blob: 9cb6d566da6e6d17df4254b52311d78d084e3448 [file] [log] [blame]
Andy Yan29721162024-02-17 19:25:00 +08001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/pwm/pwm.h>
11#include <dt-bindings/pinctrl/rockchip.h>
12#include "rk3588.dtsi"
13
14/ {
15 compatible = "coolpi,pi-cm5", "rockchip,rk3588";
16
17 aliases {
18 mmc0 = &sdhci;
19 mmc1 = &sdmmc;
20 mmc2 = &sdio;
21 };
22
23 analog-sound {
24 compatible = "audio-graph-card";
25 dais = <&i2s0_8ch_p0>;
26 label = "rk3588-es8316";
27 routing = "MIC2", "Mic Jack",
28 "Headphones", "HPOL",
29 "Headphones", "HPOR";
30 widgets = "Microphone", "Mic Jack",
31 "Headphone", "Headphones";
32 };
33
34 chosen {
35 stdout-path = "serial2:1500000n8";
36 };
37
38 avdd0v85_pcie20: avdd0v85-pcie20-regulator {
39 compatible = "regulator-fixed";
40 regulator-name = "avdd0v85_pcie20";
41 regulator-boot-on;
42 regulator-always-on;
43 regulator-min-microvolt = <850000>;
44 regulator-max-microvolt = <850000>;
45 vin-supply = <&vdd_0v85_s0>;
46 };
47
48 avdd1v8_pcie20: avdd1v8-pcie20-regulator {
49 compatible = "regulator-fixed";
50 regulator-name = "avdd1v8_pcie20";
51 regulator-boot-on;
52 regulator-always-on;
53 regulator-min-microvolt = <1800000>;
54 regulator-max-microvolt = <1800000>;
55 vin-supply = <&avcc_1v8_s0>;
56 };
57
58 avdd0v75_pcie30: avdd0v75-pcie30-regulator {
59 compatible = "regulator-fixed";
60 regulator-name = "avdd0v75_pcie30";
61 regulator-boot-on;
62 regulator-always-on;
63 regulator-min-microvolt = <750000>;
64 regulator-max-microvolt = <750000>;
65 vin-supply = <&avdd_0v75_s0>;
66 };
67
68 pcie30_avdd1v8: avdd1v8-pcie30-regulator {
69 compatible = "regulator-fixed";
70 regulator-name = "pcie30_avdd1v8";
71 regulator-boot-on;
72 regulator-always-on;
73 regulator-min-microvolt = <1800000>;
74 regulator-max-microvolt = <1800000>;
75 vin-supply = <&avcc_1v8_s0>;
76 };
77};
78
79&combphy0_ps {
80 status = "okay";
81};
82
83&combphy1_ps {
84 status = "okay";
85};
86
87&combphy2_psu {
88 status = "okay";
89};
90
91&cpu_b0 {
92 cpu-supply = <&vdd_cpu_big0_s0>;
93};
94
95&cpu_b1 {
96 cpu-supply = <&vdd_cpu_big0_s0>;
97};
98
99&cpu_b2 {
100 cpu-supply = <&vdd_cpu_big1_s0>;
101};
102
103&cpu_b3 {
104 cpu-supply = <&vdd_cpu_big1_s0>;
105};
106
107&cpu_l0 {
108 cpu-supply = <&vdd_cpu_lit_s0>;
109};
110
111&cpu_l1 {
112 cpu-supply = <&vdd_cpu_lit_s0>;
113};
114
115&cpu_l2 {
116 cpu-supply = <&vdd_cpu_lit_s0>;
117};
118
119&cpu_l3 {
120 cpu-supply = <&vdd_cpu_lit_s0>;
121};
122
123&gmac0 {
124 clock_in_out = "output";
125 phy-handle = <&rgmii_phy>;
126 phy-mode = "rgmii-rxid";
127 pinctrl-0 = <&gmac0_miim
128 &gmac0_tx_bus2
129 &gmac0_rx_bus2
130 &gmac0_rgmii_clk
131 &gmac0_rgmii_bus>;
132 pinctrl-names = "default";
133 rx_delay = <0x00>;
134 tx_delay = <0x43>;
135 status = "okay";
136};
137
138&i2c0 {
139 pinctrl-0 = <&i2c0m2_xfer>;
140 status = "okay";
141
142 vdd_cpu_big0_s0: regulator@42 {
143 compatible = "rockchip,rk8602";
144 reg = <0x42>;
145 fcs,suspend-voltage-selector = <1>;
146 regulator-name = "vdd_cpu_big0_s0";
147 regulator-always-on;
148 regulator-boot-on;
149 regulator-min-microvolt = <550000>;
150 regulator-max-microvolt = <1050000>;
151 regulator-ramp-delay = <2300>;
152 vin-supply = <&vcc5v0_sys>;
153
154 regulator-state-mem {
155 regulator-off-in-suspend;
156 };
157 };
158
159 vdd_cpu_big1_s0: regulator@43 {
160 compatible = "rockchip,rk8603", "rockchip,rk8602";
161 reg = <0x43>;
162 fcs,suspend-voltage-selector = <1>;
163 regulator-name = "vdd_cpu_big1_s0";
164 regulator-always-on;
165 regulator-boot-on;
166 regulator-min-microvolt = <550000>;
167 regulator-max-microvolt = <1050000>;
168 regulator-ramp-delay = <2300>;
169 vin-supply = <&vcc5v0_sys>;
170
171 regulator-state-mem {
172 regulator-off-in-suspend;
173 };
174 };
175};
176
177&i2c2 {
178 status = "okay";
179
180 vdd_npu_s0: regulator@42 {
181 compatible = "rockchip,rk8602";
182 reg = <0x42>;
183 fcs,suspend-voltage-selector = <1>;
184 regulator-name = "vdd_npu_s0";
185 regulator-always-on;
186 regulator-boot-on;
187 regulator-min-microvolt = <550000>;
188 regulator-max-microvolt = <950000>;
189 regulator-ramp-delay = <2300>;
190 vin-supply = <&vcc5v0_sys>;
191
192 regulator-state-mem {
193 regulator-off-in-suspend;
194 };
195 };
196};
197
198&i2c6 {
199 status = "okay";
200
201 hym8563: rtc@51 {
202 compatible = "haoyu,hym8563";
203 reg = <0x51>;
204 interrupt-parent = <&gpio0>;
205 interrupts = <RK_PD4 IRQ_TYPE_LEVEL_LOW>;
206 #clock-cells = <0>;
207 clock-output-names = "hym8563";
208 pinctrl-names = "default";
209 pinctrl-0 = <&hym8563_int>;
210 wakeup-source;
211 };
212};
213
214&i2c7 {
215 pinctrl-0 = <&i2c7m0_xfer>;
216 status = "okay";
217
218 es8316: audio-codec@11 {
219 compatible = "everest,es8316";
220 reg = <0x11>;
221 assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
222 assigned-clock-rates = <12288000>;
223 clocks = <&cru I2S0_8CH_MCLKOUT>;
224 clock-names = "mclk";
225 #sound-dai-cells = <0>;
226
227 port {
228 es8316_p0_0: endpoint {
229 remote-endpoint = <&i2s0_8ch_p0_0>;
230 };
231 };
232 };
233};
234
235&i2s0_8ch {
236 pinctrl-0 = <&i2s0_lrck
237 &i2s0_mclk
238 &i2s0_sclk
239 &i2s0_sdi0
240 &i2s0_sdo0>;
241 status = "okay";
242
243 i2s0_8ch_p0: port {
244 i2s0_8ch_p0_0: endpoint {
245 dai-format = "i2s";
246 mclk-fs = <256>;
247 remote-endpoint = <&es8316_p0_0>;
248 };
249 };
250};
251
252&mdio0 {
253 rgmii_phy: ethernet-phy@1 {
254 /* YT8531C/H */
255 compatible = "ethernet-phy-ieee802.3-c22";
256 reg = <0x1>;
257 pinctrl-names = "default";
258 pinctrl-0 = <&yt8531_rst>;
259 reset-assert-us = <20000>;
260 reset-deassert-us = <100000>;
261 reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
262 };
263};
264
265/* ethernet */
266&pcie2x1l2 {
267 reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
268 vpcie3v3-supply = <&vcc3v3_sys>;
269 pinctrl-names = "default";
270 pinctrl-0 = <&yt6801_isolate>;
271 status = "okay";
272};
273
274&pinctrl {
275 hym8563 {
276 hym8563_int: hym8563-int {
277 rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
278 };
279 };
280
281 yt6801 {
282 yt6801_isolate: yt6801-isolate {
283 rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
284 };
285 };
286
287 yt8531 {
288 yt8531_rst: yt8531-rst {
289 rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
290 };
291 };
292};
293
294&saradc {
295 vref-supply = <&vcc_1v8_s0>;
296 status = "okay";
297};
298
299&sdhci {
300 bus-width = <8>;
301 max-frequency = <200000000>;
302 mmc-hs400-1_8v;
303 mmc-hs400-enhanced-strobe;
304 no-sdio;
305 no-sd;
306 non-removable;
307 status = "okay";
308};
309
310&sdmmc {
311 bus-width = <4>;
312 cap-mmc-highspeed;
313 cap-sd-highspeed;
314 disable-wp;
315 max-frequency = <150000000>;
316 no-sdio;
317 no-mmc;
318 sd-uhs-sdr104;
319 vqmmc-supply = <&vccio_sd_s0>;
320 status = "okay";
321};
322
323&spi2 {
324 assigned-clocks = <&cru CLK_SPI2>;
325 assigned-clock-rates = <200000000>;
326 num-cs = <1>;
327 pinctrl-names = "default";
328 pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
329 status = "okay";
330
331 pmic@0 {
332 compatible = "rockchip,rk806";
333 reg = <0x0>;
334 interrupt-parent = <&gpio0>;
335 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
336 gpio-controller;
337 #gpio-cells = <2>;
338 pinctrl-names = "default";
339 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
340 <&rk806_dvs2_null>, <&rk806_dvs3_null>;
341 spi-max-frequency = <1000000>;
342 vcc1-supply = <&vcc5v0_sys>;
343 vcc2-supply = <&vcc5v0_sys>;
344 vcc3-supply = <&vcc5v0_sys>;
345 vcc4-supply = <&vcc5v0_sys>;
346 vcc5-supply = <&vcc5v0_sys>;
347 vcc6-supply = <&vcc5v0_sys>;
348 vcc7-supply = <&vcc5v0_sys>;
349 vcc8-supply = <&vcc5v0_sys>;
350 vcc9-supply = <&vcc5v0_sys>;
351 vcc10-supply = <&vcc5v0_sys>;
352 vcc11-supply = <&vcc_2v0_pldo_s3>;
353 vcc12-supply = <&vcc5v0_sys>;
354 vcc13-supply = <&vcc_2v0_pldo_s3>;
355 vcc14-supply = <&vcc_2v0_pldo_s3>;
356 vcca-supply = <&vcc5v0_sys>;
357
358 rk806_dvs1_null: dvs1-null-pins {
359 pins = "gpio_pwrctrl2";
360 function = "pin_fun0";
361 };
362
363 rk806_dvs2_null: dvs2-null-pins {
364 pins = "gpio_pwrctrl2";
365 function = "pin_fun0";
366 };
367
368 rk806_dvs3_null: dvs3-null-pins {
369 pins = "gpio_pwrctrl3";
370 function = "pin_fun0";
371 };
372
373 regulators {
374 vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
375 regulator-boot-on;
376 regulator-min-microvolt = <550000>;
377 regulator-max-microvolt = <950000>;
378 regulator-ramp-delay = <12500>;
379 regulator-name = "vdd_gpu_s0";
380 regulator-enable-ramp-delay = <400>;
381
382 regulator-state-mem {
383 regulator-off-in-suspend;
384 };
385 };
386
387 vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
388 regulator-always-on;
389 regulator-boot-on;
390 regulator-min-microvolt = <550000>;
391 regulator-max-microvolt = <950000>;
392 regulator-ramp-delay = <12500>;
393 regulator-name = "vdd_cpu_lit_s0";
394
395 regulator-state-mem {
396 regulator-off-in-suspend;
397 };
398 };
399
400 vdd_log_s0: dcdc-reg3 {
401 regulator-always-on;
402 regulator-boot-on;
403 regulator-min-microvolt = <675000>;
404 regulator-max-microvolt = <750000>;
405 regulator-ramp-delay = <12500>;
406 regulator-name = "vdd_log_s0";
407
408 regulator-state-mem {
409 regulator-off-in-suspend;
410 regulator-suspend-microvolt = <750000>;
411 };
412 };
413
414 vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
415 regulator-always-on;
416 regulator-boot-on;
417 regulator-min-microvolt = <550000>;
418 regulator-max-microvolt = <950000>;
419 regulator-ramp-delay = <12500>;
420 regulator-name = "vdd_vdenc_s0";
421
422 regulator-state-mem {
423 regulator-off-in-suspend;
424 };
425 };
426
427 vdd_ddr_s0: dcdc-reg5 {
428 regulator-always-on;
429 regulator-boot-on;
430 regulator-min-microvolt = <675000>;
431 regulator-max-microvolt = <900000>;
432 regulator-ramp-delay = <12500>;
433 regulator-name = "vdd_ddr_s0";
434
435 regulator-state-mem {
436 regulator-off-in-suspend;
437 regulator-suspend-microvolt = <850000>;
438 };
439 };
440
441 vdd2_ddr_s3: dcdc-reg6 {
442 regulator-always-on;
443 regulator-boot-on;
444 regulator-name = "vdd2_ddr_s3";
445
446 regulator-state-mem {
447 regulator-on-in-suspend;
448 };
449 };
450
451 vcc_2v0_pldo_s3: dcdc-reg7 {
452 regulator-always-on;
453 regulator-boot-on;
454 regulator-min-microvolt = <2000000>;
455 regulator-max-microvolt = <2000000>;
456 regulator-ramp-delay = <12500>;
457 regulator-name = "vdd_2v0_pldo_s3";
458
459 regulator-state-mem {
460 regulator-on-in-suspend;
461 regulator-suspend-microvolt = <2000000>;
462 };
463 };
464
465 vcc_3v3_s3: dcdc-reg8 {
466 regulator-always-on;
467 regulator-boot-on;
468 regulator-min-microvolt = <3300000>;
469 regulator-max-microvolt = <3300000>;
470 regulator-name = "vcc_3v3_s3";
471
472 regulator-state-mem {
473 regulator-on-in-suspend;
474 regulator-suspend-microvolt = <3300000>;
475 };
476 };
477
478 vddq_ddr_s0: dcdc-reg9 {
479 regulator-always-on;
480 regulator-boot-on;
481 regulator-name = "vddq_ddr_s0";
482
483 regulator-state-mem {
484 regulator-off-in-suspend;
485 };
486 };
487
488 vcc_1v8_s3: dcdc-reg10 {
489 regulator-always-on;
490 regulator-boot-on;
491 regulator-min-microvolt = <1800000>;
492 regulator-max-microvolt = <1800000>;
493 regulator-name = "vcc_1v8_s3";
494
495 regulator-state-mem {
496 regulator-on-in-suspend;
497 regulator-suspend-microvolt = <1800000>;
498 };
499 };
500
501 avcc_1v8_s0: pldo-reg1 {
502 regulator-always-on;
503 regulator-boot-on;
504 regulator-min-microvolt = <1800000>;
505 regulator-max-microvolt = <1800000>;
506 regulator-name = "avcc_1v8_s0";
507
508 regulator-state-mem {
509 regulator-off-in-suspend;
510 };
511 };
512
513 vcc_1v8_s0: pldo-reg2 {
514 regulator-always-on;
515 regulator-boot-on;
516 regulator-min-microvolt = <1800000>;
517 regulator-max-microvolt = <1800000>;
518 regulator-name = "vcc_1v8_s0";
519
520 regulator-state-mem {
521 regulator-off-in-suspend;
522 regulator-suspend-microvolt = <1800000>;
523 };
524 };
525
526 avdd_1v2_s0: pldo-reg3 {
527 regulator-always-on;
528 regulator-boot-on;
529 regulator-min-microvolt = <1200000>;
530 regulator-max-microvolt = <1200000>;
531 regulator-name = "avdd_1v2_s0";
532
533 regulator-state-mem {
534 regulator-off-in-suspend;
535 };
536 };
537
538 vcc_3v3_s0: pldo-reg4 {
539 regulator-always-on;
540 regulator-boot-on;
541 regulator-min-microvolt = <3300000>;
542 regulator-max-microvolt = <3300000>;
543 regulator-ramp-delay = <12500>;
544 regulator-name = "vcc_3v3_s0";
545
546 regulator-state-mem {
547 regulator-off-in-suspend;
548 };
549 };
550
551 vccio_sd_s0: pldo-reg5 {
552 regulator-always-on;
553 regulator-boot-on;
554 regulator-min-microvolt = <1800000>;
555 regulator-max-microvolt = <3300000>;
556 regulator-ramp-delay = <12500>;
557 regulator-name = "vccio_sd_s0";
558
559 regulator-state-mem {
560 regulator-off-in-suspend;
561 };
562 };
563
564 pldo6_s3: pldo-reg6 {
565 regulator-always-on;
566 regulator-boot-on;
567 regulator-min-microvolt = <1800000>;
568 regulator-max-microvolt = <1800000>;
569 regulator-name = "pldo6_s3";
570
571 regulator-state-mem {
572 regulator-on-in-suspend;
573 regulator-suspend-microvolt = <1800000>;
574 };
575 };
576
577 vdd_0v75_s3: nldo-reg1 {
578 regulator-always-on;
579 regulator-boot-on;
580 regulator-min-microvolt = <750000>;
581 regulator-max-microvolt = <750000>;
582 regulator-name = "vdd_0v75_s3";
583
584 regulator-state-mem {
585 regulator-on-in-suspend;
586 regulator-suspend-microvolt = <750000>;
587 };
588 };
589
590 vdd_ddr_pll_s0: nldo-reg2 {
591 regulator-always-on;
592 regulator-boot-on;
593 regulator-min-microvolt = <850000>;
594 regulator-max-microvolt = <850000>;
595 regulator-name = "vdd_ddr_pll_s0";
596
597 regulator-state-mem {
598 regulator-off-in-suspend;
599 regulator-suspend-microvolt = <850000>;
600 };
601 };
602
603 avdd_0v75_s0: nldo-reg3 {
604 regulator-always-on;
605 regulator-boot-on;
606 regulator-min-microvolt = <750000>;
607 regulator-max-microvolt = <750000>;
608 regulator-name = "avdd_0v75_s0";
609
610 regulator-state-mem {
611 regulator-off-in-suspend;
612 };
613 };
614
615 vdd_0v85_s0: nldo-reg4 {
616 regulator-always-on;
617 regulator-boot-on;
618 regulator-min-microvolt = <850000>;
619 regulator-max-microvolt = <850000>;
620 regulator-name = "vdd_0v85_s0";
621
622 regulator-state-mem {
623 regulator-off-in-suspend;
624 };
625 };
626
627 vdd_0v75_s0: nldo-reg5 {
628 regulator-always-on;
629 regulator-boot-on;
630 regulator-min-microvolt = <750000>;
631 regulator-max-microvolt = <750000>;
632 regulator-name = "vdd_0v75_s0";
633
634 regulator-state-mem {
635 regulator-off-in-suspend;
636 };
637 };
638 };
639 };
640};
641
642&tsadc {
643 status = "okay";
644};
645
646&uart2 {
647 pinctrl-0 = <&uart2m0_xfer>;
648 status = "okay";
649};