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