xref: /linux/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts (revision e65e175b07bef5974045cc42238de99057669ca7)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 Matthias Brugger <mbrugger@suse.com>
4 */
5
6/dts-v1/;
7#include <dt-bindings/input/input.h>
8#include "rk3368.dtsi"
9
10/ {
11	model = "Rockchip Orion R68";
12	compatible = "tronsmart,orion-r68-meta", "rockchip,rk3368";
13
14	aliases {
15		mmc0 = &sdmmc;
16		mmc1 = &emmc;
17	};
18
19	chosen {
20		stdout-path = "serial2:115200n8";
21	};
22
23	memory {
24		device_type = "memory";
25		reg = <0x0 0x0 0x0 0x80000000>;
26	};
27
28	emmc_pwrseq: emmc-pwrseq {
29		compatible = "mmc-pwrseq-emmc";
30		pinctrl-0 = <&emmc_reset>;
31		pinctrl-names = "default";
32		reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
33	};
34
35	ext_gmac: external-gmac-clock {
36		compatible = "fixed-clock";
37		#clock-cells = <0>;
38		clock-frequency = <125000000>;
39		clock-output-names = "ext_gmac";
40	};
41
42	keys: gpio-keys {
43		compatible = "gpio-keys";
44		pinctrl-names = "default";
45		pinctrl-0 = <&pwr_key>;
46
47		key-power {
48			wakeup-source;
49			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
50			label = "GPIO Power";
51			linux,code = <KEY_POWER>;
52		};
53	};
54
55	leds: gpio-leds {
56		compatible = "gpio-leds";
57
58		red_led: led-0 {
59			gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
60			label = "orion:red:led";
61			pinctrl-names = "default";
62			pinctrl-0 = <&led_ctl>;
63			default-state = "on";
64		};
65
66		blue_led: led-1 {
67			gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
68			label = "orion:blue:led";
69			pinctrl-names = "default";
70			pinctrl-0 = <&stby_pwren>;
71			default-state = "off";
72		};
73	};
74
75	vcc_18: vcc18-regulator {
76		compatible = "regulator-fixed";
77		regulator-name = "vcc_18";
78		regulator-min-microvolt = <1800000>;
79		regulator-max-microvolt = <1800000>;
80		regulator-always-on;
81		regulator-boot-on;
82		vin-supply = <&vcc_sys>;
83	};
84
85	/* supplies both host and otg */
86	vcc_host: vcc-host-regulator {
87		compatible = "regulator-fixed";
88		gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
89		pinctrl-names = "default";
90		pinctrl-0 = <&host_vbus_drv>;
91		regulator-name = "vcc_host";
92		regulator-always-on;
93		regulator-boot-on;
94		vin-supply = <&vcc_sys>;
95	};
96
97	vcc_io: vcc-io-regulator {
98		compatible = "regulator-fixed";
99		regulator-name = "vcc_io";
100		regulator-min-microvolt = <3300000>;
101		regulator-max-microvolt = <3300000>;
102		regulator-always-on;
103		regulator-boot-on;
104		vin-supply = <&vcc_sys>;
105	};
106
107	vcc_lan: vcc-lan-regulator {
108		compatible = "regulator-fixed";
109		regulator-name = "vcc_lan";
110		regulator-min-microvolt = <3300000>;
111		regulator-max-microvolt = <3300000>;
112		regulator-always-on;
113		regulator-boot-on;
114		vin-supply = <&vcc_io>;
115	};
116
117	vcc_sd: vcc-sd-regulator {
118		compatible = "regulator-fixed";
119		regulator-name = "vcc_sd";
120		gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
121		regulator-min-microvolt = <1800000>;
122		regulator-max-microvolt = <3300000>;
123		vin-supply = <&vcc_io>;
124	};
125
126	vcc_sys: vcc-sys-regulator {
127		compatible = "regulator-fixed";
128		regulator-name = "vcc_sys";
129		regulator-min-microvolt = <5000000>;
130		regulator-max-microvolt = <5000000>;
131		regulator-always-on;
132		regulator-boot-on;
133	};
134
135	vccio_sd: vcc-io-sd-regulator {
136		compatible = "regulator-fixed";
137		regulator-name = "vccio_sd";
138		regulator-min-microvolt = <1800000>;
139		regulator-max-microvolt = <3300000>;
140		regulator-always-on;
141		regulator-boot-on;
142		vin-supply = <&vcc_io>;
143	};
144
145	vccio_wl: vccio-wl-regulator {
146		compatible = "regulator-fixed";
147		regulator-name = "vccio_wl";
148		regulator-min-microvolt = <3300000>;
149		regulator-max-microvolt = <3300000>;
150		regulator-always-on;
151		regulator-boot-on;
152		vin-supply = <&vcc_io>;
153	};
154
155	vdd_10: vdd-10-regulator {
156		compatible = "regulator-fixed";
157		regulator-name = "vdd_10";
158		regulator-min-microvolt = <1000000>;
159		regulator-max-microvolt = <1000000>;
160		regulator-always-on;
161		regulator-boot-on;
162		vin-supply = <&vcc_sys>;
163	};
164};
165
166&emmc {
167	bus-width = <8>;
168	cap-mmc-highspeed;
169	mmc-pwrseq = <&emmc_pwrseq>;
170	mmc-hs200-1_2v;
171	mmc-hs200-1_8v;
172	non-removable;
173	pinctrl-names = "default";
174	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
175	status = "okay";
176};
177
178&gmac {
179	assigned-clocks = <&cru SCLK_MAC>;
180	assigned-clock-parents = <&ext_gmac>;
181	clock_in_out = "input";
182	phy-supply = <&vcc_lan>;
183	phy-mode = "rgmii";
184	pinctrl-names = "default";
185	pinctrl-0 = <&rgmii_pins>;
186	snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
187	snps,reset-active-low;
188	snps,reset-delays-us = <0 10000 1000000>;
189	tx_delay = <0x30>;
190	rx_delay = <0x10>;
191	status = "okay";
192};
193
194&i2c0 {
195	status = "okay";
196
197	vdd_cpu: syr827@40 {
198		compatible = "silergy,syr827";
199		reg = <0x40>;
200		fcs,suspend-voltage-selector = <1>;
201		regulator-name = "vdd_cpu";
202		regulator-enable-ramp-delay = <300>;
203		regulator-min-microvolt = <712500>;
204		regulator-max-microvolt = <1500000>;
205		regulator-ramp-delay = <8000>;
206		regulator-always-on;
207		regulator-boot-on;
208		vin-supply = <&vcc_sys>;
209	};
210
211	hym8563: rtc@51 {
212		compatible = "haoyu,hym8563";
213		reg = <0x51>;
214		#clock-cells = <0>;
215		clock-output-names = "xin32k";
216		/* rtc_int is not connected */
217	};
218};
219
220&pinctrl {
221	pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
222		bias-disable;
223		drive-strength = <8>;
224	};
225
226	pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
227		bias-pull-up;
228		drive-strength = <8>;
229	};
230
231	emmc {
232		emmc_bus8: emmc-bus8 {
233			rockchip,pins = <1 RK_PC2 2 &pcfg_pull_up_drv_8ma>,
234					<1 RK_PC3 2 &pcfg_pull_up_drv_8ma>,
235					<1 RK_PC4 2 &pcfg_pull_up_drv_8ma>,
236					<1 RK_PC5 2 &pcfg_pull_up_drv_8ma>,
237					<1 RK_PC6 2 &pcfg_pull_up_drv_8ma>,
238					<1 RK_PC7 2 &pcfg_pull_up_drv_8ma>,
239					<1 RK_PD0 2 &pcfg_pull_up_drv_8ma>,
240					<1 RK_PD1 2 &pcfg_pull_up_drv_8ma>;
241		};
242
243		emmc-clk {
244			rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none_drv_8ma>;
245		};
246
247		emmc-cmd {
248			rockchip,pins = <1 RK_PD2 2 &pcfg_pull_up_drv_8ma>;
249		};
250
251		emmc_reset: emmc-reset {
252			rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
253		};
254	};
255
256	keys {
257		pwr_key: pwr-key {
258			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>;
259		};
260	};
261
262	leds {
263		stby_pwren: stby-pwren {
264			rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
265		};
266
267		led_ctl: led-ctl {
268			rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
269		};
270	};
271
272	sdmmc {
273		sdmmc_clk: sdmmc-clk {
274			rockchip,pins = <2 RK_PB1 1 &pcfg_pull_none_drv_8ma>;
275		};
276
277		sdmmc_cmd: sdmmc-cmd {
278			rockchip,pins = <2 RK_PB2 1 &pcfg_pull_up_drv_8ma>;
279		};
280
281		sdmmc_cd: sdmmc-cd {
282			rockchip,pins = <2 RK_PB3 1 &pcfg_pull_up_drv_8ma>;
283		};
284
285		sdmmc_bus1: sdmmc-bus1 {
286			rockchip,pins = <2 RK_PA5 1 &pcfg_pull_up_drv_8ma>;
287		};
288
289		sdmmc_bus4: sdmmc-bus4 {
290			rockchip,pins = <2 RK_PA5 1 &pcfg_pull_up_drv_8ma>,
291					<2 RK_PA6 1 &pcfg_pull_up_drv_8ma>,
292					<2 RK_PA7 1 &pcfg_pull_up_drv_8ma>,
293					<2 RK_PB0 1 &pcfg_pull_up_drv_8ma>;
294		};
295	};
296
297	usb {
298		host_vbus_drv: host-vbus-drv {
299			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
300		};
301	};
302};
303
304&saradc {
305	vref-supply = <&vcc_18>;
306	status = "okay";
307};
308
309&sdmmc {
310	bus-width = <4>;
311	clock-frequency = <50000000>;
312	max-frequency = <50000000>;
313	cap-sd-highspeed;
314	card-detect-delay = <200>;
315	pinctrl-names = "default";
316	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
317	vmmc-supply = <&vcc_sd>;
318	vqmmc-supply = <&vccio_sd>;
319	status = "okay";
320};
321
322&uart2 {
323	status = "okay";
324};
325
326&uart4 {
327	pinctrl-names = "default";
328	pinctrl-0 = <&uart4_xfer>;
329	status = "okay";
330};
331
332&usb_host0_ehci {
333	status = "okay";
334};
335
336&usb_otg {
337	status = "okay";
338};
339
340&wdt {
341	status = "okay";
342};
343