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