1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2023 Thomas McKahan
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/pinctrl/rockchip.h>
12 #include <dt-bindings/usb/pd.h>
13 #include "rk3588.dtsi"
16 model = "FriendlyElec NanoPC-T6";
17 compatible = "friendlyarm,nanopc-t6", "rockchip,rk3588";
26 stdout-path = "serial2:1500000n8";
30 compatible = "gpio-leds";
33 gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
35 linux,default-trigger = "heartbeat";
36 pinctrl-names = "default";
37 pinctrl-0 = <&sys_led_pin>;
41 gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
43 pinctrl-names = "default";
44 pinctrl-0 = <&usr_led_pin>;
49 compatible = "simple-audio-card";
50 pinctrl-names = "default";
51 pinctrl-0 = <&hp_det>;
53 simple-audio-card,name = "realtek,rt5616-codec";
54 simple-audio-card,format = "i2s";
55 simple-audio-card,mclk-fs = <256>;
57 simple-audio-card,hp-det-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
58 simple-audio-card,hp-pin-name = "Headphones";
60 simple-audio-card,widgets =
61 "Headphone", "Headphones",
62 "Microphone", "Microphone Jack";
63 simple-audio-card,routing =
66 "MIC1", "Microphone Jack",
67 "Microphone Jack", "micbias1";
69 simple-audio-card,cpu {
70 sound-dai = <&i2s0_8ch>;
72 simple-audio-card,codec {
73 sound-dai = <&rt5616>;
77 vcc12v_dcin: vcc12v-dcin-regulator {
78 compatible = "regulator-fixed";
79 regulator-name = "vcc12v_dcin";
82 regulator-min-microvolt = <12000000>;
83 regulator-max-microvolt = <12000000>;
86 /* vcc5v0_sys powers peripherals */
87 vcc5v0_sys: vcc5v0-sys-regulator {
88 compatible = "regulator-fixed";
89 regulator-name = "vcc5v0_sys";
92 regulator-min-microvolt = <5000000>;
93 regulator-max-microvolt = <5000000>;
94 vin-supply = <&vcc12v_dcin>;
97 /* vcc4v0_sys powers the RK806, RK860's */
98 vcc4v0_sys: vcc4v0-sys-regulator {
99 compatible = "regulator-fixed";
100 regulator-name = "vcc4v0_sys";
103 regulator-min-microvolt = <4000000>;
104 regulator-max-microvolt = <4000000>;
105 vin-supply = <&vcc12v_dcin>;
108 vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
109 compatible = "regulator-fixed";
110 regulator-name = "vcc-1v1-nldo-s3";
113 regulator-min-microvolt = <1100000>;
114 regulator-max-microvolt = <1100000>;
115 vin-supply = <&vcc4v0_sys>;
118 vcc_3v3_pcie20: vcc3v3-pcie20-regulator {
119 compatible = "regulator-fixed";
120 regulator-name = "vcc_3v3_pcie20";
123 regulator-min-microvolt = <3300000>;
124 regulator-max-microvolt = <3300000>;
125 vin-supply = <&vcc_3v3_s3>;
128 vbus5v0_typec: vbus5v0-typec-regulator {
129 compatible = "regulator-fixed";
131 gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
132 pinctrl-names = "default";
133 pinctrl-0 = <&typec5v_pwren>;
134 regulator-name = "vbus5v0_typec";
135 regulator-min-microvolt = <5000000>;
136 regulator-max-microvolt = <5000000>;
137 vin-supply = <&vcc5v0_sys>;
140 vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
141 compatible = "regulator-fixed";
143 gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
144 pinctrl-names = "default";
145 pinctrl-0 = <&pcie_m2_1_pwren>;
146 regulator-name = "vcc3v3_pcie2x1l0";
147 regulator-min-microvolt = <3300000>;
148 regulator-max-microvolt = <3300000>;
149 vin-supply = <&vcc5v0_sys>;
152 vcc3v3_pcie30: vcc3v3-pcie30-regulator {
153 compatible = "regulator-fixed";
155 gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
156 pinctrl-names = "default";
157 pinctrl-0 = <&pcie_m2_0_pwren>;
158 regulator-name = "vcc3v3_pcie30";
159 regulator-min-microvolt = <3300000>;
160 regulator-max-microvolt = <3300000>;
161 vin-supply = <&vcc5v0_sys>;
178 cpu-supply = <&vdd_cpu_lit_s0>;
182 cpu-supply = <&vdd_cpu_lit_s0>;
186 cpu-supply = <&vdd_cpu_lit_s0>;
190 cpu-supply = <&vdd_cpu_lit_s0>;
194 cpu-supply = <&vdd_cpu_big0_s0>;
198 cpu-supply = <&vdd_cpu_big0_s0>;
202 cpu-supply = <&vdd_cpu_big1_s0>;
206 cpu-supply = <&vdd_cpu_big1_s0>;
210 gpio-line-names = /* GPIO0 A0-A7 */
218 "HEADER_10", "HEADER_08", "HEADER_32", "",
225 gpio-line-names = /* GPIO1 A0-A7 */
226 "HEADER_27", "HEADER_28", "", "",
227 "", "", "", "HEADER_15",
229 "HEADER_26", "HEADER_21", "HEADER_19", "HEADER_23",
230 "HEADER_24", "HEADER_22", "", "",
236 "", "", "HEADER_05", "HEADER_03";
240 gpio-line-names = /* GPIO2 A0-A7 */
247 "", "CSI1_11", "CSI1_12", "",
255 gpio-line-names = /* GPIO3 A0-A7 */
256 "HEADER_35", "HEADER_38", "HEADER_40", "HEADER_36",
257 "HEADER_37", "", "DSI0_12", "",
259 "HEADER_33", "DSI0_10", "HEADER_07", "HEADER_16",
260 "HEADER_18", "HEADER_29", "HEADER_31", "HEADER_12",
262 "DSI0_08", "DSI0_14", "HEADER_11", "HEADER_13",
266 "", "DSI1_10", "", "";
270 gpio-line-names = /* GPIO4 A0-A7 */
271 "DSI1_08", "DSI1_14", "", "DSI1_12",
278 "CSI0_11", "CSI0_12", "", "",
285 pinctrl-names = "default";
286 pinctrl-0 = <&i2c0m2_xfer>;
289 vdd_cpu_big0_s0: regulator@42 {
290 compatible = "rockchip,rk8602";
292 fcs,suspend-voltage-selector = <1>;
293 regulator-name = "vdd_cpu_big0_s0";
296 regulator-min-microvolt = <550000>;
297 regulator-max-microvolt = <1050000>;
298 regulator-ramp-delay = <2300>;
299 vin-supply = <&vcc4v0_sys>;
301 regulator-state-mem {
302 regulator-off-in-suspend;
306 vdd_cpu_big1_s0: regulator@43 {
307 compatible = "rockchip,rk8603", "rockchip,rk8602";
309 fcs,suspend-voltage-selector = <1>;
310 regulator-name = "vdd_cpu_big1_s0";
313 regulator-min-microvolt = <550000>;
314 regulator-max-microvolt = <1050000>;
315 regulator-ramp-delay = <2300>;
316 vin-supply = <&vcc4v0_sys>;
318 regulator-state-mem {
319 regulator-off-in-suspend;
327 vdd_npu_s0: regulator@42 {
328 compatible = "rockchip,rk8602";
330 rockchip,suspend-voltage-selector = <1>;
331 regulator-name = "vdd_npu_s0";
334 regulator-min-microvolt = <550000>;
335 regulator-max-microvolt = <950000>;
336 regulator-ramp-delay = <2300>;
337 vin-supply = <&vcc4v0_sys>;
339 regulator-state-mem {
340 regulator-off-in-suspend;
346 clock-frequency = <200000>;
349 fusb302: typec-portc@22 {
350 compatible = "fcs,fusb302";
352 interrupt-parent = <&gpio0>;
353 interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
354 pinctrl-0 = <&usbc0_int>;
355 pinctrl-names = "default";
356 vbus-supply = <&vbus5v0_typec>;
359 compatible = "usb-c-connector";
363 try-power-role = "sink";
364 source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
365 sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
366 op-sink-microwatt = <1000000>;
371 compatible = "haoyu,hym8563";
374 clock-output-names = "hym8563";
375 pinctrl-names = "default";
376 pinctrl-0 = <&hym8563_int>;
377 interrupt-parent = <&gpio0>;
378 interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
384 clock-frequency = <200000>;
388 compatible = "realtek,rt5616";
390 clocks = <&cru I2S0_8CH_MCLKOUT>;
391 clock-names = "mclk";
392 #sound-dai-cells = <0>;
393 assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
394 assigned-clock-rates = <12288000>;
397 rt5616_p0_0: endpoint {
398 remote-endpoint = <&i2s0_8ch_p0_0>;
403 /* connected with MIPI-CSI1 */
407 pinctrl-0 = <&i2c8m2_xfer>;
411 pinctrl-names = "default";
412 pinctrl-0 = <&i2s0_lrck
420 i2s0_8ch_p0_0: endpoint {
423 remote-endpoint = <&rt5616_p0_0>;
429 reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
430 vpcie3v3-supply = <&vcc_3v3_pcie20>;
431 pinctrl-names = "default";
432 pinctrl-0 = <&pcie2_0_rst>;
437 reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
438 vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
439 pinctrl-names = "default";
440 pinctrl-0 = <&pcie2_1_rst>;
445 reset-gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
446 vpcie3v3-supply = <&vcc_3v3_pcie20>;
447 pinctrl-names = "default";
448 pinctrl-0 = <&pcie2_2_rst>;
457 reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
458 vpcie3v3-supply = <&vcc3v3_pcie30>;
464 sys_led_pin: sys-led-pin {
465 rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
468 usr_led_pin: usr-led-pin {
469 rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
475 rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
480 hym8563_int: hym8563-int {
481 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
486 pcie2_0_rst: pcie2-0-rst {
487 rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
490 pcie2_1_rst: pcie2-1-rst {
491 rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
494 pcie2_2_rst: pcie2-2-rst {
495 rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
498 pcie_m2_0_pwren: pcie-m20-pwren {
499 rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
502 pcie_m2_1_pwren: pcie-m21-pwren {
503 rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
508 typec5v_pwren: typec5v-pwren {
509 rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
512 usbc0_int: usbc0-int {
513 rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
519 pinctrl-0 = <&pwm1m1_pins>;
524 vref-supply = <&avcc_1v8_s0>;
533 max-frequency = <200000000>;
535 mmc-hs400-enhanced-strobe;
540 max-frequency = <200000000>;
548 vmmc-supply = <&vcc_3v3_s3>;
549 vqmmc-supply = <&vccio_sd_s0>;
555 assigned-clocks = <&cru CLK_SPI2>;
556 assigned-clock-rates = <200000000>;
557 pinctrl-names = "default";
558 pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
562 compatible = "rockchip,rk806";
563 spi-max-frequency = <1000000>;
566 interrupt-parent = <&gpio0>;
567 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
569 pinctrl-names = "default";
570 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
571 <&rk806_dvs2_null>, <&rk806_dvs3_null>;
573 vcc1-supply = <&vcc4v0_sys>;
574 vcc2-supply = <&vcc4v0_sys>;
575 vcc3-supply = <&vcc4v0_sys>;
576 vcc4-supply = <&vcc4v0_sys>;
577 vcc5-supply = <&vcc4v0_sys>;
578 vcc6-supply = <&vcc4v0_sys>;
579 vcc7-supply = <&vcc4v0_sys>;
580 vcc8-supply = <&vcc4v0_sys>;
581 vcc9-supply = <&vcc4v0_sys>;
582 vcc10-supply = <&vcc4v0_sys>;
583 vcc11-supply = <&vcc_2v0_pldo_s3>;
584 vcc12-supply = <&vcc4v0_sys>;
585 vcc13-supply = <&vcc_1v1_nldo_s3>;
586 vcc14-supply = <&vcc_1v1_nldo_s3>;
587 vcca-supply = <&vcc4v0_sys>;
592 rk806_dvs1_null: dvs1-null-pins {
593 pins = "gpio_pwrctrl2";
594 function = "pin_fun0";
597 rk806_dvs2_null: dvs2-null-pins {
598 pins = "gpio_pwrctrl2";
599 function = "pin_fun0";
602 rk806_dvs3_null: dvs3-null-pins {
603 pins = "gpio_pwrctrl3";
604 function = "pin_fun0";
608 vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
610 regulator-min-microvolt = <550000>;
611 regulator-max-microvolt = <950000>;
612 regulator-ramp-delay = <12500>;
613 regulator-name = "vdd_gpu_s0";
614 regulator-enable-ramp-delay = <400>;
616 regulator-state-mem {
617 regulator-off-in-suspend;
621 vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
624 regulator-min-microvolt = <550000>;
625 regulator-max-microvolt = <950000>;
626 regulator-ramp-delay = <12500>;
627 regulator-name = "vdd_cpu_lit_s0";
629 regulator-state-mem {
630 regulator-off-in-suspend;
634 vdd_log_s0: dcdc-reg3 {
637 regulator-min-microvolt = <675000>;
638 regulator-max-microvolt = <750000>;
639 regulator-ramp-delay = <12500>;
640 regulator-name = "vdd_log_s0";
642 regulator-state-mem {
643 regulator-off-in-suspend;
644 regulator-suspend-microvolt = <750000>;
648 vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
651 regulator-min-microvolt = <550000>;
652 regulator-max-microvolt = <950000>;
653 regulator-init-microvolt = <750000>;
654 regulator-ramp-delay = <12500>;
655 regulator-name = "vdd_vdenc_s0";
657 regulator-state-mem {
658 regulator-off-in-suspend;
662 vdd_ddr_s0: dcdc-reg5 {
665 regulator-min-microvolt = <675000>;
666 regulator-max-microvolt = <900000>;
667 regulator-ramp-delay = <12500>;
668 regulator-name = "vdd_ddr_s0";
670 regulator-state-mem {
671 regulator-off-in-suspend;
672 regulator-suspend-microvolt = <850000>;
676 vdd2_ddr_s3: dcdc-reg6 {
679 regulator-name = "vdd2_ddr_s3";
681 regulator-state-mem {
682 regulator-on-in-suspend;
686 vcc_2v0_pldo_s3: dcdc-reg7 {
689 regulator-min-microvolt = <2000000>;
690 regulator-max-microvolt = <2000000>;
691 regulator-ramp-delay = <12500>;
692 regulator-name = "vdd_2v0_pldo_s3";
694 regulator-state-mem {
695 regulator-on-in-suspend;
696 regulator-suspend-microvolt = <2000000>;
700 vcc_3v3_s3: dcdc-reg8 {
703 regulator-min-microvolt = <3300000>;
704 regulator-max-microvolt = <3300000>;
705 regulator-name = "vcc_3v3_s3";
707 regulator-state-mem {
708 regulator-on-in-suspend;
709 regulator-suspend-microvolt = <3300000>;
713 vddq_ddr_s0: dcdc-reg9 {
716 regulator-name = "vddq_ddr_s0";
718 regulator-state-mem {
719 regulator-off-in-suspend;
723 vcc_1v8_s3: dcdc-reg10 {
726 regulator-min-microvolt = <1800000>;
727 regulator-max-microvolt = <1800000>;
728 regulator-name = "vcc_1v8_s3";
730 regulator-state-mem {
731 regulator-on-in-suspend;
732 regulator-suspend-microvolt = <1800000>;
736 avcc_1v8_s0: pldo-reg1 {
739 regulator-min-microvolt = <1800000>;
740 regulator-max-microvolt = <1800000>;
741 regulator-name = "avcc_1v8_s0";
743 regulator-state-mem {
744 regulator-off-in-suspend;
748 vcc_1v8_s0: pldo-reg2 {
751 regulator-min-microvolt = <1800000>;
752 regulator-max-microvolt = <1800000>;
753 regulator-name = "vcc_1v8_s0";
755 regulator-state-mem {
756 regulator-off-in-suspend;
757 regulator-suspend-microvolt = <1800000>;
761 avdd_1v2_s0: pldo-reg3 {
764 regulator-min-microvolt = <1200000>;
765 regulator-max-microvolt = <1200000>;
766 regulator-name = "avdd_1v2_s0";
768 regulator-state-mem {
769 regulator-off-in-suspend;
773 vcc_3v3_s0: pldo-reg4 {
776 regulator-min-microvolt = <3300000>;
777 regulator-max-microvolt = <3300000>;
778 regulator-ramp-delay = <12500>;
779 regulator-name = "vcc_3v3_s0";
781 regulator-state-mem {
782 regulator-off-in-suspend;
786 vccio_sd_s0: pldo-reg5 {
789 regulator-min-microvolt = <1800000>;
790 regulator-max-microvolt = <3300000>;
791 regulator-ramp-delay = <12500>;
792 regulator-name = "vccio_sd_s0";
794 regulator-state-mem {
795 regulator-off-in-suspend;
799 pldo6_s3: pldo-reg6 {
802 regulator-min-microvolt = <1800000>;
803 regulator-max-microvolt = <1800000>;
804 regulator-name = "pldo6_s3";
806 regulator-state-mem {
807 regulator-on-in-suspend;
808 regulator-suspend-microvolt = <1800000>;
812 vdd_0v75_s3: nldo-reg1 {
815 regulator-min-microvolt = <750000>;
816 regulator-max-microvolt = <750000>;
817 regulator-name = "vdd_0v75_s3";
819 regulator-state-mem {
820 regulator-on-in-suspend;
821 regulator-suspend-microvolt = <750000>;
825 vdd_ddr_pll_s0: nldo-reg2 {
828 regulator-min-microvolt = <850000>;
829 regulator-max-microvolt = <850000>;
830 regulator-name = "vdd_ddr_pll_s0";
832 regulator-state-mem {
833 regulator-off-in-suspend;
834 regulator-suspend-microvolt = <850000>;
838 avdd_0v75_s0: nldo-reg3 {
841 regulator-min-microvolt = <750000>;
842 regulator-max-microvolt = <750000>;
843 regulator-name = "avdd_0v75_s0";
845 regulator-state-mem {
846 regulator-off-in-suspend;
850 vdd_0v85_s0: nldo-reg4 {
853 regulator-min-microvolt = <850000>;
854 regulator-max-microvolt = <850000>;
855 regulator-name = "vdd_0v85_s0";
857 regulator-state-mem {
858 regulator-off-in-suspend;
862 vdd_0v75_s0: nldo-reg5 {
865 regulator-min-microvolt = <750000>;
866 regulator-max-microvolt = <750000>;
867 regulator-name = "vdd_0v75_s0";
869 regulator-state-mem {
870 regulator-off-in-suspend;
882 pinctrl-0 = <&uart2m0_xfer>;