xref: /linux/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts (revision 4b660dbd9ee2059850fd30e0df420ca7a38a1856)
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 5 Model A";
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	disable-wp;
370	max-frequency = <150000000>;
371	no-sdio;
372	no-mmc;
373	sd-uhs-sdr104;
374	vmmc-supply = <&vcc_3v3_s0>;
375	vqmmc-supply = <&vccio_sd_s0>;
376	status = "okay";
377};
378
379&spi2 {
380	status = "okay";
381	assigned-clocks = <&cru CLK_SPI2>;
382	assigned-clock-rates = <200000000>;
383	num-cs = <1>;
384	pinctrl-names = "default";
385	pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
386
387	pmic@0 {
388		compatible = "rockchip,rk806";
389		reg = <0x0>;
390		interrupt-parent = <&gpio0>;
391		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
392		pinctrl-names = "default";
393		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
394			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
395		spi-max-frequency = <1000000>;
396
397		vcc1-supply = <&vcc5v0_sys>;
398		vcc2-supply = <&vcc5v0_sys>;
399		vcc3-supply = <&vcc5v0_sys>;
400		vcc4-supply = <&vcc5v0_sys>;
401		vcc5-supply = <&vcc5v0_sys>;
402		vcc6-supply = <&vcc5v0_sys>;
403		vcc7-supply = <&vcc5v0_sys>;
404		vcc8-supply = <&vcc5v0_sys>;
405		vcc9-supply = <&vcc5v0_sys>;
406		vcc10-supply = <&vcc5v0_sys>;
407		vcc11-supply = <&vcc_2v0_pldo_s3>;
408		vcc12-supply = <&vcc5v0_sys>;
409		vcc13-supply = <&vcc_1v1_nldo_s3>;
410		vcc14-supply = <&vcc_1v1_nldo_s3>;
411		vcca-supply = <&vcc5v0_sys>;
412
413		gpio-controller;
414		#gpio-cells = <2>;
415
416		rk806_dvs1_null: dvs1-null-pins {
417			pins = "gpio_pwrctrl2";
418			function = "pin_fun0";
419		};
420
421		rk806_dvs2_null: dvs2-null-pins {
422			pins = "gpio_pwrctrl2";
423			function = "pin_fun0";
424		};
425
426		rk806_dvs3_null: dvs3-null-pins {
427			pins = "gpio_pwrctrl3";
428			function = "pin_fun0";
429		};
430
431		regulators {
432			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
433				regulator-name = "vdd_gpu_s0";
434				regulator-boot-on;
435				regulator-min-microvolt = <550000>;
436				regulator-max-microvolt = <950000>;
437				regulator-ramp-delay = <12500>;
438				regulator-enable-ramp-delay = <400>;
439
440				regulator-state-mem {
441					regulator-off-in-suspend;
442				};
443			};
444
445			vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
446				regulator-name = "vdd_cpu_lit_s0";
447				regulator-always-on;
448				regulator-boot-on;
449				regulator-min-microvolt = <550000>;
450				regulator-max-microvolt = <950000>;
451				regulator-ramp-delay = <12500>;
452
453				regulator-state-mem {
454					regulator-off-in-suspend;
455				};
456			};
457
458			vdd_log_s0: dcdc-reg3 {
459				regulator-name = "vdd_log_s0";
460				regulator-always-on;
461				regulator-boot-on;
462				regulator-min-microvolt = <675000>;
463				regulator-max-microvolt = <750000>;
464				regulator-ramp-delay = <12500>;
465
466				regulator-state-mem {
467					regulator-off-in-suspend;
468					regulator-suspend-microvolt = <750000>;
469				};
470			};
471
472			vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
473				regulator-name = "vdd_vdenc_s0";
474				regulator-always-on;
475				regulator-boot-on;
476				regulator-min-microvolt = <550000>;
477				regulator-max-microvolt = <950000>;
478				regulator-ramp-delay = <12500>;
479
480				regulator-state-mem {
481					regulator-off-in-suspend;
482				};
483			};
484
485			vdd_ddr_s0: dcdc-reg5 {
486				regulator-name = "vdd_ddr_s0";
487				regulator-always-on;
488				regulator-boot-on;
489				regulator-min-microvolt = <675000>;
490				regulator-max-microvolt = <900000>;
491				regulator-ramp-delay = <12500>;
492
493				regulator-state-mem {
494					regulator-off-in-suspend;
495					regulator-suspend-microvolt = <850000>;
496				};
497			};
498
499			vdd2_ddr_s3: dcdc-reg6 {
500				regulator-name = "vdd2_ddr_s3";
501				regulator-always-on;
502				regulator-boot-on;
503
504				regulator-state-mem {
505					regulator-on-in-suspend;
506				};
507			};
508
509			vcc_2v0_pldo_s3: dcdc-reg7 {
510				regulator-name = "vdd_2v0_pldo_s3";
511				regulator-always-on;
512				regulator-boot-on;
513				regulator-min-microvolt = <2000000>;
514				regulator-max-microvolt = <2000000>;
515				regulator-ramp-delay = <12500>;
516
517				regulator-state-mem {
518					regulator-on-in-suspend;
519					regulator-suspend-microvolt = <2000000>;
520				};
521			};
522
523			vcc_3v3_s3: dcdc-reg8 {
524				regulator-name = "vcc_3v3_s3";
525				regulator-always-on;
526				regulator-boot-on;
527				regulator-min-microvolt = <3300000>;
528				regulator-max-microvolt = <3300000>;
529
530				regulator-state-mem {
531					regulator-on-in-suspend;
532					regulator-suspend-microvolt = <3300000>;
533				};
534			};
535
536			vddq_ddr_s0: dcdc-reg9 {
537				regulator-name = "vddq_ddr_s0";
538				regulator-always-on;
539				regulator-boot-on;
540
541				regulator-state-mem {
542					regulator-off-in-suspend;
543				};
544			};
545
546			vcc_1v8_s3: dcdc-reg10 {
547				regulator-name = "vcc_1v8_s3";
548				regulator-always-on;
549				regulator-boot-on;
550				regulator-min-microvolt = <1800000>;
551				regulator-max-microvolt = <1800000>;
552
553				regulator-state-mem {
554					regulator-on-in-suspend;
555					regulator-suspend-microvolt = <1800000>;
556				};
557			};
558
559			avcc_1v8_s0: pldo-reg1 {
560				regulator-name = "avcc_1v8_s0";
561				regulator-always-on;
562				regulator-boot-on;
563				regulator-min-microvolt = <1800000>;
564				regulator-max-microvolt = <1800000>;
565
566				regulator-state-mem {
567					regulator-off-in-suspend;
568				};
569			};
570
571			vcc_1v8_s0: pldo-reg2 {
572				regulator-name = "vcc_1v8_s0";
573				regulator-always-on;
574				regulator-boot-on;
575				regulator-min-microvolt = <1800000>;
576				regulator-max-microvolt = <1800000>;
577
578				regulator-state-mem {
579					regulator-off-in-suspend;
580					regulator-suspend-microvolt = <1800000>;
581				};
582			};
583
584			avdd_1v2_s0: pldo-reg3 {
585				regulator-name = "avdd_1v2_s0";
586				regulator-always-on;
587				regulator-boot-on;
588				regulator-min-microvolt = <1200000>;
589				regulator-max-microvolt = <1200000>;
590
591				regulator-state-mem {
592					regulator-off-in-suspend;
593				};
594			};
595
596			vcc_3v3_s0: pldo-reg4 {
597				regulator-name = "vcc_3v3_s0";
598				regulator-always-on;
599				regulator-boot-on;
600				regulator-min-microvolt = <3300000>;
601				regulator-max-microvolt = <3300000>;
602				regulator-ramp-delay = <12500>;
603
604				regulator-state-mem {
605					regulator-off-in-suspend;
606				};
607			};
608
609			vccio_sd_s0: pldo-reg5 {
610				regulator-name = "vccio_sd_s0";
611				regulator-always-on;
612				regulator-boot-on;
613				regulator-min-microvolt = <1800000>;
614				regulator-max-microvolt = <3300000>;
615				regulator-ramp-delay = <12500>;
616
617				regulator-state-mem {
618					regulator-off-in-suspend;
619				};
620			};
621
622			pldo6_s3: pldo-reg6 {
623				regulator-name = "pldo6_s3";
624				regulator-always-on;
625				regulator-boot-on;
626				regulator-min-microvolt = <1800000>;
627				regulator-max-microvolt = <1800000>;
628
629				regulator-state-mem {
630					regulator-on-in-suspend;
631					regulator-suspend-microvolt = <1800000>;
632				};
633			};
634
635			vdd_0v75_s3: nldo-reg1 {
636				regulator-name = "vdd_0v75_s3";
637				regulator-always-on;
638				regulator-boot-on;
639				regulator-min-microvolt = <750000>;
640				regulator-max-microvolt = <750000>;
641
642				regulator-state-mem {
643					regulator-on-in-suspend;
644					regulator-suspend-microvolt = <750000>;
645				};
646			};
647
648			vdd_ddr_pll_s0: nldo-reg2 {
649				regulator-name = "vdd_ddr_pll_s0";
650				regulator-always-on;
651				regulator-boot-on;
652				regulator-min-microvolt = <850000>;
653				regulator-max-microvolt = <850000>;
654
655				regulator-state-mem {
656					regulator-off-in-suspend;
657					regulator-suspend-microvolt = <850000>;
658				};
659			};
660
661			avdd_0v75_s0: nldo-reg3 {
662				regulator-name = "avdd_0v75_s0";
663				regulator-always-on;
664				regulator-boot-on;
665				regulator-min-microvolt = <750000>;
666				regulator-max-microvolt = <750000>;
667
668				regulator-state-mem {
669					regulator-off-in-suspend;
670				};
671			};
672
673			vdd_0v85_s0: nldo-reg4 {
674				regulator-name = "vdd_0v85_s0";
675				regulator-always-on;
676				regulator-boot-on;
677				regulator-min-microvolt = <850000>;
678				regulator-max-microvolt = <850000>;
679
680				regulator-state-mem {
681					regulator-off-in-suspend;
682				};
683			};
684
685			vdd_0v75_s0: nldo-reg5 {
686				regulator-name = "vdd_0v75_s0";
687				regulator-always-on;
688				regulator-boot-on;
689				regulator-min-microvolt = <750000>;
690				regulator-max-microvolt = <750000>;
691
692				regulator-state-mem {
693					regulator-off-in-suspend;
694				};
695			};
696		};
697	};
698};
699
700&u2phy2 {
701	status = "okay";
702};
703
704&u2phy2_host {
705	status = "okay";
706	phy-supply = <&vcc5v0_host>;
707};
708
709&u2phy3 {
710	status = "okay";
711};
712
713&u2phy3_host {
714	phy-supply = <&vcc5v0_host>;
715	status = "okay";
716};
717
718&uart2 {
719	pinctrl-0 = <&uart2m0_xfer>;
720	status = "okay";
721};
722
723&usb_host0_ehci {
724	status = "okay";
725	pinctrl-names = "default";
726	pinctrl-0 = <&wl_reset &wl_dis &wl_wake_host &bt_dis &bt_wake_host>;
727};
728
729&usb_host0_ohci {
730	status = "okay";
731};
732
733&usb_host1_ehci {
734	status = "okay";
735};
736
737&usb_host1_ohci {
738	status = "okay";
739};
740
741&usb_host2_xhci {
742	status = "okay";
743};
744