GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm64 / boot / dts / rockchip / rk3308-rock-pi-s.dts
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 #include "rk3308.dtsi"
9
10 / {
11         model = "Radxa ROCK Pi S";
12         compatible = "radxa,rockpis", "rockchip,rk3308";
13
14         aliases {
15                 ethernet0 = &gmac;
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>;
108                 regulator-init-microvolt = <1015000>;
109                 regulator-settling-time-up-us = <250>;
110                 regulator-always-on;
111                 regulator-boot-on;
112         };
113
114         vdd_log: vdd-log {
115                 compatible = "regulator-fixed";
116                 regulator-name = "vdd_log";
117                 regulator-always-on;
118                 regulator-boot-on;
119                 regulator-min-microvolt = <1050000>;
120                 regulator-max-microvolt = <1050000>;
121                 vin-supply = <&vcc5v0_sys>;
122         };
123 };
124
125 &cpu0 {
126         cpu-supply = <&vdd_core>;
127 };
128
129 &emmc {
130         bus-width = <4>;
131         cap-mmc-highspeed;
132         mmc-hs200-1_8v;
133         non-removable;
134         vmmc-supply = <&vcc_io>;
135         status = "okay";
136 };
137
138 &gmac {
139         clock_in_out = "output";
140         phy-supply = <&vcc_io>;
141         snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
142         snps,reset-active-low;
143         snps,reset-delays-us = <0 50000 50000>;
144         status = "okay";
145 };
146
147 &i2c1 {
148         status = "okay";
149 };
150
151 &pinctrl {
152         pinctrl-names = "default";
153         pinctrl-0 = <&rtc_32k>;
154
155         leds {
156                 green_led_gio: green-led-gpio {
157                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
158                 };
159
160                 heartbeat_led_gpio: heartbeat-led-gpio {
161                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
162                 };
163         };
164
165         usb {
166                 otg_vbus_drv: otg-vbus-drv {
167                         rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
168                 };
169         };
170
171         sdio-pwrseq {
172                 wifi_enable_h: wifi-enable-h {
173                         rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
174                 };
175
176                 wifi_host_wake: wifi-host-wake {
177                         rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
178                 };
179         };
180 };
181
182 &pwm0 {
183         status = "okay";
184         pinctrl-0 = <&pwm0_pin_pull_down>;
185 };
186
187 &saradc {
188         vref-supply = <&vcc_1v8>;
189         status = "okay";
190 };
191
192 &sdio {
193         #address-cells = <1>;
194         #size-cells = <0>;
195         cap-sd-highspeed;
196         cap-sdio-irq;
197         keep-power-in-suspend;
198         max-frequency = <1000000>;
199         mmc-pwrseq = <&sdio_pwrseq>;
200         non-removable;
201         sd-uhs-sdr104;
202         status = "okay";
203 };
204
205 &sdmmc {
206         cap-sd-highspeed;
207         status = "okay";
208 };
209
210 &u2phy {
211         status = "okay";
212
213         u2phy_host: host-port {
214                 phy-supply = <&vcc5v0_otg>;
215                 status = "okay";
216         };
217
218         u2phy_otg: otg-port {
219                 phy-supply = <&vcc5v0_otg>;
220                 status = "okay";
221         };
222 };
223
224 &uart0 {
225         status = "okay";
226 };
227
228 &uart4 {
229         status = "okay";
230
231         bluetooth {
232                 compatible = "realtek,rtl8723bs-bt";
233                 device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
234                 host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
235         };
236 };
237
238 &usb_host_ehci {
239         status = "okay";
240 };
241
242 &usb_host_ohci {
243         status = "okay";
244 };
245
246 &usb20_otg {
247         dr_mode = "peripheral";
248         status = "okay";
249 };
250
251 &wdt {
252         status = "okay";
253 };