Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 3 | * Copyright (c) 2019 Akash Gajjar <akash@openedev.com> |
| 4 | * Copyright (c) 2019 Jagan Teki <jagan@openedev.com> |
Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | /dts-v1/; |
Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 8 | #include "rk3308.dtsi" |
| 9 | |
| 10 | / { |
| 11 | model = "Radxa ROCK Pi S"; |
| 12 | compatible = "radxa,rockpis", "rockchip,rk3308"; |
| 13 | |
| 14 | aliases { |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 15 | ethernet0 = &gmac; |
Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 16 | mmc0 = &emmc; |
| 17 | mmc1 = &sdmmc; |
| 18 | }; |
| 19 | |
| 20 | chosen { |
| 21 | stdout-path = "serial0:1500000n8"; |
| 22 | }; |
| 23 | |
| 24 | leds { |
| 25 | compatible = "gpio-leds"; |
| 26 | pinctrl-names = "default"; |
| 27 | pinctrl-0 = <&green_led_gio>, <&heartbeat_led_gpio>; |
| 28 | |
| 29 | green-led { |
| 30 | default-state = "on"; |
| 31 | gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; |
| 32 | label = "rockpis:green:power"; |
| 33 | linux,default-trigger = "default-on"; |
| 34 | }; |
| 35 | |
| 36 | blue-led { |
| 37 | default-state = "on"; |
| 38 | gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; |
| 39 | label = "rockpis:blue:user"; |
| 40 | linux,default-trigger = "heartbeat"; |
| 41 | }; |
| 42 | }; |
| 43 | |
| 44 | sdio_pwrseq: sdio-pwrseq { |
| 45 | compatible = "mmc-pwrseq-simple"; |
| 46 | pinctrl-0 = <&wifi_enable_h>; |
| 47 | pinctrl-names = "default"; |
| 48 | reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; |
| 49 | }; |
| 50 | |
| 51 | vcc_1v8: vcc-1v8 { |
| 52 | compatible = "regulator-fixed"; |
| 53 | regulator-name = "vcc_1v8"; |
| 54 | regulator-always-on; |
| 55 | regulator-boot-on; |
| 56 | regulator-min-microvolt = <1800000>; |
| 57 | regulator-max-microvolt = <1800000>; |
| 58 | vin-supply = <&vcc_io>; |
| 59 | }; |
| 60 | |
| 61 | vcc_io: vcc-io { |
| 62 | compatible = "regulator-fixed"; |
| 63 | regulator-name = "vcc_io"; |
| 64 | regulator-always-on; |
| 65 | regulator-boot-on; |
| 66 | regulator-min-microvolt = <3300000>; |
| 67 | regulator-max-microvolt = <3300000>; |
| 68 | vin-supply = <&vcc5v0_sys>; |
| 69 | }; |
| 70 | |
| 71 | vcc_ddr: vcc-ddr { |
| 72 | compatible = "regulator-fixed"; |
| 73 | regulator-name = "vcc_ddr"; |
| 74 | regulator-always-on; |
| 75 | regulator-boot-on; |
| 76 | regulator-min-microvolt = <1500000>; |
| 77 | regulator-max-microvolt = <1500000>; |
| 78 | vin-supply = <&vcc5v0_sys>; |
| 79 | }; |
| 80 | |
| 81 | vcc5v0_otg: vcc5v0-otg { |
| 82 | compatible = "regulator-fixed"; |
| 83 | enable-active-high; |
| 84 | gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; |
| 85 | pinctrl-names = "default"; |
| 86 | pinctrl-0 = <&otg_vbus_drv>; |
| 87 | regulator-name = "vcc5v0_otg"; |
| 88 | regulator-always-on; |
| 89 | vin-supply = <&vcc5v0_sys>; |
| 90 | }; |
| 91 | |
| 92 | vcc5v0_sys: vcc5v0-sys { |
| 93 | compatible = "regulator-fixed"; |
| 94 | regulator-name = "vcc5v0_sys"; |
| 95 | regulator-always-on; |
| 96 | regulator-boot-on; |
| 97 | regulator-min-microvolt = <5000000>; |
| 98 | regulator-max-microvolt = <5000000>; |
| 99 | }; |
| 100 | |
| 101 | vdd_core: vdd-core { |
| 102 | compatible = "pwm-regulator"; |
| 103 | pwms = <&pwm0 0 5000 1>; |
| 104 | pwm-supply = <&vcc5v0_sys>; |
| 105 | regulator-name = "vdd_core"; |
| 106 | regulator-min-microvolt = <827000>; |
| 107 | regulator-max-microvolt = <1340000>; |
Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 108 | regulator-settling-time-up-us = <250>; |
| 109 | regulator-always-on; |
| 110 | regulator-boot-on; |
| 111 | }; |
| 112 | |
| 113 | vdd_log: vdd-log { |
| 114 | compatible = "regulator-fixed"; |
| 115 | regulator-name = "vdd_log"; |
| 116 | regulator-always-on; |
| 117 | regulator-boot-on; |
| 118 | regulator-min-microvolt = <1050000>; |
| 119 | regulator-max-microvolt = <1050000>; |
| 120 | vin-supply = <&vcc5v0_sys>; |
| 121 | }; |
| 122 | }; |
| 123 | |
| 124 | &cpu0 { |
| 125 | cpu-supply = <&vdd_core>; |
| 126 | }; |
| 127 | |
| 128 | &emmc { |
| 129 | bus-width = <4>; |
| 130 | cap-mmc-highspeed; |
| 131 | mmc-hs200-1_8v; |
| 132 | non-removable; |
| 133 | vmmc-supply = <&vcc_io>; |
| 134 | status = "okay"; |
| 135 | }; |
| 136 | |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 137 | &gmac { |
Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 138 | clock_in_out = "output"; |
| 139 | phy-supply = <&vcc_io>; |
| 140 | snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; |
| 141 | snps,reset-active-low; |
| 142 | snps,reset-delays-us = <0 50000 50000>; |
| 143 | status = "okay"; |
| 144 | }; |
| 145 | |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 146 | &gpio0 { |
| 147 | gpio-line-names = |
| 148 | /* GPIO0_A0 - A7 */ |
| 149 | "", "", "", "", "", "", "", "", |
| 150 | /* GPIO0_B0 - B7 */ |
| 151 | "", "", "", "header1-pin3 [GPIO0_B3]", |
| 152 | "header1-pin5 [GPIO0_B4]", "", "", |
| 153 | "header1-pin11 [GPIO0_B7]", |
| 154 | /* GPIO0_C0 - C7 */ |
| 155 | "header1-pin13 [GPIO0_C0]", |
| 156 | "header1-pin15 [GPIO0_C1]", "", "", "", |
| 157 | "", "", "", |
| 158 | /* GPIO0_D0 - D7 */ |
| 159 | "", "", "", "", "", "", "", ""; |
| 160 | }; |
| 161 | |
| 162 | &gpio1 { |
| 163 | gpio-line-names = |
| 164 | /* GPIO1_A0 - A7 */ |
| 165 | "", "", "", "", "", "", "", "", |
| 166 | /* GPIO1_B0 - B7 */ |
| 167 | "", "", "", "", "", "", "", "", |
| 168 | /* GPIO1_C0 - C7 */ |
| 169 | "", "", "", "", "", "", "header1-pin21 [GPIO1_C6]", |
| 170 | "header1-pin19 [GPIO1_C7]", |
| 171 | /* GPIO1_D0 - D7 */ |
| 172 | "header1-pin23 [GPIO1_D0]", "header1-pin24 [GPIO1_D1]", |
| 173 | "", "", "", "", "", ""; |
| 174 | }; |
| 175 | |
| 176 | &gpio2 { |
| 177 | gpio-line-names = |
| 178 | /* GPIO2_A0 - A7 */ |
| 179 | "header1-pin10 [GPIO2_A0]", "header1-pin8 [GPIO2_A1]", |
| 180 | "", "", |
| 181 | "header1-pin7 [GPIO2_A4]", "header1-pin12 [GPIO2_A5]", |
| 182 | "header2-pin46 [GPIO2_A6]", "header1-pin22 [GPIO1_A7]", |
| 183 | /* GPIO2_B0 - B7 */ |
| 184 | "header2-pin45 [GPIO2_B0]", "header1-pin18 [GPIO2_B1]", |
| 185 | "header1-pin16 [GPIO2_B2]", "header2-pin44 [GPIO2_B3]", |
| 186 | "header2-pin43 [GPIO2_B4]", "header2-pin28 [GPIO2_B5]", |
| 187 | "header2-pin30 [GPIO2_B6]", "header2-pin32 [GPIO2_B7]", |
| 188 | /* GPIO2_C0 - C7 */ |
| 189 | "header2-pin34 [GPIO2_C0]", "", "", "", "", "", "", "", |
| 190 | /* GPIO2_D0 - D7 */ |
| 191 | "", "", "", "", "", "", "", ""; |
| 192 | }; |
| 193 | |
| 194 | &gpio3 { |
| 195 | gpio-line-names = |
| 196 | /* GPIO3_A0 - A7 */ |
| 197 | "", "", "", "", "", "", "", "", |
| 198 | /* GPIO3_B0 - B7 */ |
| 199 | "", "", "header2-pin42 [GPIO3_B2]", |
| 200 | "header2-pin41 [GPIO3_B3]", "header2-pin40 [GPIO3_B4]", |
| 201 | "header2-pin39 [GPIO3_B5]", "", "", |
| 202 | /* GPIO3_C0 - C7 */ |
| 203 | "", "", "", "", "", "", "", "", |
| 204 | /* GPIO3_D0 - D7 */ |
| 205 | "", "", "", "", "", "", "", ""; |
| 206 | }; |
| 207 | |
Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 208 | &i2c1 { |
| 209 | status = "okay"; |
| 210 | }; |
| 211 | |
| 212 | &pinctrl { |
| 213 | pinctrl-names = "default"; |
| 214 | pinctrl-0 = <&rtc_32k>; |
| 215 | |
| 216 | leds { |
| 217 | green_led_gio: green-led-gpio { |
| 218 | rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 219 | }; |
| 220 | |
| 221 | heartbeat_led_gpio: heartbeat-led-gpio { |
| 222 | rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; |
| 223 | }; |
| 224 | }; |
| 225 | |
| 226 | usb { |
| 227 | otg_vbus_drv: otg-vbus-drv { |
| 228 | rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; |
| 229 | }; |
| 230 | }; |
| 231 | |
| 232 | sdio-pwrseq { |
| 233 | wifi_enable_h: wifi-enable-h { |
| 234 | rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 235 | }; |
| 236 | |
| 237 | wifi_host_wake: wifi-host-wake { |
| 238 | rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; |
| 239 | }; |
| 240 | }; |
| 241 | }; |
| 242 | |
| 243 | &pwm0 { |
| 244 | status = "okay"; |
| 245 | pinctrl-0 = <&pwm0_pin_pull_down>; |
| 246 | }; |
| 247 | |
| 248 | &saradc { |
| 249 | vref-supply = <&vcc_1v8>; |
| 250 | status = "okay"; |
| 251 | }; |
| 252 | |
| 253 | &sdio { |
| 254 | #address-cells = <1>; |
| 255 | #size-cells = <0>; |
| 256 | cap-sd-highspeed; |
| 257 | cap-sdio-irq; |
| 258 | keep-power-in-suspend; |
| 259 | max-frequency = <1000000>; |
| 260 | mmc-pwrseq = <&sdio_pwrseq>; |
| 261 | non-removable; |
| 262 | sd-uhs-sdr104; |
| 263 | status = "okay"; |
| 264 | }; |
| 265 | |
| 266 | &sdmmc { |
| 267 | cap-sd-highspeed; |
| 268 | status = "okay"; |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 269 | }; |
| 270 | |
| 271 | &u2phy { |
| 272 | status = "okay"; |
| 273 | |
| 274 | u2phy_host: host-port { |
| 275 | phy-supply = <&vcc5v0_otg>; |
| 276 | status = "okay"; |
| 277 | }; |
| 278 | |
| 279 | u2phy_otg: otg-port { |
| 280 | phy-supply = <&vcc5v0_otg>; |
| 281 | status = "okay"; |
| 282 | }; |
Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 283 | }; |
| 284 | |
| 285 | &uart0 { |
| 286 | status = "okay"; |
| 287 | }; |
| 288 | |
| 289 | &uart4 { |
| 290 | status = "okay"; |
| 291 | |
| 292 | bluetooth { |
| 293 | compatible = "realtek,rtl8723bs-bt"; |
| 294 | device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; |
| 295 | host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; |
| 296 | }; |
| 297 | }; |
| 298 | |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 299 | &usb_host_ehci { |
| 300 | status = "okay"; |
| 301 | }; |
| 302 | |
| 303 | &usb_host_ohci { |
| 304 | status = "okay"; |
| 305 | }; |
| 306 | |
| 307 | &usb20_otg { |
| 308 | dr_mode = "peripheral"; |
| 309 | status = "okay"; |
| 310 | }; |
| 311 | |
Akash Gajjar | 60a9f71 | 2023-02-14 21:01:09 +0530 | [diff] [blame] | 312 | &wdt { |
| 313 | status = "okay"; |
| 314 | }; |