xref: /linux/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi (revision 55d0969c451159cff86949b38c39171cab962069)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2023 Theobroma Systems Design und Consulting GmbH
4 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/leds/common.h>
8#include <dt-bindings/pinctrl/rockchip.h>
9#include "rk3588.dtsi"
10
11/ {
12	compatible = "tsd,rk3588-tiger", "rockchip,rk3588";
13
14	aliases {
15		i2c10 = &i2c10;
16		mmc0 = &sdhci;
17		rtc0 = &rtc_twi;
18	};
19
20	emmc_pwrseq: emmc-pwrseq {
21		compatible = "mmc-pwrseq-emmc";
22		pinctrl-0 = <&emmc_reset>;
23		pinctrl-names = "default";
24		reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
25	};
26
27	extcon_usb3: extcon-usb3 {
28		compatible = "linux,extcon-usb-gpio";
29		id-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
30		pinctrl-names = "default";
31		pinctrl-0 = <&usb3_id>;
32		status = "disabled";
33	};
34
35	leds {
36		compatible = "gpio-leds";
37		pinctrl-names = "default";
38		pinctrl-0 = <&module_led_pin>;
39
40		/* Named LED1 on the board */
41		led-1 {
42			gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
43			function = LED_FUNCTION_HEARTBEAT;
44			linux,default-trigger = "heartbeat";
45			color = <LED_COLOR_ID_AMBER>;
46		};
47	};
48
49	/*
50	 * 100MHz reference clock for PCIe peripherals from PI6C557-05BLE
51	 * clock generator.
52	 * The clock output is gated via the OE pin on the clock generator.
53	 * This is modeled as a fixed-clock plus a gpio-gate-clock.
54	 */
55	pcie_refclk_gen: pcie-refclk-gen-clock {
56		compatible = "fixed-clock";
57		#clock-cells = <0>;
58		clock-frequency = <100000000>;
59	};
60
61	pcie_refclk: pcie-refclk-clock {
62		compatible = "gpio-gate-clock";
63		clocks = <&pcie_refclk_gen>;
64		#clock-cells = <0>;
65		enable-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; /* PCIE30X4_CLKREQN_M1_L */
66	};
67
68	vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
69		compatible = "regulator-fixed";
70		regulator-name = "vcc_1v1_nldo_s3";
71		regulator-always-on;
72		regulator-boot-on;
73		regulator-min-microvolt = <1100000>;
74		regulator-max-microvolt = <1100000>;
75		vin-supply = <&vcc5v0_sys>;
76	};
77
78	vcc_1v2_s3: vcc-1v2-s3-regulator {
79		compatible = "regulator-fixed";
80		regulator-name = "vcc_1v2_s3";
81		regulator-always-on;
82		regulator-boot-on;
83		regulator-min-microvolt = <1200000>;
84		regulator-max-microvolt = <1200000>;
85		vin-supply = <&vcc5v0_sys>;
86	};
87
88	vcc5v0_sys: vcc5v0-sys-regulator {
89		compatible = "regulator-fixed";
90		regulator-name = "vcc5v0_sys";
91		regulator-always-on;
92		regulator-boot-on;
93		regulator-min-microvolt = <5000000>;
94		regulator-max-microvolt = <5000000>;
95		vin-supply = <&vcc5v0_baseboard>;
96	};
97};
98
99&cpu_b0 {
100	cpu-supply = <&vdd_cpu_big0_s0>;
101};
102
103&cpu_b1 {
104	cpu-supply = <&vdd_cpu_big0_s0>;
105};
106
107&cpu_b2 {
108	cpu-supply = <&vdd_cpu_big1_s0>;
109};
110
111&cpu_b3 {
112	cpu-supply = <&vdd_cpu_big1_s0>;
113};
114
115&cpu_l0 {
116	cpu-supply = <&vdd_cpu_lit_s0>;
117};
118
119&cpu_l1 {
120	cpu-supply = <&vdd_cpu_lit_s0>;
121};
122
123&cpu_l2 {
124	cpu-supply = <&vdd_cpu_lit_s0>;
125};
126
127&cpu_l3 {
128	cpu-supply = <&vdd_cpu_lit_s0>;
129};
130
131&gmac0 {
132	clock_in_out = "output";
133	phy-handle = <&rgmii_phy>;
134	phy-mode = "rgmii";
135	phy-supply = <&vcc_1v2_s3>;
136	pinctrl-names = "default";
137	pinctrl-0 = <&gmac0_miim
138		     &gmac0_rx_bus2
139		     &gmac0_tx_bus2
140		     &gmac0_rgmii_clk
141		     &gmac0_rgmii_bus
142		     &eth0_pins
143		     &eth_reset>;
144	tx_delay = <0x10>;
145	rx_delay = <0x10>;
146	snps,reset-gpio = <&gpio4 RK_PC3 GPIO_ACTIVE_LOW>;
147	snps,reset-active-low;
148	snps,reset-delays-us = <0 10000 100000>;
149};
150
151&gpu {
152	mali-supply = <&vdd_gpu_s0>;
153	status = "okay";
154};
155
156&hdmi0 {
157	pinctrl-names = "default";
158	pinctrl-0 = <&hdmim1_tx0_cec &hdmim0_tx0_hpd &hdmim1_tx0_scl
159		     &hdmim1_tx0_sda>;
160};
161
162&i2c1 {
163	pinctrl-0 = <&i2c1m0_xfer>;
164};
165
166&i2c1m0_xfer {
167	rockchip,pins =
168		/* i2c1_scl_m0 */
169		<0 RK_PB5 9 &pcfg_pull_none_drv_level_0>,
170		/* i2c1_sda_m0 */
171		<0 RK_PB6 9 &pcfg_pull_none_drv_level_0>;
172};
173
174&i2c2 {
175	pinctrl-0 = <&i2c2m3_xfer>;
176	status = "okay";
177};
178
179&i2c2m3_xfer {
180	rockchip,pins =
181		/* i2c2_scl_m3 */
182		<1 RK_PC5 9 &pcfg_pull_none_drv_level_0>,
183		/* i2c2_sda_m3 */
184		<1 RK_PC4 9 &pcfg_pull_none_drv_level_0>;
185};
186
187&i2c3 {
188	pinctrl-0 = <&i2c3m0_xfer>;
189};
190
191&i2c4 {
192	pinctrl-0 = <&i2c4m4_xfer>;
193	status = "okay";
194
195	vdd_npu_s0: regulator@42 {
196		compatible = "rockchip,rk8602";
197		reg = <0x42>;
198		fcs,suspend-voltage-selector = <1>;
199		regulator-name = "vdd_npu_s0";
200		regulator-always-on;
201		regulator-boot-on;
202		regulator-min-microvolt = <550000>;
203		regulator-max-microvolt = <950000>;
204		regulator-ramp-delay = <2300>;
205		vin-supply = <&vcc5v0_sys>;
206
207		regulator-state-mem {
208			regulator-off-in-suspend;
209		};
210	};
211};
212
213&i2c5 {
214	pinctrl-0 = <&i2c5m1_xfer>;
215};
216
217&i2c5m1_xfer {
218	rockchip,pins =
219		/* i2c5_scl_m1 */
220		<4 RK_PB6 9 &pcfg_pull_none_drv_level_0>,
221		/* i2c5_sda_m1 */
222		<4 RK_PB7 9 &pcfg_pull_none_drv_level_0>;
223};
224
225&i2c6 {
226	/*
227	 * Mule-ATtiny can handle up to Fast mode Plus (1MHz) on I2C bus,
228	 * but SOC can handle only up to (400kHz).
229	 */
230	clock-frequency = <400000>;
231	status = "okay";
232
233	fan@18 {
234		compatible = "tsd,mule", "ti,amc6821";
235		reg = <0x18>;
236
237		i2c-mux {
238			compatible = "tsd,mule-i2c-mux";
239			#address-cells = <1>;
240			#size-cells = <0>;
241
242			i2c10: i2c@0 {
243				reg = <0x0>;
244				#address-cells = <1>;
245				#size-cells = <0>;
246
247				rtc_twi: rtc@6f {
248					compatible = "isil,isl1208";
249					reg = <0x6f>;
250				};
251			};
252		};
253	};
254};
255
256&i2c6m0_xfer {
257	rockchip,pins =
258		/* i2c6_scl_m0 */
259		<0 RK_PD0 9 &pcfg_pull_none_drv_level_0>,
260		/* i2c6_sda_m0 */
261		<0 RK_PC7 9 &pcfg_pull_none_drv_level_0>;
262};
263
264&i2c7 {
265	status = "okay";
266
267	vdd_cpu_big0_s0: regulator@42 {
268		compatible = "rockchip,rk8602";
269		reg = <0x42>;
270		fcs,suspend-voltage-selector = <1>;
271		regulator-name = "vdd_cpu_big0_s0";
272		regulator-always-on;
273		regulator-boot-on;
274		regulator-min-microvolt = <550000>;
275		regulator-max-microvolt = <1050000>;
276		regulator-ramp-delay = <2300>;
277		vin-supply = <&vcc5v0_sys>;
278
279		regulator-state-mem {
280			regulator-off-in-suspend;
281		};
282	};
283
284	vdd_cpu_big1_s0: regulator@43 {
285		compatible = "rockchip,rk8603", "rockchip,rk8602";
286		reg = <0x43>;
287		fcs,suspend-voltage-selector = <1>;
288		regulator-name = "vdd_cpu_big1_s0";
289		regulator-always-on;
290		regulator-boot-on;
291		regulator-min-microvolt = <550000>;
292		regulator-max-microvolt = <1050000>;
293		regulator-ramp-delay = <2300>;
294		vin-supply = <&vcc5v0_sys>;
295
296		regulator-state-mem {
297			regulator-off-in-suspend;
298		};
299	};
300};
301
302&i2c7m0_xfer {
303	rockchip,pins =
304		/* i2c7_scl_m0 */
305		<1 RK_PD0 9 &pcfg_pull_none_drv_level_0>,
306		/* i2c7_sda_m0 */
307		<1 RK_PD1 9 &pcfg_pull_none_drv_level_0>;
308};
309
310&i2c8 {
311	pinctrl-0 = <&i2c8m2_xfer>;
312};
313
314&mdio0 {
315	rgmii_phy: ethernet-phy@6 {
316		/* KSZ9031 or KSZ9131 */
317		compatible = "ethernet-phy-ieee802.3-c22";
318		reg = <0x6>;
319		clocks = <&cru REFCLKO25M_ETH0_OUT>;
320	};
321};
322
323&pcie3x4 {
324	/*
325	 * The board has a gpio-controlled "pcie_refclk" generator,
326	 * so add it to the list of clocks.
327	 */
328	clocks = <&cru ACLK_PCIE_4L_MSTR>, <&cru ACLK_PCIE_4L_SLV>,
329		 <&cru ACLK_PCIE_4L_DBI>, <&cru PCLK_PCIE_4L>,
330		 <&cru CLK_PCIE_AUX0>, <&cru CLK_PCIE4L_PIPE>,
331		 <&pcie_refclk>;
332	clock-names = "aclk_mst", "aclk_slv",
333		      "aclk_dbi", "pclk",
334		      "aux", "pipe",
335		      "ref";
336	reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>;
337};
338
339&pinctrl {
340	emmc {
341		emmc_reset: emmc-reset {
342			rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
343		};
344	};
345
346	ethernet {
347		eth_reset: eth-reset {
348			rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
349		};
350	};
351
352	leds {
353		module_led_pin: module-led-pin {
354			rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
355		};
356	};
357
358	usb3 {
359		usb3_id: usb3-id {
360			rockchip,pins =
361			  <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
362		};
363	};
364};
365
366&pwm0 {
367	pinctrl-0 = <&pwm0m1_pins>;
368	pinctrl-names = "default";
369};
370
371&saradc {
372	vref-supply = <&vcc_1v8_s0>;
373	status = "okay";
374};
375
376&sdhci {
377	bus-width = <8>;
378	cap-mmc-highspeed;
379	mmc-ddr-1_8v;
380	mmc-hs200-1_8v;
381	mmc-hs400-1_8v;
382	mmc-hs400-enhanced-strobe;
383	mmc-pwrseq = <&emmc_pwrseq>;
384	no-sdio;
385	no-sd;
386	non-removable;
387	pinctrl-names = "default";
388	pinctrl-0 = <&emmc_bus8 &emmc_cmd &emmc_clk &emmc_data_strobe>;
389	supports-cqe;
390	vmmc-supply = <&vcc_3v3_s3>;
391	vqmmc-supply = <&vcc_1v8_s3>;
392	status = "okay";
393};
394
395&sdmmc {
396	bus-width = <4>;
397	cap-sd-highspeed;
398	max-frequency = <150000000>;
399	vqmmc-supply = <&vccio_sd_s0>;
400};
401
402&spi0 {
403	pinctrl-0 = <&spi0m1_cs0 &spi0m1_cs1 &spi0m3_pins>;
404};
405
406&spi2 {
407	assigned-clocks = <&cru CLK_SPI2>;
408	assigned-clock-rates = <200000000>;
409	num-cs = <1>;
410	pinctrl-names = "default";
411	pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
412	status = "okay";
413
414	pmic@0 {
415		compatible = "rockchip,rk806";
416		reg = <0x0>;
417		interrupt-parent = <&gpio0>;
418		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
419		gpio-controller;
420		#gpio-cells = <2>;
421		pinctrl-names = "default";
422		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
423			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
424		spi-max-frequency = <1000000>;
425		system-power-controller;
426		vcc1-supply = <&vcc5v0_sys>;
427		vcc2-supply = <&vcc5v0_sys>;
428		vcc3-supply = <&vcc5v0_sys>;
429		vcc4-supply = <&vcc5v0_sys>;
430		vcc5-supply = <&vcc5v0_sys>;
431		vcc6-supply = <&vcc5v0_sys>;
432		vcc7-supply = <&vcc5v0_sys>;
433		vcc8-supply = <&vcc5v0_sys>;
434		vcc9-supply = <&vcc5v0_sys>;
435		vcc10-supply = <&vcc5v0_sys>;
436		vcc11-supply = <&vcc_2v0_pldo_s3>;
437		vcc12-supply = <&vcc5v0_sys>;
438		vcc13-supply = <&vcc_1v1_nldo_s3>;
439		vcc14-supply = <&vcc_1v1_nldo_s3>;
440		vcca-supply = <&vcc5v0_sys>;
441
442		rk806_dvs1_null: dvs1-null-pins {
443			pins = "gpio_pwrctrl1";
444			function = "pin_fun0";
445		};
446
447		rk806_dvs2_null: dvs2-null-pins {
448			pins = "gpio_pwrctrl2";
449			function = "pin_fun0";
450		};
451
452		rk806_dvs3_null: dvs3-null-pins {
453			pins = "gpio_pwrctrl3";
454			function = "pin_fun0";
455		};
456
457		regulators {
458			vdd_gpu_s0: dcdc-reg1 {
459				regulator-boot-on;
460				regulator-min-microvolt = <550000>;
461				regulator-max-microvolt = <950000>;
462				regulator-ramp-delay = <12500>;
463				regulator-name = "vdd_gpu_s0";
464				regulator-enable-ramp-delay = <400>;
465
466				regulator-state-mem {
467					regulator-off-in-suspend;
468				};
469			};
470
471			vdd_cpu_lit_s0: dcdc-reg2 {
472				regulator-name = "vdd_cpu_lit_s0";
473				regulator-always-on;
474				regulator-boot-on;
475				regulator-min-microvolt = <550000>;
476				regulator-max-microvolt = <950000>;
477				regulator-ramp-delay = <12500>;
478
479				regulator-state-mem {
480					regulator-off-in-suspend;
481				};
482			};
483
484			vdd_log_s0: dcdc-reg3 {
485				regulator-name = "vdd_log_s0";
486				regulator-always-on;
487				regulator-boot-on;
488				regulator-min-microvolt = <675000>;
489				regulator-max-microvolt = <750000>;
490				regulator-ramp-delay = <12500>;
491
492				regulator-state-mem {
493					regulator-off-in-suspend;
494					regulator-suspend-microvolt = <750000>;
495				};
496			};
497
498			vdd_vdenc_s0: dcdc-reg4 {
499				regulator-name = "vdd_vdenc_s0";
500				regulator-always-on;
501				regulator-boot-on;
502				regulator-min-microvolt = <550000>;
503				regulator-max-microvolt = <950000>;
504				regulator-ramp-delay = <12500>;
505
506				regulator-state-mem {
507					regulator-off-in-suspend;
508				};
509			};
510
511			vdd_ddr_s0: dcdc-reg5 {
512				regulator-name = "vdd_ddr_s0";
513				regulator-always-on;
514				regulator-boot-on;
515				regulator-min-microvolt = <675000>;
516				regulator-max-microvolt = <900000>;
517				regulator-ramp-delay = <12500>;
518
519				regulator-state-mem {
520					regulator-off-in-suspend;
521					regulator-suspend-microvolt = <850000>;
522				};
523			};
524
525			vdd2_ddr_s3: dcdc-reg6 {
526				regulator-name = "vdd2_ddr_s3";
527				regulator-always-on;
528				regulator-boot-on;
529
530				regulator-state-mem {
531					regulator-on-in-suspend;
532				};
533			};
534
535			vcc_2v0_pldo_s3: dcdc-reg7 {
536				regulator-name = "vcc_2v0_pldo_s3";
537				regulator-always-on;
538				regulator-boot-on;
539				regulator-min-microvolt = <2000000>;
540				regulator-max-microvolt = <2000000>;
541				regulator-ramp-delay = <12500>;
542
543				regulator-state-mem {
544					regulator-on-in-suspend;
545					regulator-suspend-microvolt = <2000000>;
546				};
547			};
548
549			vcc_3v3_s3: dcdc-reg8 {
550				regulator-name = "vcc_3v3_s3";
551				regulator-always-on;
552				regulator-boot-on;
553				regulator-min-microvolt = <3300000>;
554				regulator-max-microvolt = <3300000>;
555
556				regulator-state-mem {
557					regulator-on-in-suspend;
558					regulator-suspend-microvolt = <3300000>;
559				};
560			};
561
562			vddq_ddr_s0: dcdc-reg9 {
563				regulator-name = "vddq_ddr_s0";
564				regulator-always-on;
565				regulator-boot-on;
566
567				regulator-state-mem {
568					regulator-off-in-suspend;
569				};
570			};
571
572			vcc_1v8_s3: dcdc-reg10 {
573				regulator-name = "vcc_1v8_s3";
574				regulator-always-on;
575				regulator-boot-on;
576				regulator-min-microvolt = <1800000>;
577				regulator-max-microvolt = <1800000>;
578
579				regulator-state-mem {
580					regulator-on-in-suspend;
581					regulator-suspend-microvolt = <1800000>;
582				};
583			};
584
585			vcca_1v8_s0: pldo-reg1 {
586				regulator-name = "vcca_1v8_s0";
587				regulator-always-on;
588				regulator-boot-on;
589				regulator-min-microvolt = <1800000>;
590				regulator-max-microvolt = <1800000>;
591
592				regulator-state-mem {
593					regulator-off-in-suspend;
594				};
595			};
596
597			vcc_1v8_s0: pldo-reg2 {
598				regulator-name = "vcc_1v8_s0";
599				regulator-always-on;
600				regulator-boot-on;
601				regulator-min-microvolt = <1800000>;
602				regulator-max-microvolt = <1800000>;
603
604				regulator-state-mem {
605					regulator-off-in-suspend;
606					regulator-suspend-microvolt = <1800000>;
607				};
608			};
609
610			vdda_1v2_s0: pldo-reg3 {
611				regulator-name = "vdda_1v2_s0";
612				regulator-always-on;
613				regulator-boot-on;
614				regulator-min-microvolt = <1200000>;
615				regulator-max-microvolt = <1200000>;
616
617				regulator-state-mem {
618					regulator-off-in-suspend;
619				};
620			};
621
622			vcca_3v3_s0: pldo-reg4 {
623				regulator-name = "vcca_3v3_s0";
624				regulator-always-on;
625				regulator-boot-on;
626				regulator-min-microvolt = <3300000>;
627				regulator-max-microvolt = <3300000>;
628				regulator-ramp-delay = <12500>;
629
630				regulator-state-mem {
631					regulator-off-in-suspend;
632				};
633			};
634
635			vccio_sd_s0: pldo-reg5 {
636				regulator-name = "vccio_sd_s0";
637				regulator-always-on;
638				regulator-boot-on;
639				regulator-min-microvolt = <1800000>;
640				regulator-max-microvolt = <3300000>;
641				regulator-ramp-delay = <12500>;
642
643				regulator-state-mem {
644					regulator-off-in-suspend;
645				};
646			};
647
648			pldo6_s3: pldo-reg6 {
649				regulator-name = "pldo6_s3";
650				regulator-always-on;
651				regulator-boot-on;
652				regulator-min-microvolt = <1800000>;
653				regulator-max-microvolt = <1800000>;
654
655				regulator-state-mem {
656					regulator-on-in-suspend;
657					regulator-suspend-microvolt = <1800000>;
658				};
659			};
660
661			vdd_0v75_s3: nldo-reg1 {
662				regulator-name = "vdd_0v75_s3";
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-on-in-suspend;
670					regulator-suspend-microvolt = <750000>;
671				};
672			};
673
674			vdda_ddr_pll_s0: nldo-reg2 {
675				regulator-name = "vdda_ddr_pll_s0";
676				regulator-always-on;
677				regulator-boot-on;
678				regulator-min-microvolt = <850000>;
679				regulator-max-microvolt = <850000>;
680
681				regulator-state-mem {
682					regulator-off-in-suspend;
683					regulator-suspend-microvolt = <850000>;
684				};
685			};
686
687			vdda_0v75_s0: nldo-reg3 {
688				regulator-name = "vdda_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			vdda_0v85_s0: nldo-reg4 {
700				regulator-name = "vdda_0v85_s0";
701				regulator-always-on;
702				regulator-boot-on;
703				regulator-min-microvolt = <850000>;
704				regulator-max-microvolt = <850000>;
705
706				regulator-state-mem {
707					regulator-off-in-suspend;
708				};
709			};
710
711			vdd_0v75_s0: nldo-reg5 {
712				regulator-name = "vdd_0v75_s0";
713				regulator-always-on;
714				regulator-boot-on;
715				regulator-min-microvolt = <750000>;
716				regulator-max-microvolt = <750000>;
717
718				regulator-state-mem {
719					regulator-off-in-suspend;
720				};
721			};
722		};
723	};
724};
725
726&tsadc {
727	status = "okay";
728};
729
730/* Routed to UART0 on the Q7 connector */
731&uart2 {
732	pinctrl-0 = <&uart2m2_xfer>;
733};
734
735/* Mule-ATtiny UPDI */
736&uart4 {
737	pinctrl-0 = <&uart4m2_xfer>;
738	status = "okay";
739};
740