1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2019 Akash Gajjar <akash@openedev.com> 4 * Copyright (c) 2019 Jagan Teki <jagan@openedev.com> 5 */ 6 7/dts-v1/; 8 9#include <dt-bindings/leds/common.h> 10#include "rk3308.dtsi" 11 12/ { 13 model = "Radxa ROCK Pi S"; 14 compatible = "radxa,rockpis", "rockchip,rk3308"; 15 16 aliases { 17 ethernet0 = &gmac; 18 mmc0 = &emmc; 19 mmc1 = &sdmmc; 20 mmc2 = &sdio; 21 }; 22 23 chosen { 24 stdout-path = "serial0:1500000n8"; 25 }; 26 27 leds { 28 compatible = "gpio-leds"; 29 pinctrl-names = "default"; 30 pinctrl-0 = <&green_led>, <&heartbeat_led>; 31 32 green-led { 33 color = <LED_COLOR_ID_GREEN>; 34 default-state = "on"; 35 function = LED_FUNCTION_POWER; 36 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; 37 label = "rockpis:green:power"; 38 linux,default-trigger = "default-on"; 39 }; 40 41 blue-led { 42 color = <LED_COLOR_ID_BLUE>; 43 default-state = "on"; 44 function = LED_FUNCTION_HEARTBEAT; 45 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; 46 label = "rockpis:blue:user"; 47 linux,default-trigger = "heartbeat"; 48 }; 49 }; 50 51 sdio_pwrseq: sdio-pwrseq { 52 compatible = "mmc-pwrseq-simple"; 53 pinctrl-0 = <&wifi_enable_h>; 54 pinctrl-names = "default"; 55 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; 56 }; 57 58 vcc_1v8: vcc-1v8 { 59 compatible = "regulator-fixed"; 60 regulator-name = "vcc_1v8"; 61 regulator-always-on; 62 regulator-boot-on; 63 regulator-min-microvolt = <1800000>; 64 regulator-max-microvolt = <1800000>; 65 vin-supply = <&vcc_io>; 66 }; 67 68 vcc_io: vcc-io { 69 compatible = "regulator-fixed"; 70 regulator-name = "vcc_io"; 71 regulator-always-on; 72 regulator-boot-on; 73 regulator-min-microvolt = <3300000>; 74 regulator-max-microvolt = <3300000>; 75 vin-supply = <&vcc5v0_sys>; 76 }; 77 78 vcc_ddr: vcc-ddr { 79 compatible = "regulator-fixed"; 80 regulator-name = "vcc_ddr"; 81 regulator-always-on; 82 regulator-boot-on; 83 regulator-min-microvolt = <1500000>; 84 regulator-max-microvolt = <1500000>; 85 vin-supply = <&vcc5v0_sys>; 86 }; 87 88 vcc5v0_otg: vcc5v0-otg { 89 compatible = "regulator-fixed"; 90 enable-active-high; 91 gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; 92 pinctrl-names = "default"; 93 pinctrl-0 = <&otg_vbus_drv>; 94 regulator-name = "vcc5v0_otg"; 95 regulator-always-on; 96 vin-supply = <&vcc5v0_sys>; 97 }; 98 99 vcc5v0_sys: vcc5v0-sys { 100 compatible = "regulator-fixed"; 101 regulator-name = "vcc5v0_sys"; 102 regulator-always-on; 103 regulator-boot-on; 104 regulator-min-microvolt = <5000000>; 105 regulator-max-microvolt = <5000000>; 106 }; 107 108 vdd_core: vdd-core { 109 compatible = "pwm-regulator"; 110 pwms = <&pwm0 0 5000 1>; 111 pwm-supply = <&vcc5v0_sys>; 112 regulator-name = "vdd_core"; 113 regulator-min-microvolt = <827000>; 114 regulator-max-microvolt = <1340000>; 115 regulator-settling-time-up-us = <250>; 116 regulator-always-on; 117 regulator-boot-on; 118 }; 119 120 vdd_log: vdd-log { 121 compatible = "regulator-fixed"; 122 regulator-name = "vdd_log"; 123 regulator-always-on; 124 regulator-boot-on; 125 regulator-min-microvolt = <1050000>; 126 regulator-max-microvolt = <1050000>; 127 vin-supply = <&vcc5v0_sys>; 128 }; 129}; 130 131&cpu0 { 132 cpu-supply = <&vdd_core>; 133}; 134 135&emmc { 136 cap-mmc-highspeed; 137 cap-sd-highspeed; 138 no-sdio; 139 non-removable; 140 pinctrl-names = "default"; 141 pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>; 142 vmmc-supply = <&vcc_io>; 143 status = "okay"; 144}; 145 146&gmac { 147 clock_in_out = "output"; 148 phy-handle = <&rtl8201f>; 149 phy-supply = <&vcc_io>; 150 status = "okay"; 151 152 mdio { 153 compatible = "snps,dwmac-mdio"; 154 #address-cells = <1>; 155 #size-cells = <0>; 156 157 rtl8201f: ethernet-phy@1 { 158 compatible = "ethernet-phy-ieee802.3-c22"; 159 reg = <1>; 160 pinctrl-names = "default"; 161 pinctrl-0 = <&mac_rst>; 162 reset-assert-us = <20000>; 163 reset-deassert-us = <50000>; 164 reset-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 165 }; 166 }; 167}; 168 169&gpio0 { 170 gpio-line-names = 171 /* GPIO0_A0 - A7 */ 172 "", "", "", "", "", "", "", "", 173 /* GPIO0_B0 - B7 */ 174 "", "", "", "header1-pin3 [GPIO0_B3]", 175 "header1-pin5 [GPIO0_B4]", "", "", 176 "header1-pin11 [GPIO0_B7]", 177 /* GPIO0_C0 - C7 */ 178 "header1-pin13 [GPIO0_C0]", 179 "header1-pin15 [GPIO0_C1]", "", "", "", 180 "", "", "", 181 /* GPIO0_D0 - D7 */ 182 "", "", "", "", "", "", "", ""; 183}; 184 185&gpio1 { 186 gpio-line-names = 187 /* GPIO1_A0 - A7 */ 188 "", "", "", "", "", "", "", "", 189 /* GPIO1_B0 - B7 */ 190 "", "", "", "", "", "", "", "", 191 /* GPIO1_C0 - C7 */ 192 "", "", "", "", "", "", "header1-pin21 [GPIO1_C6]", 193 "header1-pin19 [GPIO1_C7]", 194 /* GPIO1_D0 - D7 */ 195 "header1-pin23 [GPIO1_D0]", "header1-pin24 [GPIO1_D1]", 196 "", "", "", "", "", ""; 197}; 198 199&gpio2 { 200 gpio-line-names = 201 /* GPIO2_A0 - A7 */ 202 "header1-pin10 [GPIO2_A0]", "header1-pin8 [GPIO2_A1]", 203 "", "", 204 "header1-pin7 [GPIO2_A4]", "header1-pin12 [GPIO2_A5]", 205 "header2-pin46 [GPIO2_A6]", "header1-pin22 [GPIO1_A7]", 206 /* GPIO2_B0 - B7 */ 207 "header2-pin45 [GPIO2_B0]", "header1-pin18 [GPIO2_B1]", 208 "header1-pin16 [GPIO2_B2]", "header2-pin44 [GPIO2_B3]", 209 "header2-pin43 [GPIO2_B4]", "header2-pin28 [GPIO2_B5]", 210 "header2-pin30 [GPIO2_B6]", "header2-pin32 [GPIO2_B7]", 211 /* GPIO2_C0 - C7 */ 212 "header2-pin34 [GPIO2_C0]", "", "", "", "", "", "", "", 213 /* GPIO2_D0 - D7 */ 214 "", "", "", "", "", "", "", ""; 215}; 216 217&gpio3 { 218 gpio-line-names = 219 /* GPIO3_A0 - A7 */ 220 "", "", "", "", "", "", "", "", 221 /* GPIO3_B0 - B7 */ 222 "", "", "header2-pin42 [GPIO3_B2]", 223 "header2-pin41 [GPIO3_B3]", "header2-pin40 [GPIO3_B4]", 224 "header2-pin39 [GPIO3_B5]", "", "", 225 /* GPIO3_C0 - C7 */ 226 "", "", "", "", "", "", "", "", 227 /* GPIO3_D0 - D7 */ 228 "", "", "", "", "", "", "", ""; 229}; 230 231&i2c1 { 232 status = "okay"; 233}; 234 235&io_domains { 236 vccio0-supply = <&vcc_io>; 237 vccio1-supply = <&vcc_io>; 238 vccio2-supply = <&vcc_io>; 239 vccio3-supply = <&vcc_io>; 240 vccio4-supply = <&vcc_1v8>; 241 vccio5-supply = <&vcc_io>; 242 status = "okay"; 243}; 244 245&pinctrl { 246 pinctrl-names = "default"; 247 pinctrl-0 = <&rtc_32k>; 248 249 bluetooth { 250 bt_reg_on: bt-reg-on { 251 rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 252 }; 253 254 bt_wake_host: bt-wake-host { 255 rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>; 256 }; 257 258 host_wake_bt: host-wake-bt { 259 rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 260 }; 261 }; 262 263 gmac { 264 mac_rst: mac-rst { 265 rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; 266 }; 267 }; 268 269 leds { 270 green_led: green-led { 271 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; 272 }; 273 274 heartbeat_led: heartbeat-led { 275 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; 276 }; 277 }; 278 279 usb { 280 otg_vbus_drv: otg-vbus-drv { 281 rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; 282 }; 283 }; 284 285 sdio-pwrseq { 286 wifi_enable_h: wifi-enable-h { 287 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 288 }; 289 290 wifi_host_wake: wifi-host-wake { 291 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; 292 }; 293 }; 294}; 295 296&pwm0 { 297 status = "okay"; 298 pinctrl-0 = <&pwm0_pin_pull_down>; 299}; 300 301&saradc { 302 vref-supply = <&vcc_1v8>; 303 status = "okay"; 304}; 305 306&sdio { 307 #address-cells = <1>; 308 #size-cells = <0>; 309 cap-sd-highspeed; 310 cap-sdio-irq; 311 keep-power-in-suspend; 312 max-frequency = <100000000>; 313 mmc-pwrseq = <&sdio_pwrseq>; 314 no-mmc; 315 no-sd; 316 non-removable; 317 sd-uhs-sdr50; 318 vmmc-supply = <&vcc_io>; 319 vqmmc-supply = <&vcc_1v8>; 320 status = "okay"; 321 322 rtl8723ds: wifi@1 { 323 reg = <1>; 324 interrupt-parent = <&gpio0>; 325 interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>; 326 interrupt-names = "host-wake"; 327 pinctrl-names = "default"; 328 pinctrl-0 = <&wifi_host_wake>; 329 }; 330}; 331 332&sdmmc { 333 cap-mmc-highspeed; 334 cap-sd-highspeed; 335 disable-wp; 336 vmmc-supply = <&vcc_io>; 337 status = "okay"; 338}; 339 340&u2phy { 341 status = "okay"; 342 343 u2phy_host: host-port { 344 phy-supply = <&vcc5v0_otg>; 345 status = "okay"; 346 }; 347 348 u2phy_otg: otg-port { 349 phy-supply = <&vcc5v0_otg>; 350 status = "okay"; 351 }; 352}; 353 354&uart0 { 355 pinctrl-names = "default"; 356 pinctrl-0 = <&uart0_xfer>; 357 status = "okay"; 358}; 359 360&uart4 { 361 uart-has-rtscts; 362 status = "okay"; 363 364 bluetooth { 365 compatible = "realtek,rtl8723ds-bt"; 366 device-wake-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; 367 enable-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; 368 host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; 369 pinctrl-names = "default"; 370 pinctrl-0 = <&bt_reg_on &bt_wake_host &host_wake_bt>; 371 }; 372}; 373 374&usb_host_ehci { 375 status = "okay"; 376}; 377 378&usb_host_ohci { 379 status = "okay"; 380}; 381 382&usb20_otg { 383 dr_mode = "peripheral"; 384 status = "okay"; 385}; 386 387&wdt { 388 status = "okay"; 389}; 390