xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/rk3308-evb-v10.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
5 */
6
7#include <dt-bindings/input/input.h>
8#include "rk3308.dtsi"
9
10/ {
11	model = "Rockchip RK3308 EVB";
12	compatible = "rockchip,rk3308-evb", "rockchip,rk3308";
13
14	chosen {
15		bootargs = "earlycon=uart8250,mmio32,0xff0c0000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rootfstype=squashfs rootwait snd_aloop.index=7 snd_aloop.use_raw_jiffies=1";
16	};
17
18	adc-keys0 {
19		compatible = "adc-keys";
20		io-channels = <&saradc 0>;
21		io-channel-names = "buttons";
22		poll-interval = <100>;
23		keyup-threshold-microvolt = <1800000>;
24
25		func-key {
26			linux,code = <KEY_FN>;
27			label = "function";
28			press-threshold-microvolt = <18000>;
29		};
30	};
31
32	adc-keys1 {
33		compatible = "adc-keys";
34		io-channels = <&saradc 1>;
35		io-channel-names = "buttons";
36		poll-interval = <100>;
37		keyup-threshold-microvolt = <1800000>;
38
39		esc-key {
40			linux,code = <KEY_MICMUTE>;
41			label = "micmute";
42			press-threshold-microvolt = <1130000>;
43		};
44
45		home-key {
46			linux,code = <KEY_MODE>;
47			label = "mode";
48			press-threshold-microvolt = <901000>;
49		};
50
51		menu-key {
52			linux,code = <KEY_PLAY>;
53			label = "play";
54			press-threshold-microvolt = <624000>;
55		};
56
57		vol-down-key {
58			linux,code = <KEY_VOLUMEDOWN>;
59			label = "volume down";
60			press-threshold-microvolt = <300000>;
61		};
62
63		vol-up-key {
64			linux,code = <KEY_VOLUMEUP>;
65			label = "volume up";
66			press-threshold-microvolt = <18000>;
67		};
68	};
69
70	dummy_codec: dummy-codec {
71		compatible = "rockchip,dummy-codec";
72		#sound-dai-cells = <0>;
73	};
74
75	gpio-keys {
76		compatible = "gpio-keys";
77		autorepeat;
78
79		pinctrl-names = "default";
80		pinctrl-0 = <&pwr_key>;
81
82		power {
83			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
84			linux,code = <KEY_POWER>;
85			label = "GPIO Key Power";
86			wakeup-source;
87			debounce-interval = <100>;
88		};
89	};
90
91	sdio_pwrseq: sdio-pwrseq {
92		compatible = "mmc-pwrseq-simple";
93		pinctrl-names = "default";
94		pinctrl-0 = <&wifi_enable_h>;
95
96		/*
97		 * On the module itself this is one of these (depending
98		 * on the actual card populated):
99		 * - SDIO_RESET_L_WL_REG_ON
100		 * - PDN (power down when low)
101		 */
102		reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
103	};
104
105	acodec_sound: acodec-sound {
106		compatible = "rockchip,multicodecs-card";
107		rockchip,card-name = "rockchip,rk3308-acodec";
108		rockchip,codec-hp-det;
109		rockchip,mclk-fs = <256>;
110		rockchip,cpu = <&i2s_8ch_2>;
111		rockchip,codec = <&acodec>;
112	};
113
114	bluetooth_sound: bluetooth-sound {
115		status = "disabled";
116		compatible = "rockchip,multicodecs-card";
117		rockchip,card-name = "rockchip,rk3308-pcm";
118		rockchip,mclk-fs = <128>;
119		rockchip,cpu = <&i2s_2ch_0>;
120		rockchip,codec = <&dummy_codec>;
121		rockchip,format = "dsp_b";
122		rockchip,bitclock-inversion = <0>;
123		rockchip,wait-card-locked = <0>;
124	};
125
126	spdif_rx_sound: spdif-rx-sound {
127		status = "disabled";
128		compatible = "simple-audio-card";
129		simple-audio-card,name = "rockchip,spdif-rx-sound";
130		simple-audio-card,cpu {
131			sound-dai = <&spdif_rx>;
132		};
133		simple-audio-card,codec {
134			sound-dai = <&dummy_codec>;
135		};
136	};
137
138	spdif_tx_sound: spdif-tx-sound {
139		status = "disabled";
140		compatible = "simple-audio-card";
141		simple-audio-card,name = "rockchip,spdif-tx-sound";
142		simple-audio-card,mclk-fs = <128>;
143		simple-audio-card,cpu {
144			sound-dai = <&spdif_tx>;
145		};
146		simple-audio-card,codec {
147			sound-dai = <&dummy_codec>;
148		};
149	};
150
151	vdd_log: vdd_core: vdd-core {
152		compatible = "pwm-regulator";
153		pwms = <&pwm0 0 5000 1>;
154		regulator-name = "vdd_core";
155		regulator-min-microvolt = <827000>;
156		regulator-max-microvolt = <1340000>;
157		regulator-init-microvolt = <1015000>;
158		regulator-early-min-microvolt = <1015000>;
159		regulator-always-on;
160		regulator-boot-on;
161		regulator-settling-time-up-us = <250>;
162		status = "okay";
163	};
164
165	vdd_1v0: vdd-1v0 {
166		compatible = "regulator-fixed";
167		regulator-name = "vdd_1v0";
168		regulator-always-on;
169		regulator-boot-on;
170		regulator-min-microvolt = <1000000>;
171		regulator-max-microvolt = <1000000>;
172	};
173
174	vcc_3v3_codec: vcc_io: vcc-io {
175		compatible = "regulator-fixed";
176		regulator-name = "vcc_io";
177		regulator-always-on;
178		regulator-boot-on;
179		regulator-min-microvolt = <3300000>;
180		regulator-max-microvolt = <3300000>;
181	};
182
183	vccio_sdio: vcc_1v8: vcc-1v8 {
184		compatible = "regulator-fixed";
185		regulator-name = "vcc_1v8";
186		regulator-always-on;
187		regulator-boot-on;
188		regulator-min-microvolt = <1800000>;
189		regulator-max-microvolt = <1800000>;
190		vin-supply = <&vcc_io>;
191	};
192
193	vcc_sd: vcc-sd {
194		compatible = "regulator-fixed";
195		gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>;
196		regulator-name = "vcc_sd";
197		regulator-min-microvolt = <3300000>;
198		regulator-max-microvolt = <3300000>;
199	};
200
201	vcc_1v8_codec: vcc-1v8-codec {
202		compatible = "regulator-fixed";
203		regulator-name = "vcc_1v8_codec";
204		regulator-always-on;
205		regulator-boot-on;
206		regulator-min-microvolt = <1800000>;
207		regulator-max-microvolt = <1800000>;
208		vin-supply = <&vcc_io>;
209	};
210
211	vcc_ddr: vcc-ddr {
212		compatible = "regulator-fixed";
213		regulator-name = "vcc_ddr";
214		regulator-always-on;
215		regulator-boot-on;
216		regulator-min-microvolt = <1500000>;
217		regulator-max-microvolt = <1500000>;
218	};
219
220	vccio_flash: vccio-flash {
221		compatible = "regulator-fixed";
222		regulator-name = "vccio_flash";
223		regulator-always-on;
224		regulator-boot-on;
225		regulator-min-microvolt = <1800000>;
226		regulator-max-microvolt = <1800000>;
227	};
228
229	vcc_phy: vcc-phy-regulator {
230		compatible = "regulator-fixed";
231		regulator-name = "vcc_phy";
232		regulator-always-on;
233		regulator-boot-on;
234	};
235
236	vbus_host: vbus-host-regulator {
237		compatible = "regulator-fixed";
238		enable-active-high;
239		gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
240		pinctrl-names = "default";
241		pinctrl-0 = <&usb_drv>;
242		regulator-name = "vbus_host";
243	};
244
245	wireless-bluetooth {
246		compatible = "bluetooth-platdata";
247		uart_rts_gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_LOW>;
248		pinctrl-names = "default", "rts_gpio";
249		pinctrl-0 = <&uart4_rts>;
250		pinctrl-1 = <&uart4_rts_pin>;
251		BT,power_gpio    = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
252		BT,wake_host_irq = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
253		status = "okay";
254	};
255
256	wireless-wlan {
257		compatible = "wlan-platdata";
258		rockchip,grf = <&grf>;
259		wifi_chip_type = "ap6255";
260		WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
261		status = "okay";
262	};
263};
264
265&acodec {
266	status = "okay";
267
268	rockchip,no-deep-low-power;
269	rockchip,loopback-grp = <3>;
270	hp-ctl-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
271	spk-ctl-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
272};
273
274&cpu0 {
275	cpu-supply = <&vdd_core>;
276};
277
278&dmc {
279	center-supply = <&vdd_core>;
280	status = "okay";
281};
282
283&emmc {
284	bus-width = <8>;
285	cap-mmc-highspeed;
286	mmc-hs200-1_8v;
287	no-sdio;
288	no-sd;
289	disable-wp;
290	non-removable;
291	num-slots = <1>;
292	status = "okay";
293};
294
295&fiq_debugger {
296	status = "okay";
297};
298
299&mac {
300	phy-supply = <&vcc_phy>;
301	assigned-clocks = <&cru SCLK_MAC>;
302	assigned-clock-parents = <&mac_clkin>;
303	clock_in_out = "input";
304	pinctrl-names = "default";
305	pinctrl-0 = <&rmii_pins &mac_refclk>;
306	snps,reset-gpio = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
307	snps,reset-active-low;
308	snps,reset-delays-us = <0 50000 50000>;
309	status = "disable";
310};
311
312&io_domains {
313	status = "okay";
314
315	vccio0-supply = <&vcc_io>;
316	vccio1-supply = <&vcc_io>;
317	vccio2-supply = <&vcc_1v8>;
318	vccio3-supply = <&vccio_flash>;
319	vccio4-supply = <&vccio_sdio>;
320	vccio5-supply = <&vcc_io>;
321};
322
323&i2c1 {
324	clock-frequency = <400000>;
325	status = "okay";
326
327	is31fl3236: led-controller@3c {
328		compatible = "issi,is31fl3236";
329		reg = <0x3c>;
330		#address-cells = <1>;
331		#size-cells = <0>;
332		reset-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
333		status = "okay";
334
335		led1: led@1 {
336			label = "led1";
337			reg = <1>;
338			led-max-microamp = <10000>;
339			linux,default-trigger = "timer";
340			linux,default-trigger-delay-ms = <0>;
341			linux,blink-delay-on-ms = <100>;
342			linux,blink-delay-off-ms = <1200>;
343		};
344
345		led2: led@2 {
346			label = "led2";
347			reg = <2>;
348			led-max-microamp = <10000>;
349			linux,default-trigger = "timer";
350			linux,default-trigger-delay-ms = <0>;
351			linux,blink-delay-on-ms = <100>;
352			linux,blink-delay-off-ms = <1200>;
353		};
354
355		led3: led@3 {
356			label = "led3";
357			reg = <3>;
358			led-max-microamp = <10000>;
359			linux,default-trigger = "default-on";
360		};
361
362		led4: led@4 {
363			label = "led4";
364			reg = <4>;
365			led-max-microamp = <10000>;
366			linux,default-trigger = "timer";
367			linux,default-trigger-delay-ms = <100>;
368			linux,blink-delay-on-ms = <100>;
369			linux,blink-delay-off-ms = <1200>;
370		};
371
372		led5: led@5 {
373			label = "led5";
374			reg = <5>;
375			led-max-microamp = <10000>;
376			linux,default-trigger = "timer";
377			linux,default-trigger-delay-ms = <100>;
378			linux,blink-delay-on-ms = <100>;
379			linux,blink-delay-off-ms = <1200>;
380		};
381
382		led6: led@6 {
383			label = "led6";
384			reg = <6>;
385			led-max-microamp = <10000>;
386			linux,default-trigger = "default-on";
387		};
388
389		led7: led@7 {
390			label = "led7";
391			reg = <7>;
392			led-max-microamp = <10000>;
393			linux,default-trigger = "timer";
394			linux,default-trigger-delay-ms = <200>;
395			linux,blink-delay-on-ms = <100>;
396			linux,blink-delay-off-ms = <1200>;
397		};
398
399		led8: led@8 {
400			label = "led8";
401			reg = <8>;
402			led-max-microamp = <10000>;
403			linux,default-trigger = "timer";
404			linux,default-trigger-delay-ms = <200>;
405			linux,blink-delay-on-ms = <100>;
406			linux,blink-delay-off-ms = <1200>;
407		};
408
409		led9: led@9 {
410			label = "led9";
411			reg = <9>;
412			led-max-microamp = <10000>;
413			linux,default-trigger = "default-on";
414		};
415
416		led10: led@10 {
417			label = "led10";
418			reg = <10>;
419			led-max-microamp = <10000>;
420			linux,default-trigger = "timer";
421			linux,default-trigger-delay-ms = <300>;
422			linux,blink-delay-on-ms = <100>;
423			linux,blink-delay-off-ms = <1200>;
424		};
425
426		led11: led@11 {
427			label = "led11";
428			reg = <11>;
429			led-max-microamp = <10000>;
430			linux,default-trigger = "timer";
431			linux,default-trigger-delay-ms = <300>;
432			linux,blink-delay-on-ms = <100>;
433			linux,blink-delay-off-ms = <1200>;
434		};
435
436		led12: led@12 {
437			label = "led12";
438			reg = <12>;
439			led-max-microamp = <10000>;
440			linux,default-trigger = "default-on";
441		};
442
443		led13: led@13 {
444			label = "led13";
445			reg = <13>;
446			led-max-microamp = <10000>;
447			linux,default-trigger = "timer";
448			linux,default-trigger-delay-ms = <400>;
449			linux,blink-delay-on-ms = <100>;
450			linux,blink-delay-off-ms = <1200>;
451		};
452
453		led14: led@14 {
454			label = "led14";
455			reg = <14>;
456			led-max-microamp = <10000>;
457			linux,default-trigger = "timer";
458			linux,default-trigger-delay-ms = <400>;
459			linux,blink-delay-on-ms = <100>;
460			linux,blink-delay-off-ms = <1200>;
461		};
462
463		led15: led@15 {
464			label = "led15";
465			reg = <15>;
466			led-max-microamp = <10000>;
467			linux,default-trigger = "default-on";
468		};
469
470		led16: led@16 {
471			label = "led16";
472			reg = <16>;
473			led-max-microamp = <10000>;
474			linux,default-trigger = "timer";
475			linux,default-trigger-delay-ms = <500>;
476			linux,blink-delay-on-ms = <100>;
477			linux,blink-delay-off-ms = <1200>;
478		};
479
480		led17: led@17 {
481			label = "led17";
482			reg = <17>;
483			led-max-microamp = <10000>;
484			linux,default-trigger = "timer";
485			linux,default-trigger-delay-ms = <500>;
486			linux,blink-delay-on-ms = <100>;
487			linux,blink-delay-off-ms = <1200>;
488		};
489
490		led18: led@18 {
491			label = "led18";
492			reg = <18>;
493			led-max-microamp = <10000>;
494			linux,default-trigger = "default-on";
495		};
496
497		led19: led@19 {
498			label = "led19";
499			reg = <19>;
500			led-max-microamp = <10000>;
501			linux,default-trigger = "timer";
502			linux,default-trigger-delay-ms = <600>;
503			linux,blink-delay-on-ms = <100>;
504			linux,blink-delay-off-ms = <1200>;
505		};
506
507		led20: led@20 {
508			label = "led20";
509			reg = <20>;
510			led-max-microamp = <10000>;
511			linux,default-trigger = "timer";
512			linux,default-trigger-delay-ms = <600>;
513			linux,blink-delay-on-ms = <100>;
514			linux,blink-delay-off-ms = <1200>;
515		};
516
517		led21: led@21 {
518			label = "led21";
519			reg = <21>;
520			led-max-microamp = <10000>;
521			linux,default-trigger = "default-on";
522		};
523
524		led22: led@22 {
525			label = "led22";
526			reg = <22>;
527			led-max-microamp = <10000>;
528			linux,default-trigger = "timer";
529			linux,default-trigger-delay-ms = <700>;
530			linux,blink-delay-on-ms = <100>;
531			linux,blink-delay-off-ms = <1200>;
532		};
533
534		led23: led@23 {
535			label = "led23";
536			reg = <23>;
537			led-max-microamp = <10000>;
538			linux,default-trigger = "timer";
539			linux,default-trigger-delay-ms = <700>;
540			linux,blink-delay-on-ms = <100>;
541			linux,blink-delay-off-ms = <1200>;
542		};
543
544		led124: led@24 {
545			label = "led24";
546			reg = <24>;
547			led-max-microamp = <10000>;
548			linux,default-trigger = "default-on";
549		};
550
551		led25: led@25 {
552			label = "led25";
553			reg = <25>;
554			led-max-microamp = <10000>;
555			linux,default-trigger = "timer";
556			linux,default-trigger-delay-ms = <800>;
557			linux,blink-delay-on-ms = <100>;
558			linux,blink-delay-off-ms = <1200>;
559		};
560
561		led26: led@26 {
562			label = "led26";
563			reg = <26>;
564			led-max-microamp = <10000>;
565			linux,default-trigger = "timer";
566			linux,default-trigger-delay-ms = <800>;
567			linux,blink-delay-on-ms = <100>;
568			linux,blink-delay-off-ms = <1200>;
569		};
570
571		led27: led@27 {
572			label = "led27";
573			reg = <27>;
574			led-max-microamp = <10000>;
575			linux,default-trigger = "default-on";
576		};
577
578		led28: led@28 {
579			label = "led28";
580			reg = <28>;
581			led-max-microamp = <10000>;
582			linux,default-trigger = "timer";
583			linux,default-trigger-delay-ms = <900>;
584			linux,blink-delay-on-ms = <100>;
585			linux,blink-delay-off-ms = <1200>;
586		};
587
588		led29: led@29 {
589			label = "led29";
590			reg = <29>;
591			led-max-microamp = <10000>;
592			linux,default-trigger = "timer";
593			linux,default-trigger-delay-ms = <900>;
594			linux,blink-delay-on-ms = <100>;
595			linux,blink-delay-off-ms = <1200>;
596		};
597
598		led30: led@30 {
599			label = "led30";
600			reg = <30>;
601			led-max-microamp = <10000>;
602			linux,default-trigger = "default-on";
603		};
604
605		led31: led@31 {
606			label = "led31";
607			reg = <31>;
608			led-max-microamp = <10000>;
609			linux,default-trigger = "timer";
610			linux,default-trigger-delay-ms = <1000>;
611			linux,blink-delay-on-ms = <100>;
612			linux,blink-delay-off-ms = <1200>;
613		};
614
615		led32: led@32 {
616			label = "led32";
617			reg = <32>;
618			led-max-microamp = <10000>;
619			linux,default-trigger = "timer";
620			linux,default-trigger-delay-ms = <1000>;
621			linux,blink-delay-on-ms = <100>;
622			linux,blink-delay-off-ms = <1200>;
623		};
624
625		led33: led@33 {
626			label = "led33";
627			reg = <33>;
628			led-max-microamp = <10000>;
629			linux,default-trigger = "default-on";
630		};
631
632		led34: led@34 {
633			label = "led34";
634			reg = <34>;
635			led-max-microamp = <10000>;
636			linux,default-trigger = "timer";
637			linux,default-trigger-delay-ms = <1100>;
638			linux,blink-delay-on-ms = <100>;
639			linux,blink-delay-off-ms = <1200>;
640		};
641
642		led35: led@35 {
643			label = "led35";
644			reg = <35>;
645			led-max-microamp = <10000>;
646			linux,default-trigger = "timer";
647			linux,default-trigger-delay-ms = <1100>;
648			linux,blink-delay-on-ms = <100>;
649			linux,blink-delay-off-ms = <1200>;
650		};
651
652		led36: led@36 {
653			label = "led36";
654			reg = <36>;
655			led-max-microamp = <10000>;
656			linux,default-trigger = "default-on";
657		};
658	};
659};
660
661&i2s_8ch_2 {
662	status = "okay";
663};
664
665&nandc {
666	status = "okay";
667};
668
669&rockchip_suspend {
670	rockchip,pwm-regulator-config = <
671		(0
672		| RKPM_PWM_REGULATOR
673		)
674	>;
675
676	status = "okay";
677};
678
679&rng {
680	status = "okay";
681};
682
683&saradc {
684	status = "okay";
685	vref-supply = <&vcc_1v8>;
686};
687
688&sdio {
689	bus-width = <4>;
690	cap-sd-highspeed;
691	no-sd;
692	no-mmc;
693	ignore-pm-notify;
694	keep-power-in-suspend;
695	non-removable;
696	mmc-pwrseq = <&sdio_pwrseq>;
697	sd-uhs-sdr104;
698	status = "okay";
699};
700
701&sdmmc {
702	bus-width = <4>;
703	cap-mmc-highspeed;
704	cap-sd-highspeed;
705	no-sdio;
706	no-mmc;
707	card-detect-delay = <300>;
708	vmmc-supply = <&vcc_sd>;
709	status = "disabled";
710};
711
712&sfc {
713	status = "okay";
714};
715
716&tsadc {
717	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
718	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
719	status = "okay";
720};
721
722&pinctrl {
723	buttons {
724		pwr_key: pwr-key {
725			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
726		};
727	};
728
729	usb {
730		usb_drv: usb-drv {
731			rockchip,pins =
732				<0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
733		};
734	};
735
736	sdio-pwrseq {
737		wifi_enable_h: wifi-enable-h {
738			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
739		};
740	};
741};
742
743&pwm0 {
744	status = "okay";
745	pinctrl-names = "active";
746	pinctrl-0 = <&pwm0_pin_pull_down>;
747};
748
749&u2phy {
750	status = "okay";
751
752	u2phy_host: host-port {
753		phy-supply = <&vbus_host>;
754		status = "okay";
755	};
756
757	u2phy_otg: otg-port {
758		status = "okay";
759	};
760};
761
762&uart4 {
763	pinctrl-names = "default";
764	pinctrl-0 = <&uart4_xfer &uart4_cts>;
765	status = "okay";
766};
767
768&usb20_otg {
769	status = "okay";
770};
771
772&usb_host0_ehci {
773	status = "okay";
774};
775
776&usb_host0_ohci{
777	status = "okay";
778};
779