xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3036-evb1-ddr3-v10.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd
4 *
5 */
6
7/dts-v1/;
8
9#include "rk3036.dtsi"
10#include <dt-bindings/input/input.h>
11
12/ {
13	model = "Rockchip RK3036 EVB1 DDR3 V10 Board";
14	compatible = "rockchip,rk3036-evb1-ddr3-v10", "rockchip,rk3036";
15
16	chosen {
17		bootargs = "console=uart8250,mmio32,0x20068000 rw root=PARTUUID=614e0000-0000 rootfstype=ext4 rootwait";
18	};
19
20	memory {
21		device_type = "memory";
22		reg = <0x60000000 0x20000000>;
23	};
24
25	multi_sounds: multi-sounds {
26		status = "okay";
27		compatible = "simple-audio-card";
28		simple-audio-card,format = "i2s";
29		simple-audio-card,mclk-fs = <256>;
30		simple-audio-card,name = "rockchip,rk3036-sounds";
31		simple-audio-card,dai-link@0 {
32			format = "i2s";
33			cpu {
34				sound-dai = <&i2s>;
35			};
36			codec {
37				sound-dai = <&acodec>;
38			};
39		};
40		simple-audio-card,dai-link@1 {
41			format = "i2s";
42			cpu {
43				sound-dai = <&i2s>;
44			};
45			codec {
46				sound-dai = <&hdmi>;
47			};
48		};
49		simple-audio-card,dai-link@2 {
50			format = "i2s";
51			cpu {
52				sound-dai = <&i2s>;
53			};
54			codec {
55				sound-dai = <&es8311>;
56			};
57		};
58	};
59
60	spdiftx_codec: spdiftx-codec {
61		status = "okay";
62		compatible = "linux,spdif-dit";
63		#sound-dai-cells = <0>;
64	};
65
66	spdif_sound: spdif-sound {
67		status = "okay";
68		compatible = "simple-audio-card";
69		simple-audio-card,name = "rockchip,spdif-sound";
70		simple-audio-card,dai-link {
71			mclk-fs = <256>;
72			cpu {
73				sound-dai = <&spdif_tx>;
74			};
75			codec {
76				sound-dai = <&spdiftx_codec>;
77			};
78		};
79	};
80
81	vdd_arm: vdd-arm-regulator {
82		 compatible = "pwm-regulator";
83		 rockchip,pwm_id = <2>;
84		 pwms = <&pwm2 0 25000 0>;
85		 regulator-name = "vdd_arm";
86		 regulator-init-microvolt = <1100000>;
87		 regulator-min-microvolt = <950000>;
88		 regulator-max-microvolt = <1400000>;
89		 regulator-always-on;
90		 regulator-boot-on;
91	 };
92
93	vcc_host: vcc-host-regulator {
94		compatible = "regulator-fixed";
95		regulator-name = "vcc_host";
96		gpio = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>;
97		pinctrl-names = "default";
98		pinctrl-0 = <&host_vbus_drv>;
99		regulator-min-microvolt = <5000000>;
100		regulator-max-microvolt = <5000000>;
101		regulator-always-on;
102		enable-active-high;
103		regulator-boot-on;
104	};
105
106	xin32k: xin32k {
107		compatible = "fixed-clock";
108		clock-frequency = <32768>;
109		clock-output-names = "xin32k";
110		#clock-cells = <0>;
111	};
112
113	wireless-wlan {
114		compatible = "wlan-platdata";
115
116		wifi_chip_type = "rk915";
117		WIFI,poweren_gpio = <&gpio0 RK_PD2 GPIO_ACTIVE_HIGH>;
118		WIFI,host_wake_irq = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
119		status = "okay";
120	};
121};
122
123&acodec {
124	pa-ctl-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
125	#sound-dai-cells = <0>;
126	status = "okay";
127};
128
129&cpu0 {
130	cpu-supply = <&vdd_arm>;
131};
132
133&cpu0_opp_table {
134	/delete-node/ opp-408000000;
135	/delete-node/ opp-1200000000;
136};
137
138&emac {
139	pinctrl-names = "default";
140	pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
141	phy = <&phy0>;
142	phy-reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; /* PHY_RST */
143	phy-reset-duration = <10>; /* millisecond */
144
145
146	/* If you're going to use Ethernet, you need an external clock
147	 * This is just a test(e.g: the accurate 50MHz what mac_ref need)
148	 * so cpu The frequency should be set to 600M
149	 */
150	assigned-clock-parents = <&cru PLL_APLL>;
151	status = "okay";
152
153	phy0: ethernet-phy@0 {
154		reg = <0>;
155	};
156};
157
158&emmc {
159	rockchip,default-sample-phase = <0>;
160	status = "okay";
161};
162
163&gpu {
164	status = "okay";
165	mali-supply = <&vdd_arm>;
166};
167
168&hdmi {
169	#sound-dai-cells = <0>;
170	status = "okay";
171};
172
173&hevc {
174	status = "okay";
175};
176
177&hevc_mmu {
178	status = "okay";
179};
180
181&i2c1 {
182	status = "okay";
183};
184
185&i2c2 {
186	clock-frequency = <400000>;
187	status = "okay";
188
189	rtc@51 {
190		compatible = "haoyu,hym8563";
191		reg = <0x51>;
192		interrupt-parent = <&gpio2>;
193		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
194		pinctrl-names = "default";
195		pinctrl-0 = <&rtc_int>;
196		#clock-cells = <0>;
197		clock-output-names = "xin32k";
198	};
199
200	es8311: es8311@18 {
201		compatible = "everest,es8311";
202		reg = <0x18>;
203		clocks = <&cru SCLK_I2S_OUT>;
204		clock-names = "mclk";
205		adc-pga-gain = <8>;
206		adc-volume = <0xdf>;
207		dac-volume = <0xbf>;
208		aec-mode = "adc left, adc right";
209		pinctrl-names = "default";
210		pinctrl-0 = <&i2s_mclk>;
211
212		/*
213		 * in rk3036-evb-v10,es8311 is not actually connected
214		 * to PA,so we don't need spk-ctl-gpios
215		 */
216		/*spk-ctl-gpios = ;*/
217
218		#sound-dai-cells = <0>;
219	};
220
221	rk628: rk628@50 {
222		compatible = "rockchip,rk628";
223		reg = <0x50>;
224		interrupt-parent = <&gpio0>;
225		interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
226		reset-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>;
227		plugin-det-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
228		status = "okay";
229		rk628,hdmi-in;
230		rk628-dsi {
231			//rockchip,dual-channel;
232			dsi,eotp;
233			dsi,video-mode;
234			dsi,format = "rgb888";
235			dsi,lanes  = <4>;
236			status = "okay";
237
238			rk628-panel {
239				panel-init-sequence = [
240					39 00 04 ff 98 81 03
241					15 00 02 01 00
242					15 00 02 02 00
243					15 00 02 03 53
244					15 00 02 04 53
245					15 00 02 05 13
246					15 00 02 06 04
247					15 00 02 07 02
248					15 00 02 08 02
249					15 00 02 09 00
250					15 00 02 0a 00
251					15 00 02 0b 00
252					15 00 02 0c 00
253					15 00 02 0d 00
254					15 00 02 0e 00
255					15 00 02 0f 00
256					15 00 02 10 00
257					15 00 02 11 00
258					15 00 02 12 00
259					15 00 02 13 00
260					15 00 02 14 00
261					15 00 02 15 08
262					15 00 02 16 10
263					15 00 02 17 00
264					15 00 02 18 08
265					15 00 02 19 00
266					15 00 02 1a 00
267					15 00 02 1b 00
268					15 00 02 1c 00
269					15 00 02 1d 00
270					15 00 02 1e c0
271					15 00 02 1f 80
272					15 00 02 20 02
273					15 00 02 21 09
274					15 00 02 22 00
275					15 00 02 23 00
276					15 00 02 24 00
277					15 00 02 25 00
278					15 00 02 26 00
279					15 00 02 27 00
280					15 00 02 28 55
281					15 00 02 29 03
282					15 00 02 2a 00
283					15 00 02 2b 00
284					15 00 02 2c 00
285					15 00 02 2d 00
286					15 00 02 2e 00
287					15 00 02 2f 00
288					15 00 02 30 00
289					15 00 02 31 00
290					15 00 02 32 00
291					15 00 02 33 00
292					15 00 02 34 04
293					15 00 02 35 05
294					15 00 02 36 05
295					15 00 02 37 00
296					15 00 02 38 3c
297					15 00 02 39 35
298					15 00 02 3a 00
299					15 00 02 3b 40
300					15 00 02 3c 00
301					15 00 02 3d 00
302					15 00 02 3e 00
303					15 00 02 3f 00
304					15 00 02 40 00
305					15 00 02 41 88
306					15 00 02 42 00
307					15 00 02 43 00
308					15 00 02 44 1f
309					15 00 02 50 01
310					15 00 02 51 23
311					15 00 02 52 45
312					15 00 02 53 67
313					15 00 02 54 89
314					15 00 02 55 ab
315					15 00 02 56 01
316					15 00 02 57 23
317					15 00 02 58 45
318					15 00 02 59 67
319					15 00 02 5a 89
320					15 00 02 5b ab
321					15 00 02 5c cd
322					15 00 02 5d ef
323					15 00 02 5e 03
324					15 00 02 5f 14
325					15 00 02 60 15
326					15 00 02 61 0c
327					15 00 02 62 0d
328					15 00 02 63 0e
329					15 00 02 64 0f
330					15 00 02 65 10
331					15 00 02 66 11
332					15 00 02 67 08
333					15 00 02 68 02
334					15 00 02 69 0a
335					15 00 02 6a 02
336					15 00 02 6b 02
337					15 00 02 6c 02
338					15 00 02 6d 02
339					15 00 02 6e 02
340					15 00 02 6f 02
341					15 00 02 70 02
342					15 00 02 71 02
343					15 00 02 72 06
344					15 00 02 73 02
345					15 00 02 74 02
346					15 00 02 75 14
347					15 00 02 76 15
348					15 00 02 77 0f
349					15 00 02 78 0e
350					15 00 02 79 0d
351					15 00 02 7a 0c
352					15 00 02 7b 11
353					15 00 02 7c 10
354					15 00 02 7d 06
355					15 00 02 7e 02
356					15 00 02 7f 0a
357					15 00 02 80 02
358					15 00 02 81 02
359					15 00 02 82 02
360					15 00 02 83 02
361					15 00 02 84 02
362					15 00 02 85 02
363					15 00 02 86 02
364					15 00 02 87 02
365					15 00 02 88 08
366					15 00 02 89 02
367					15 00 02 8a 02
368					39 00 04 ff 98 81 04
369					15 00 02 00 80
370					15 00 02 70 00
371					15 00 02 71 00
372					15 00 02 66 fe
373					15 00 02 82 15
374					15 00 02 84 15
375					15 00 02 85 15
376					15 00 02 3a 24
377					15 00 02 32 ac
378					15 00 02 8c 80
379					15 00 02 3c f5
380					15 00 02 88 33
381					39 00 04 ff 98 81 01
382					15 00 02 22 0a
383					15 00 02 31 00
384					15 00 02 53 78
385					15 00 02 55 7b
386					15 00 02 60 20
387					15 00 02 61 00
388					15 00 02 62 0d
389					15 00 02 63 00
390					15 00 02 a0 00
391					15 00 02 a1 10
392					15 00 02 a2 1c
393					15 00 02 a3 13
394					15 00 02 a4 15
395					15 00 02 a5 26
396					15 00 02 a6 1a
397					15 00 02 a7 1d
398					15 00 02 a8 67
399					15 00 02 a9 1c
400					15 00 02 aa 29
401					15 00 02 ab 5b
402					15 00 02 ac 26
403					15 00 02 ad 28
404					15 00 02 ae 5c
405					15 00 02 af 30
406					15 00 02 b0 31
407					15 00 02 b1 32
408					15 00 02 b2 00
409					15 00 02 b1 2e
410					15 00 02 b2 32
411					15 00 02 b3 00
412					15 00 02 c0 00
413					15 00 02 c1 10
414					15 00 02 c2 1c
415					15 00 02 c3 13
416					15 00 02 c4 15
417					15 00 02 c5 26
418					15 00 02 c6 1a
419					15 00 02 c7 1d
420					15 00 02 c8 67
421					15 00 02 c9 1c
422					15 00 02 ca 29
423					15 00 02 cb 5b
424					15 00 02 cc 26
425					15 00 02 cd 28
426					15 00 02 ce 5c
427					15 00 02 cf 30
428					15 00 02 d0 31
429					15 00 02 d1 2e
430					15 00 02 d2 32
431					15 00 02 d3 00
432					39 00 04 ff 98 81 00
433					05 00 01 11
434					05 01 01 29
435				];
436			};
437		};
438
439		display-timings {
440
441			src-timing {
442				clock-frequency = <65000000>;
443				hactive = <720>;
444				vactive = <1280>;
445				hfront-porch = <48>;
446				hsync-len = <8>;
447				hback-porch = <52>;
448				vfront-porch = <16>;
449				vsync-len = <6>;
450				vback-porch = <15>;
451				hsync-active = <0>;
452				vsync-active = <0>;
453				de-active = <0>;
454				pixelclk-active = <0>;
455			};
456
457			dst-timing {
458				clock-frequency = <65000000>;
459				hactive = <720>;
460				vactive = <1280>;
461				hfront-porch = <48>;
462				hsync-len = <8>;
463				hback-porch = <52>;
464				vfront-porch = <16>;
465				vsync-len = <6>;
466				vback-porch = <15>;
467				hsync-active = <0>;
468				vsync-active = <0>;
469				de-active = <0>;
470				pixelclk-active = <0>;
471			};
472		};
473	};
474};
475
476&i2s {
477	status = "okay";
478	#sound-dai-cells = <0>;
479	pinctrl-0 = <&i2s_sclk
480		     &i2s_lrclktx
481		     &i2s_sdo
482		     &i2s_sdi>;
483};
484
485&mpp_srv {
486	status = "okay";
487};
488
489&spdif_tx {
490	status = "okay";
491	#sound-dai-cells = <0>;
492};
493
494&pinctrl {
495	usb {
496		host_vbus_drv: host-vbus-drv {
497			rockchip,pins = <2 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
498		};
499	};
500
501	hym8563 {
502		rtc_int: rtc-int {
503			rockchip,pins = <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
504		};
505	};
506};
507
508&pwm2 {
509	status = "okay";
510};
511
512&pwm3 {
513	status = "okay";
514	pinctrl-names = "default";
515	pinctrl-0 = <&pwm3_pin>;
516	compatible = "rockchip,remotectl-pwm";
517	remote_pwm_id = <3>;
518	handle_cpu_id = <1>;
519	remote_support_psci = <1>;
520
521	ir_key1 {
522		rockchip,usercode = <0x4040>;
523		rockchip,key_table =
524			<0xf2	KEY_REPLY>,
525			<0xba	KEY_BACK>,
526			<0xf4	KEY_UP>,
527			<0xf1	KEY_DOWN>,
528			<0xef	KEY_LEFT>,
529			<0xee	KEY_RIGHT>,
530			<0xbd	KEY_HOME>,
531			<0xea	KEY_VOLUMEUP>,
532			<0xe3	KEY_VOLUMEDOWN>,
533			<0xe2	KEY_SEARCH>,
534			<0xb2	KEY_POWER>,
535			<0xbc	KEY_MUTE>,
536			<0xec	KEY_MENU>,
537			<0xbf	0x190>,
538			<0xe0	0x191>,
539			<0xe1	0x192>,
540			<0xe9	183>,
541			<0xe6	248>,
542			<0xe8	185>,
543			<0xe7	186>,
544			<0xf0	388>,
545			<0xbe	0x175>;
546	};
547
548	ir_key2 {
549		rockchip,usercode = <0xff00>;
550		rockchip,key_table =
551			<0xf9	KEY_HOME>,
552			<0xbf	KEY_BACK>,
553			<0xfb	KEY_MENU>,
554			<0xaa	KEY_REPLY>,
555			<0xb9	KEY_UP>,
556			<0xe9	KEY_DOWN>,
557			<0xb8	KEY_LEFT>,
558			<0xea	KEY_RIGHT>,
559			<0xeb	KEY_VOLUMEDOWN>,
560			<0xef	KEY_VOLUMEUP>,
561			<0xf7	KEY_MUTE>,
562			<0xe7	KEY_POWER>,
563			<0xfc	KEY_POWER>,
564			<0xa9	KEY_VOLUMEDOWN>,
565			<0xa8	KEY_PLAYPAUSE>,
566			<0xe0	KEY_VOLUMEDOWN>,
567			<0xa5	KEY_VOLUMEDOWN>,
568			<0xab	183>,
569			<0xb7	388>,
570			<0xe8	388>,
571			<0xf8	184>,
572			<0xaf	185>,
573			<0xed	KEY_VOLUMEDOWN>,
574			<0xee	186>,
575			<0xb3	KEY_VOLUMEDOWN>,
576			<0xf1	KEY_VOLUMEDOWN>,
577			<0xf2	KEY_VOLUMEDOWN>,
578			<0xf3	KEY_SEARCH>,
579			<0xb4	KEY_VOLUMEDOWN>,
580			<0xa4	KEY_SETUP>,
581			<0xbe	KEY_SEARCH>;
582	};
583
584	ir_key3 {
585		rockchip,usercode = <0x1dcc>;
586		rockchip,key_table =
587			<0xee	KEY_REPLY>,
588			<0xf0	KEY_BACK>,
589			<0xf8	KEY_UP>,
590			<0xbb	KEY_DOWN>,
591			<0xef	KEY_LEFT>,
592			<0xed	KEY_RIGHT>,
593			<0xfc	KEY_HOME>,
594			<0xf1	KEY_VOLUMEUP>,
595			<0xfd	KEY_VOLUMEDOWN>,
596			<0xb7	KEY_SEARCH>,
597			<0xff	KEY_POWER>,
598			<0xf3	KEY_MUTE>,
599			<0xbf	KEY_MENU>,
600			<0xf9	0x191>,
601			<0xf5	0x192>,
602			<0xb3	388>,
603			<0xbe	KEY_1>,
604			<0xba	KEY_2>,
605			<0xb2	KEY_3>,
606			<0xbd	KEY_4>,
607			<0xf9	KEY_5>,
608			<0xb1	KEY_6>,
609			<0xfc	KEY_7>,
610			<0xf8	KEY_8>,
611			<0xb0	KEY_9>,
612			<0xb6	KEY_0>,
613			<0xb5	KEY_BACKSPACE>;
614	};
615};
616
617&sdio {
618	bus-width = <4>;
619	max_frequency = <50000000>;
620	cap-sd-highspeed;
621	supports-sdio;
622	ignore-pm-notify;
623	keep-power-in-suspend;
624	supports-rk912;
625	/delete-property/ non-removable;
626
627	pinctrl-names = "default";
628	pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
629
630	//status = "okay";
631};
632
633&sdmmc {
634	bus-width = <4>;
635	cap-mmc-highspeed;
636	cap-sd-highspeed;
637	card-detect-delay = <200>;
638	disable-wp;
639	num-slots = <1>;
640	pinctrl-names = "default";
641	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
642	supports-sd;
643	status = "disabled";
644};
645
646&sfc {
647	status = "okay";
648};
649
650&tve {
651	status = "okay";
652};
653
654&uart0 {
655	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
656	status = "okay";
657};
658
659&uart2 {
660	status = "okay";
661};
662
663&usb_host {
664	status = "okay";
665};
666
667&usb_otg {
668	status = "okay";
669};
670
671&vop {
672	status = "okay";
673};
674
675&vop_mmu {
676	status = "okay";
677};
678
679&vdpu {
680	status = "okay";
681};
682
683&vpu_mmu {
684	status = "okay";
685};
686
687&wdt {
688	status = "okay";
689};
690
691