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