xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/rk3328-rock64-android.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
4 *
5 */
6
7#include "rk3328.dtsi"
8#include "rk3328-android.dtsi"
9#include <dt-bindings/input/input.h>
10
11/ {
12	gmac_clkin: external-gmac-clock {
13		compatible = "fixed-clock";
14		clock-frequency = <125000000>;
15		clock-output-names = "gmac_clkin";
16		#clock-cells = <0>;
17	};
18
19	vcc_sd: sdmmc-regulator {
20		compatible = "regulator-fixed";
21		gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
22		pinctrl-names = "default";
23		pinctrl-0 = <&sdmmc0m1_gpio>;
24		regulator-name = "vcc_sd";
25		regulator-min-microvolt = <3300000>;
26		regulator-max-microvolt = <3300000>;
27		vin-supply = <&vcc_io>;
28	};
29
30	vcc_host_5v: vcc-host-5v-regulator {
31		compatible = "regulator-fixed";
32		enable-active-high;
33		gpio = <&gpio0 0 GPIO_ACTIVE_HIGH>;
34		pinctrl-names = "default";
35		pinctrl-0 = <&usb30_host_drv>;
36		regulator-name = "vcc_host_5v";
37		regulator-always-on;
38		vin-supply = <&vcc_sys>;
39	};
40
41	vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
42		compatible = "regulator-fixed";
43		enable-active-high;
44		gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>;
45		pinctrl-names = "default";
46		pinctrl-0 = <&usb20_host_drv>;
47		regulator-name = "vcc_host1_5v";
48		regulator-always-on;
49		vin-supply = <&vcc_sys>;
50	};
51
52	vcc_sys: vcc-sys {
53		compatible = "regulator-fixed";
54		regulator-name = "vcc_sys";
55		regulator-always-on;
56		regulator-boot-on;
57		regulator-min-microvolt = <5000000>;
58		regulator-max-microvolt = <5000000>;
59	};
60
61	sound {
62		compatible = "simple-audio-card";
63		simple-audio-card,format = "i2s";
64		simple-audio-card,mclk-fs = <256>;
65		simple-audio-card,name = "rockchip-rk3328";
66		simple-audio-card,cpu {
67			sound-dai = <&i2s1>;
68		};
69		simple-audio-card,codec {
70			sound-dai = <&codec>;
71		};
72	};
73
74	hdmi-sound {
75		compatible = "simple-audio-card";
76		simple-audio-card,format = "i2s";
77		simple-audio-card,mclk-fs = <128>;
78		simple-audio-card,name = "rockchip-hdmi";
79		simple-audio-card,cpu {
80			sound-dai = <&i2s0>;
81		};
82		simple-audio-card,codec {
83			sound-dai = <&hdmi>;
84		};
85	};
86
87	vcc_phy: vcc-phy-regulator {
88		compatible = "regulator-fixed";
89		regulator-name = "vcc_phy";
90		regulator-always-on;
91		regulator-boot-on;
92	};
93
94	xin32k: xin32k {
95		compatible = "fixed-clock";
96		clock-frequency = <32768>;
97		clock-output-names = "xin32k";
98		#clock-cells = <0>;
99	};
100};
101
102&avsd {
103	status = "okay";
104};
105
106&codec {
107	#sound-dai-cells = <0>;
108	status = "okay";
109};
110
111&cpu0 {
112	cpu-supply = <&vdd_arm>;
113};
114
115&dfi {
116	status = "okay";
117};
118
119&dmc {
120	center-supply = <&vdd_logic>;
121	status = "okay";
122};
123
124&emmc {
125	bus-width = <8>;
126	cap-mmc-highspeed;
127	mmc-hs200-1_8v;
128	no-sdio;
129	no-sd;
130	disable-wp;
131	non-removable;
132	num-slots = <1>;
133	pinctrl-names = "default";
134	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
135	status = "okay";
136};
137
138&gmac2io {
139	phy-supply = <&vcc_phy>;
140	phy-mode = "rgmii";
141	clock_in_out = "input";
142	snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
143	snps,reset-active-low;
144	snps,reset-delays-us = <0 10000 50000>;
145	assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
146	assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
147	pinctrl-names = "default";
148	pinctrl-0 = <&rgmiim1_pins>;
149	tx_delay = <0x26>;
150	rx_delay = <0x11>;
151	status = "okay";
152};
153
154&gmac2phy {
155	phy-supply = <&vcc_phy>;
156	clock_in_out = "output";
157	assigned-clocks = <&cru SCLK_MAC2PHY_SRC>;
158	assigned-clock-rate = <50000000>;
159	assigned-clocks = <&cru SCLK_MAC2PHY>;
160	assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
161	status = "disabled";
162};
163
164&gpu {
165	status = "okay";
166	mali-supply = <&vdd_logic>;
167};
168
169&hdmi {
170	#sound-dai-cells = <0>;
171	status = "okay";
172};
173
174&hdmiphy {
175	status = "okay";
176};
177
178&i2c1 {
179	status = "okay";
180
181	rk805: rk805@18 {
182		compatible = "rockchip,rk805";
183		status = "okay";
184		reg = <0x18>;
185		interrupt-parent = <&gpio2>;
186		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
187		pinctrl-names = "default";
188		pinctrl-0 = <&pmic_int_l>;
189		wakeup-source;
190		gpio-controller;
191		#gpio-cells = <2>;
192		#clock-cells = <1>;
193		clock-output-names = "rk805-clkout1", "rk805-clkout2";
194
195		vcc1-supply = <&vcc_sys>;
196		vcc2-supply = <&vcc_sys>;
197		vcc3-supply = <&vcc_sys>;
198		vcc4-supply = <&vcc_sys>;
199		vcc5-supply = <&vcc_io>;
200		vcc6-supply = <&vcc_io>;
201
202		rtc {
203			status = "okay";
204		};
205
206		pwrkey {
207			status = "disabled";
208		};
209
210		gpio {
211			status = "okay";
212		};
213
214		regulators {
215			vdd_logic: DCDC_REG1 {
216				regulator-name = "vdd_logic";
217				regulator-min-microvolt = <712500>;
218				regulator-max-microvolt = <1450000>;
219				regulator-initial-mode = <0x1>;
220				regulator-ramp-delay = <12500>;
221				regulator-boot-on;
222				regulator-always-on;
223				regulator-state-mem {
224					regulator-mode = <0x2>;
225					regulator-on-in-suspend;
226					regulator-suspend-microvolt = <1000000>;
227				};
228			};
229
230			vdd_arm: DCDC_REG2 {
231				regulator-name = "vdd_arm";
232				regulator-init-microvolt = <1225000>;
233				regulator-min-microvolt = <712500>;
234				regulator-max-microvolt = <1450000>;
235				regulator-initial-mode = <0x1>;
236				regulator-ramp-delay = <12500>;
237				regulator-boot-on;
238				regulator-always-on;
239				regulator-state-mem {
240					regulator-mode = <0x2>;
241					regulator-on-in-suspend;
242					regulator-suspend-microvolt = <950000>;
243				};
244			};
245
246			vcc_ddr: DCDC_REG3 {
247				regulator-name = "vcc_ddr";
248				regulator-initial-mode = <0x1>;
249				regulator-boot-on;
250				regulator-always-on;
251				regulator-state-mem {
252					regulator-mode = <0x2>;
253					regulator-on-in-suspend;
254				};
255			};
256
257			vcc_io: DCDC_REG4 {
258				regulator-name = "vcc_io";
259				regulator-min-microvolt = <3300000>;
260				regulator-max-microvolt = <3300000>;
261				regulator-initial-mode = <0x1>;
262				regulator-boot-on;
263				regulator-always-on;
264				regulator-state-mem {
265					regulator-mode = <0x2>;
266					regulator-on-in-suspend;
267					regulator-suspend-microvolt = <3300000>;
268				};
269			};
270
271			vdd_18: LDO_REG1 {
272				regulator-name = "vdd_18";
273				regulator-min-microvolt = <1800000>;
274				regulator-max-microvolt = <1800000>;
275				regulator-boot-on;
276				regulator-always-on;
277				regulator-state-mem {
278					regulator-on-in-suspend;
279					regulator-suspend-microvolt = <1800000>;
280				};
281			};
282
283			vcc_18emmc: LDO_REG2 {
284				regulator-name = "vcc_18emmc";
285				regulator-min-microvolt = <1800000>;
286				regulator-max-microvolt = <1800000>;
287				regulator-boot-on;
288				regulator-always-on;
289				regulator-state-mem {
290					regulator-on-in-suspend;
291					regulator-suspend-microvolt = <1800000>;
292				};
293			};
294
295			vdd_11: LDO_REG3 {
296				regulator-name = "vdd_11";
297				regulator-min-microvolt = <1100000>;
298				regulator-max-microvolt = <1100000>;
299				regulator-boot-on;
300				regulator-always-on;
301				regulator-state-mem {
302					regulator-on-in-suspend;
303					regulator-suspend-microvolt = <1100000>;
304				};
305			};
306		};
307	};
308};
309
310&i2s0 {
311	#sound-dai-cells = <0>;
312	rockchip,bclk-fs = <128>;
313	status = "okay";
314};
315
316&i2s1 {
317	#sound-dai-cells = <0>;
318	status = "okay";
319};
320
321&iep {
322	status = "okay";
323};
324
325&iep_mmu {
326	status = "okay";
327};
328
329&io_domains {
330	status = "okay";
331
332	vccio1-supply = <&vcc_io>;
333	vccio2-supply = <&vcc_18emmc>;
334	vccio3-supply = <&vcc_io>;
335	vccio4-supply = <&vdd_18>;
336	vccio5-supply = <&vcc_io>;
337	vccio6-supply = <&vcc_io>;
338	pmuio-supply = <&vcc_io>;
339};
340
341&mpp_srv {
342	status = "okay";
343};
344
345&pinctrl {
346	pmic {
347		pmic_int_l: pmic-int-l {
348			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
349		};
350	};
351
352	usb2 {
353		usb20_host_drv: usb20-host-drv {
354			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
355		};
356	};
357
358	usb3 {
359		usb30_host_drv: usb30-host-drv {
360			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
361		};
362	};
363};
364
365&pwm3 {
366	status = "okay";
367	pinctrl-names = "default";
368	pinctrl-0 = <&pwmir_pin>;
369	compatible = "rockchip,remotectl-pwm";
370	remote_pwm_id = <3>;
371	handle_cpu_id = <1>;
372	remote_support_psci = <1>;
373
374	ir_key1 {
375		rockchip,usercode = <0x4040>;
376		rockchip,key_table =
377			<0xf2	KEY_REPLY>,
378			<0xba	KEY_BACK>,
379			<0xf4	KEY_UP>,
380			<0xf1	KEY_DOWN>,
381			<0xef	KEY_LEFT>,
382			<0xee	KEY_RIGHT>,
383			<0xbd	KEY_HOME>,
384			<0xea	KEY_VOLUMEUP>,
385			<0xe3	KEY_VOLUMEDOWN>,
386			<0xe2	KEY_SEARCH>,
387			<0xb2	KEY_POWER>,
388			<0xbc	KEY_MUTE>,
389			<0xec	KEY_MENU>,
390			<0xbf	0x190>,
391			<0xe0	0x191>,
392			<0xe1	0x192>,
393			<0xe9	183>,
394			<0xe6	248>,
395			<0xe8	185>,
396			<0xe7	186>,
397			<0xf0	388>,
398			<0xbe	0x175>;
399	};
400
401	ir_key2 {
402		rockchip,usercode = <0xff00>;
403		rockchip,key_table =
404			<0xf9	KEY_HOME>,
405			<0xbf	KEY_BACK>,
406			<0xfb	KEY_MENU>,
407			<0xaa	KEY_REPLY>,
408			<0xb9	KEY_UP>,
409			<0xe9	KEY_DOWN>,
410			<0xb8	KEY_LEFT>,
411			<0xea	KEY_RIGHT>,
412			<0xeb	KEY_VOLUMEDOWN>,
413			<0xef	KEY_VOLUMEUP>,
414			<0xf7	KEY_MUTE>,
415			<0xe7	KEY_POWER>,
416			<0xfc	KEY_POWER>,
417			<0xa9	KEY_VOLUMEDOWN>,
418			<0xa8	KEY_PLAYPAUSE>,
419			<0xe0	KEY_VOLUMEDOWN>,
420			<0xa5	KEY_VOLUMEDOWN>,
421			<0xab	183>,
422			<0xb7	388>,
423			<0xe8	388>,
424			<0xf8	184>,
425			<0xaf	185>,
426			<0xed	KEY_VOLUMEDOWN>,
427			<0xee	186>,
428			<0xb3	KEY_VOLUMEDOWN>,
429			<0xf1	KEY_VOLUMEDOWN>,
430			<0xf2	KEY_VOLUMEDOWN>,
431			<0xf3	KEY_SEARCH>,
432			<0xb4	KEY_VOLUMEDOWN>,
433			<0xa4	KEY_SETUP>,
434			<0xbe	KEY_SEARCH>;
435	};
436
437	ir_key3 {
438		rockchip,usercode = <0x1dcc>;
439		rockchip,key_table =
440			<0xee	KEY_REPLY>,
441			<0xf0	KEY_BACK>,
442			<0xf8	KEY_UP>,
443			<0xbb	KEY_DOWN>,
444			<0xef	KEY_LEFT>,
445			<0xed	KEY_RIGHT>,
446			<0xfc	KEY_HOME>,
447			<0xf1	KEY_VOLUMEUP>,
448			<0xfd	KEY_VOLUMEDOWN>,
449			<0xb7	KEY_SEARCH>,
450			<0xff	KEY_POWER>,
451			<0xf3	KEY_MUTE>,
452			<0xbf	KEY_MENU>,
453			<0xf9	0x191>,
454			<0xf5	0x192>,
455			<0xb3	388>,
456			<0xbe	KEY_1>,
457			<0xba	KEY_2>,
458			<0xb2	KEY_3>,
459			<0xbd	KEY_4>,
460			<0xf9	KEY_5>,
461			<0xb1	KEY_6>,
462			<0xfc	KEY_7>,
463			<0xf8	KEY_8>,
464			<0xb0	KEY_9>,
465			<0xb6	KEY_0>,
466			<0xb5	KEY_BACKSPACE>;
467	};
468};
469
470&rga {
471	status = "okay";
472};
473
474&rkvdec {
475	status = "okay";
476	vcodec-supply = <&vdd_logic>;
477};
478
479&rkvdec_mmu {
480	status = "okay";
481};
482
483&rockchip_suspend {
484	status = "okay";
485	rockchip,virtual-poweroff = <1>;
486};
487
488&sdmmc {
489	bus-width = <4>;
490	cap-mmc-highspeed;
491	cap-sd-highspeed;
492	disable-wp;
493	max-frequency = <150000000>;
494	num-slots = <1>;
495	pinctrl-names = "default";
496	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
497	no-sdio;
498	no-mmc;
499	status = "okay";
500	vmmc-supply = <&vcc_sd>;
501};
502
503&spi0 {
504	status = "okay";
505
506	flash@0 {
507		compatible = "gigadevice,gd25q128", "jedec,spi-nor";
508		#address-cells = <1>;
509		#size-cells = <1>;
510		reg = <0>;
511		m25p,fast-read;
512		/* The max SCLK of the flash 104/80 MHZ  */
513		spi-max-frequency = <50000000>;
514	};
515};
516
517&threshold {
518	temperature = <90000>; /* millicelsius */
519};
520
521&target {
522	temperature = <105000>; /* millicelsius */
523};
524
525&soc_crit {
526	temperature = <115000>; /* millicelsius */
527};
528
529&tsadc {
530	rockchip,hw-tshut-temp = <120000>;
531	status = "okay";
532};
533
534&u2phy {
535	status = "okay";
536
537};
538
539&u2phy_host {
540	phy-supply = <&vcc_host1_5v>;
541	status = "okay";
542};
543
544&u2phy_otg {
545	phy-supply = <&vcc_otg_5v>;
546	status = "okay";
547};
548
549&u3phy {
550	phy-supply = <&vcc_host_5v>;
551	status = "okay";
552};
553
554&u3phy_utmi {
555	status = "okay";
556};
557
558&u3phy_pipe {
559	status = "okay";
560};
561
562&usb20_otg {
563	status = "okay";
564};
565
566&usb_host0_ehci {
567	status = "okay";
568};
569
570&usb_host0_ohci {
571	status = "okay";
572};
573
574&usbdrd3 {
575	status = "okay";
576};
577
578&usbdrd_dwc3 {
579	status = "okay";
580};
581
582&vdpu {
583	status = "okay";
584};
585
586&vpu_mmu {
587	status = "okay";
588};
589
590&vepu {
591	status = "okay";
592};
593
594&vepu_mmu {
595	status = "okay";
596};
597
598&vepu22 {
599	status = "okay";
600};
601
602&vepu22_mmu {
603	status = "okay";
604};
605
606&vop {
607	status = "okay";
608};
609
610&vop_mmu {
611	status = "okay";
612};
613