blob: e7138a4ae0bca8450d440f043d4a7541da110f83 [file] [log] [blame]
Johan Jonkerd2a74ec2021-06-25 15:26:33 +02001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
Heiko Stübner47197682017-03-26 21:09:55 +02002/*
3 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
Heiko Stübner47197682017-03-26 21:09:55 +02004 */
5
6/dts-v1/;
7#include <dt-bindings/input/input.h>
8#include "rk3188.dtsi"
Kever Yang7abb7e82018-04-18 11:13:44 +08009#include "rk3188-radxarock-u-boot.dtsi"
Heiko Stübner47197682017-03-26 21:09:55 +020010
11/ {
12 model = "Radxa Rock";
13 compatible = "radxa,rock", "rockchip,rk3188";
14
Johan Jonker2ee023d2021-06-25 15:26:30 +020015 aliases {
16 mmc0 = &mmc0;
17 };
18
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020019 memory@60000000 {
Heiko Stübner47197682017-03-26 21:09:55 +020020 device_type = "memory";
21 reg = <0x60000000 0x80000000>;
22 };
23
24 gpio-keys {
25 compatible = "gpio-keys";
26 autorepeat;
27
28 power {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020029 gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
Heiko Stübner47197682017-03-26 21:09:55 +020030 linux,code = <KEY_POWER>;
31 label = "GPIO Key Power";
32 linux,input-type = <1>;
33 wakeup-source;
34 debounce-interval = <100>;
35 };
36 };
37
38 gpio-leds {
39 compatible = "gpio-leds";
40
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020041 green_led: led-0 {
Heiko Stübner47197682017-03-26 21:09:55 +020042 label = "rock:green:user1";
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020043 gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_LOW>;
Heiko Stübner47197682017-03-26 21:09:55 +020044 default-state = "off";
45 };
46
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020047 blue_led: led-1 {
Heiko Stübner47197682017-03-26 21:09:55 +020048 label = "rock:blue:user2";
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020049 gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
Heiko Stübner47197682017-03-26 21:09:55 +020050 default-state = "off";
51 };
52
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020053 sleep_led: led-2 {
Heiko Stübner47197682017-03-26 21:09:55 +020054 label = "rock:red:power";
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020055 gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
Heiko Stübner47197682017-03-26 21:09:55 +020056 default-state = "off";
57 };
58 };
59
60 sound {
61 compatible = "simple-audio-card";
62 simple-audio-card,name = "SPDIF";
63
64 simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */
65 cpu { sound-dai = <&spdif>; };
66 codec { sound-dai = <&spdif_out>; };
67 };
68 };
69
70 spdif_out: spdif-out {
71 compatible = "linux,spdif-dit";
72 #sound-dai-cells = <0>;
73 };
74
75 ir_recv: gpio-ir-receiver {
76 compatible = "gpio-ir-receiver";
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020077 gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
Heiko Stübner47197682017-03-26 21:09:55 +020078 pinctrl-names = "default";
79 pinctrl-0 = <&ir_recv_pin>;
80 };
81
82 vcc_otg: usb-otg-regulator {
83 compatible = "regulator-fixed";
84 enable-active-high;
Johan Jonkerd2a74ec2021-06-25 15:26:33 +020085 gpio = <&gpio2 RK_PD7 GPIO_ACTIVE_HIGH>;
Heiko Stübner47197682017-03-26 21:09:55 +020086 pinctrl-names = "default";
87 pinctrl-0 = <&otg_vbus_drv>;
88 regulator-name = "otg-vbus";
89 regulator-min-microvolt = <5000000>;
90 regulator-max-microvolt = <5000000>;
91 regulator-always-on;
92 regulator-boot-on;
93 };
94
95 vcc_sd0: sdmmc-regulator {
96 compatible = "regulator-fixed";
97 regulator-name = "sdmmc-supply";
98 regulator-min-microvolt = <3300000>;
99 regulator-max-microvolt = <3300000>;
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200100 gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
Heiko Stuebnere4d5fa32018-09-21 10:59:48 +0200101 pinctrl-names = "default";
102 pinctrl-0 = <&sdmmc_pwr>;
Heiko Stübner47197682017-03-26 21:09:55 +0200103 startup-delay-us = <100000>;
104 vin-supply = <&vcc_io>;
105 };
106
107 vcc_host: usb-host-regulator {
108 compatible = "regulator-fixed";
109 enable-active-high;
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200110 gpio = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
Heiko Stübner47197682017-03-26 21:09:55 +0200111 pinctrl-names = "default";
112 pinctrl-0 = <&host_vbus_drv>;
113 regulator-name = "host-pwr";
114 regulator-min-microvolt = <5000000>;
115 regulator-max-microvolt = <5000000>;
116 regulator-always-on;
117 regulator-boot-on;
118 };
119
120 vsys: vsys-regulator {
121 compatible = "regulator-fixed";
122 regulator-name = "vsys";
123 regulator-min-microvolt = <5000000>;
124 regulator-max-microvolt = <5000000>;
125 regulator-boot-on;
126 };
127};
128
Heiko Stübner47197682017-03-26 21:09:55 +0200129&emac {
130 status = "okay";
131
132 pinctrl-names = "default";
133 pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>;
134
135 phy = <&phy0>;
136 phy-supply = <&vcc_rmii>;
137
138 phy0: ethernet-phy@0 {
139 reg = <0>;
140 interrupt-parent = <&gpio3>;
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200141 interrupts = <RK_PD2 IRQ_TYPE_LEVEL_LOW>;
Heiko Stübner47197682017-03-26 21:09:55 +0200142 };
143};
144
145&cpu0 {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200146 cpu-supply = <&vdd_arm>;
147};
148
149&cpu1 {
150 cpu-supply = <&vdd_arm>;
151};
152
153&cpu2 {
154 cpu-supply = <&vdd_arm>;
155};
156
157&cpu3 {
158 cpu-supply = <&vdd_arm>;
159};
160
161&gpu {
162 status = "okay";
Heiko Stübner47197682017-03-26 21:09:55 +0200163};
164
165&i2c1 {
166 status = "okay";
167 clock-frequency = <400000>;
168
169 rtc@51 {
170 compatible = "haoyu,hym8563";
171 reg = <0x51>;
172 interrupt-parent = <&gpio0>;
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200173 interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
Heiko Stübner47197682017-03-26 21:09:55 +0200174 pinctrl-names = "default";
175 pinctrl-0 = <&rtc_int>;
176 #clock-cells = <0>;
177 clock-output-names = "xin32k";
178 };
179
180 act8846: act8846@5a {
181 compatible = "active-semi,act8846";
182 reg = <0x5a>;
183 status = "okay";
184 system-power-controller;
185
186 pinctrl-names = "default";
187 pinctrl-0 = <&act8846_dvs0_ctl>;
188
189 vp1-supply = <&vsys>;
190 vp2-supply = <&vsys>;
191 vp3-supply = <&vsys>;
192 vp4-supply = <&vsys>;
193 inl1-supply = <&vcc_io>;
194 inl2-supply = <&vsys>;
195 inl3-supply = <&vsys>;
196
197 regulators {
198 vcc_ddr: REG1 {
199 regulator-name = "VCC_DDR";
200 regulator-min-microvolt = <1200000>;
201 regulator-max-microvolt = <1200000>;
202 regulator-always-on;
203 };
204
205 vdd_log: REG2 {
206 regulator-name = "VDD_LOG";
207 regulator-min-microvolt = <1000000>;
208 regulator-max-microvolt = <1000000>;
209 regulator-always-on;
210 };
211
212 vdd_arm: REG3 {
213 regulator-name = "VDD_ARM";
214 regulator-min-microvolt = <875000>;
215 regulator-max-microvolt = <1350000>;
216 regulator-always-on;
217 };
218
219 vcc_io: REG4 {
220 regulator-name = "VCC_IO";
221 regulator-min-microvolt = <3300000>;
222 regulator-max-microvolt = <3300000>;
223 regulator-always-on;
224 };
225
226 vdd_10: REG5 {
227 regulator-name = "VDD_10";
228 regulator-min-microvolt = <1000000>;
229 regulator-max-microvolt = <1000000>;
230 regulator-always-on;
231 };
232
233 vdd_hdmi: REG6 {
234 regulator-name = "VDD_HDMI";
235 regulator-min-microvolt = <2500000>;
236 regulator-max-microvolt = <2500000>;
237 regulator-always-on;
238 };
239
240 vcc18: REG7 {
241 regulator-name = "VCC_18";
242 regulator-min-microvolt = <1800000>;
243 regulator-max-microvolt = <1800000>;
244 regulator-always-on;
245 };
246
247 vcca_33: REG8 {
248 regulator-name = "VCCA_33";
249 regulator-min-microvolt = <3300000>;
250 regulator-max-microvolt = <3300000>;
251 regulator-always-on;
252 };
253
254 vcc_rmii: REG9 {
255 regulator-name = "VCC_RMII";
256 regulator-min-microvolt = <3300000>;
257 regulator-max-microvolt = <3300000>;
258 };
259
260 vccio_wl: REG10 {
261 regulator-name = "VCCIO_WL";
262 regulator-min-microvolt = <3300000>;
263 regulator-max-microvolt = <3300000>;
264 regulator-always-on;
265 };
266
267 vcc_18: REG11 {
268 regulator-name = "VCC18_IO";
269 regulator-min-microvolt = <1800000>;
270 regulator-max-microvolt = <1800000>;
271 regulator-always-on;
272 };
273
274 vcc28: REG12 {
275 regulator-name = "VCC_28";
276 regulator-min-microvolt = <2800000>;
277 regulator-max-microvolt = <2800000>;
278 regulator-always-on;
279 };
280 };
281 };
282};
283
284&mmc0 {
Heiko Stübner47197682017-03-26 21:09:55 +0200285 status = "okay";
286 pinctrl-names = "default";
287 pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
288 vmmc-supply = <&vcc_sd0>;
289
290 bus-width = <4>;
291 cap-mmc-highspeed;
292 cap-sd-highspeed;
293 disable-wp;
294};
295
296&pwm1 {
297 status = "okay";
298};
299
300&pwm2 {
301 status = "okay";
302};
303
304&pwm3 {
305 status = "okay";
306};
307
308&pinctrl {
309 pcfg_output_low: pcfg-output-low {
310 output-low;
311 };
312
313 act8846 {
314 act8846_dvs0_ctl: act8846-dvs0-ctl {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200315 rockchip,pins = <3 RK_PD3 RK_FUNC_GPIO &pcfg_output_low>;
Heiko Stübner47197682017-03-26 21:09:55 +0200316 };
317 };
318
319 hym8563 {
320 rtc_int: rtc-int {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200321 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
Heiko Stübner47197682017-03-26 21:09:55 +0200322 };
323 };
324
325 lan8720a {
326 phy_int: phy-int {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200327 rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
Heiko Stübner47197682017-03-26 21:09:55 +0200328 };
329 };
330
331 ir-receiver {
332 ir_recv_pin: ir-recv-pin {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200333 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
Heiko Stübner47197682017-03-26 21:09:55 +0200334 };
335 };
336
Heiko Stuebnere4d5fa32018-09-21 10:59:48 +0200337 sd0 {
338 sdmmc_pwr: sdmmc-pwr {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200339 rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
Heiko Stuebnere4d5fa32018-09-21 10:59:48 +0200340 };
341 };
342
Heiko Stübner47197682017-03-26 21:09:55 +0200343 usb {
344 host_vbus_drv: host-vbus-drv {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200345 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
Heiko Stübner47197682017-03-26 21:09:55 +0200346 };
347 otg_vbus_drv: otg-vbus-drv {
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200348 rockchip,pins = <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
Heiko Stübner47197682017-03-26 21:09:55 +0200349 };
350 };
351};
352
353&spdif {
354 status = "okay";
355};
356
357&uart0 {
358 status = "okay";
359};
360
361&uart1 {
362 status = "okay";
363};
364
Johan Jonkerd2a74ec2021-06-25 15:26:33 +0200365&uart2 {
366 status = "okay";
367};
368
Heiko Stübner47197682017-03-26 21:09:55 +0200369&uart3 {
370 status = "okay";
371};
372
373&usbphy {
374 status = "okay";
375};
376
377&usb_host {
378 status = "okay";
379};
380
381&usb_otg {
382 status = "okay";
383};
384
385&wdt {
386 status = "okay";
387};