Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3588-friendlyelec-cm3588.dtsi

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2023 Thomas McKahan
5 * Copyright (c) 2024 Sebastian Kropatsch
6 *
7 */
8
9 /dts-v1/;
10
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/leds/common.h>
13 #include <dt-bindings/pinctrl/rockchip.h>
14 #include "rk3588.dtsi"
15
16 / {
17 model = "FriendlyElec CM3588";
18 compatible = "friendlyarm,cm3588", "rockchip,rk3588";
19
20 aliases {
21 mmc0 = &sdhci;
22 mmc1 = &sdmmc;
23 };
24
25 chosen {
26 stdout-path = "serial2:1500000n8";
27 };
28
29 leds {
30 compatible = "gpio-leds";
31
32 led_sys: led-0 {
33 color = <LED_COLOR_ID_AMBER>;
34 function = LED_FUNCTION_HEARTBEAT;
35 gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
36 linux,default-trigger = "heartbeat";
37 pinctrl-names = "default";
38 pinctrl-0 = <&led_sys_pin>;
39 };
40
41 led_usr: led-1 {
42 color = <LED_COLOR_ID_GREEN>;
43 function = LED_FUNCTION_INDICATOR;
44 gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
45 pinctrl-names = "default";
46 pinctrl-0 = <&led_usr_pin>;
47 };
48 };
49
50 /* vcc_4v0_sys powers the RK806 and RK860's */
51 vcc_4v0_sys: regulator-vcc-4v0-sys {
52 compatible = "regulator-fixed";
53 regulator-name = "vcc_4v0_sys";
54 regulator-always-on;
55 regulator-boot-on;
56 regulator-min-microvolt = <4000000>;
57 regulator-max-microvolt = <4000000>;
58 };
59
60 vcc_3v3_pcie20: regulator-vcc-3v3-pcie20 {
61 compatible = "regulator-fixed";
62 regulator-name = "vcc_3v3_pcie20";
63 regulator-always-on;
64 regulator-boot-on;
65 regulator-min-microvolt = <3300000>;
66 regulator-max-microvolt = <3300000>;
67 vin-supply = <&vcc_3v3_s3>;
68 };
69
70 vcc_3v3_sd_s0: regulator-vcc-3v3-sd-s0 {
71 compatible = "regulator-fixed";
72 gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
73 pinctrl-names = "default";
74 pinctrl-0 = <&sd_s0_pwr>;
75 regulator-boot-on;
76 regulator-max-microvolt = <3300000>;
77 regulator-min-microvolt = <3300000>;
78 regulator-name = "vcc_3v3_sd_s0";
79 vin-supply = <&vcc_3v3_s3>;
80 };
81
82 vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
83 compatible = "regulator-fixed";
84 regulator-name = "vcc-1v1-nldo-s3";
85 regulator-always-on;
86 regulator-boot-on;
87 regulator-min-microvolt = <1100000>;
88 regulator-max-microvolt = <1100000>;
89 vin-supply = <&vcc_4v0_sys>;
90 };
91 };
92
93 /* Combo PHY 0 is configured to act as as PCIe 2.0 PHY */
94 /* Used by PCIe controller 4 (pcie2x1l2) */
95 &combphy0_ps {
96 status = "okay";
97 };
98
99 &cpu_l0 {
100 cpu-supply = <&vdd_cpu_lit_s0>;
101 };
102
103 &cpu_l1 {
104 cpu-supply = <&vdd_cpu_lit_s0>;
105 };
106
107 &cpu_l2 {
108 cpu-supply = <&vdd_cpu_lit_s0>;
109 };
110
111 &cpu_l3 {
112 cpu-supply = <&vdd_cpu_lit_s0>;
113 };
114
115 &cpu_b0 {
116 cpu-supply = <&vdd_cpu_big0_s0>;
117 };
118
119 &cpu_b1 {
120 cpu-supply = <&vdd_cpu_big0_s0>;
121 };
122
123 &cpu_b2 {
124 cpu-supply = <&vdd_cpu_big1_s0>;
125 };
126
127 &cpu_b3 {
128 cpu-supply = <&vdd_cpu_big1_s0>;
129 };
130
131 &gpu {
132 mali-supply = <&vdd_gpu_s0>;
133 sram-supply = <&vdd_gpu_mem_s0>;
134 status = "okay";
135 };
136
137 &i2c0 {
138 pinctrl-names = "default";
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 = <&vcc_4v0_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 = <&vcc_4v0_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-boot-on;
186 regulator-min-microvolt = <550000>;
187 regulator-max-microvolt = <950000>;
188 regulator-ramp-delay = <2300>;
189 vin-supply = <&vcc_4v0_sys>;
190
191 regulator-state-mem {
192 regulator-off-in-suspend;
193 };
194 };
195 };
196
197 &i2c6 {
198 clock-frequency = <200000>;
199 pinctrl-names = "default";
200 pinctrl-0 = <&i2c6m0_xfer>;
201 status = "okay";
202
203 hym8563: rtc@51 {
204 compatible = "haoyu,hym8563";
205 reg = <0x51>;
206 #clock-cells = <0>;
207 clock-output-names = "hym8563";
208 interrupt-parent = <&gpio0>;
209 interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
210 pinctrl-names = "default";
211 pinctrl-0 = <&hym8563_int>;
212 wakeup-source;
213 };
214 };
215
216 &i2c7 {
217 clock-frequency = <200000>;
218 status = "okay";
219
220 rt5616: audio-codec@1b {
221 compatible = "realtek,rt5616";
222 reg = <0x1b>;
223 #sound-dai-cells = <0>;
224 assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
225 assigned-clock-rates = <12288000>;
226 clocks = <&cru I2S0_8CH_MCLKOUT>;
227 clock-names = "mclk";
228 };
229 };
230
231 &i2s0_8ch {
232 pinctrl-names = "default";
233 pinctrl-0 = <&i2s0_lrck
234 &i2s0_mclk
235 &i2s0_sclk
236 &i2s0_sdi0
237 &i2s0_sdo0>;
238 status = "okay";
239 };
240
241 &i2s5_8ch {
242 status = "okay";
243 };
244
245 &i2s6_8ch {
246 status = "okay";
247 };
248
249 &i2s7_8ch {
250 status = "okay";
251 };
252
253 &pcie2x1l2 {
254 /* r8125 ethernet, @fe190000 */
255 pinctrl-names = "default";
256 pinctrl-0 = <&pcie2_2_rst>;
257 reset-gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
258 vpcie3v3-supply = <&vcc_3v3_pcie20>;
259 status = "okay";
260 };
261
262 &pd_gpu {
263 domain-supply = <&vdd_gpu_s0>;
264 };
265
266 &pd_npu {
267 domain-supply = <&vdd_npu_s0>;
268 };
269
270 &pinctrl {
271 gpio-leds {
272 led_sys_pin: led-sys-pin {
273 rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
274 };
275
276 led_usr_pin: led-usr-pin {
277 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
278 };
279 };
280
281 hym8563 {
282 hym8563_int: rtc-int {
283 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
284 };
285 };
286
287 pcie {
288 pcie2_2_rst: pcie2-2-rst {
289 rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
290 };
291 };
292
293 sdmmc {
294 sd_s0_pwr: sd-s0-pwr {
295 rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
296 };
297 };
298 };
299
300 &rknn_core_0 {
301 npu-supply = <&vdd_npu_s0>;
302 sram-supply = <&vdd_npu_s0>;
303 status = "okay";
304 };
305
306 &rknn_core_1 {
307 npu-supply = <&vdd_npu_s0>;
308 sram-supply = <&vdd_npu_s0>;
309 status = "okay";
310 };
311
312 &rknn_core_2 {
313 npu-supply = <&vdd_npu_s0>;
314 sram-supply = <&vdd_npu_s0>;
315 status = "okay";
316 };
317
318 &rknn_mmu_0 {
319 status = "okay";
320 };
321
322 &rknn_mmu_1 {
323 status = "okay";
324 };
325
326 &rknn_mmu_2 {
327 status = "okay";
328 };
329
330 &saradc {
331 vref-supply = <&avcc_1v8_s0>;
332 status = "okay";
333 };
334
335 /* eMMC */
336 &sdhci {
337 bus-width = <8>;
338 mmc-hs400-1_8v;
339 mmc-hs400-enhanced-strobe;
340 no-sd;
341 no-sdio;
342 non-removable;
343 vmmc-supply = <&vcc_3v3_s3>;
344 vqmmc-supply = <&vcc_1v8_s3>;
345 status = "okay";
346 };
347
348 /* microSD card */
349 &sdmmc {
350 bus-width = <4>;
351 cap-sd-highspeed;
352 disable-wp;
353 max-frequency = <150000000>;
354 no-mmc;
355 no-sdio;
356 sd-uhs-sdr104;
357 vmmc-supply = <&vcc_3v3_sd_s0>;
358 vqmmc-supply = <&vccio_sd_s0>;
359 };
360
361 &spi2 {
362 assigned-clocks = <&cru CLK_SPI2>;
363 assigned-clock-rates = <200000000>;
364 num-cs = <1>;
365 pinctrl-names = "default";
366 pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
367 status = "okay";
368
369 rk806_single: pmic@0 {
370 compatible = "rockchip,rk806";
371 reg = <0x0>;
372
373 interrupt-parent = <&gpio0>;
374 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
375
376 pinctrl-names = "default";
377 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
378 <&rk806_dvs2_null>, <&rk806_dvs3_null>;
379
380 spi-max-frequency = <1000000>;
381 system-power-controller;
382
383 vcc1-supply = <&vcc_4v0_sys>;
384 vcc2-supply = <&vcc_4v0_sys>;
385 vcc3-supply = <&vcc_4v0_sys>;
386 vcc4-supply = <&vcc_4v0_sys>;
387 vcc5-supply = <&vcc_4v0_sys>;
388 vcc6-supply = <&vcc_4v0_sys>;
389 vcc7-supply = <&vcc_4v0_sys>;
390 vcc8-supply = <&vcc_4v0_sys>;
391 vcc9-supply = <&vcc_4v0_sys>;
392 vcc10-supply = <&vcc_4v0_sys>;
393 vcc11-supply = <&vcc_2v0_pldo_s3>;
394 vcc12-supply = <&vcc_4v0_sys>;
395 vcc13-supply = <&vcc_1v1_nldo_s3>;
396 vcc14-supply = <&vcc_1v1_nldo_s3>;
397 vcca-supply = <&vcc_4v0_sys>;
398
399 gpio-controller;
400 #gpio-cells = <2>;
401
402 rk806_dvs1_null: dvs1-null-pins {
403 pins = "gpio_pwrctrl1";
404 function = "pin_fun0";
405 };
406
407 rk806_dvs2_null: dvs2-null-pins {
408 pins = "gpio_pwrctrl2";
409 function = "pin_fun0";
410 };
411
412 rk806_dvs3_null: dvs3-null-pins {
413 pins = "gpio_pwrctrl3";
414 function = "pin_fun0";
415 };
416
417 regulators {
418 vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
419 regulator-boot-on;
420 regulator-min-microvolt = <550000>;
421 regulator-max-microvolt = <950000>;
422 regulator-ramp-delay = <12500>;
423 regulator-name = "vdd_gpu_s0";
424 regulator-enable-ramp-delay = <400>;
425
426 regulator-state-mem {
427 regulator-off-in-suspend;
428 };
429 };
430
431 vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
432 regulator-always-on;
433 regulator-boot-on;
434 regulator-min-microvolt = <550000>;
435 regulator-max-microvolt = <950000>;
436 regulator-ramp-delay = <12500>;
437 regulator-name = "vdd_cpu_lit_s0";
438
439 regulator-state-mem {
440 regulator-off-in-suspend;
441 };
442 };
443
444 vdd_log_s0: dcdc-reg3 {
445 regulator-always-on;
446 regulator-boot-on;
447 regulator-min-microvolt = <675000>;
448 regulator-max-microvolt = <750000>;
449 regulator-ramp-delay = <12500>;
450 regulator-name = "vdd_log_s0";
451
452 regulator-state-mem {
453 regulator-off-in-suspend;
454 regulator-suspend-microvolt = <750000>;
455 };
456 };
457
458 vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
459 regulator-always-on;
460 regulator-boot-on;
461 regulator-min-microvolt = <550000>;
462 regulator-max-microvolt = <950000>;
463 regulator-ramp-delay = <12500>;
464 regulator-name = "vdd_vdenc_s0";
465
466 regulator-state-mem {
467 regulator-off-in-suspend;
468 };
469 };
470
471 vdd_ddr_s0: dcdc-reg5 {
472 regulator-always-on;
473 regulator-boot-on;
474 regulator-min-microvolt = <675000>;
475 regulator-max-microvolt = <900000>;
476 regulator-ramp-delay = <12500>;
477 regulator-name = "vdd_ddr_s0";
478
479 regulator-state-mem {
480 regulator-off-in-suspend;
481 regulator-suspend-microvolt = <850000>;
482 };
483 };
484
485 vdd2_ddr_s3: dcdc-reg6 {
486 regulator-always-on;
487 regulator-boot-on;
488 regulator-name = "vdd2_ddr_s3";
489
490 regulator-state-mem {
491 regulator-on-in-suspend;
492 };
493 };
494
495 vcc_2v0_pldo_s3: dcdc-reg7 {
496 regulator-always-on;
497 regulator-boot-on;
498 regulator-min-microvolt = <2000000>;
499 regulator-max-microvolt = <2000000>;
500 regulator-ramp-delay = <12500>;
501 regulator-name = "vdd_2v0_pldo_s3";
502
503 regulator-state-mem {
504 regulator-on-in-suspend;
505 regulator-suspend-microvolt = <2000000>;
506 };
507 };
508
509 vcc_3v3_s3: dcdc-reg8 {
510 regulator-always-on;
511 regulator-boot-on;
512 regulator-min-microvolt = <3300000>;
513 regulator-max-microvolt = <3300000>;
514 regulator-name = "vcc_3v3_s3";
515
516 regulator-state-mem {
517 regulator-on-in-suspend;
518 regulator-suspend-microvolt = <3300000>;
519 };
520 };
521
522 vddq_ddr_s0: dcdc-reg9 {
523 regulator-always-on;
524 regulator-boot-on;
525 regulator-name = "vddq_ddr_s0";
526
527 regulator-state-mem {
528 regulator-off-in-suspend;
529 };
530 };
531
532 vcc_1v8_s3: dcdc-reg10 {
533 regulator-always-on;
534 regulator-boot-on;
535 regulator-min-microvolt = <1800000>;
536 regulator-max-microvolt = <1800000>;
537 regulator-name = "vcc_1v8_s3";
538
539 regulator-state-mem {
540 regulator-on-in-suspend;
541 regulator-suspend-microvolt = <1800000>;
542 };
543 };
544
545 avcc_1v8_s0: pldo-reg1 {
546 regulator-always-on;
547 regulator-boot-on;
548 regulator-min-microvolt = <1800000>;
549 regulator-max-microvolt = <1800000>;
550 regulator-name = "avcc_1v8_s0";
551
552 regulator-state-mem {
553 regulator-off-in-suspend;
554 };
555 };
556
557 vcc_1v8_s0: pldo-reg2 {
558 regulator-always-on;
559 regulator-boot-on;
560 regulator-min-microvolt = <1800000>;
561 regulator-max-microvolt = <1800000>;
562 regulator-name = "vcc_1v8_s0";
563
564 regulator-state-mem {
565 regulator-off-in-suspend;
566 regulator-suspend-microvolt = <1800000>;
567 };
568 };
569
570 avdd_1v2_s0: pldo-reg3 {
571 regulator-always-on;
572 regulator-boot-on;
573 regulator-min-microvolt = <1200000>;
574 regulator-max-microvolt = <1200000>;
575 regulator-name = "avdd_1v2_s0";
576
577 regulator-state-mem {
578 regulator-off-in-suspend;
579 };
580 };
581
582 vcc_3v3_s0: pldo-reg4 {
583 regulator-always-on;
584 regulator-boot-on;
585 regulator-min-microvolt = <3300000>;
586 regulator-max-microvolt = <3300000>;
587 regulator-ramp-delay = <12500>;
588 regulator-name = "vcc_3v3_s0";
589
590 regulator-state-mem {
591 regulator-off-in-suspend;
592 };
593 };
594
595 vccio_sd_s0: pldo-reg5 {
596 regulator-always-on;
597 regulator-boot-on;
598 regulator-min-microvolt = <1800000>;
599 regulator-max-microvolt = <3300000>;
600 regulator-ramp-delay = <12500>;
601 regulator-name = "vccio_sd_s0";
602
603 regulator-state-mem {
604 regulator-off-in-suspend;
605 };
606 };
607
608 pldo6_s3: pldo-reg6 {
609 regulator-always-on;
610 regulator-boot-on;
611 regulator-min-microvolt = <1800000>;
612 regulator-max-microvolt = <1800000>;
613 regulator-name = "pldo6_s3";
614
615 regulator-state-mem {
616 regulator-on-in-suspend;
617 regulator-suspend-microvolt = <1800000>;
618 };
619 };
620
621 vdd_0v75_s3: nldo-reg1 {
622 regulator-always-on;
623 regulator-boot-on;
624 regulator-min-microvolt = <750000>;
625 regulator-max-microvolt = <750000>;
626 regulator-name = "vdd_0v75_s3";
627
628 regulator-state-mem {
629 regulator-on-in-suspend;
630 regulator-suspend-microvolt = <750000>;
631 };
632 };
633
634 vdd_ddr_pll_s0: nldo-reg2 {
635 regulator-always-on;
636 regulator-boot-on;
637 regulator-min-microvolt = <850000>;
638 regulator-max-microvolt = <850000>;
639 regulator-name = "vdd_ddr_pll_s0";
640
641 regulator-state-mem {
642 regulator-off-in-suspend;
643 regulator-suspend-microvolt = <850000>;
644 };
645 };
646
647 avdd_0v75_s0: nldo-reg3 {
648 regulator-always-on;
649 regulator-boot-on;
650 regulator-min-microvolt = <750000>;
651 regulator-max-microvolt = <750000>;
652 regulator-name = "avdd_0v75_s0";
653
654 regulator-state-mem {
655 regulator-off-in-suspend;
656 };
657 };
658
659 vdd_0v85_s0: nldo-reg4 {
660 regulator-always-on;
661 regulator-boot-on;
662 regulator-min-microvolt = <850000>;
663 regulator-max-microvolt = <850000>;
664 regulator-name = "vdd_0v85_s0";
665
666 regulator-state-mem {
667 regulator-off-in-suspend;
668 };
669 };
670
671 vdd_0v75_s0: nldo-reg5 {
672 regulator-always-on;
673 regulator-boot-on;
674 regulator-min-microvolt = <750000>;
675 regulator-max-microvolt = <750000>;
676 regulator-name = "vdd_0v75_s0";
677
678 regulator-state-mem {
679 regulator-off-in-suspend;
680 };
681 };
682 };
683 };
684 };
685
686 &tsadc {
687 status = "okay";
688 };
689
690 /* Debug UART */
691 &uart2 {
692 pinctrl-names = "default";
693 pinctrl-0 = <&uart2m0_xfer>;
694 };