xref: /linux/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts (revision 67f9c312b0a7f4bc869376d2a68308e673235954)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/leds/common.h>
7#include <dt-bindings/pinctrl/rockchip.h>
8#include "rk3588s.dtsi"
9
10/ {
11	model = "Radxa ROCK 5A";
12	compatible = "radxa,rock-5a", "rockchip,rk3588s";
13
14	aliases {
15		ethernet0 = &gmac1;
16		mmc0 = &sdhci;
17		mmc1 = &sdmmc;
18	};
19
20	analog-sound {
21		compatible = "audio-graph-card";
22		label = "rk3588-es8316";
23
24		widgets = "Microphone", "Mic Jack",
25			  "Headphone", "Headphones";
26
27		routing = "MIC2", "Mic Jack",
28			  "Headphones", "HPOL",
29			  "Headphones", "HPOR";
30
31		dais = <&i2s0_8ch_p0>;
32	};
33
34	chosen {
35		stdout-path = "serial2:1500000n8";
36	};
37
38	leds {
39		compatible = "gpio-leds";
40		pinctrl-names = "default";
41		pinctrl-0 = <&io_led>;
42
43		io-led {
44			color = <LED_COLOR_ID_BLUE>;
45			function = LED_FUNCTION_STATUS;
46			gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
47			linux,default-trigger = "heartbeat";
48		};
49	};
50
51	fan: pwm-fan {
52		compatible = "pwm-fan";
53		cooling-levels = <0 95 145 195 255>;
54		fan-supply = <&vcc_5v0>;
55		pwms = <&pwm3 0 50000 0>;
56		#cooling-cells = <2>;
57	};
58
59	vcc12v_dcin: vcc12v-dcin-regulator {
60		compatible = "regulator-fixed";
61		regulator-name = "vcc12v_dcin";
62		regulator-always-on;
63		regulator-boot-on;
64		regulator-min-microvolt = <12000000>;
65		regulator-max-microvolt = <12000000>;
66	};
67
68	vcc5v0_host: vcc5v0-host-regulator {
69		compatible = "regulator-fixed";
70		regulator-name = "vcc5v0_host";
71		regulator-boot-on;
72		regulator-always-on;
73		regulator-min-microvolt = <5000000>;
74		regulator-max-microvolt = <5000000>;
75		enable-active-high;
76		gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
77		pinctrl-names = "default";
78		pinctrl-0 = <&vcc5v0_host_en>;
79		vin-supply = <&vcc5v0_sys>;
80	};
81
82	vcc5v0_sys: vcc5v0-sys-regulator {
83		compatible = "regulator-fixed";
84		regulator-name = "vcc5v0_sys";
85		regulator-always-on;
86		regulator-boot-on;
87		regulator-min-microvolt = <5000000>;
88		regulator-max-microvolt = <5000000>;
89		vin-supply = <&vcc12v_dcin>;
90	};
91
92	vcc_5v0: vcc-5v0-regulator {
93		compatible = "regulator-fixed";
94		regulator-name = "vcc_5v0";
95		regulator-min-microvolt = <5000000>;
96		regulator-max-microvolt = <5000000>;
97		regulator-boot-on;
98		regulator-always-on;
99		enable-active-high;
100		gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
101		pinctrl-names = "default";
102		pinctrl-0 = <&vcc_5v0_en>;
103		vin-supply = <&vcc5v0_sys>;
104	};
105
106	vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
107		compatible = "regulator-fixed";
108		regulator-name = "vcc_1v1_nldo_s3";
109		regulator-always-on;
110		regulator-boot-on;
111		regulator-min-microvolt = <1100000>;
112		regulator-max-microvolt = <1100000>;
113		vin-supply = <&vcc5v0_sys>;
114	};
115};
116
117&combphy2_psu {
118	status = "okay";
119};
120
121&cpu_b0 {
122	cpu-supply = <&vdd_cpu_big0_s0>;
123};
124
125&cpu_b1 {
126	cpu-supply = <&vdd_cpu_big0_s0>;
127};
128
129&cpu_b2 {
130	cpu-supply = <&vdd_cpu_big1_s0>;
131};
132
133&cpu_b3 {
134	cpu-supply = <&vdd_cpu_big1_s0>;
135};
136
137&cpu_l0 {
138	cpu-supply = <&vdd_cpu_lit_s0>;
139};
140
141&cpu_l1 {
142	cpu-supply = <&vdd_cpu_lit_s0>;
143};
144
145&cpu_l2 {
146	cpu-supply = <&vdd_cpu_lit_s0>;
147};
148
149&cpu_l3 {
150	cpu-supply = <&vdd_cpu_lit_s0>;
151};
152
153&i2c0 {
154	pinctrl-names = "default";
155	pinctrl-0 = <&i2c0m2_xfer>;
156	status = "okay";
157
158	vdd_cpu_big0_s0: regulator@42 {
159		compatible = "rockchip,rk8602";
160		reg = <0x42>;
161		fcs,suspend-voltage-selector = <1>;
162		regulator-name = "vdd_cpu_big0_s0";
163		regulator-always-on;
164		regulator-boot-on;
165		regulator-min-microvolt = <550000>;
166		regulator-max-microvolt = <1050000>;
167		regulator-ramp-delay = <2300>;
168		vin-supply = <&vcc5v0_sys>;
169
170		regulator-state-mem {
171			regulator-off-in-suspend;
172		};
173	};
174
175	vdd_cpu_big1_s0: regulator@43 {
176		compatible = "rockchip,rk8603", "rockchip,rk8602";
177		reg = <0x43>;
178		fcs,suspend-voltage-selector = <1>;
179		regulator-name = "vdd_cpu_big1_s0";
180		regulator-always-on;
181		regulator-boot-on;
182		regulator-min-microvolt = <550000>;
183		regulator-max-microvolt = <1050000>;
184		regulator-ramp-delay = <2300>;
185		vin-supply = <&vcc5v0_sys>;
186
187		regulator-state-mem {
188			regulator-off-in-suspend;
189		};
190	};
191};
192
193&i2c2 {
194	status = "okay";
195
196	vdd_npu_s0: regulator@42 {
197		compatible = "rockchip,rk8602";
198		reg = <0x42>;
199		fcs,suspend-voltage-selector = <1>;
200		regulator-name = "vdd_npu_s0";
201		regulator-always-on;
202		regulator-boot-on;
203		regulator-min-microvolt = <550000>;
204		regulator-max-microvolt = <950000>;
205		regulator-ramp-delay = <2300>;
206		vin-supply = <&vcc5v0_sys>;
207
208		regulator-state-mem {
209			regulator-off-in-suspend;
210		};
211	};
212
213	eeprom: eeprom@50 {
214		compatible = "belling,bl24c16a", "atmel,24c16";
215		reg = <0x50>;
216		pagesize = <16>;
217	};
218};
219
220&i2c3 {
221	status = "okay";
222};
223
224&i2c5 {
225	status = "okay";
226	pinctrl-names = "default";
227	pinctrl-0 = <&i2c5m2_xfer>;
228};
229
230&i2c7 {
231	status = "okay";
232
233	es8316: audio-codec@11 {
234		compatible = "everest,es8316";
235		reg = <0x11>;
236		clocks = <&cru I2S0_8CH_MCLKOUT>;
237		clock-names = "mclk";
238		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
239		assigned-clock-rates = <12288000>;
240		#sound-dai-cells = <0>;
241
242		port {
243			es8316_p0_0: endpoint {
244				remote-endpoint = <&i2s0_8ch_p0_0>;
245			};
246		};
247	};
248};
249
250&i2s0_8ch {
251	pinctrl-names = "default";
252	pinctrl-0 = <&i2s0_lrck
253		     &i2s0_mclk
254		     &i2s0_sclk
255		     &i2s0_sdi0
256		     &i2s0_sdo0>;
257	status = "okay";
258
259	i2s0_8ch_p0: port {
260		i2s0_8ch_p0_0: endpoint {
261			dai-format = "i2s";
262			mclk-fs = <256>;
263			remote-endpoint = <&es8316_p0_0>;
264		};
265	};
266};
267
268&gmac1 {
269	clock_in_out = "output";
270	phy-handle = <&rgmii_phy1>;
271	phy-mode = "rgmii";
272	pinctrl-0 = <&gmac1_miim
273		     &gmac1_tx_bus2
274		     &gmac1_rx_bus2
275		     &gmac1_rgmii_clk
276		     &gmac1_rgmii_bus>;
277	pinctrl-names = "default";
278	tx_delay = <0x3a>;
279	rx_delay = <0x3e>;
280	status = "okay";
281};
282
283&mdio1 {
284	rgmii_phy1: ethernet-phy@1 {
285		/* RTL8211F */
286		compatible = "ethernet-phy-id001c.c916";
287		reg = <0x1>;
288		pinctrl-names = "default";
289		pinctrl-0 = <&rtl8211f_rst>;
290		reset-assert-us = <20000>;
291		reset-deassert-us = <100000>;
292		reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
293	};
294};
295
296&pinctrl {
297	leds {
298		io_led: io-led {
299			rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
300		};
301	};
302
303	power {
304		vcc_5v0_en: vcc-5v0-en {
305			rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
306		};
307	};
308
309	rtl8211f {
310		rtl8211f_rst: rtl8211f-rst {
311			rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
312		};
313	};
314
315	usb {
316		vcc5v0_host_en: vcc5v0-host-en {
317			rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
318		};
319	};
320
321	wifibt {
322		wl_reset: wl-reset {
323			rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
324		};
325
326		wl_dis: wl-dis {
327			rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_output_high>;
328		};
329
330		wl_wake_host: wl-wake-host {
331			rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
332		};
333
334		bt_dis: bt-dis {
335			rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_output_high>;
336		};
337
338		bt_wake_host: bt-wake-host {
339			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
340		};
341	};
342};
343
344&pwm3 {
345	pinctrl-names = "default";
346	pinctrl-0 = <&pwm3m1_pins>;
347	status = "okay";
348};
349
350&saradc {
351	vref-supply = <&avcc_1v8_s0>;
352	status = "okay";
353};
354
355&sdhci {
356	bus-width = <8>;
357	no-sdio;
358	no-sd;
359	non-removable;
360	mmc-hs400-1_8v;
361	mmc-hs400-enhanced-strobe;
362	status = "okay";
363};
364
365&sdmmc {
366	bus-width = <4>;
367	cap-mmc-highspeed;
368	cap-sd-highspeed;
369	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
370	disable-wp;
371	max-frequency = <150000000>;
372	no-sdio;
373	no-mmc;
374	sd-uhs-sdr104;
375	vmmc-supply = <&vcc_3v3_s0>;
376	vqmmc-supply = <&vccio_sd_s0>;
377	status = "okay";
378};
379
380&spi2 {
381	status = "okay";
382	assigned-clocks = <&cru CLK_SPI2>;
383	assigned-clock-rates = <200000000>;
384	num-cs = <1>;
385	pinctrl-names = "default";
386	pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
387
388	pmic@0 {
389		compatible = "rockchip,rk806";
390		reg = <0x0>;
391		interrupt-parent = <&gpio0>;
392		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
393		pinctrl-names = "default";
394		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
395			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
396		spi-max-frequency = <1000000>;
397		system-power-controller;
398
399		vcc1-supply = <&vcc5v0_sys>;
400		vcc2-supply = <&vcc5v0_sys>;
401		vcc3-supply = <&vcc5v0_sys>;
402		vcc4-supply = <&vcc5v0_sys>;
403		vcc5-supply = <&vcc5v0_sys>;
404		vcc6-supply = <&vcc5v0_sys>;
405		vcc7-supply = <&vcc5v0_sys>;
406		vcc8-supply = <&vcc5v0_sys>;
407		vcc9-supply = <&vcc5v0_sys>;
408		vcc10-supply = <&vcc5v0_sys>;
409		vcc11-supply = <&vcc_2v0_pldo_s3>;
410		vcc12-supply = <&vcc5v0_sys>;
411		vcc13-supply = <&vcc_1v1_nldo_s3>;
412		vcc14-supply = <&vcc_1v1_nldo_s3>;
413		vcca-supply = <&vcc5v0_sys>;
414
415		gpio-controller;
416		#gpio-cells = <2>;
417
418		rk806_dvs1_null: dvs1-null-pins {
419			pins = "gpio_pwrctrl1";
420			function = "pin_fun0";
421		};
422
423		rk806_dvs2_null: dvs2-null-pins {
424			pins = "gpio_pwrctrl2";
425			function = "pin_fun0";
426		};
427
428		rk806_dvs3_null: dvs3-null-pins {
429			pins = "gpio_pwrctrl3";
430			function = "pin_fun0";
431		};
432
433		regulators {
434			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
435				regulator-name = "vdd_gpu_s0";
436				regulator-boot-on;
437				regulator-min-microvolt = <550000>;
438				regulator-max-microvolt = <950000>;
439				regulator-ramp-delay = <12500>;
440				regulator-enable-ramp-delay = <400>;
441
442				regulator-state-mem {
443					regulator-off-in-suspend;
444				};
445			};
446
447			vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
448				regulator-name = "vdd_cpu_lit_s0";
449				regulator-always-on;
450				regulator-boot-on;
451				regulator-min-microvolt = <550000>;
452				regulator-max-microvolt = <950000>;
453				regulator-ramp-delay = <12500>;
454
455				regulator-state-mem {
456					regulator-off-in-suspend;
457				};
458			};
459
460			vdd_log_s0: dcdc-reg3 {
461				regulator-name = "vdd_log_s0";
462				regulator-always-on;
463				regulator-boot-on;
464				regulator-min-microvolt = <675000>;
465				regulator-max-microvolt = <750000>;
466				regulator-ramp-delay = <12500>;
467
468				regulator-state-mem {
469					regulator-off-in-suspend;
470					regulator-suspend-microvolt = <750000>;
471				};
472			};
473
474			vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
475				regulator-name = "vdd_vdenc_s0";
476				regulator-always-on;
477				regulator-boot-on;
478				regulator-min-microvolt = <550000>;
479				regulator-max-microvolt = <950000>;
480				regulator-ramp-delay = <12500>;
481
482				regulator-state-mem {
483					regulator-off-in-suspend;
484				};
485			};
486
487			vdd_ddr_s0: dcdc-reg5 {
488				regulator-name = "vdd_ddr_s0";
489				regulator-always-on;
490				regulator-boot-on;
491				regulator-min-microvolt = <675000>;
492				regulator-max-microvolt = <900000>;
493				regulator-ramp-delay = <12500>;
494
495				regulator-state-mem {
496					regulator-off-in-suspend;
497					regulator-suspend-microvolt = <850000>;
498				};
499			};
500
501			vdd2_ddr_s3: dcdc-reg6 {
502				regulator-name = "vdd2_ddr_s3";
503				regulator-always-on;
504				regulator-boot-on;
505
506				regulator-state-mem {
507					regulator-on-in-suspend;
508				};
509			};
510
511			vcc_2v0_pldo_s3: dcdc-reg7 {
512				regulator-name = "vdd_2v0_pldo_s3";
513				regulator-always-on;
514				regulator-boot-on;
515				regulator-min-microvolt = <2000000>;
516				regulator-max-microvolt = <2000000>;
517				regulator-ramp-delay = <12500>;
518
519				regulator-state-mem {
520					regulator-on-in-suspend;
521					regulator-suspend-microvolt = <2000000>;
522				};
523			};
524
525			vcc_3v3_s3: dcdc-reg8 {
526				regulator-name = "vcc_3v3_s3";
527				regulator-always-on;
528				regulator-boot-on;
529				regulator-min-microvolt = <3300000>;
530				regulator-max-microvolt = <3300000>;
531
532				regulator-state-mem {
533					regulator-on-in-suspend;
534					regulator-suspend-microvolt = <3300000>;
535				};
536			};
537
538			vddq_ddr_s0: dcdc-reg9 {
539				regulator-name = "vddq_ddr_s0";
540				regulator-always-on;
541				regulator-boot-on;
542
543				regulator-state-mem {
544					regulator-off-in-suspend;
545				};
546			};
547
548			vcc_1v8_s3: dcdc-reg10 {
549				regulator-name = "vcc_1v8_s3";
550				regulator-always-on;
551				regulator-boot-on;
552				regulator-min-microvolt = <1800000>;
553				regulator-max-microvolt = <1800000>;
554
555				regulator-state-mem {
556					regulator-on-in-suspend;
557					regulator-suspend-microvolt = <1800000>;
558				};
559			};
560
561			avcc_1v8_s0: pldo-reg1 {
562				regulator-name = "avcc_1v8_s0";
563				regulator-always-on;
564				regulator-boot-on;
565				regulator-min-microvolt = <1800000>;
566				regulator-max-microvolt = <1800000>;
567
568				regulator-state-mem {
569					regulator-off-in-suspend;
570				};
571			};
572
573			vcc_1v8_s0: pldo-reg2 {
574				regulator-name = "vcc_1v8_s0";
575				regulator-always-on;
576				regulator-boot-on;
577				regulator-min-microvolt = <1800000>;
578				regulator-max-microvolt = <1800000>;
579
580				regulator-state-mem {
581					regulator-off-in-suspend;
582					regulator-suspend-microvolt = <1800000>;
583				};
584			};
585
586			avdd_1v2_s0: pldo-reg3 {
587				regulator-name = "avdd_1v2_s0";
588				regulator-always-on;
589				regulator-boot-on;
590				regulator-min-microvolt = <1200000>;
591				regulator-max-microvolt = <1200000>;
592
593				regulator-state-mem {
594					regulator-off-in-suspend;
595				};
596			};
597
598			vcc_3v3_s0: pldo-reg4 {
599				regulator-name = "vcc_3v3_s0";
600				regulator-always-on;
601				regulator-boot-on;
602				regulator-min-microvolt = <3300000>;
603				regulator-max-microvolt = <3300000>;
604				regulator-ramp-delay = <12500>;
605
606				regulator-state-mem {
607					regulator-off-in-suspend;
608				};
609			};
610
611			vccio_sd_s0: pldo-reg5 {
612				regulator-name = "vccio_sd_s0";
613				regulator-always-on;
614				regulator-boot-on;
615				regulator-min-microvolt = <1800000>;
616				regulator-max-microvolt = <3300000>;
617				regulator-ramp-delay = <12500>;
618
619				regulator-state-mem {
620					regulator-off-in-suspend;
621				};
622			};
623
624			pldo6_s3: pldo-reg6 {
625				regulator-name = "pldo6_s3";
626				regulator-always-on;
627				regulator-boot-on;
628				regulator-min-microvolt = <1800000>;
629				regulator-max-microvolt = <1800000>;
630
631				regulator-state-mem {
632					regulator-on-in-suspend;
633					regulator-suspend-microvolt = <1800000>;
634				};
635			};
636
637			vdd_0v75_s3: nldo-reg1 {
638				regulator-name = "vdd_0v75_s3";
639				regulator-always-on;
640				regulator-boot-on;
641				regulator-min-microvolt = <750000>;
642				regulator-max-microvolt = <750000>;
643
644				regulator-state-mem {
645					regulator-on-in-suspend;
646					regulator-suspend-microvolt = <750000>;
647				};
648			};
649
650			vdd_ddr_pll_s0: nldo-reg2 {
651				regulator-name = "vdd_ddr_pll_s0";
652				regulator-always-on;
653				regulator-boot-on;
654				regulator-min-microvolt = <850000>;
655				regulator-max-microvolt = <850000>;
656
657				regulator-state-mem {
658					regulator-off-in-suspend;
659					regulator-suspend-microvolt = <850000>;
660				};
661			};
662
663			avdd_0v75_s0: nldo-reg3 {
664				regulator-name = "avdd_0v75_s0";
665				regulator-always-on;
666				regulator-boot-on;
667				regulator-min-microvolt = <750000>;
668				regulator-max-microvolt = <750000>;
669
670				regulator-state-mem {
671					regulator-off-in-suspend;
672				};
673			};
674
675			vdd_0v85_s0: nldo-reg4 {
676				regulator-name = "vdd_0v85_s0";
677				regulator-always-on;
678				regulator-boot-on;
679				regulator-min-microvolt = <850000>;
680				regulator-max-microvolt = <850000>;
681
682				regulator-state-mem {
683					regulator-off-in-suspend;
684				};
685			};
686
687			vdd_0v75_s0: nldo-reg5 {
688				regulator-name = "vdd_0v75_s0";
689				regulator-always-on;
690				regulator-boot-on;
691				regulator-min-microvolt = <750000>;
692				regulator-max-microvolt = <750000>;
693
694				regulator-state-mem {
695					regulator-off-in-suspend;
696				};
697			};
698		};
699	};
700};
701
702&u2phy0 {
703	status = "okay";
704};
705
706&u2phy0_otg {
707	status = "okay";
708};
709
710&u2phy2 {
711	status = "okay";
712};
713
714&u2phy2_host {
715	status = "okay";
716	phy-supply = <&vcc5v0_host>;
717};
718
719&u2phy3 {
720	status = "okay";
721};
722
723&u2phy3_host {
724	phy-supply = <&vcc5v0_host>;
725	status = "okay";
726};
727
728&uart2 {
729	pinctrl-0 = <&uart2m0_xfer>;
730	status = "okay";
731};
732
733&usbdp_phy0 {
734	status = "okay";
735	rockchip,dp-lane-mux = <2 3>;
736};
737
738&usb_host0_ehci {
739	status = "okay";
740	pinctrl-names = "default";
741	pinctrl-0 = <&wl_reset &wl_dis &wl_wake_host &bt_dis &bt_wake_host>;
742};
743
744&usb_host0_ohci {
745	status = "okay";
746};
747
748&usb_host0_xhci {
749	dr_mode = "host";
750	status = "okay";
751};
752
753&usb_host1_ehci {
754	status = "okay";
755};
756
757&usb_host1_ohci {
758	status = "okay";
759};
760
761&usb_host2_xhci {
762	status = "okay";
763};
764