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 14/ { 15 model = "Rockchip RK3562 TEST1 DDR3 V10 Board"; 16 compatible = "rockchip,rk3562-test1-ddr3-v10", "rockchip,rk3562"; 17 18 dc_12v: dc-12v { 19 compatible = "regulator-fixed"; 20 regulator-name = "dc_12v"; 21 regulator-always-on; 22 regulator-boot-on; 23 regulator-min-microvolt = <12000000>; 24 regulator-max-microvolt = <12000000>; 25 }; 26 27 rk809_sound: rk809-sound { 28 status = "okay"; 29 compatible = "rockchip,multicodecs-card"; 30 rockchip,card-name = "rockchip-rk809"; 31 hp-det-gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>; 32 rockchip,format = "i2s"; 33 rockchip,mclk-fs = <256>; 34 rockchip,cpu = <&sai2>; 35 rockchip,codec = <&rk809_codec>; 36 pinctrl-names = "default"; 37 pinctrl-0 = <&hp_det>; 38 }; 39 40 sdio_pwrseq: sdio-pwrseq { 41 compatible = "mmc-pwrseq-simple"; 42 clocks = <&rk809 1>; 43 clock-names = "ext_clock"; 44 pinctrl-names = "default"; 45 pinctrl-0 = <&wifi_enable_h>; 46 47 /* 48 * On the module itself this is one of these (depending 49 * on the actual card populated): 50 * - SDIO_RESET_L_WL_REG_ON 51 * - PDN (power down when low) 52 */ 53 post-power-on-delay-ms = <200>; 54 reset-gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>; 55 }; 56 57 vcc5v0_sys: vcc5v0-sys { 58 compatible = "regulator-fixed"; 59 regulator-name = "vcc5v0_sys"; 60 regulator-always-on; 61 regulator-boot-on; 62 regulator-min-microvolt = <5000000>; 63 regulator-max-microvolt = <5000000>; 64 vin-supply = <&dc_12v>; 65 }; 66 67 vcc5v0_usb: vcc5v0-usb { 68 compatible = "regulator-fixed"; 69 regulator-name = "vcc5v0_usb"; 70 regulator-always-on; 71 regulator-boot-on; 72 regulator-min-microvolt = <5000000>; 73 regulator-max-microvolt = <5000000>; 74 vin-supply = <&dc_12v>; 75 }; 76 77 vcc5v0_usb_host: vcc5v0-usb-host { 78 compatible = "regulator-fixed"; 79 regulator-name = "vcc5v0_usb_host"; 80 regulator-boot-on; 81 regulator-always-on; 82 regulator-min-microvolt = <5000000>; 83 regulator-max-microvolt = <5000000>; 84 enable-active-high; 85 gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; 86 vin-supply = <&vcc5v0_usb>; 87 pinctrl-names = "default"; 88 pinctrl-0 = <&usb_host_pwren>; 89 }; 90 91 vcc5v0_usb_otg: vcc5v0-usb-otg { 92 compatible = "regulator-fixed"; 93 regulator-name = "vcc5v0_usb_otg"; 94 regulator-min-microvolt = <5000000>; 95 regulator-max-microvolt = <5000000>; 96 enable-active-high; 97 gpio = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; 98 vin-supply = <&vcc5v0_usb>; 99 pinctrl-names = "default"; 100 pinctrl-0 = <&usb_otg_pwren>; 101 }; 102 103 vcc3v3_clk: vcc3v3-clk { 104 compatible = "regulator-fixed"; 105 regulator-name = "vcc3v3_clk"; 106 regulator-min-microvolt = <3300000>; 107 regulator-max-microvolt = <3300000>; 108 vin-supply = <&vcc5v0_sys>; 109 }; 110 111 vcc3v3_sys: vcc-sys { 112 compatible = "regulator-fixed"; 113 regulator-name = "vcc3v3_sys"; 114 regulator-always-on; 115 regulator-boot-on; 116 regulator-min-microvolt = <3300000>; 117 regulator-max-microvolt = <3300000>; 118 vin-supply = <&dc_12v>; 119 }; 120 121 vcc25_ddr: vcc25-ddr { 122 compatible = "regulator-fixed"; 123 regulator-name = "vcc25_ddr"; 124 regulator-always-on; 125 regulator-boot-on; 126 regulator-min-microvolt = <2500000>; 127 regulator-max-microvolt = <2500000>; 128 vin-supply = <&vcc3v3_sys>; 129 }; 130 131 vdd_npu: vdd-npu { 132 compatible = "pwm-regulator"; 133 pwms = <&pwm6 0 5000 1>; 134 regulator-name = "vdd_npu"; 135 regulator-min-microvolt = <800000>; 136 regulator-max-microvolt = <1100000>; 137 regulator-init-microvolt = <900000>; 138 regulator-always-on; 139 regulator-boot-on; 140 regulator-settling-time-up-us = <250>; 141 pwm-supply = <&vcc5v0_sys>; 142 status = "okay"; 143 }; 144 145 wireless-wlan { 146 compatible = "wlan-platdata"; 147 rockchip,grf = <&sys_grf>; 148 wifi_chip_type = "ap6275s"; 149 pinctrl-names = "default"; 150 pinctrl-0 = <&wifi_host_wake_irq>; 151 WIFI,host_wake_irq = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; 152 WIFI,poweren_gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; 153 status = "okay"; 154 }; 155 156 wireless-bluetooth { 157 compatible = "bluetooth-platdata"; 158 clocks = <&rk809 1>; 159 clock-names = "ext_clock"; 160 //wifi-bt-power-toggle; 161 uart_rts_gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_LOW>; 162 pinctrl-names = "default", "rts_gpio"; 163 pinctrl-0 = <&uart1m0_rtsn>; 164 pinctrl-1 = <&uart1_gpios>; 165 BT,reset_gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; 166 BT,wake_gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; 167 BT,wake_host_irq = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; 168 status = "okay"; 169 }; 170}; 171 172&combphy_pu { 173 status = "okay"; 174}; 175 176&dsi { 177 status = "okay"; 178}; 179 180&dsi_in_vp0 { 181 status = "okay"; 182}; 183 184&dsi_panel { 185 power-supply = <&vcc3v3_lcd_n>; 186 reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>; 187 pinctrl-names = "default"; 188 pinctrl-0 = <&lcd_rst_gpio>; 189}; 190 191&gmac0 { 192 /* Use rgmii-rxid mode to disable rx delay inside Soc */ 193 phy-mode = "rgmii-rxid"; 194 clock_in_out = "output"; 195 196 snps,reset-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_LOW>; 197 snps,reset-active-low; 198 /* Reset time is 20ms, 100ms for rtl8211f */ 199 snps,reset-delays-us = <0 20000 100000>; 200 201 tx_delay = <0x3f>; 202 /* rx_delay = <0x3f>; */ 203 204 pinctrl-names = "default"; 205 pinctrl-0 = <&rgmiim1_miim 206 &rgmiim1_tx_bus2 207 &rgmiim1_rx_bus2 208 &rgmiim1_rgmii_clk 209 &rgmiim1_rgmii_bus 210 ðm1_pins>; 211 212 phy-handle = <&rgmii_phy>; 213 status = "okay"; 214}; 215 216>1x { 217 compatible = "goodix,gt1x"; 218 reg = <0x14>; 219 pinctrl-names = "default"; 220 pinctrl-0 = <&touch_gpio>; 221 goodix,rst-gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 222 goodix,irq-gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; 223 /* 224 * power-supply should switche to vcc3v3_lcd1_n 225 * when mipi panel is connected to dsi1. 226 */ 227 power-supply = <&vcc3v3_lcd_n>; 228}; 229 230&mdio0 { 231 rgmii_phy: phy@1 { 232 compatible = "ethernet-phy-ieee802.3-c22"; 233 reg = <0x1>; 234 clocks = <&cru CLK_GMAC_ETH_OUT2IO>; 235 assigned-clocks = <&cru CLK_GMAC_ETH_OUT2IO>; 236 assigned-clock-rates = <25000000>; 237 }; 238}; 239 240&pinctrl { 241 headphone { 242 hp_det: hp-det { 243 rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; 244 }; 245 }; 246 247 lcd { 248 lcd_rst_gpio: lcd-rst-gpio { 249 rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; 250 }; 251 }; 252 253 sdio-pwrseq { 254 wifi_enable_h: wifi-enable-h { 255 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 256 }; 257 }; 258 259 touch { 260 touch_gpio: touch-gpio { 261 rockchip,pins = 262 <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, 263 <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 264 }; 265 }; 266 267 usb { 268 usb_host_pwren: usb-host-pwren { 269 rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; 270 }; 271 272 usb_otg_pwren: usb-otg-pwren { 273 rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; 274 }; 275 }; 276 277 wireless-wlan { 278 wifi_host_wake_irq: wifi-host-wake-irq { 279 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>; 280 }; 281 }; 282 283 wireless-bluetooth { 284 uart1_gpios: uart1-gpios { 285 rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 286 }; 287 }; 288}; 289 290&route_dsi { 291 status = "okay"; 292}; 293 294&sai2 { 295 status = "okay"; 296 pinctrl-names = "default"; 297 pinctrl-0 = <&i2s2m1_lrck 298 &i2s2m1_sclk 299 &i2s2m1_sdi 300 &i2s2m1_sdo>; 301}; 302 303&sdmmc0 { 304 no-sd; 305 no-mmc; 306 bus-width = <4>; 307 disable-wp; 308 cap-sd-highspeed; 309 cap-sdio-irq; 310 keep-power-in-suspend; 311 mmc-pwrseq = <&sdio_pwrseq>; 312 non-removable; 313 pinctrl-names = "default"; 314 pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd>; 315 sd-uhs-sdr104; 316 status = "okay"; 317}; 318 319&sdmmc1 { 320 no-sdio; 321 no-mmc; 322 bus-width = <4>; 323 cap-mmc-highspeed; 324 cap-sd-highspeed; 325 disable-wp; 326 sd-uhs-sdr104; 327 vmmc-supply = <&vcc3v3_sd>; 328 vqmmc-supply = <&vccio_sd>; 329 pinctrl-names = "default"; 330 pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_clk &sdmmc1_cmd &sdmmc1_det>; 331 /* Should disable gmac0 and fix hardware if enabling sdmmc1 */ 332 status = "disabled"; 333}; 334 335&pwm6 { 336 status = "okay"; 337}; 338 339&u2phy { 340 status = "okay"; 341}; 342 343&u2phy_host { 344 status = "okay"; 345 phy-supply = <&vcc5v0_usb_host>; 346}; 347 348&u2phy_otg { 349 status = "okay"; 350 vbus-supply = <&vcc5v0_usb_otg>; 351}; 352 353&uart1 { 354 status = "okay"; 355 pinctrl-names = "default"; 356 pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>; 357}; 358 359&usb_host0_ehci { 360 status = "okay"; 361}; 362 363&usb_host0_ohci { 364 status = "okay"; 365}; 366 367&usbdrd30 { 368 status = "okay"; 369}; 370 371&usbdrd_dwc3 { 372 status = "okay"; 373 dr_mode = "otg"; 374 extcon = <&u2phy>; 375}; 376 377&vcc3v3_lcd_n { 378 gpio = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>; 379 enable-active-high; 380}; 381 382&video_phy { 383 status = "okay"; 384}; 385