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