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