├── README.md ├── batocera-41-add-tn3399-v3.patch └── rocknix-20240702-add-tn3399-v3.patch /README.md: -------------------------------------------------------------------------------- 1 | # 此仓库不再更新,移步[新仓库](https://github.com/retro98boy/batocera.linux) 2 | 3 | # 仓库作用 4 | 5 | 为TN3399_V3移植Batocera和ROCKNIX,提供补丁让Batocera和ROCKNIX的源码能编译出TN3399_V3的镜像 6 | 7 | # Batocera 8 | 9 | ## Batocera是什么 10 | 11 | Batocera是一个基于Linux的开源模拟器游戏系统,rootfs采用Buildroot构建。原项目[地址](https://github.com/batocera-linux/batocera.linux) 12 | 13 | Batocera集成了RetroArch和一些独立模拟器如PPSSPP,并且带有EmulationStation模拟器前端,使打开游戏从执行命令变成操作手柄/键盘。同时Batocera还附带Kodi媒体播放器 14 | 15 | PS:Batocera镜像只附带几个示例游戏ROM,需要玩家自己导入外部ROM 16 | 17 | ## 如何编译 18 | 19 | [这里](https://pan.baidu.com/s/1vD1iyD0hk2TpH0c3WGPV-w?pwd=elp1)打包了编译过程中需要下载的源码,解压完大小在26GiB 20 | 21 | 官方提供了基于Dokcer的编译方法,方便在任何Linux发行版上编译,步骤如下 22 | 23 | ### 下载源码 24 | 25 | ``` 26 | cd Desktop 27 | git clone -b 41 --recursive https://github.com/batocera-linux/batocera.linux.git 28 | # 将提供的额外源码解压,免去编译过程中再下载 29 | cat dl.tar.zst* | unzstd -T0 -c | tar -xv -C ~/Desktop/batocera.linux 30 | ``` 31 | 32 | ### 打补丁 33 | 34 | 将patch复制到batocera.linux目录里,cd进入其中,打上补丁: 35 | 36 | ``` 37 | patch -p1 < batocera-41-add-tn3399-v3.patch 38 | ``` 39 | 40 | ### 编译 41 | 42 | ``` 43 | make rk3399-build 44 | ``` 45 | 46 | 目标镜像在batocera.linux/output/rk3399/images/batocera/images/tn3399-v3 47 | 48 | # ROCKNIX 49 | 50 | ## ROCKNIX是什么 51 | 52 | ROCKNIX是一个基于Linux的开源模拟器游戏系统,rootfs采用CoreELEC/LibreELEC构建。原项目[地址](https://github.com/ROCKNIX/distribution) 53 | 54 | ROCKNIX集成了RetroArch和一些独立模拟器如PPSSPP,并且带有EmulationStation模拟器前端,使打开游戏从执行命令变成操作手柄/键盘 55 | 56 | PS:ROCKNIX是JELOS部分开发人员创建的一个新项目,而原JELOS已经归档 57 | 58 | ## 如何编译 59 | 60 | 官方提供了基于Dokcer的编译方法,方便在任何Linux发行版上编译,步骤如下 61 | 62 | ### 下载源码 63 | 64 | 从github拉取ROCKNIX的源码: 65 | 66 | ``` 67 | cd Desktop 68 | git clone -b main https://github.com/ROCKNIX/distribution.git 69 | cd distribution 70 | # 切换到20240702版本 71 | git checkout 74e0aa3bcefd139376201550df2af68257eab834 72 | ``` 73 | 74 | ### 打补丁 75 | 76 | 将patch复制到distribution目录里,cd进入其中,打上补丁: 77 | 78 | ``` 79 | patch -p1 < rocknix-20240702-add-tn3399-v3.patch 80 | ``` 81 | 82 | ### 编译 83 | 84 | 理论上执行`make docker-RK3399`即可完成编译,但是在编译过程中有概率会出错,所以推荐基于Docker手动编译 85 | 86 | 执行`make docker-shell`进入编译环境的shell,然后执行`make RK3399`编译,如果有错误(几乎都是包源码下载失败导致)导致停止编译,查看报错信息得知是哪一个包编译出错,单独编译: 87 | 88 | ``` 89 | export PROJECT=Rockchip DEVICE=RK3399 ARCH=arm 90 | # 或者 91 | export PROJECT=Rockchip DEVICE=RK3399 ARCH=aarch64 92 | # 取决于正在编译32 bit还是64 bit的二进制 93 | 94 | # 删除不全的源码 95 | rm -rf sources/报错的包名 96 | 97 | # 清除旧的编译 98 | ./scripts/clean 报错的包名 99 | 100 | # 重新编译 101 | ./scripts/build 报错的包名 102 | ``` 103 | 104 | 单独的包编译成功后,接着继续执行`make RK3399`编译即可 105 | 106 | 目标镜像在distribution/release,img.gz文件用于烧录镜像,tar文件用于从旧版本OTA 107 | -------------------------------------------------------------------------------- /batocera-41-add-tn3399-v3.patch: -------------------------------------------------------------------------------- 1 | diff --git a/board/batocera/rockchip/patches/alsa-ucm-conf/001-add-rockchip-rt5640.patch b/board/batocera/rockchip/patches/alsa-ucm-conf/001-add-rockchip-rt5640.patch 2 | new file mode 100644 3 | index 0000000000..0a3c93d4ff 4 | --- /dev/null 5 | +++ b/board/batocera/rockchip/patches/alsa-ucm-conf/001-add-rockchip-rt5640.patch 6 | @@ -0,0 +1,120 @@ 7 | +diff --git a/ucm2/conf.d/simple-card/rockchip,rt5640-codec-HiFi.conf b/ucm2/conf.d/simple-card/rockchip,rt5640-codec-HiFi.conf 8 | +new file mode 100644 9 | +index 0000000..45dffb5 10 | +--- /dev/null 11 | ++++ b/ucm2/conf.d/simple-card/rockchip,rt5640-codec-HiFi.conf 12 | +@@ -0,0 +1,90 @@ 13 | ++SectionVerb { 14 | ++ Value { 15 | ++ TQ HiFi 16 | ++ PlaybackChannels 2 17 | ++ CaptureChannels 2 18 | ++ } 19 | ++ 20 | ++ EnableSequence [ 21 | ++ # for speaker and headphones 22 | ++ cset "name='Stereo DAC MIXL DAC L1 Switch' on" 23 | ++ cset "name='Stereo DAC MIXR DAC R1 Switch' on" 24 | ++ ] 25 | ++} 26 | ++ 27 | ++SectionDevice."Speaker" { 28 | ++ Comment "Internal Speakers" 29 | ++ 30 | ++ ConflictingDevice [ 31 | ++ "Headphones" 32 | ++ ] 33 | ++ 34 | ++ Value { 35 | ++ PlaybackPriority 200 36 | ++ PlaybackPCM "hw:${CardId},0" 37 | ++ } 38 | ++ 39 | ++ EnableSequence [ 40 | ++ cset "name='SPOL MIX DAC L1 Switch' on" 41 | ++ cset "name='SPOR MIX DAC R1 Switch' on" 42 | ++ cset "name='Speaker L Playback Switch' on" 43 | ++ cset "name='Speaker R Playback Switch' on" 44 | ++ ] 45 | ++ 46 | ++ DisableSequence [ 47 | ++ cset "name='Speaker L Playback Switch' off" 48 | ++ cset "name='Speaker R Playback Switch' off" 49 | ++ cset "name='SPOL MIX DAC L1 Switch' off" 50 | ++ cset "name='SPOR MIX DAC R1 Switch' off" 51 | ++ ] 52 | ++} 53 | ++ 54 | ++SectionDevice."Headphones" { 55 | ++ Comment "Headphones" 56 | ++ 57 | ++ ConflictingDevice [ 58 | ++ "Speaker" 59 | ++ ] 60 | ++ 61 | ++ Value { 62 | ++ PlaybackPriority 100 63 | ++ PlaybackPCM "hw:${CardId},0" 64 | ++ JackControl "Headphone Jack" 65 | ++ JackHWMute "Speaker" 66 | ++ } 67 | ++ 68 | ++ EnableSequence [ 69 | ++ cset "name='HPO MIX DAC1 Switch' on" 70 | ++ cset "name='HP L Playback Switch' on" 71 | ++ cset "name='HP R Playback Switch' on" 72 | ++ ] 73 | ++ 74 | ++ DisableSequence [ 75 | ++ cset "name='HP L Playback Switch' off" 76 | ++ cset "name='HP R Playback Switch' off" 77 | ++ cset "name='HPO MIX DAC1 Switch' off" 78 | ++ ] 79 | ++} 80 | ++ 81 | ++SectionDevice."Mic" { 82 | ++ Comment "Internal Microphone" 83 | ++ 84 | ++ Value { 85 | ++ CapturePriority 100 86 | ++ CapturePCM "hw:${CardId},0" 87 | ++ } 88 | ++ 89 | ++ EnableSequence [ 90 | ++ cset "name='RECMIXL BST1 Switch' on" 91 | ++ cset "name='RECMIXR BST1 Switch' on" 92 | ++ cset "name='Stereo ADC MIXL ADC1 Switch' on" 93 | ++ cset "name='Stereo ADC MIXR ADC1 Switch' on" 94 | ++ ] 95 | ++ 96 | ++ DisableSequence [ 97 | ++ cset "name='Stereo ADC MIXL ADC1 Switch' off" 98 | ++ cset "name='Stereo ADC MIXR ADC1 Switch' off" 99 | ++ cset "name='RECMIXL BST1 Switch' off" 100 | ++ cset "name='RECMIXR BST1 Switch' off" 101 | ++ ] 102 | ++} 103 | +diff --git a/ucm2/conf.d/simple-card/rockchip,rt5640-codec.conf b/ucm2/conf.d/simple-card/rockchip,rt5640-codec.conf 104 | +new file mode 100644 105 | +index 0000000..1a3e0b9 106 | +--- /dev/null 107 | ++++ b/ucm2/conf.d/simple-card/rockchip,rt5640-codec.conf 108 | +@@ -0,0 +1,18 @@ 109 | ++Syntax 4 110 | ++ 111 | ++Comment "Rockchip ALC5640 card" 112 | ++ 113 | ++SectionUseCase."HiFi" { 114 | ++ File "rockchip,rt5640-codec-HiFi.conf" 115 | ++ Comment "Default" 116 | ++} 117 | ++ 118 | ++BootSequence [ 119 | ++ # speaker default 120 | ++ cset "name='Stereo DAC MIXL DAC L1 Switch' on" 121 | ++ cset "name='Stereo DAC MIXR DAC R1 Switch' on" 122 | ++ cset "name='SPOL MIX DAC L1 Switch' on" 123 | ++ cset "name='SPOR MIX DAC R1 Switch' on" 124 | ++ cset "name='Speaker L Playback Switch' on" 125 | ++ cset "name='Speaker R Playback Switch' on" 126 | ++] 127 | diff --git a/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3-with-1024x600-single-8bit-lvds-panel.dts b/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3-with-1024x600-single-8bit-lvds-panel.dts 128 | new file mode 100644 129 | index 0000000000..c75954305b 130 | --- /dev/null 131 | +++ b/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3-with-1024x600-single-8bit-lvds-panel.dts 132 | @@ -0,0 +1,18 @@ 133 | +/dts-v1/; 134 | + 135 | +#include "rk3399-tn3399-v3-with-lvds-panel.dtsi" 136 | + 137 | +/ { 138 | + vcc_panel: vcc-panel { 139 | + regulator-min-microvolt = <3300000>; 140 | + regulator-max-microvolt = <3300000>; 141 | + vin-supply = <&vcc3v3_sys>; 142 | + }; 143 | +}; 144 | + 145 | +&mipi_dsi { 146 | + panel@0 { 147 | + compatible = "tc358775,1024x600-single-8bit"; 148 | + }; 149 | +}; 150 | + 151 | diff --git a/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3-with-lvds-panel.dtsi b/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3-with-lvds-panel.dtsi 152 | new file mode 100644 153 | index 0000000000..f2bda20a1b 154 | --- /dev/null 155 | +++ b/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3-with-lvds-panel.dtsi 156 | @@ -0,0 +1,92 @@ 157 | +/dts-v1/; 158 | + 159 | +#include "rk3399-tn3399-v3.dts" 160 | + 161 | +/ { 162 | + backlight: backlight { 163 | + compatible = "pwm-backlight"; 164 | + enable-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; 165 | + pwms = <&pwm0 0 25000 0>; 166 | + brightness-levels = < 167 | + 0 1 2 3 4 5 6 7 168 | + 8 9 10 11 12 13 14 15 169 | + 16 17 18 19 20 21 22 23 170 | + 24 25 26 27 28 29 30 31 171 | + 32 33 34 35 36 37 38 39 172 | + 40 41 42 43 44 45 46 47 173 | + 48 49 50 51 52 53 54 55 174 | + 56 57 58 59 60 61 62 63 175 | + 64 65 66 67 68 69 70 71 176 | + 72 73 74 75 76 77 78 79 177 | + 80 81 82 83 84 85 86 87 178 | + 88 89 90 91 92 93 94 95 179 | + 96 97 98 99 100 101 102 103 180 | + 104 105 106 107 108 109 110 111 181 | + 112 113 114 115 116 117 118 119 182 | + 120 121 122 123 124 125 126 127 183 | + 128 129 130 131 132 133 134 135 184 | + 136 137 138 139 140 141 142 143 185 | + 144 145 146 147 148 149 150 151 186 | + 152 153 154 155 156 157 158 159 187 | + 160 161 162 163 164 165 166 167 188 | + 168 169 170 171 172 173 174 175 189 | + 176 177 178 179 180 181 182 183 190 | + 184 185 186 187 188 189 190 191 191 | + 192 193 194 195 196 197 198 199 192 | + 200 201 202 203 204 205 206 207 193 | + 208 209 210 211 212 213 214 215 194 | + 216 217 218 219 220 221 222 223 195 | + 224 225 226 227 228 229 230 231 196 | + 232 233 234 235 236 237 238 239 197 | + 240 241 242 243 244 245 246 247 198 | + 248 249 250 251 252 253 254 255>; 199 | + default-brightness-level = <200>; 200 | + }; 201 | + 202 | + vcc_panel: vcc-panel { 203 | + compatible = "regulator-fixed"; 204 | + enable-active-high; 205 | + gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; 206 | + pinctrl-names = "default"; 207 | + pinctrl-0 = <&vcc_panel_en>; 208 | + regulator-name = "vcc_panel"; 209 | + }; 210 | +}; 211 | + 212 | +&mipi_dsi { 213 | + clock-master; 214 | + status = "okay"; 215 | + 216 | + ports { 217 | + mipi_out: port@1 { 218 | + #address-cells = <0>; 219 | + #size-cells = <0>; 220 | + reg = <1>; 221 | + 222 | + dsi_out: endpoint { 223 | + remote-endpoint = <&tc358775_in>; 224 | + }; 225 | + }; 226 | + }; 227 | + 228 | + panel@0 { 229 | + reg = <0>; 230 | + backlight = <&backlight>; 231 | + power-supply = <&vcc_panel>; 232 | + 233 | + port { 234 | + tc358775_in: endpoint { 235 | + remote-endpoint = <&dsi_out>; 236 | + }; 237 | + }; 238 | + }; 239 | +}; 240 | + 241 | +&pinctrl { 242 | + panel { 243 | + vcc_panel_en: vcc-panel-en { 244 | + rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 245 | + }; 246 | + }; 247 | +}; 248 | + 249 | diff --git a/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3.dts b/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3.dts 250 | new file mode 100644 251 | index 0000000000..3e1eecce89 252 | --- /dev/null 253 | +++ b/board/batocera/rockchip/rk3399/dts/rk3399-tn3399-v3.dts 254 | @@ -0,0 +1,806 @@ 255 | +/dts-v1/; 256 | + 257 | +#include 258 | +#include 259 | +#include "rockchip/rk3399.dtsi" 260 | +#include "rockchip/rk3399-op1-opp.dtsi" 261 | + 262 | +/ { 263 | + model = "TIANNUO TN3399_V3"; 264 | + compatible = "tiannuo,tn3399-v3", "rockchip,rk3399"; 265 | + 266 | + aliases { 267 | + mmc0 = &sdhci; 268 | + mmc1 = &sdmmc; 269 | + mmc2 = &sdio0; 270 | + }; 271 | + 272 | + chosen { 273 | + stdout-path = "serial2:1500000n8"; 274 | + }; 275 | + 276 | + clkin_gmac: external-gmac-clock { 277 | + compatible = "fixed-clock"; 278 | + clock-frequency = <125000000>; 279 | + clock-output-names = "clkin_gmac"; 280 | + #clock-cells = <0>; 281 | + }; 282 | + 283 | + leds { 284 | + compatible = "gpio-leds"; 285 | + pinctrl-names = "default"; 286 | + pinctrl-0 = <&sys_led>; 287 | + 288 | + sys-led { 289 | + label = "sys"; 290 | + gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; 291 | + linux,default-trigger = "heartbeat"; 292 | + }; 293 | + }; 294 | + 295 | + rt5640-sound { 296 | + compatible = "simple-audio-card"; 297 | + pinctrl-names = "default"; 298 | + pinctrl-0 = <&hp_det>; 299 | + simple-audio-card,name = "rockchip,rt5640-codec"; 300 | + simple-audio-card,format = "i2s"; 301 | + simple-audio-card,mclk-fs = <256>; 302 | + simple-audio-card,widgets = 303 | + "Microphone", "Internal Microphone", 304 | + "Headphone", "Headphones", 305 | + "Speaker", "Internal Speakers"; 306 | + simple-audio-card,routing = 307 | + "Internal Microphone", "MICBIAS1", 308 | + "IN1P", "Internal Microphone", 309 | + "IN1N", "Internal Microphone", 310 | + "Headphones", "HPOL", 311 | + "Headphones", "HPOR", 312 | + "NS4258 INL", "SPOLP", 313 | + "NS4258 INL", "SPOLN", 314 | + "NS4258 INR", "SPORP", 315 | + "NS4258 INR", "SPORN", 316 | + "Internal Speakers", "NS4258 OUTL", 317 | + "Internal Speakers", "NS4258 OUTR"; 318 | + simple-audio-card,hp-det-gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>; 319 | + simple-audio-card,aux-devs = <&speaker_amp>; 320 | + simple-audio-card,pin-switches = "Internal Speakers"; 321 | + 322 | + simple-audio-card,cpu { 323 | + sound-dai = <&i2s1>; 324 | + }; 325 | + 326 | + simple-audio-card,codec { 327 | + sound-dai = <&rt5640>; 328 | + }; 329 | + }; 330 | + 331 | + speaker_amp: speaker-amp { 332 | + compatible = "simple-audio-amplifier"; 333 | + pinctrl-names = "default"; 334 | + pinctrl-0 = <&ns4258_en>; 335 | + enable-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; 336 | + sound-name-prefix = "NS4258"; 337 | + VCC-supply = <&audio_5v>; 338 | + }; 339 | + 340 | + sdio_pwrseq: sdio-pwrseq { 341 | + compatible = "mmc-pwrseq-simple"; 342 | + clocks = <&rk808 1>; 343 | + clock-names = "lpo"; 344 | + pinctrl-names = "default"; 345 | + pinctrl-0 = <&wifi_enable_h>; 346 | + reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; 347 | + }; 348 | + 349 | + dc12v: dc12v { 350 | + compatible = "regulator-fixed"; 351 | + regulator-name = "dc12v"; 352 | + regulator-always-on; 353 | + regulator-boot-on; 354 | + regulator-min-microvolt = <12000000>; 355 | + regulator-max-microvolt = <12000000>; 356 | + }; 357 | + 358 | + vcc5v0_sys: vcc5v0-sys { 359 | + compatible = "regulator-fixed"; 360 | + regulator-name = "vcc5v0_sys"; 361 | + regulator-always-on; 362 | + regulator-boot-on; 363 | + regulator-min-microvolt = <5000000>; 364 | + regulator-max-microvolt = <5000000>; 365 | + vin-supply = <&dc12v>; 366 | + }; 367 | + 368 | + usb_vbus: usb-vbus { 369 | + compatible = "regulator-fixed"; 370 | + enable-active-high; 371 | + gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; 372 | + pinctrl-names = "default"; 373 | + pinctrl-0 = <&vcc5v0_typec0_en>; 374 | + regulator-name = "usb_vbus"; 375 | + regulator-always-on; 376 | + regulator-boot-on; 377 | + regulator-min-microvolt = <5000000>; 378 | + regulator-max-microvolt = <5000000>; 379 | + vin-supply = <&vcc5v0_sys>; 380 | + }; 381 | + 382 | + vcc3v3_sys: vcc3v3-sys { 383 | + compatible = "regulator-fixed"; 384 | + regulator-name = "vcc3v3_sys"; 385 | + regulator-always-on; 386 | + regulator-boot-on; 387 | + regulator-min-microvolt = <3300000>; 388 | + regulator-max-microvolt = <3300000>; 389 | + vin-supply = <&dc12v>; 390 | + }; 391 | + 392 | + vcc3v0_sd: vcc3v0-sd { 393 | + compatible = "regulator-fixed"; 394 | + enable-active-high; 395 | + gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; 396 | + pinctrl-names = "default"; 397 | + pinctrl-0 = <&sdmmc0_pwr_h>; 398 | + regulator-name = "vcc3v0_sd"; 399 | + regulator-always-on; 400 | + regulator-boot-on; 401 | + regulator-min-microvolt = <3300000>; 402 | + regulator-max-microvolt = <3300000>; 403 | + vin-supply = <&vcc3v3_sys>; 404 | + }; 405 | + 406 | + vcca1v8_s3: vcca1v8-s3 { 407 | + compatible = "regulator-fixed"; 408 | + regulator-name = "vcca1v8_s3"; 409 | + regulator-always-on; 410 | + regulator-boot-on; 411 | + regulator-min-microvolt = <1800000>; 412 | + regulator-max-microvolt = <1800000>; 413 | + vin-supply = <&vcc3v3_sys>; 414 | + }; 415 | + 416 | + vcca0v9_s3: vcca0v9-s3 { 417 | + compatible = "regulator-fixed"; 418 | + regulator-name = "vcca0v9_s3"; 419 | + regulator-always-on; 420 | + regulator-boot-on; 421 | + regulator-min-microvolt = <900000>; 422 | + regulator-max-microvolt = <900000>; 423 | + vin-supply = <&vcc_1v8>; 424 | + }; 425 | + 426 | + vcc_lan: vcc-lan { 427 | + compatible = "regulator-fixed"; 428 | + regulator-name = "vcc_lan"; 429 | + regulator-always-on; 430 | + regulator-boot-on; 431 | + regulator-min-microvolt = <3300000>; 432 | + regulator-max-microvolt = <3300000>; 433 | + vin-supply = <&vcc3v3_sys>; 434 | + }; 435 | + 436 | + vdd_log: vdd-log { 437 | + compatible = "pwm-regulator"; 438 | + pwms = <&pwm2 0 25000 1>; 439 | + pwm-supply = <&vcc3v3_sys>; 440 | + regulator-name = "vdd_log"; 441 | + regulator-always-on; 442 | + regulator-boot-on; 443 | + regulator-min-microvolt = <800000>; 444 | + regulator-max-microvolt = <1400000>; 445 | + }; 446 | + 447 | + audio_5v: audio-5v { 448 | + compatible = "regulator-fixed"; 449 | + regulator-name = "audio_5v"; 450 | + regulator-always-on; 451 | + regulator-boot-on; 452 | + regulator-min-microvolt = <5000000>; 453 | + regulator-max-microvolt = <5000000>; 454 | + vin-supply = <&vcc5v0_sys>; 455 | + }; 456 | +}; 457 | + 458 | +&cpu_l0 { 459 | + cpu-supply = <&vdd_cpu_l>; 460 | +}; 461 | + 462 | +&cpu_l1 { 463 | + cpu-supply = <&vdd_cpu_l>; 464 | +}; 465 | + 466 | +&cpu_l2 { 467 | + cpu-supply = <&vdd_cpu_l>; 468 | +}; 469 | + 470 | +&cpu_l3 { 471 | + cpu-supply = <&vdd_cpu_l>; 472 | +}; 473 | + 474 | +&cpu_b0 { 475 | + cpu-supply = <&vdd_cpu_b>; 476 | +}; 477 | + 478 | +&cpu_b1 { 479 | + cpu-supply = <&vdd_cpu_b>; 480 | +}; 481 | + 482 | +&emmc_phy { 483 | + status = "okay"; 484 | +}; 485 | + 486 | +&gmac { 487 | + assigned-clock-parents = <&clkin_gmac>; 488 | + assigned-clocks = <&cru SCLK_RMII_SRC>; 489 | + clock_in_out = "input"; 490 | + pinctrl-names = "default"; 491 | + pinctrl-0 = <&rgmii_pins>, <&phy_rst_l>; 492 | + phy-handle = <&rtl8211e>; 493 | + phy-mode = "rgmii"; 494 | + phy-supply = <&vcc_lan>; 495 | + tx_delay = <0x28>; 496 | + rx_delay = <0x11>; 497 | + status = "okay"; 498 | + 499 | + mdio { 500 | + compatible = "snps,dwmac-mdio"; 501 | + #address-cells = <1>; 502 | + #size-cells = <0>; 503 | + 504 | + rtl8211e: ethernet-phy@0 { 505 | + reg = <0>; 506 | + reset-assert-us = <10000>; 507 | + reset-deassert-us = <30000>; 508 | + reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; 509 | + }; 510 | + }; 511 | +}; 512 | + 513 | +&gpu { 514 | + mali-supply = <&vdd_gpu>; 515 | + status = "okay"; 516 | +}; 517 | + 518 | +&hdmi { 519 | + avdd-0v9-supply = <&vcca0v9_s3>; 520 | + avdd-1v8-supply = <&vcca1v8_s3>; 521 | + ddc-i2c-bus = <&i2c3>; 522 | + pinctrl-names = "default"; 523 | + pinctrl-0 = <&hdmi_cec>; 524 | + status = "okay"; 525 | +}; 526 | + 527 | +&hdmi_sound { 528 | + status = "okay"; 529 | +}; 530 | + 531 | +&i2c0 { 532 | + clock-frequency = <400000>; 533 | + i2c-scl-rising-time-ns = <168>; 534 | + i2c-scl-falling-time-ns = <4>; 535 | + status = "okay"; 536 | + 537 | + rk808: pmic@1b { 538 | + compatible = "rockchip,rk808"; 539 | + reg = <0x1b>; 540 | + interrupt-parent = <&gpio1>; 541 | + interrupts = <21 IRQ_TYPE_LEVEL_LOW>; 542 | + #clock-cells = <1>; 543 | + clock-output-names = "xin32k", "rk808-clkout2"; 544 | + pinctrl-names = "default"; 545 | + pinctrl-0 = <&pmic_int_l>; 546 | + rockchip,system-power-controller; 547 | + wakeup-source; 548 | + 549 | + vcc1-supply = <&vcc3v3_sys>; 550 | + vcc2-supply = <&vcc3v3_sys>; 551 | + vcc3-supply = <&vcc3v3_sys>; 552 | + vcc4-supply = <&vcc3v3_sys>; 553 | + vcc6-supply = <&vcc3v3_sys>; 554 | + vcc7-supply = <&vcc3v3_sys>; 555 | + vcc8-supply = <&vcc3v3_sys>; 556 | + vcc9-supply = <&vcc3v3_sys>; 557 | + vcc10-supply = <&vcc3v3_sys>; 558 | + vcc11-supply = <&vcc3v3_sys>; 559 | + vcc12-supply = <&vcc3v3_sys>; 560 | + vddio-supply = <&vcc_1v8>; 561 | + 562 | + regulators { 563 | + vdd_center: DCDC_REG1 { 564 | + regulator-name = "vdd_center"; 565 | + regulator-always-on; 566 | + regulator-boot-on; 567 | + regulator-min-microvolt = <750000>; 568 | + regulator-max-microvolt = <1350000>; 569 | + regulator-ramp-delay = <6001>; 570 | + regulator-state-mem { 571 | + regulator-off-in-suspend; 572 | + }; 573 | + }; 574 | + 575 | + vdd_cpu_l: DCDC_REG2 { 576 | + regulator-name = "vdd_cpu_l"; 577 | + regulator-always-on; 578 | + regulator-boot-on; 579 | + regulator-min-microvolt = <750000>; 580 | + regulator-max-microvolt = <1350000>; 581 | + regulator-ramp-delay = <6001>; 582 | + regulator-state-mem { 583 | + regulator-off-in-suspend; 584 | + }; 585 | + }; 586 | + 587 | + vcc_ddr: DCDC_REG3 { 588 | + regulator-name = "vcc_ddr"; 589 | + regulator-always-on; 590 | + regulator-boot-on; 591 | + regulator-state-mem { 592 | + regulator-on-in-suspend; 593 | + }; 594 | + }; 595 | + 596 | + vcc_1v8: DCDC_REG4 { 597 | + regulator-name = "vcc_1v8"; 598 | + regulator-always-on; 599 | + regulator-boot-on; 600 | + regulator-min-microvolt = <1800000>; 601 | + regulator-max-microvolt = <1800000>; 602 | + regulator-state-mem { 603 | + regulator-on-in-suspend; 604 | + regulator-suspend-microvolt = <1800000>; 605 | + }; 606 | + }; 607 | + 608 | + vcc1v8_dvp: LDO_REG1 { 609 | + regulator-name = "vcc1v8_dvp"; 610 | + regulator-always-on; 611 | + regulator-boot-on; 612 | + regulator-min-microvolt = <1800000>; 613 | + regulator-max-microvolt = <1800000>; 614 | + regulator-state-mem { 615 | + regulator-off-in-suspend; 616 | + }; 617 | + }; 618 | + 619 | + vcc3v0_touch: LDO_REG2 { 620 | + regulator-name = "vcc3v0_touch"; 621 | + regulator-min-microvolt = <3000000>; 622 | + regulator-max-microvolt = <3000000>; 623 | + regulator-state-mem { 624 | + regulator-off-in-suspend; 625 | + }; 626 | + }; 627 | + 628 | + vcc1v8_pmupll: LDO_REG3 { 629 | + regulator-name = "vcc1v8_pmupll"; 630 | + regulator-always-on; 631 | + regulator-boot-on; 632 | + regulator-min-microvolt = <1800000>; 633 | + regulator-max-microvolt = <1800000>; 634 | + regulator-state-mem { 635 | + regulator-on-in-suspend; 636 | + regulator-suspend-microvolt = <1800000>; 637 | + }; 638 | + }; 639 | + 640 | + vcc_sdio: LDO_REG4 { 641 | + regulator-name = "vcc_sdio"; 642 | + regulator-always-on; 643 | + regulator-boot-on; 644 | + regulator-min-microvolt = <1800000>; 645 | + regulator-max-microvolt = <3300000>; 646 | + regulator-state-mem { 647 | + regulator-on-in-suspend; 648 | + regulator-suspend-microvolt = <3300000>; 649 | + }; 650 | + }; 651 | + 652 | + vcca3v0_codec: LDO_REG5 { 653 | + regulator-name = "vcca3v0_codec"; 654 | + regulator-always-on; 655 | + regulator-boot-on; 656 | + regulator-min-microvolt = <3000000>; 657 | + regulator-max-microvolt = <3000000>; 658 | + regulator-state-mem { 659 | + regulator-off-in-suspend; 660 | + }; 661 | + }; 662 | + 663 | + vcc_1v5: LDO_REG6 { 664 | + regulator-name = "vcc_1v5"; 665 | + regulator-always-on; 666 | + regulator-boot-on; 667 | + regulator-min-microvolt = <1500000>; 668 | + regulator-max-microvolt = <1500000>; 669 | + regulator-state-mem { 670 | + regulator-on-in-suspend; 671 | + regulator-suspend-microvolt = <1500000>; 672 | + }; 673 | + }; 674 | + 675 | + vcca1v8_codec: LDO_REG7 { 676 | + regulator-name = "vcca1v8_codec"; 677 | + regulator-always-on; 678 | + regulator-boot-on; 679 | + regulator-min-microvolt = <1800000>; 680 | + regulator-max-microvolt = <1800000>; 681 | + regulator-state-mem { 682 | + regulator-off-in-suspend; 683 | + }; 684 | + }; 685 | + 686 | + vcc_3v0: LDO_REG8 { 687 | + regulator-name = "vcc_3v0"; 688 | + regulator-always-on; 689 | + regulator-boot-on; 690 | + regulator-min-microvolt = <3000000>; 691 | + regulator-max-microvolt = <3000000>; 692 | + regulator-state-mem { 693 | + regulator-on-in-suspend; 694 | + regulator-suspend-microvolt = <3000000>; 695 | + }; 696 | + }; 697 | + 698 | + vcc3v3_s3: SWITCH_REG1 { 699 | + regulator-name = "vcc3v3_s3"; 700 | + regulator-always-on; 701 | + regulator-boot-on; 702 | + regulator-state-mem { 703 | + regulator-off-in-suspend; 704 | + }; 705 | + }; 706 | + 707 | + vcc3v3_s0: SWITCH_REG2 { 708 | + regulator-name = "vcc3v3_s0"; 709 | + regulator-state-mem { 710 | + regulator-off-in-suspend; 711 | + }; 712 | + }; 713 | + }; 714 | + }; 715 | + 716 | + vdd_cpu_b: regulator@40 { 717 | + compatible = "silergy,syr827"; 718 | + reg = <0x40>; 719 | + fcs,suspend-voltage-selector = <1>; 720 | + pinctrl-names = "default"; 721 | + pinctrl-0 = <&vsel1_pin>; 722 | + regulator-name = "vdd_cpu_b"; 723 | + regulator-min-microvolt = <712500>; 724 | + regulator-max-microvolt = <1500000>; 725 | + regulator-ramp-delay = <1000>; 726 | + regulator-always-on; 727 | + regulator-boot-on; 728 | + vin-supply = <&vcc3v3_sys>; 729 | + 730 | + regulator-state-mem { 731 | + regulator-off-in-suspend; 732 | + }; 733 | + }; 734 | + 735 | + vdd_gpu: regulator@41 { 736 | + compatible = "silergy,syr828"; 737 | + reg = <0x41>; 738 | + fcs,suspend-voltage-selector = <1>; 739 | + pinctrl-names = "default"; 740 | + pinctrl-0 = <&vsel2_pin>; 741 | + regulator-name = "vdd_gpu"; 742 | + regulator-min-microvolt = <712500>; 743 | + regulator-max-microvolt = <1500000>; 744 | + regulator-ramp-delay = <1000>; 745 | + regulator-always-on; 746 | + regulator-boot-on; 747 | + vin-supply = <&vcc3v3_sys>; 748 | + 749 | + regulator-state-mem { 750 | + regulator-off-in-suspend; 751 | + }; 752 | + }; 753 | +}; 754 | + 755 | +&i2c1 { 756 | + i2c-scl-rising-time-ns = <300>; 757 | + i2c-scl-falling-time-ns = <15>; 758 | + status = "okay"; 759 | + 760 | + rt5640: rt5640@1c { 761 | + compatible = "realtek,rt5640"; 762 | + reg = <0x1c>; 763 | + clocks = <&cru SCLK_I2S_8CH_OUT>; 764 | + clock-names = "mclk"; 765 | + realtek,in1-differential; 766 | + #sound-dai-cells = <0>; 767 | + pinctrl-names = "default"; 768 | + pinctrl-0 = <&ear_ctrl>; 769 | + }; 770 | +}; 771 | + 772 | +&i2c2 { 773 | + status = "okay"; 774 | +}; 775 | + 776 | +&i2c3 { 777 | + status = "okay"; 778 | +}; 779 | + 780 | +&i2c4 { 781 | + status = "okay"; 782 | +}; 783 | + 784 | +&i2s0 { 785 | + #sound-dai-cells = <0>; 786 | + status = "okay"; 787 | +}; 788 | + 789 | +&i2s1 { 790 | + rockchip,playback-channels = <2>; 791 | + rockchip,capture-channels = <2>; 792 | + #sound-dai-cells = <0>; 793 | + status = "okay"; 794 | +}; 795 | + 796 | +&i2s2 { 797 | + #sound-dai-cells = <0>; 798 | + status = "okay"; 799 | +}; 800 | + 801 | +&io_domains { 802 | + bt656-supply = <&vcc1v8_dvp>; 803 | + audio-supply = <&vcca1v8_codec>; 804 | + sdmmc-supply = <&vcc_sdio>; 805 | + gpio1830-supply = <&vcc_3v0>; 806 | + status = "okay"; 807 | +}; 808 | + 809 | +&pinctrl { 810 | + gmac { 811 | + phy_rst_l: phy-rst-l { 812 | + rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; 813 | + }; 814 | + }; 815 | + 816 | + bt { 817 | + bt_enable_h: bt-enable-h { 818 | + rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; 819 | + }; 820 | + 821 | + bt_host_wake_l: bt-host-wake-l { 822 | + rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 823 | + }; 824 | + 825 | + bt_wake_l: bt-wake-l { 826 | + rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 827 | + }; 828 | + }; 829 | + 830 | + rt5640 { 831 | + ear_ctrl: ear-ctrl { 832 | + rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_output_high>; 833 | + }; 834 | + 835 | + hp_det: hp-det { 836 | + rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; 837 | + }; 838 | + 839 | + ns4258_en: ns4258-en { 840 | + rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 841 | + }; 842 | + }; 843 | + 844 | + leds { 845 | + sys_led: sys-led { 846 | + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; 847 | + }; 848 | + }; 849 | + 850 | + pmic { 851 | + pmic_int_l: pmic-int-l { 852 | + rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; 853 | + }; 854 | + 855 | + vsel1_pin: vsel1-pin { 856 | + rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; 857 | + }; 858 | + 859 | + vsel2_pin: vsel2-pin { 860 | + rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; 861 | + }; 862 | + }; 863 | + 864 | + sdmmc { 865 | + sdmmc0_pwr_h: sdmmc0-pwr-h { 866 | + rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; 867 | + }; 868 | + }; 869 | + 870 | + usb2 { 871 | + vcc5v0_typec0_en: vcc5v0-typec0-en { 872 | + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; 873 | + }; 874 | + }; 875 | + 876 | + wifi { 877 | + wifi_enable_h: wifi-enable-h { 878 | + rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 879 | + }; 880 | + 881 | + wifi_host_wake_l: wifi-host-wake-l { 882 | + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; 883 | + }; 884 | + }; 885 | +}; 886 | + 887 | +&pmu_io_domains { 888 | + pmu1830-supply = <&vcc_1v8>; 889 | + status = "okay"; 890 | +}; 891 | + 892 | +&pwm0 { 893 | + status = "okay"; 894 | +}; 895 | + 896 | +&pwm2 { 897 | + status = "okay"; 898 | +}; 899 | + 900 | +&saradc { 901 | + vref-supply = <&vcca1v8_s3>; 902 | + status = "okay"; 903 | +}; 904 | + 905 | +&sdhci { 906 | + max-frequency = <150000000>; 907 | + bus-width = <8>; 908 | + mmc-hs200-1_8v; 909 | + non-removable; 910 | + status = "okay"; 911 | +}; 912 | + 913 | +&sdio0 { 914 | + bus-width = <4>; 915 | + clock-frequency = <50000000>; 916 | + cap-sdio-irq; 917 | + cap-sd-highspeed; 918 | + keep-power-in-suspend; 919 | + mmc-pwrseq = <&sdio_pwrseq>; 920 | + non-removable; 921 | + pinctrl-names = "default"; 922 | + pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; 923 | + #address-cells = <1>; 924 | + #size-cells = <0>; 925 | + status = "okay"; 926 | + 927 | + brcmf: wifi@1 { 928 | + compatible = "brcm,bcm43455-fmac"; 929 | + reg = <1>; 930 | + interrupt-parent = <&gpio0>; 931 | + interrupts = ; 932 | + interrupt-names = "host-wake"; 933 | + pinctrl-names = "default"; 934 | + pinctrl-0 = <&wifi_host_wake_l>; 935 | + }; 936 | +}; 937 | + 938 | +&sdmmc { 939 | + bus-width = <4>; 940 | + cap-mmc-highspeed; 941 | + cap-sd-highspeed; 942 | + cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 943 | + disable-wp; 944 | + max-frequency = <150000000>; 945 | + pinctrl-names = "default"; 946 | + pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>; 947 | + vmmc-supply = <&vcc3v0_sd>; 948 | + vqmmc-supply = <&vcc_sdio>; 949 | + status = "okay"; 950 | +}; 951 | + 952 | +&spi1 { 953 | + status = "okay"; 954 | +}; 955 | + 956 | +&tcphy0 { 957 | + status = "okay"; 958 | +}; 959 | + 960 | +&tcphy1 { 961 | + status = "okay"; 962 | +}; 963 | + 964 | +&tsadc { 965 | + /* tshut mode 0:CRU 1:GPIO */ 966 | + rockchip,hw-tshut-mode = <1>; 967 | + /* tshut polarity 0:LOW 1:HIGH */ 968 | + rockchip,hw-tshut-polarity = <1>; 969 | + status = "okay"; 970 | +}; 971 | + 972 | +&u2phy0 { 973 | + status = "okay"; 974 | + 975 | + u2phy0_host: host-port { 976 | + phy-supply = <&usb_vbus>; 977 | + status = "okay"; 978 | + }; 979 | +}; 980 | + 981 | +&u2phy1 { 982 | + status = "okay"; 983 | + 984 | + u2phy1_host: host-port { 985 | + phy-supply = <&usb_vbus>; 986 | + status = "okay"; 987 | + }; 988 | +}; 989 | + 990 | +&uart0 { 991 | + pinctrl-names = "default"; 992 | + pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; 993 | + status = "okay"; 994 | + 995 | + bluetooth { 996 | + compatible = "brcm,bcm4345c5"; 997 | + clocks = <&rk808 1>; 998 | + clock-names = "lpo"; 999 | + device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; 1000 | + host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; 1001 | + shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; 1002 | + pinctrl-names = "default"; 1003 | + pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>; 1004 | + }; 1005 | +}; 1006 | + 1007 | +&uart2 { 1008 | + status = "okay"; 1009 | +}; 1010 | + 1011 | +&usb_host0_ehci { 1012 | + status = "okay"; 1013 | +}; 1014 | + 1015 | +&usb_host0_ohci { 1016 | + status = "okay"; 1017 | +}; 1018 | + 1019 | +&usb_host1_ehci { 1020 | + status = "okay"; 1021 | +}; 1022 | + 1023 | +&usb_host1_ohci { 1024 | + status = "okay"; 1025 | +}; 1026 | + 1027 | +&usbdrd3_0 { 1028 | + status = "okay"; 1029 | +}; 1030 | + 1031 | +&usbdrd_dwc3_0 { 1032 | + dr_mode = "host"; 1033 | + status = "okay"; 1034 | +}; 1035 | + 1036 | +&usbdrd3_1 { 1037 | + status = "okay"; 1038 | +}; 1039 | + 1040 | +&usbdrd_dwc3_1 { 1041 | + dr_mode = "host"; 1042 | + status = "okay"; 1043 | +}; 1044 | + 1045 | +&vopb { 1046 | + status = "okay"; 1047 | +}; 1048 | + 1049 | +&vopb_mmu { 1050 | + status = "okay"; 1051 | +}; 1052 | + 1053 | +&vopl { 1054 | + status = "okay"; 1055 | +}; 1056 | + 1057 | +&vopl_mmu { 1058 | + status = "okay"; 1059 | +}; 1060 | + 1061 | diff --git a/board/batocera/rockchip/rk3399/linux-defconfig.config b/board/batocera/rockchip/rk3399/linux-defconfig.config 1062 | index ad55083400..49f2486e5e 100644 1063 | --- a/board/batocera/rockchip/rk3399/linux-defconfig.config 1064 | +++ b/board/batocera/rockchip/rk3399/linux-defconfig.config 1065 | @@ -4687,6 +4687,7 @@ CONFIG_DRM_PANEL_VISIONOX_RM69299=y 1066 | # CONFIG_DRM_PANEL_VISIONOX_R66451 is not set 1067 | CONFIG_DRM_PANEL_WIDECHIPS_WS2401=y 1068 | CONFIG_DRM_PANEL_XINPENG_XPP055C272=y 1069 | +CONFIG_DRM_PANEL_TOSHIBA_TC358775=y 1070 | # end of Display Panels 1071 | 1072 | CONFIG_DRM_BRIDGE=y 1073 | @@ -5156,7 +5157,7 @@ CONFIG_SND_SOC_RT5514=y 1074 | CONFIG_SND_SOC_RT5514_SPI=y 1075 | # CONFIG_SND_SOC_RT5616 is not set 1076 | # CONFIG_SND_SOC_RT5631 is not set 1077 | -# CONFIG_SND_SOC_RT5640 is not set 1078 | +CONFIG_SND_SOC_RT5640=y 1079 | CONFIG_SND_SOC_RT5645=y 1080 | CONFIG_SND_SOC_RT5651=y 1081 | # CONFIG_SND_SOC_RT5659 is not set 1082 | diff --git a/board/batocera/rockchip/rk3399/linux_patches/linux-0000-drivers-gpu-drm-panel-add-tc358775.patch b/board/batocera/rockchip/rk3399/linux_patches/linux-0000-drivers-gpu-drm-panel-add-tc358775.patch 1083 | new file mode 100644 1084 | index 0000000000..ad45d193d0 1085 | --- /dev/null 1086 | +++ b/board/batocera/rockchip/rk3399/linux_patches/linux-0000-drivers-gpu-drm-panel-add-tc358775.patch 1087 | @@ -0,0 +1,296 @@ 1088 | +diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig 1089 | +index 869e535fa..465af3c2b 100644 1090 | +--- a/drivers/gpu/drm/panel/Kconfig 1091 | ++++ b/drivers/gpu/drm/panel/Kconfig 1092 | +@@ -835,4 +835,13 @@ config DRM_PANEL_XINPENG_XPP055C272 1093 | + Say Y here if you want to enable support for the Xinpeng 1094 | + XPP055C272 controller for 720x1280 LCD panels with MIPI/RGB/SPI 1095 | + system interfaces. 1096 | ++ 1097 | ++config DRM_PANEL_TOSHIBA_TC358775 1098 | ++ tristate "TOSHIBA TC358775 panel driver" 1099 | ++ depends on OF 1100 | ++ depends on DRM_MIPI_DSI 1101 | ++ depends on BACKLIGHT_CLASS_DEVICE 1102 | ++ help 1103 | ++ say Y here if you want to enable support for TOSHIBA TC358775 1104 | ++ panel as found in TIANNUO TN3399_V3. 1105 | + endmenu 1106 | +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile 1107 | +index 433e93d57..51e9e98a6 100644 1108 | +--- a/drivers/gpu/drm/panel/Makefile 1109 | ++++ b/drivers/gpu/drm/panel/Makefile 1110 | +@@ -85,3 +85,4 @@ obj-$(CONFIG_DRM_PANEL_VISIONOX_VTDR6130) += panel-visionox-vtdr6130.o 1111 | + obj-$(CONFIG_DRM_PANEL_VISIONOX_R66451) += panel-visionox-r66451.o 1112 | + obj-$(CONFIG_DRM_PANEL_WIDECHIPS_WS2401) += panel-widechips-ws2401.o 1113 | + obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o 1114 | ++obj-$(CONFIG_DRM_PANEL_TOSHIBA_TC358775) += panel-toshiba-tc358775.o 1115 | +diff --git a/drivers/gpu/drm/panel/panel-toshiba-tc358775.c b/drivers/gpu/drm/panel/panel-toshiba-tc358775.c 1116 | +new file mode 100644 1117 | +index 000000000..e75c103d4 1118 | +--- /dev/null 1119 | ++++ b/drivers/gpu/drm/panel/panel-toshiba-tc358775.c 1120 | +@@ -0,0 +1,263 @@ 1121 | ++#include "linux/of_device.h" 1122 | ++#include 1123 | ++#include 1124 | ++#include 1125 | ++#include 1126 | ++#include 1127 | ++ 1128 | ++#include