blob: 5c702f00b27fd719e1135506d832e17a50a2eda1 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// 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/;
Tom Rini762f85b2024-07-20 11:15:10 -06008
9#include <dt-bindings/leds/common.h>
Tom Rini53633a82024-02-29 12:33:36 -050010#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 };
21
22 chosen {
23 stdout-path = "serial0:1500000n8";
24 };
25
26 leds {
27 compatible = "gpio-leds";
28 pinctrl-names = "default";
Tom Rini762f85b2024-07-20 11:15:10 -060029 pinctrl-0 = <&green_led>, <&heartbeat_led>;
Tom Rini53633a82024-02-29 12:33:36 -050030
31 green-led {
Tom Rini762f85b2024-07-20 11:15:10 -060032 color = <LED_COLOR_ID_GREEN>;
Tom Rini53633a82024-02-29 12:33:36 -050033 default-state = "on";
Tom Rini762f85b2024-07-20 11:15:10 -060034 function = LED_FUNCTION_POWER;
Tom Rini53633a82024-02-29 12:33:36 -050035 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
36 label = "rockpis:green:power";
37 linux,default-trigger = "default-on";
38 };
39
40 blue-led {
Tom Rini762f85b2024-07-20 11:15:10 -060041 color = <LED_COLOR_ID_BLUE>;
Tom Rini53633a82024-02-29 12:33:36 -050042 default-state = "on";
Tom Rini762f85b2024-07-20 11:15:10 -060043 function = LED_FUNCTION_HEARTBEAT;
Tom Rini53633a82024-02-29 12:33:36 -050044 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: 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: 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: 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: 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: 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: 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: 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 {
Tom Rini53633a82024-02-29 12:33:36 -0500135 cap-mmc-highspeed;
Tom Rini762f85b2024-07-20 11:15:10 -0600136 cap-sd-highspeed;
137 no-sdio;
Tom Rini53633a82024-02-29 12:33:36 -0500138 non-removable;
Tom Rini762f85b2024-07-20 11:15:10 -0600139 pinctrl-names = "default";
140 pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
Tom Rini53633a82024-02-29 12:33:36 -0500141 vmmc-supply = <&vcc_io>;
142 status = "okay";
143};
144
145&gmac {
146 clock_in_out = "output";
Jonas Karlmanf860eee2024-07-30 14:51:44 +0000147 phy-handle = <&rtl8201f>;
Tom Rini53633a82024-02-29 12:33:36 -0500148 phy-supply = <&vcc_io>;
Tom Rini53633a82024-02-29 12:33:36 -0500149 status = "okay";
Jonas Karlmanf860eee2024-07-30 14:51:44 +0000150
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 };
Tom Rini53633a82024-02-29 12:33:36 -0500166};
167
Tom Rini93743d22024-04-01 09:08:13 -0400168&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
Tom Rini53633a82024-02-29 12:33:36 -0500230&i2c1 {
231 status = "okay";
232};
233
Jonas Karlman32271112024-07-30 14:51:45 +0000234&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
Tom Rini53633a82024-02-29 12:33:36 -0500244&pinctrl {
245 pinctrl-names = "default";
246 pinctrl-0 = <&rtc_32k>;
247
Jonas Karlmanf860eee2024-07-30 14:51:44 +0000248 gmac {
249 mac_rst: mac-rst {
250 rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
251 };
252 };
253
Tom Rini53633a82024-02-29 12:33:36 -0500254 leds {
Tom Rini762f85b2024-07-20 11:15:10 -0600255 green_led: green-led {
Tom Rini53633a82024-02-29 12:33:36 -0500256 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
257 };
258
Tom Rini762f85b2024-07-20 11:15:10 -0600259 heartbeat_led: heartbeat-led {
Tom Rini53633a82024-02-29 12:33:36 -0500260 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
261 };
262 };
263
264 usb {
265 otg_vbus_drv: otg-vbus-drv {
266 rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
267 };
268 };
269
270 sdio-pwrseq {
271 wifi_enable_h: wifi-enable-h {
272 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
273 };
274
275 wifi_host_wake: wifi-host-wake {
276 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
277 };
278 };
279};
280
281&pwm0 {
282 status = "okay";
283 pinctrl-0 = <&pwm0_pin_pull_down>;
284};
285
286&saradc {
287 vref-supply = <&vcc_1v8>;
288 status = "okay";
289};
290
291&sdio {
292 #address-cells = <1>;
293 #size-cells = <0>;
294 cap-sd-highspeed;
295 cap-sdio-irq;
296 keep-power-in-suspend;
297 max-frequency = <1000000>;
298 mmc-pwrseq = <&sdio_pwrseq>;
299 non-removable;
300 sd-uhs-sdr104;
301 status = "okay";
302};
303
304&sdmmc {
Jonas Karlman86c856e2024-07-30 14:51:42 +0000305 cap-mmc-highspeed;
Tom Rini53633a82024-02-29 12:33:36 -0500306 cap-sd-highspeed;
Jonas Karlman86c856e2024-07-30 14:51:42 +0000307 disable-wp;
308 vmmc-supply = <&vcc_io>;
Tom Rini53633a82024-02-29 12:33:36 -0500309 status = "okay";
310};
311
312&u2phy {
313 status = "okay";
314
315 u2phy_host: host-port {
316 phy-supply = <&vcc5v0_otg>;
317 status = "okay";
318 };
319
320 u2phy_otg: otg-port {
321 phy-supply = <&vcc5v0_otg>;
322 status = "okay";
323 };
324};
325
326&uart0 {
Jonas Karlman9b4ef732024-07-30 14:51:43 +0000327 pinctrl-names = "default";
328 pinctrl-0 = <&uart0_xfer>;
Tom Rini53633a82024-02-29 12:33:36 -0500329 status = "okay";
330};
331
332&uart4 {
333 status = "okay";
334
335 bluetooth {
336 compatible = "realtek,rtl8723bs-bt";
337 device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
338 host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
339 };
340};
341
342&usb_host_ehci {
343 status = "okay";
344};
345
346&usb_host_ohci {
347 status = "okay";
348};
349
350&usb20_otg {
351 dr_mode = "peripheral";
352 status = "okay";
353};
354
355&wdt {
356 status = "okay";
357};