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