• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// SPDX-License-Identifier: GPL-2.0+ OR X11
2/*
3 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
4 */
5
6/dts-v1/;
7#include <dt-bindings/input/input.h>
8#include "rk3188.dtsi"
9#include "rk3188-radxarock-u-boot.dtsi"
10
11/ {
12	model = "Radxa Rock";
13	compatible = "radxa,rock", "rockchip,rk3188";
14
15	chosen {
16/*		stdout-path = &uart2; */
17		stdout-path = "serial2:115200n8";
18	};
19
20	config {
21		u-boot,dm-pre-reloc;
22		u-boot,boot-led = "rock:red:power";
23	};
24
25	memory {
26		device_type = "memory";
27		reg = <0x60000000 0x80000000>;
28	};
29
30	gpio-keys {
31		compatible = "gpio-keys";
32		autorepeat;
33
34		power {
35			gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
36			linux,code = <KEY_POWER>;
37			label = "GPIO Key Power";
38			linux,input-type = <1>;
39			wakeup-source;
40			debounce-interval = <100>;
41		};
42	};
43
44	gpio-leds {
45		compatible = "gpio-leds";
46
47		green {
48			label = "rock:green:user1";
49			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
50			default-state = "off";
51		};
52
53		blue {
54			label = "rock:blue:user2";
55			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
56			default-state = "off";
57		};
58
59		sleep {
60			label = "rock:red:power";
61			gpios = <&gpio0 15 0>;
62			default-state = "off";
63		};
64	};
65
66	sound {
67		compatible = "simple-audio-card";
68		simple-audio-card,name = "SPDIF";
69
70		simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
71			cpu { sound-dai = <&spdif>; };
72			codec { sound-dai = <&spdif_out>; };
73		};
74	};
75
76	spdif_out: spdif-out {
77		compatible = "linux,spdif-dit";
78		#sound-dai-cells = <0>;
79	};
80
81	ir_recv: gpio-ir-receiver {
82		compatible = "gpio-ir-receiver";
83		gpios = <&gpio0 10 1>;
84		pinctrl-names = "default";
85		pinctrl-0 = <&ir_recv_pin>;
86	};
87
88	vcc_otg: usb-otg-regulator {
89		compatible = "regulator-fixed";
90		enable-active-high;
91		gpio = <&gpio2 31 GPIO_ACTIVE_HIGH>;
92		pinctrl-names = "default";
93		pinctrl-0 = <&otg_vbus_drv>;
94		regulator-name = "otg-vbus";
95		regulator-min-microvolt = <5000000>;
96		regulator-max-microvolt = <5000000>;
97		regulator-always-on;
98		regulator-boot-on;
99	};
100
101	vcc_sd0: sdmmc-regulator {
102		compatible = "regulator-fixed";
103		regulator-name = "sdmmc-supply";
104		regulator-min-microvolt = <3300000>;
105		regulator-max-microvolt = <3300000>;
106		gpio = <&gpio3 1 GPIO_ACTIVE_LOW>;
107		pinctrl-names = "default";
108		pinctrl-0 = <&sdmmc_pwr>;
109		startup-delay-us = <100000>;
110		vin-supply = <&vcc_io>;
111	};
112
113	vcc_host: usb-host-regulator {
114		compatible = "regulator-fixed";
115		enable-active-high;
116		gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>;
117		pinctrl-names = "default";
118		pinctrl-0 = <&host_vbus_drv>;
119		regulator-name = "host-pwr";
120		regulator-min-microvolt = <5000000>;
121		regulator-max-microvolt = <5000000>;
122		regulator-always-on;
123		regulator-boot-on;
124	};
125
126	vsys: vsys-regulator {
127		compatible = "regulator-fixed";
128		regulator-name = "vsys";
129		regulator-min-microvolt = <5000000>;
130		regulator-max-microvolt = <5000000>;
131		regulator-boot-on;
132	};
133};
134
135&dmc {
136	rockchip,pctl-timing = <0x12c 0xc8 0x1f4 0x1e 0x4e 0x4 0x69 0x6
137		0x3 0x0 0x6 0x5 0xc 0x10 0x6 0x4
138		0x4 0x5 0x4 0x200 0x3 0xa 0x40 0x0
139		0x1 0x5 0x5 0x3 0xc 0x1e 0x100 0x0
140		0x4 0x0>;
141	rockchip,phy-timing = <0x208c6690 0x690878 0x10022a00
142		0x220 0x40 0x0 0x0>;
143	rockchip,sdram-params = <0x24716310 0 2 300000000 3 9 0>;
144};
145
146&emac {
147	status = "okay";
148
149	pinctrl-names = "default";
150	pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>;
151
152	phy = <&phy0>;
153	phy-supply = <&vcc_rmii>;
154
155	phy0: ethernet-phy@0 {
156		reg = <0>;
157		interrupt-parent = <&gpio3>;
158		interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
159	};
160};
161
162&cpu0 {
163	cpu0-supply = <&vdd_arm>;
164};
165
166&i2c1 {
167	status = "okay";
168	clock-frequency = <400000>;
169
170	rtc@51 {
171		compatible = "haoyu,hym8563";
172		reg = <0x51>;
173		interrupt-parent = <&gpio0>;
174		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
175		pinctrl-names = "default";
176		pinctrl-0 = <&rtc_int>;
177		#clock-cells = <0>;
178		clock-output-names = "xin32k";
179	};
180
181	act8846: act8846@5a {
182		compatible = "active-semi,act8846";
183		reg = <0x5a>;
184		status = "okay";
185		system-power-controller;
186
187		pinctrl-names = "default";
188		pinctrl-0 = <&act8846_dvs0_ctl>;
189
190		vp1-supply = <&vsys>;
191		vp2-supply = <&vsys>;
192		vp3-supply = <&vsys>;
193		vp4-supply = <&vsys>;
194		inl1-supply = <&vcc_io>;
195		inl2-supply = <&vsys>;
196		inl3-supply = <&vsys>;
197
198		regulators {
199			vcc_ddr: REG1 {
200				regulator-name = "VCC_DDR";
201				regulator-min-microvolt = <1200000>;
202				regulator-max-microvolt = <1200000>;
203				regulator-always-on;
204			};
205
206			vdd_log: REG2 {
207				regulator-name = "VDD_LOG";
208				regulator-min-microvolt = <1000000>;
209				regulator-max-microvolt = <1000000>;
210				regulator-always-on;
211			};
212
213			vdd_arm: REG3 {
214				regulator-name = "VDD_ARM";
215				regulator-min-microvolt = <875000>;
216				regulator-max-microvolt = <1350000>;
217				regulator-always-on;
218			};
219
220			vcc_io: REG4 {
221				regulator-name = "VCC_IO";
222				regulator-min-microvolt = <3300000>;
223				regulator-max-microvolt = <3300000>;
224				regulator-always-on;
225			};
226
227			vdd_10: REG5 {
228				regulator-name = "VDD_10";
229				regulator-min-microvolt = <1000000>;
230				regulator-max-microvolt = <1000000>;
231				regulator-always-on;
232			};
233
234			vdd_hdmi: REG6 {
235				regulator-name = "VDD_HDMI";
236				regulator-min-microvolt = <2500000>;
237				regulator-max-microvolt = <2500000>;
238				regulator-always-on;
239			};
240
241			vcc18: REG7 {
242				regulator-name = "VCC_18";
243				regulator-min-microvolt = <1800000>;
244				regulator-max-microvolt = <1800000>;
245				regulator-always-on;
246			};
247
248			vcca_33: REG8 {
249				regulator-name = "VCCA_33";
250				regulator-min-microvolt = <3300000>;
251				regulator-max-microvolt = <3300000>;
252				regulator-always-on;
253			};
254
255			vcc_rmii: REG9 {
256				regulator-name = "VCC_RMII";
257				regulator-min-microvolt = <3300000>;
258				regulator-max-microvolt = <3300000>;
259			};
260
261			vccio_wl: REG10 {
262				regulator-name = "VCCIO_WL";
263				regulator-min-microvolt = <3300000>;
264				regulator-max-microvolt = <3300000>;
265				regulator-always-on;
266			};
267
268			vcc_18: REG11 {
269				regulator-name = "VCC18_IO";
270				regulator-min-microvolt = <1800000>;
271				regulator-max-microvolt = <1800000>;
272				regulator-always-on;
273			};
274
275			vcc28: REG12 {
276				regulator-name = "VCC_28";
277				regulator-min-microvolt = <2800000>;
278				regulator-max-microvolt = <2800000>;
279				regulator-always-on;
280			};
281		};
282	};
283};
284
285&mmc0 {
286	num-slots = <1>;
287	status = "okay";
288	pinctrl-names = "default";
289	pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
290	vmmc-supply = <&vcc_sd0>;
291
292	bus-width = <4>;
293	cap-mmc-highspeed;
294	cap-sd-highspeed;
295	disable-wp;
296};
297
298&pwm1 {
299	status = "okay";
300};
301
302&pwm2 {
303	status = "okay";
304};
305
306&pwm3 {
307	status = "okay";
308};
309
310&pinctrl {
311	pcfg_output_low: pcfg-output-low {
312		output-low;
313	};
314
315	act8846 {
316		act8846_dvs0_ctl: act8846-dvs0-ctl {
317			rockchip,pins = <RK_GPIO3 27 RK_FUNC_GPIO &pcfg_output_low>;
318		};
319	};
320
321	hym8563 {
322		rtc_int: rtc-int {
323			rockchip,pins = <RK_GPIO0 0 RK_FUNC_GPIO &pcfg_pull_up>;
324		};
325	};
326
327	lan8720a  {
328		phy_int: phy-int {
329			rockchip,pins = <RK_GPIO3 26 RK_FUNC_GPIO &pcfg_pull_up>;
330		};
331	};
332
333	ir-receiver {
334		ir_recv_pin: ir-recv-pin {
335			rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO &pcfg_pull_none>;
336		};
337	};
338
339	sd0 {
340		sdmmc_pwr: sdmmc-pwr {
341			rockchip,pins = <RK_GPIO3 1 RK_FUNC_GPIO &pcfg_pull_none>;
342		};
343	};
344
345	usb {
346		host_vbus_drv: host-vbus-drv {
347			rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
348		};
349		otg_vbus_drv: otg-vbus-drv {
350			rockchip,pins = <2 31 RK_FUNC_GPIO &pcfg_pull_none>;
351		};
352	};
353};
354
355&spdif {
356	status = "okay";
357};
358
359&uart0 {
360	status = "okay";
361};
362
363&uart1 {
364	status = "okay";
365};
366
367&uart3 {
368	status = "okay";
369};
370
371&usbphy {
372	status = "okay";
373};
374
375&usb_host {
376	status = "okay";
377};
378
379&usb_otg {
380	status = "okay";
381};
382
383&wdt {
384	status = "okay";
385};
386