blob: 079101cddd65fa102cb1e40c4bbfa2433ce0dbbf [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";
147 phy-supply = <&vcc_io>;
148 snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
149 snps,reset-active-low;
150 snps,reset-delays-us = <0 50000 50000>;
151 status = "okay";
152};
153
Tom Rini93743d22024-04-01 09:08:13 -0400154&gpio0 {
155 gpio-line-names =
156 /* GPIO0_A0 - A7 */
157 "", "", "", "", "", "", "", "",
158 /* GPIO0_B0 - B7 */
159 "", "", "", "header1-pin3 [GPIO0_B3]",
160 "header1-pin5 [GPIO0_B4]", "", "",
161 "header1-pin11 [GPIO0_B7]",
162 /* GPIO0_C0 - C7 */
163 "header1-pin13 [GPIO0_C0]",
164 "header1-pin15 [GPIO0_C1]", "", "", "",
165 "", "", "",
166 /* GPIO0_D0 - D7 */
167 "", "", "", "", "", "", "", "";
168};
169
170&gpio1 {
171 gpio-line-names =
172 /* GPIO1_A0 - A7 */
173 "", "", "", "", "", "", "", "",
174 /* GPIO1_B0 - B7 */
175 "", "", "", "", "", "", "", "",
176 /* GPIO1_C0 - C7 */
177 "", "", "", "", "", "", "header1-pin21 [GPIO1_C6]",
178 "header1-pin19 [GPIO1_C7]",
179 /* GPIO1_D0 - D7 */
180 "header1-pin23 [GPIO1_D0]", "header1-pin24 [GPIO1_D1]",
181 "", "", "", "", "", "";
182};
183
184&gpio2 {
185 gpio-line-names =
186 /* GPIO2_A0 - A7 */
187 "header1-pin10 [GPIO2_A0]", "header1-pin8 [GPIO2_A1]",
188 "", "",
189 "header1-pin7 [GPIO2_A4]", "header1-pin12 [GPIO2_A5]",
190 "header2-pin46 [GPIO2_A6]", "header1-pin22 [GPIO1_A7]",
191 /* GPIO2_B0 - B7 */
192 "header2-pin45 [GPIO2_B0]", "header1-pin18 [GPIO2_B1]",
193 "header1-pin16 [GPIO2_B2]", "header2-pin44 [GPIO2_B3]",
194 "header2-pin43 [GPIO2_B4]", "header2-pin28 [GPIO2_B5]",
195 "header2-pin30 [GPIO2_B6]", "header2-pin32 [GPIO2_B7]",
196 /* GPIO2_C0 - C7 */
197 "header2-pin34 [GPIO2_C0]", "", "", "", "", "", "", "",
198 /* GPIO2_D0 - D7 */
199 "", "", "", "", "", "", "", "";
200};
201
202&gpio3 {
203 gpio-line-names =
204 /* GPIO3_A0 - A7 */
205 "", "", "", "", "", "", "", "",
206 /* GPIO3_B0 - B7 */
207 "", "", "header2-pin42 [GPIO3_B2]",
208 "header2-pin41 [GPIO3_B3]", "header2-pin40 [GPIO3_B4]",
209 "header2-pin39 [GPIO3_B5]", "", "",
210 /* GPIO3_C0 - C7 */
211 "", "", "", "", "", "", "", "",
212 /* GPIO3_D0 - D7 */
213 "", "", "", "", "", "", "", "";
214};
215
Tom Rini53633a82024-02-29 12:33:36 -0500216&i2c1 {
217 status = "okay";
218};
219
220&pinctrl {
221 pinctrl-names = "default";
222 pinctrl-0 = <&rtc_32k>;
223
224 leds {
Tom Rini762f85b2024-07-20 11:15:10 -0600225 green_led: green-led {
Tom Rini53633a82024-02-29 12:33:36 -0500226 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
227 };
228
Tom Rini762f85b2024-07-20 11:15:10 -0600229 heartbeat_led: heartbeat-led {
Tom Rini53633a82024-02-29 12:33:36 -0500230 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
231 };
232 };
233
234 usb {
235 otg_vbus_drv: otg-vbus-drv {
236 rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
237 };
238 };
239
240 sdio-pwrseq {
241 wifi_enable_h: wifi-enable-h {
242 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
243 };
244
245 wifi_host_wake: wifi-host-wake {
246 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
247 };
248 };
249};
250
251&pwm0 {
252 status = "okay";
253 pinctrl-0 = <&pwm0_pin_pull_down>;
254};
255
256&saradc {
257 vref-supply = <&vcc_1v8>;
258 status = "okay";
259};
260
261&sdio {
262 #address-cells = <1>;
263 #size-cells = <0>;
264 cap-sd-highspeed;
265 cap-sdio-irq;
266 keep-power-in-suspend;
267 max-frequency = <1000000>;
268 mmc-pwrseq = <&sdio_pwrseq>;
269 non-removable;
270 sd-uhs-sdr104;
271 status = "okay";
272};
273
274&sdmmc {
275 cap-sd-highspeed;
276 status = "okay";
277};
278
279&u2phy {
280 status = "okay";
281
282 u2phy_host: host-port {
283 phy-supply = <&vcc5v0_otg>;
284 status = "okay";
285 };
286
287 u2phy_otg: otg-port {
288 phy-supply = <&vcc5v0_otg>;
289 status = "okay";
290 };
291};
292
293&uart0 {
294 status = "okay";
295};
296
297&uart4 {
298 status = "okay";
299
300 bluetooth {
301 compatible = "realtek,rtl8723bs-bt";
302 device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
303 host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
304 };
305};
306
307&usb_host_ehci {
308 status = "okay";
309};
310
311&usb_host_ohci {
312 status = "okay";
313};
314
315&usb20_otg {
316 dr_mode = "peripheral";
317 status = "okay";
318};
319
320&wdt {
321 status = "okay";
322};