1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd. 4 * 5 */ 6 7/dts-v1/; 8 9#include "dt-bindings/usb/pd.h" 10#include "rk3562.dtsi" 11#include "rk3562-evb.dtsi" 12#include "rk3562-evb1-cam.dtsi" 13#include <dt-bindings/gpio/gpio.h> 14#include <dt-bindings/pinctrl/rockchip.h> 15#include <dt-bindings/sensor-dev.h> 16 17/ { 18 model = "Rockchip RK3562 EVB1 LP4X V10 Board"; 19 compatible = "rockchip,rk3562-evb1-lp4x-v10", "rockchip,rk3562"; 20 21 dc_12v: dc-12v { 22 compatible = "regulator-fixed"; 23 regulator-name = "dc_12v"; 24 regulator-always-on; 25 regulator-boot-on; 26 regulator-min-microvolt = <12000000>; 27 regulator-max-microvolt = <12000000>; 28 }; 29 30 rk817_sound: rk817-sound { 31 status = "okay"; 32 compatible = "rockchip,multicodecs-card"; 33 rockchip,card-name = "rockchip-rk817"; 34 hp-det-gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>; 35 rockchip,format = "i2s"; 36 rockchip,mclk-fs = <256>; 37 rockchip,cpu = <&sai0>; 38 rockchip,codec = <&rk817_codec>; 39 pinctrl-names = "default"; 40 pinctrl-0 = <&hp_det>; 41 }; 42 43 sdio_pwrseq: sdio-pwrseq { 44 compatible = "mmc-pwrseq-simple"; 45 clocks = <&rk817 1>; 46 clock-names = "ext_clock"; 47 pinctrl-names = "default"; 48 pinctrl-0 = <&wifi_enable_h>; 49 50 /* 51 * On the module itself this is one of these (depending 52 * on the actual card populated): 53 * - SDIO_RESET_L_WL_REG_ON 54 * - PDN (power down when low) 55 */ 56 post-power-on-delay-ms = <200>; 57 reset-gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>; 58 }; 59 60 vcc3v3_pcie20: vcc3v3-pcie20 { 61 compatible = "regulator-fixed"; 62 regulator-name = "vcc3v3_pcie20"; 63 regulator-min-microvolt = <3300000>; 64 regulator-max-microvolt = <3300000>; 65 enable-active-high; 66 gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; 67 startup-delay-us = <5000>; 68 vin-supply = <&dc_12v>; 69 }; 70 71 vcc5v0_sys: vcc5v0-sys { 72 compatible = "regulator-fixed"; 73 regulator-name = "vcc5v0_sys"; 74 regulator-always-on; 75 regulator-boot-on; 76 regulator-min-microvolt = <5000000>; 77 regulator-max-microvolt = <5000000>; 78 vin-supply = <&dc_12v>; 79 }; 80 81 vcc5v0_usb_host: vcc5v0-usb-host { 82 compatible = "regulator-fixed"; 83 regulator-name = "vcc5v0_usb_host"; 84 regulator-boot-on; 85 regulator-always-on; 86 regulator-min-microvolt = <5000000>; 87 regulator-max-microvolt = <5000000>; 88 enable-active-high; 89 gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; 90 vin-supply = <&dcdc_boost>; 91 pinctrl-names = "default"; 92 pinctrl-0 = <&usb_host_pwren>; 93 }; 94 95 vbat_3v8: vbat-3v8 { 96 compatible = "regulator-fixed"; 97 regulator-name = "vbat_3v8"; 98 regulator-always-on; 99 regulator-boot-on; 100 regulator-min-microvolt = <3800000>; 101 regulator-max-microvolt = <3800000>; 102 }; 103 104 vcc_sd: vcc-sd { 105 compatible = "regulator-gpio"; 106 enable-active-low; 107 regulator-boot-on; 108 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; 109 regulator-min-microvolt = <3300000>; 110 regulator-max-microvolt = <3300000>; 111 pinctrl-names = "default"; 112 pinctrl-0 = <&vcc_sd_h>; 113 regulator-name = "vcc_sd"; 114 states = <0 0x0 115 3300000 0x1>; 116 }; 117 118 vcc_sys: vcc-sys { 119 compatible = "regulator-fixed"; 120 regulator-name = "vcc_sys"; 121 regulator-always-on; 122 regulator-boot-on; 123 regulator-min-microvolt = <3800000>; 124 regulator-max-microvolt = <3800000>; 125 }; 126 127 vdd_gpu: vdd-gpu { 128 compatible = "pwm-regulator"; 129 pwms = <&pwm7 0 5000 1>; 130 regulator-name = "vdd_gpu"; 131 regulator-min-microvolt = <800000>; 132 regulator-max-microvolt = <1100000>; 133 regulator-init-microvolt = <900000>; 134 regulator-always-on; 135 regulator-boot-on; 136 regulator-settling-time-up-us = <250>; 137 pwm-supply = <&vcc_sys>; 138 status = "okay"; 139 }; 140 141 vdd_npu: vdd-npu { 142 compatible = "pwm-regulator"; 143 pwms = <&pwm6 0 5000 1>; 144 regulator-name = "vdd_npu"; 145 regulator-min-microvolt = <800000>; 146 regulator-max-microvolt = <1100000>; 147 regulator-init-microvolt = <900000>; 148 regulator-always-on; 149 regulator-boot-on; 150 regulator-settling-time-up-us = <250>; 151 pwm-supply = <&vcc_sys>; 152 status = "okay"; 153 }; 154 155 wireless-wlan { 156 compatible = "wlan-platdata"; 157 rockchip,grf = <&sys_grf>; 158 wifi_chip_type = "ap6275s"; 159 pinctrl-names = "default"; 160 pinctrl-0 = <&wifi_host_wake_irq>; 161 WIFI,host_wake_irq = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; 162 WIFI,poweren_gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; 163 status = "okay"; 164 }; 165 166 wireless-bluetooth { 167 compatible = "bluetooth-platdata"; 168 clocks = <&rk817 1>; 169 clock-names = "ext_clock"; 170 //wifi-bt-power-toggle; 171 uart_rts_gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>; 172 pinctrl-names = "default", "rts_gpio"; 173 pinctrl-0 = <&uart1m0_rtsn>; 174 pinctrl-1 = <&uart1_gpios>; 175 BT,reset_gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; 176 BT,wake_gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; 177 BT,wake_host_irq = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; 178 status = "okay"; 179 }; 180}; 181 182&gmac0 { 183 /* Use rgmii-rxid mode to disable rx delay inside Soc */ 184 phy-mode = "rgmii-rxid"; 185 clock_in_out = "output"; 186 187 snps,reset-gpio = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>; 188 snps,reset-active-low; 189 /* Reset time is 20ms, 100ms for rtl8211f */ 190 snps,reset-delays-us = <0 20000 100000>; 191 192 tx_delay = <0x42>; 193 /* rx_delay = <0x3f>; */ 194 195 pinctrl-names = "default"; 196 pinctrl-0 = <&rgmiim0_miim 197 &rgmiim0_tx_bus2 198 &rgmiim0_rx_bus2 199 &rgmiim0_rgmii_clk 200 &rgmiim0_rgmii_bus 201 ðm0_pins>; 202 203 phy-handle = <&rgmii_phy>; 204 status = "okay"; 205}; 206 207&i2c0 { 208 status = "okay"; 209 210 usbc0: fusb302@22 { 211 compatible = "fcs,fusb302"; 212 reg = <0x22>; 213 interrupt-parent = <&gpio1>; 214 interrupts = <RK_PC7 IRQ_TYPE_LEVEL_LOW>; 215 pinctrl-names = "default"; 216 pinctrl-0 = <&usbc0_int>; 217 vbus-supply = <&otg_switch>; 218 status = "okay"; 219 220 ports { 221 #address-cells = <1>; 222 #size-cells = <0>; 223 224 port@0 { 225 reg = <0>; 226 usbc0_role_sw: endpoint@0 { 227 remote-endpoint = <&dwc3_role_switch>; 228 }; 229 }; 230 }; 231 232 usb_con: connector { 233 compatible = "usb-c-connector"; 234 label = "USB-C"; 235 data-role = "dual"; 236 power-role = "dual"; 237 try-power-role = "sink"; 238 op-sink-microwatt = <1000000>; 239 sink-pdos = 240 <PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>; 241 source-pdos = 242 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>; 243 }; 244 }; 245}; 246 247&i2c5 { 248 status = "okay"; 249 250 mpu6500_acc: mpu_acc@68 { 251 compatible = "mpu6500_acc"; 252 reg = <0x68>; 253 irq-gpio = <&gpio0 RK_PA7 IRQ_TYPE_EDGE_RISING>; 254 irq_enable = <0>; 255 poll_delay_ms = <30>; 256 type = <SENSOR_TYPE_ACCEL>; 257 layout = <3>; 258 }; 259 260 mpu6500_gyro: mpu_gyro@68 { 261 compatible = "mpu6500_gyro"; 262 reg = <0x68>; 263 poll_delay_ms = <30>; 264 type = <SENSOR_TYPE_GYROSCOPE>; 265 layout = <3>; 266 }; 267}; 268 269&combphy_pu { 270 status = "okay"; 271}; 272 273&dsi { 274 status = "okay"; 275}; 276 277&dsi_in_vp0 { 278 status = "okay"; 279}; 280 281&dsi_panel { 282 power-supply = <&vcc3v3_lcd_n>; 283 reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>; 284 pinctrl-names = "default"; 285 pinctrl-0 = <&lcd_rst_gpio>; 286}; 287 288&mdio0 { 289 rgmii_phy: phy@1 { 290 compatible = "ethernet-phy-ieee802.3-c22"; 291 reg = <0x1>; 292 clocks = <&cru CLK_GMAC_ETH_OUT2IO>; 293 assigned-clocks = <&cru CLK_GMAC_ETH_OUT2IO>; 294 assigned-clock-rates = <25000000>; 295 }; 296}; 297 298&pwm3 { 299 status = "okay"; 300 301 compatible = "rockchip,remotectl-pwm"; 302 pinctrl-names = "default"; 303 pinctrl-0 = <&pwm3m0_pins>; 304 assigned-clocks = <&cru CLK_PMU1_PWM0>; 305 assigned-clock-rates = <24000000>; 306 remote_pwm_id = <3>; 307 handle_cpu_id = <1>; 308 remote_support_psci = <1>; 309 310 ir_key1 { 311 rockchip,usercode = <0x4040>; 312 rockchip,key_table = 313 <0xf2 KEY_REPLY>, 314 <0xba KEY_BACK>, 315 <0xf4 KEY_UP>, 316 <0xf1 KEY_DOWN>, 317 <0xef KEY_LEFT>, 318 <0xee KEY_RIGHT>, 319 <0xbd KEY_HOME>, 320 <0xea KEY_VOLUMEUP>, 321 <0xe3 KEY_VOLUMEDOWN>, 322 <0xe2 KEY_SEARCH>, 323 <0xb2 KEY_POWER>, 324 <0xbc KEY_MUTE>, 325 <0xec KEY_MENU>, 326 <0xbf 0x190>, 327 <0xe0 0x191>, 328 <0xe1 0x192>, 329 <0xe9 183>, 330 <0xe6 248>, 331 <0xe8 185>, 332 <0xe7 186>, 333 <0xf0 388>, 334 <0xbe 0x175>; 335 }; 336 337 ir_key2 { 338 rockchip,usercode = <0xff00>; 339 rockchip,key_table = 340 <0xf9 KEY_HOME>, 341 <0xbf KEY_BACK>, 342 <0xfb KEY_MENU>, 343 <0xaa KEY_REPLY>, 344 <0xb9 KEY_UP>, 345 <0xe9 KEY_DOWN>, 346 <0xb8 KEY_LEFT>, 347 <0xea KEY_RIGHT>, 348 <0xeb KEY_VOLUMEDOWN>, 349 <0xef KEY_VOLUMEUP>, 350 <0xf7 KEY_MUTE>, 351 <0xe7 KEY_POWER>, 352 <0xfc KEY_POWER>, 353 <0xa9 KEY_VOLUMEDOWN>, 354 <0xa8 KEY_VOLUMEDOWN>, 355 <0xe0 KEY_VOLUMEDOWN>, 356 <0xa5 KEY_VOLUMEDOWN>, 357 <0xab 183>, 358 <0xb7 388>, 359 <0xe8 388>, 360 <0xf8 184>, 361 <0xaf 185>, 362 <0xed KEY_VOLUMEDOWN>, 363 <0xee 186>, 364 <0xb3 KEY_VOLUMEDOWN>, 365 <0xf1 KEY_VOLUMEDOWN>, 366 <0xf2 KEY_VOLUMEDOWN>, 367 <0xf3 KEY_SEARCH>, 368 <0xb4 KEY_VOLUMEDOWN>, 369 <0xbe KEY_SEARCH>; 370 }; 371 372 ir_key3 { 373 rockchip,usercode = <0x1dcc>; 374 rockchip,key_table = 375 <0xee KEY_REPLY>, 376 <0xf0 KEY_BACK>, 377 <0xf8 KEY_UP>, 378 <0xbb KEY_DOWN>, 379 <0xef KEY_LEFT>, 380 <0xed KEY_RIGHT>, 381 <0xfc KEY_HOME>, 382 <0xf1 KEY_VOLUMEUP>, 383 <0xfd KEY_VOLUMEDOWN>, 384 <0xb7 KEY_SEARCH>, 385 <0xff KEY_POWER>, 386 <0xf3 KEY_MUTE>, 387 <0xbf KEY_MENU>, 388 <0xf9 0x191>, 389 <0xf5 0x192>, 390 <0xb3 388>, 391 <0xbe KEY_1>, 392 <0xba KEY_2>, 393 <0xb2 KEY_3>, 394 <0xbd KEY_4>, 395 <0xf9 KEY_5>, 396 <0xb1 KEY_6>, 397 <0xfc KEY_7>, 398 <0xf8 KEY_8>, 399 <0xb0 KEY_9>, 400 <0xb6 KEY_0>, 401 <0xb5 KEY_BACKSPACE>; 402 }; 403}; 404 405&pwm6 { 406 status = "okay"; 407}; 408 409&pwm7 { 410 status = "okay"; 411}; 412 413&route_dsi { 414 status = "okay"; 415}; 416 417&vcc3v3_lcd_n { 418 gpio = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>; 419 enable-active-high; 420}; 421 422&video_phy { 423 status = "okay"; 424}; 425 426&pcie2x1 { 427 reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; 428 vpcie3v3-supply = <&vcc3v3_pcie20>; 429 status = "okay"; 430}; 431 432&pinctrl { 433 headphone { 434 hp_det: hp-det { 435 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; 436 }; 437 }; 438 439 lcd { 440 lcd_rst_gpio: lcd-rst-gpio { 441 rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; 442 }; 443 }; 444 445 sdio-pwrseq { 446 wifi_enable_h: wifi-enable-h { 447 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 448 }; 449 }; 450 451 vcc_sd { 452 vcc_sd_h: vcc-sd-h { 453 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>; 454 }; 455 }; 456 457 usb { 458 usb_host_pwren: usb-host-pwren { 459 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; 460 }; 461 462 usbc0_int: usbc0-int { 463 rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; 464 }; 465 }; 466 467 wireless-wlan { 468 wifi_host_wake_irq: wifi-host-wake-irq { 469 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>; 470 }; 471 }; 472 473 wireless-bluetooth { 474 uart1_gpios: uart1-gpios { 475 rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 476 }; 477 }; 478}; 479 480&sai0 { 481 status = "okay"; 482 pinctrl-names = "default"; 483 pinctrl-0 = <&i2s0m0_lrck 484 &i2s0m0_sclk 485 &i2s0m0_sdi0 486 &i2s0m0_sdo0>; 487}; 488 489&sdmmc0 { 490 no-sdio; 491 no-mmc; 492 bus-width = <4>; 493 cap-mmc-highspeed; 494 cap-sd-highspeed; 495 disable-wp; 496 sd-uhs-sdr104; 497 vmmc-supply = <&vcc_sd>; 498 vqmmc-supply = <&vccio_sd>; 499 pinctrl-names = "default"; 500 pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; 501 status = "okay"; 502}; 503 504&sdmmc1 { 505 no-sd; 506 no-mmc; 507 bus-width = <4>; 508 disable-wp; 509 cap-sd-highspeed; 510 cap-sdio-irq; 511 keep-power-in-suspend; 512 mmc-pwrseq = <&sdio_pwrseq>; 513 non-removable; 514 pinctrl-names = "default"; 515 pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>; 516 sd-uhs-sdr104; 517 status = "okay"; 518}; 519 520&u2phy { 521 status = "okay"; 522}; 523 524&u2phy_host { 525 status = "okay"; 526 phy-supply = <&vcc5v0_usb_host>; 527}; 528 529&u2phy_otg { 530 status = "okay"; 531}; 532 533&uart1 { 534 status = "okay"; 535 pinctrl-names = "default"; 536 pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>; 537}; 538 539&usb_host0_ehci { 540 status = "okay"; 541}; 542 543&usb_host0_ohci { 544 status = "okay"; 545}; 546 547&usbdrd30 { 548 status = "okay"; 549}; 550 551&usbdrd_dwc3 { 552 status = "okay"; 553 554 dr_mode = "otg"; 555 maximum-speed = "high-speed"; 556 phys = <&u2phy_otg>; 557 phy-names = "usb2-phy"; 558 snps,dis_u2_susphy_quirk; 559 snps,usb2-lpm-disable; 560 usb-role-switch; 561 port { 562 #address-cells = <1>; 563 #size-cells = <0>; 564 dwc3_role_switch: endpoint@0 { 565 reg = <0>; 566 remote-endpoint = <&usbc0_role_sw>; 567 }; 568 }; 569}; 570