xref: /linux/arch/arm64/boot/dts/rockchip/rk3328-roc.dtsi (revision cdd30ebb1b9f36159d66f088b61aee264e649d7a)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
4 */
5
6/dts-v1/;
7
8#include "rk3328.dtsi"
9
10/ {
11	aliases {
12		ethernet0 = &gmac2io;
13		mmc0 = &sdmmc;
14		mmc1 = &emmc;
15	};
16
17	chosen {
18		stdout-path = "serial2:1500000n8";
19	};
20
21	gmac_clkin: external-gmac-clock {
22		compatible = "fixed-clock";
23		clock-frequency = <125000000>;
24		clock-output-names = "gmac_clkin";
25		#clock-cells = <0>;
26	};
27
28	dc_12v: regulator-dc-12v {
29		compatible = "regulator-fixed";
30		regulator-name = "dc_12v";
31		regulator-always-on;
32		regulator-boot-on;
33		regulator-min-microvolt = <12000000>;
34		regulator-max-microvolt = <12000000>;
35	};
36
37	vcc_sd: regulator-sdmmc {
38		compatible = "regulator-fixed";
39		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
40		pinctrl-names = "default";
41		pinctrl-0 = <&sdmmc0m1_pin>;
42		regulator-boot-on;
43		regulator-name = "vcc_sd";
44		regulator-min-microvolt = <3300000>;
45		regulator-max-microvolt = <3300000>;
46		vin-supply = <&vcc_io>;
47	};
48
49	vcc_sdio: regulator-sdmmcio {
50		compatible = "regulator-gpio";
51		states = <1800000 0x1>, <3300000 0x0>;
52		regulator-name = "vcc_sdio";
53		regulator-type = "voltage";
54		regulator-min-microvolt = <1800000>;
55		regulator-max-microvolt = <3300000>;
56		regulator-always-on;
57		vin-supply = <&vcc_sys>;
58	};
59
60	vcc_host1_5v: vcc_otg_5v: regulator-vcc-host1-5v {
61		compatible = "regulator-fixed";
62		enable-active-high;
63		pinctrl-names = "default";
64		pinctrl-0 = <&usb20_host_drv>;
65		regulator-name = "vcc_host1_5v";
66		regulator-always-on;
67		vin-supply = <&vcc_sys>;
68	};
69
70	vcc_sys: regulator-vcc-sys {
71		compatible = "regulator-fixed";
72		regulator-name = "vcc_sys";
73		regulator-always-on;
74		regulator-boot-on;
75		regulator-min-microvolt = <5000000>;
76		regulator-max-microvolt = <5000000>;
77		vin-supply = <&dc_12v>;
78	};
79
80	vcc_phy: regulator-vcc-phy {
81		compatible = "regulator-fixed";
82		regulator-name = "vcc_phy";
83		regulator-always-on;
84		regulator-boot-on;
85	};
86
87	leds {
88		compatible = "gpio-leds";
89
90		power_led: led-0 {
91			label = "firefly:blue:power";
92			linux,default-trigger = "heartbeat";
93			gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
94			default-state = "on";
95		};
96
97		user_led: led-1 {
98			label = "firefly:yellow:user";
99			linux,default-trigger = "mmc1";
100			gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
101			default-state = "off";
102		};
103	};
104};
105
106&analog_sound {
107	status = "okay";
108};
109
110&codec {
111	status = "okay";
112};
113
114&cpu0 {
115	cpu-supply = <&vdd_arm>;
116};
117
118&cpu1 {
119	cpu-supply = <&vdd_arm>;
120};
121
122&cpu2 {
123	cpu-supply = <&vdd_arm>;
124};
125
126&cpu3 {
127	cpu-supply = <&vdd_arm>;
128};
129
130&emmc {
131	bus-width = <8>;
132	cap-mmc-highspeed;
133	max-frequency = <150000000>;
134	mmc-ddr-1_8v;
135	mmc-hs200-1_8v;
136	non-removable;
137	pinctrl-names = "default";
138	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
139	vmmc-supply = <&vcc_io>;
140	vqmmc-supply = <&vcc18_emmc>;
141	status = "okay";
142};
143
144&gmac2io {
145	assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
146	assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
147	clock_in_out = "input";
148	phy-supply = <&vcc_phy>;
149	phy-mode = "rgmii";
150	pinctrl-names = "default";
151	pinctrl-0 = <&rgmiim1_pins>;
152	snps,aal;
153	snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
154	snps,reset-active-low;
155	snps,reset-delays-us = <0 10000 50000>;
156	snps,rxpbl = <0x4>;
157	snps,txpbl = <0x4>;
158	tx_delay = <0x24>;
159	rx_delay = <0x18>;
160	status = "okay";
161};
162
163&hdmi {
164	status = "okay";
165};
166
167&hdmiphy {
168	status = "okay";
169};
170
171&hdmi_sound {
172	status = "okay";
173};
174
175&i2c1 {
176	status = "okay";
177
178	rk805: pmic@18 {
179		compatible = "rockchip,rk805";
180		reg = <0x18>;
181		#clock-cells = <1>;
182		clock-output-names = "xin32k", "rk805-clkout2";
183		gpio-controller;
184		#gpio-cells = <2>;
185		pinctrl-names = "default";
186		pinctrl-0 = <&pmic_int_l>;
187		system-power-controller;
188		wakeup-source;
189
190		vcc1-supply = <&vcc_sys>;
191		vcc2-supply = <&vcc_sys>;
192		vcc3-supply = <&vcc_sys>;
193		vcc4-supply = <&vcc_sys>;
194		vcc5-supply = <&vcc_io>;
195		vcc6-supply = <&vcc_io>;
196
197		regulators {
198			vdd_logic: DCDC_REG1 {
199				regulator-name = "vdd_logic";
200				regulator-min-microvolt = <712500>;
201				regulator-max-microvolt = <1450000>;
202				regulator-always-on;
203				regulator-boot-on;
204				regulator-state-mem {
205					regulator-on-in-suspend;
206					regulator-suspend-microvolt = <1000000>;
207				};
208			};
209
210			vdd_arm: DCDC_REG2 {
211				regulator-name = "vdd_arm";
212				regulator-min-microvolt = <712500>;
213				regulator-max-microvolt = <1450000>;
214				regulator-always-on;
215				regulator-boot-on;
216				regulator-state-mem {
217					regulator-on-in-suspend;
218					regulator-suspend-microvolt = <950000>;
219				};
220			};
221
222			vcc_ddr: DCDC_REG3 {
223				regulator-name = "vcc_ddr";
224				regulator-always-on;
225				regulator-boot-on;
226				regulator-state-mem {
227					regulator-on-in-suspend;
228				};
229			};
230
231			vcc_io: DCDC_REG4 {
232				regulator-name = "vcc_io";
233				regulator-min-microvolt = <3300000>;
234				regulator-max-microvolt = <3300000>;
235				regulator-always-on;
236				regulator-boot-on;
237				regulator-state-mem {
238					regulator-on-in-suspend;
239					regulator-suspend-microvolt = <3300000>;
240				};
241			};
242
243			vcc_18: LDO_REG1 {
244				regulator-name = "vcc_18";
245				regulator-min-microvolt = <1800000>;
246				regulator-max-microvolt = <1800000>;
247				regulator-always-on;
248				regulator-boot-on;
249				regulator-state-mem {
250					regulator-on-in-suspend;
251					regulator-suspend-microvolt = <1800000>;
252				};
253			};
254
255			vcc18_emmc: LDO_REG2 {
256				regulator-name = "vcc18_emmc";
257				regulator-min-microvolt = <1800000>;
258				regulator-max-microvolt = <1800000>;
259				regulator-always-on;
260				regulator-boot-on;
261				regulator-state-mem {
262					regulator-on-in-suspend;
263					regulator-suspend-microvolt = <1800000>;
264				};
265			};
266
267			vdd_10: LDO_REG3 {
268				regulator-name = "vdd_10";
269				regulator-min-microvolt = <1000000>;
270				regulator-max-microvolt = <1000000>;
271				regulator-always-on;
272				regulator-boot-on;
273				regulator-state-mem {
274					regulator-on-in-suspend;
275					regulator-suspend-microvolt = <1000000>;
276				};
277			};
278		};
279	};
280};
281
282&i2s0 {
283	status = "okay";
284};
285
286&i2s1 {
287	status = "okay";
288};
289
290&io_domains {
291	status = "okay";
292
293	vccio1-supply = <&vcc_io>;
294	vccio2-supply = <&vcc18_emmc>;
295	vccio3-supply = <&vcc_sdio>;
296	vccio4-supply = <&vcc_18>;
297	vccio5-supply = <&vcc_io>;
298	vccio6-supply = <&vcc_io>;
299	pmuio-supply = <&vcc_io>;
300};
301
302&pinctrl {
303	pmic {
304		pmic_int_l: pmic-int-l {
305			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
306		};
307	};
308
309	usb2 {
310		usb20_host_drv: usb20-host-drv {
311			rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
312		};
313	};
314};
315
316&sdmmc {
317	bus-width = <4>;
318	cap-mmc-highspeed;
319	cap-sd-highspeed;
320	disable-wp;
321	max-frequency = <150000000>;
322	pinctrl-names = "default";
323	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
324	sd-uhs-sdr12;
325	sd-uhs-sdr25;
326	sd-uhs-sdr50;
327	sd-uhs-sdr104;
328	vmmc-supply = <&vcc_sd>;
329	vqmmc-supply = <&vcc_sdio>;
330	status = "okay";
331};
332
333&tsadc {
334	status = "okay";
335};
336
337&u2phy {
338	status = "okay";
339};
340
341&u2phy_host {
342	status = "okay";
343};
344
345&u2phy_otg {
346	status = "okay";
347};
348
349&uart2 {
350	status = "okay";
351};
352
353&usb20_otg {
354	dr_mode = "host";
355	status = "okay";
356};
357
358&usbdrd3 {
359	dr_mode = "host";
360	status = "okay";
361};
362
363&usb_host0_ehci {
364	status = "okay";
365};
366
367&usb_host0_ohci {
368	status = "okay";
369};
370
371&vop {
372	status = "okay";
373};
374
375&vop_mmu {
376	status = "okay";
377};
378