1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd. 4 * 5 */ 6 7#include "dt-bindings/usb/pd.h" 8#include "rk3588.dtsi" 9#include "rk3588-evb.dtsi" 10#include "rk3588-rk806-single.dtsi" 11 12/ { 13 fan: pwm-fan { 14 compatible = "pwm-fan"; 15 #cooling-cells = <2>; 16 pwms = <&pwm14 0 50000 0>; 17 cooling-levels = <0 50 100 150 200 255>; 18 rockchip,temp-trips = < 19 50000 1 20 55000 2 21 60000 3 22 65000 4 23 70000 5 24 >; 25 }; 26 27 pcie30_avdd1v8: pcie30-avdd1v8 { 28 compatible = "regulator-fixed"; 29 regulator-name = "pcie30_avdd1v8"; 30 regulator-boot-on; 31 regulator-always-on; 32 regulator-min-microvolt = <1800000>; 33 regulator-max-microvolt = <1800000>; 34 vin-supply = <&avcc_1v8_s0>; 35 }; 36 37 pcie30_avdd0v75: pcie30-avdd0v75 { 38 compatible = "regulator-fixed"; 39 regulator-name = "pcie30_avdd0v75"; 40 regulator-boot-on; 41 regulator-always-on; 42 regulator-min-microvolt = <750000>; 43 regulator-max-microvolt = <750000>; 44 vin-supply = <&avdd_0v75_s0>; 45 }; 46 47 reserved-memory { 48 #address-cells = <2>; 49 #size-cells = <2>; 50 ranges; 51 dma_trans: dma-trans@3c000000 { 52 reg = <0x0 0x3c000000 0x0 0x04000000>; 53 }; 54 }; 55 56 vbus5v0_typec: vbus5v0-typec { 57 compatible = "regulator-fixed"; 58 regulator-name = "vbus5v0_typec"; 59 regulator-min-microvolt = <5000000>; 60 regulator-max-microvolt = <5000000>; 61 enable-active-high; 62 gpio = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>; 63 vin-supply = <&vcc5v0_usb>; 64 pinctrl-names = "default"; 65 pinctrl-0 = <&typec5v_pwren>; 66 }; 67 68 vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 { 69 compatible = "regulator-fixed"; 70 regulator-name = "vcc_1v1_nldo_s3"; 71 regulator-always-on; 72 regulator-boot-on; 73 regulator-min-microvolt = <1100000>; 74 regulator-max-microvolt = <1100000>; 75 vin-supply = <&vcc5v0_sys>; 76 }; 77 78 vcc3v3_au5426: vcc3v3-au5426 { 79 compatible = "regulator-fixed"; 80 regulator-name = "vcc3v3_au5426"; 81 regulator-min-microvolt = <3300000>; 82 regulator-max-microvolt = <3300000>; 83 enable-active-high; 84 regulator-boot-on; 85 regulator-always-on; 86 gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; 87 startup-delay-us = <5000>; 88 vin-supply = <&vcc5v0_sys>; 89 }; 90 91 vcc3v3_lcd_n: vcc3v3-lcd0-n { 92 compatible = "regulator-fixed"; 93 regulator-name = "vcc3v3_lcd0_n"; 94 regulator-boot-on; 95 enable-active-high; 96 gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 97 vin-supply = <&vcc_1v8_s3>; 98 }; 99 100 vcc5v0_host: vcc5v0-host { 101 compatible = "regulator-fixed"; 102 regulator-name = "vcc5v0_host"; 103 regulator-boot-on; 104 regulator-always-on; 105 regulator-min-microvolt = <5000000>; 106 regulator-max-microvolt = <5000000>; 107 enable-active-high; 108 gpio = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>; 109 vin-supply = <&vcc5v0_usb>; 110 pinctrl-names = "default"; 111 pinctrl-0 = <&vcc5v0_host_en>; 112 }; 113}; 114 115&backlight { 116 pwms = <&pwm3 0 25000 0>; 117 status = "okay"; 118}; 119 120&dp0 { 121 status = "okay"; 122}; 123 124&dp0_in_vp2 { 125 status = "okay"; 126}; 127 128/* 129 * mipi_dcphy0 needs to be enabled 130 * when dsi0 is enabled 131 */ 132&dsi0 { 133 status = "okay"; 134}; 135 136&dsi0_in_vp2 { 137 status = "disabled"; 138}; 139 140&dsi0_in_vp3 { 141 status = "okay"; 142}; 143 144&dsi0_panel { 145 power-supply = <&vcc3v3_lcd_n>; 146 reset-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_LOW>; 147 pinctrl-names = "default"; 148 pinctrl-0 = <&lcd_rst_gpio>; 149}; 150 151&gmac0 { 152 /* Use rgmii-rxid mode to disable rx delay inside Soc */ 153 phy-mode = "rgmii-rxid"; 154 clock_in_out = "output"; 155 156 snps,reset-gpio = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>; 157 snps,reset-active-low; 158 /* Reset time is 20ms, 100ms for rtl8211f */ 159 snps,reset-delays-us = <0 20000 100000>; 160 161 pinctrl-names = "default"; 162 pinctrl-0 = <&gmac0_miim 163 &gmac0_tx_bus2 164 &gmac0_rx_bus2 165 &gmac0_rgmii_clk 166 &gmac0_rgmii_bus>; 167 168 tx_delay = <0x44>; 169 /* rx_delay = <0x4f>; */ 170 171 phy-handle = <&rgmii_phy0>; 172 status = "okay"; 173}; 174 175&gmac1 { 176 /* Use rgmii-rxid mode to disable rx delay inside Soc */ 177 phy-mode = "rgmii-rxid"; 178 clock_in_out = "output"; 179 180 snps,reset-gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>; 181 snps,reset-active-low; 182 /* Reset time is 20ms, 100ms for rtl8211f */ 183 snps,reset-delays-us = <0 20000 100000>; 184 185 pinctrl-names = "default"; 186 pinctrl-0 = <&gmac1_miim 187 &gmac1_tx_bus2 188 &gmac1_rx_bus2 189 &gmac1_rgmii_clk 190 &gmac1_rgmii_bus>; 191 192 tx_delay = <0x44>; 193 /* rx_delay = <0x4f>; */ 194 195 phy-handle = <&rgmii_phy1>; 196 status = "okay"; 197}; 198 199&i2c0 { 200 status = "okay"; 201 pinctrl-names = "default"; 202 pinctrl-0 = <&i2c0m2_xfer>; 203 204 vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 { 205 compatible = "rockchip,rk8602"; 206 reg = <0x42>; 207 vin-supply = <&vcc5v0_sys>; 208 regulator-compatible = "rk860x-reg"; 209 regulator-name = "vdd_cpu_big0_s0"; 210 regulator-min-microvolt = <550000>; 211 regulator-max-microvolt = <1050000>; 212 regulator-ramp-delay = <2300>; 213 rockchip,suspend-voltage-selector = <1>; 214 regulator-boot-on; 215 regulator-always-on; 216 regulator-state-mem { 217 regulator-off-in-suspend; 218 }; 219 }; 220 221 vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 { 222 compatible = "rockchip,rk8603"; 223 reg = <0x43>; 224 vin-supply = <&vcc5v0_sys>; 225 regulator-compatible = "rk860x-reg"; 226 regulator-name = "vdd_cpu_big1_s0"; 227 regulator-min-microvolt = <550000>; 228 regulator-max-microvolt = <1050000>; 229 regulator-ramp-delay = <2300>; 230 rockchip,suspend-voltage-selector = <1>; 231 regulator-boot-on; 232 regulator-always-on; 233 regulator-state-mem { 234 regulator-off-in-suspend; 235 }; 236 }; 237}; 238 239&i2c2 { 240 status = "okay"; 241 242 vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 { 243 compatible = "rockchip,rk8602"; 244 reg = <0x42>; 245 vin-supply = <&vcc5v0_sys>; 246 regulator-compatible = "rk860x-reg"; 247 regulator-name = "vdd_npu_s0"; 248 regulator-min-microvolt = <550000>; 249 regulator-max-microvolt = <950000>; 250 regulator-ramp-delay = <2300>; 251 rockchip,suspend-voltage-selector = <1>; 252 regulator-boot-on; 253 regulator-always-on; 254 regulator-state-mem { 255 regulator-off-in-suspend; 256 }; 257 }; 258}; 259 260&i2c6 { 261 status = "okay"; 262 gt1x: gt1x@14 { 263 compatible = "goodix,gt1x"; 264 reg = <0x14>; 265 pinctrl-names = "default"; 266 pinctrl-0 = <&touch_gpio>; 267 goodix,rst-gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>; 268 goodix,irq-gpio = <&gpio0 RK_PC6 IRQ_TYPE_LEVEL_LOW>; 269 power-supply = <&vcc3v3_lcd_n>; 270 }; 271}; 272 273&i2c8 { 274 status = "okay"; 275 pinctrl-names = "default"; 276 pinctrl-0 = <&i2c8m3_xfer>; 277 278 usbc0: fusb302@22 { 279 compatible = "fcs,fusb302"; 280 reg = <0x22>; 281 interrupt-parent = <&gpio0>; 282 interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>; 283 pinctrl-names = "default"; 284 pinctrl-0 = <&usbc0_int>; 285 vbus-supply = <&vbus5v0_typec>; 286 status = "okay"; 287 288 ports { 289 #address-cells = <1>; 290 #size-cells = <0>; 291 292 port@0 { 293 reg = <0>; 294 usbc0_role_sw: endpoint@0 { 295 remote-endpoint = <&dwc3_0_role_switch>; 296 }; 297 }; 298 }; 299 300 usb_con: connector { 301 compatible = "usb-c-connector"; 302 label = "USB-C"; 303 data-role = "dual"; 304 power-role = "dual"; 305 try-power-role = "sink"; 306 op-sink-microwatt = <1000000>; 307 sink-pdos = 308 <PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>; 309 source-pdos = 310 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>; 311 312 altmodes { 313 #address-cells = <1>; 314 #size-cells = <0>; 315 316 altmode@0 { 317 reg = <0>; 318 svid = <0xff01>; 319 vdo = <0xffffffff>; 320 }; 321 }; 322 323 ports { 324 #address-cells = <1>; 325 #size-cells = <0>; 326 327 port@0 { 328 reg = <0>; 329 usbc0_orien_sw: endpoint { 330 remote-endpoint = <&usbdp_phy0_orientation_switch>; 331 }; 332 }; 333 334 port@1 { 335 reg = <1>; 336 dp_altmode_mux: endpoint { 337 remote-endpoint = <&usbdp_phy0_dp_altmode_mux>; 338 }; 339 }; 340 }; 341 }; 342 }; 343}; 344 345&mdio0 { 346 rgmii_phy0: phy@1 { 347 compatible = "ethernet-phy-ieee802.3-c22"; 348 reg = <0x1>; 349 }; 350}; 351 352&mdio1 { 353 rgmii_phy1: phy@1 { 354 compatible = "ethernet-phy-ieee802.3-c22"; 355 reg = <0x1>; 356 }; 357}; 358 359&mipi_dcphy0 { 360 status = "okay"; 361}; 362 363&pcie30phy { 364 status = "okay"; 365}; 366 367&pcie3x4 { 368 compatible = "rockchip,rk3588-pcie-ep"; 369 memory-region = <&dma_trans>; 370 busno = <1>; 371}; 372 373&pinctrl { 374 lcd { 375 lcd_rst_gpio: lcd-rst-gpio { 376 rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; 377 }; 378 }; 379 380 touch { 381 touch_gpio: touch-gpio { 382 rockchip,pins = 383 <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>, 384 <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; 385 }; 386 }; 387 388 usb { 389 vcc5v0_host_en: vcc5v0-host-en { 390 rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; 391 }; 392 }; 393 394 usb-typec { 395 usbc0_int: usbc0-int { 396 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; 397 }; 398 399 typec5v_pwren: typec5v-pwren { 400 rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 401 }; 402 }; 403}; 404 405&pwm3 { 406 status = "okay"; 407}; 408 409&pwm14 { 410 pinctrl-0 = <&pwm14m1_pins>; 411 status = "okay"; 412}; 413 414&route_dsi0 { 415 status = "okay"; 416 connect = <&vp3_out_dsi0>; 417}; 418 419&u2phy2 { 420 status = "disabled"; 421}; 422 423&u2phy3 { 424 status = "disabled"; 425}; 426 427&u2phy1_otg { 428 phy-supply = <&vcc5v0_host>; 429}; 430 431&u2phy2_host { 432 status = "disabled"; 433}; 434 435&u2phy3_host { 436 status = "disabled"; 437}; 438 439&usb_host0_ehci { 440 status = "disabled"; 441}; 442 443&usb_host0_ohci { 444 status = "disabled"; 445}; 446 447&usb_host1_ehci { 448 status = "disabled"; 449}; 450 451&usb_host1_ohci { 452 status = "disabled"; 453}; 454 455&usbdp_phy0 { 456 orientation-switch; 457 svid = <0xff01>; 458 sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; 459 sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; 460 461 port { 462 #address-cells = <1>; 463 #size-cells = <0>; 464 usbdp_phy0_orientation_switch: endpoint@0 { 465 reg = <0>; 466 remote-endpoint = <&usbc0_orien_sw>; 467 }; 468 469 usbdp_phy0_dp_altmode_mux: endpoint@1 { 470 reg = <1>; 471 remote-endpoint = <&dp_altmode_mux>; 472 }; 473 }; 474}; 475 476&usbdrd_dwc3_0 { 477 dr_mode = "otg"; 478 usb-role-switch; 479 port { 480 #address-cells = <1>; 481 #size-cells = <0>; 482 dwc3_0_role_switch: endpoint@0 { 483 reg = <0>; 484 remote-endpoint = <&usbc0_role_sw>; 485 }; 486 }; 487}; 488 489&usbhost3_0 { 490 status = "disabled"; 491}; 492 493&usbhost_dwc3_0 { 494 status = "disabled"; 495}; 496