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