xref: /OK3568_Linux_fs/kernel/scripts/dtc/include-prefixes/arm64/rockchip/rk3328-rock64.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
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	xin32k: xin32k {
25		compatible = "fixed-clock";
26		clock-frequency = <32768>;
27		clock-output-names = "xin32k";
28		#clock-cells = <0>;
29	};
30
31	vcc_sd: sdmmc-regulator {
32		compatible = "regulator-fixed";
33		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
34		pinctrl-names = "default";
35		pinctrl-0 = <&sdmmc0m1_pin>;
36		regulator-name = "vcc_sd";
37		regulator-min-microvolt = <3300000>;
38		regulator-max-microvolt = <3300000>;
39		vin-supply = <&vcc_io>;
40	};
41
42	vcc_host_5v: vcc-host-5v-regulator {
43		compatible = "regulator-fixed";
44		gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
45		pinctrl-names = "default";
46		pinctrl-0 = <&usb20_host_drv>;
47		regulator-name = "vcc_host_5v";
48		regulator-always-on;
49		regulator-boot-on;
50		vin-supply = <&vcc_sys>;
51	};
52
53	vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
54		compatible = "regulator-fixed";
55		gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
56		pinctrl-names = "default";
57		pinctrl-0 = <&usb20_host_drv>;
58		regulator-name = "vcc_host1_5v";
59		regulator-always-on;
60		regulator-boot-on;
61		vin-supply = <&vcc_sys>;
62	};
63
64	vcc_sys: vcc-sys {
65		compatible = "regulator-fixed";
66		regulator-name = "vcc_sys";
67		regulator-always-on;
68		regulator-boot-on;
69		regulator-min-microvolt = <5000000>;
70		regulator-max-microvolt = <5000000>;
71	};
72
73	ir-receiver {
74		compatible = "gpio-ir-receiver";
75		gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
76		pinctrl-0 = <&ir_int>;
77		pinctrl-names = "default";
78	};
79
80	leds {
81		compatible = "gpio-leds";
82
83		power_led: led-0 {
84			gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
85			linux,default-trigger = "mmc0";
86		};
87
88		standby_led: led-1 {
89			gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
90			linux,default-trigger = "heartbeat";
91		};
92	};
93
94	sound {
95		compatible = "audio-graph-card";
96		label = "rockchip,rk3328";
97		dais = <&i2s1_p0
98			&spdif_p0>;
99	};
100
101	spdif-dit {
102		compatible = "linux,spdif-dit";
103		#sound-dai-cells = <0>;
104
105		port {
106			dit_p0_0: endpoint {
107				remote-endpoint = <&spdif_p0_0>;
108			};
109		};
110	};
111};
112
113&codec {
114	mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
115	status = "okay";
116
117	port@0 {
118		codec_p0_0: endpoint {
119			remote-endpoint = <&i2s1_p0_0>;
120		};
121	};
122};
123
124&cpu0 {
125	cpu-supply = <&vdd_arm>;
126};
127
128&cpu1 {
129	cpu-supply = <&vdd_arm>;
130};
131
132&cpu2 {
133	cpu-supply = <&vdd_arm>;
134};
135
136&cpu3 {
137	cpu-supply = <&vdd_arm>;
138};
139
140&emmc {
141	bus-width = <8>;
142	cap-mmc-highspeed;
143	mmc-hs200-1_8v;
144	non-removable;
145	pinctrl-names = "default";
146	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
147	vmmc-supply = <&vcc_io>;
148	vqmmc-supply = <&vcc18_emmc>;
149	status = "okay";
150};
151
152&gmac2io {
153	assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
154	assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
155	clock_in_out = "input";
156	phy-supply = <&vcc_io>;
157	phy-mode = "rgmii";
158	pinctrl-names = "default";
159	pinctrl-0 = <&rgmiim1_pins>;
160	snps,force_thresh_dma_mode;
161	snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
162	snps,reset-active-low;
163	snps,reset-delays-us = <0 10000 50000>;
164	tx_delay = <0x24>;
165	rx_delay = <0x18>;
166	status = "okay";
167};
168
169&hdmi {
170	status = "okay";
171};
172
173&hdmiphy {
174	status = "okay";
175};
176
177&i2c1 {
178	status = "okay";
179
180	rk805: pmic@18 {
181		compatible = "rockchip,rk805";
182		reg = <0x18>;
183		interrupt-parent = <&gpio2>;
184		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
185		#clock-cells = <1>;
186		clock-output-names = "rk805-clkout1", "rk805-clkout2";
187		gpio-controller;
188		#gpio-cells = <2>;
189		pinctrl-names = "default";
190		pinctrl-0 = <&pmic_int_l>;
191		rockchip,system-power-controller;
192		wakeup-source;
193
194		vcc1-supply = <&vcc_sys>;
195		vcc2-supply = <&vcc_sys>;
196		vcc3-supply = <&vcc_sys>;
197		vcc4-supply = <&vcc_sys>;
198		vcc5-supply = <&vcc_io>;
199		vcc6-supply = <&vcc_sys>;
200
201		regulators {
202			vdd_logic: DCDC_REG1 {
203				regulator-name = "vdd_logic";
204				regulator-min-microvolt = <712500>;
205				regulator-max-microvolt = <1450000>;
206				regulator-ramp-delay = <12500>;
207				regulator-always-on;
208				regulator-boot-on;
209				regulator-state-mem {
210					regulator-on-in-suspend;
211					regulator-suspend-microvolt = <1000000>;
212				};
213			};
214
215			vdd_arm: DCDC_REG2 {
216				regulator-name = "vdd_arm";
217				regulator-min-microvolt = <712500>;
218				regulator-max-microvolt = <1450000>;
219				regulator-ramp-delay = <12500>;
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&i2s1 {
289	status = "okay";
290
291	i2s1_p0: port {
292		i2s1_p0_0: endpoint {
293			dai-format = "i2s";
294			mclk-fs = <256>;
295			remote-endpoint = <&codec_p0_0>;
296		};
297	};
298};
299
300&io_domains {
301	status = "okay";
302
303	vccio1-supply = <&vcc_io>;
304	vccio2-supply = <&vcc18_emmc>;
305	vccio3-supply = <&vcc_io>;
306	vccio4-supply = <&vcc_18>;
307	vccio5-supply = <&vcc_io>;
308	vccio6-supply = <&vcc_io>;
309	pmuio-supply = <&vcc_io>;
310};
311
312&pinctrl {
313	ir {
314		ir_int: ir-int {
315			rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
316		};
317	};
318
319	pmic {
320		pmic_int_l: pmic-int-l {
321			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
322		};
323	};
324
325	usb2 {
326		usb20_host_drv: usb20-host-drv {
327			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
328		};
329	};
330};
331
332&sdmmc {
333	bus-width = <4>;
334	cap-mmc-highspeed;
335	cap-sd-highspeed;
336	disable-wp;
337	max-frequency = <150000000>;
338	pinctrl-names = "default";
339	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
340	vmmc-supply = <&vcc_sd>;
341	status = "okay";
342};
343
344&spdif {
345	pinctrl-0 = <&spdifm0_tx>;
346	status = "okay";
347
348	spdif_p0: port {
349		spdif_p0_0: endpoint {
350			remote-endpoint = <&dit_p0_0>;
351		};
352	};
353};
354
355&spi0 {
356	status = "okay";
357
358	spiflash@0 {
359		compatible = "jedec,spi-nor";
360		reg = <0>;
361
362		/* maximum speed for Rockchip SPI */
363		spi-max-frequency = <50000000>;
364	};
365};
366
367&tsadc {
368	rockchip,hw-tshut-mode = <0>;
369	rockchip,hw-tshut-polarity = <0>;
370	status = "okay";
371};
372
373&uart2 {
374	status = "okay";
375};
376
377&u2phy {
378	status = "okay";
379
380	u2phy_host: host-port {
381		status = "okay";
382	};
383
384	u2phy_otg: otg-port {
385		status = "okay";
386	};
387};
388
389&usb20_otg {
390	dr_mode = "host";
391	status = "okay";
392};
393
394&usbdrd3 {
395	dr_mode = "host";
396	status = "okay";
397};
398
399&usb_host0_ehci {
400	status = "okay";
401};
402
403&usb_host0_ohci {
404	status = "okay";
405};
406
407&vop {
408	status = "okay";
409};
410
411&vop_mmu {
412	status = "okay";
413};
414