415c34fff6c39fa2a2a0cb3fe06157f21e393f7b
[openwrt/staging/ldir.git] /
1 From d14f3a4f1feabb6bb5935bf3b275a1e6bf2208eb Mon Sep 17 00:00:00 2001
2 From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
3 Date: Thu, 29 Aug 2024 14:26:53 +0200
4 Subject: [PATCH] arm64: dts: rockchip: prepare NanoPC-T6 for LTS board
5
6 FriendlyELEC introduced a second version of NanoPC-T6 SBC.
7
8 Create common include file and make NanoPC-T6 use it. Following
9 patches will add LTS version.
10
11 Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
12 Link: https://lore.kernel.org/r/20240829-friendlyelec-nanopc-t6-lts-v6-2-edff247e8c02@linaro.org
13 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
14 ---
15 .../boot/dts/rockchip/rk3588-nanopc-t6.dts | 932 +----------------
16 .../boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 945 ++++++++++++++++++
17 2 files changed, 947 insertions(+), 930 deletions(-)
18 create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
19
20 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts
21 +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts
22 @@ -2,944 +2,16 @@
23 /*
24 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
25 * Copyright (c) 2023 Thomas McKahan
26 + * Copyright (c) 2024 Linaro Ltd.
27 *
28 */
29
30 /dts-v1/;
31
32 -#include <dt-bindings/gpio/gpio.h>
33 -#include <dt-bindings/pinctrl/rockchip.h>
34 -#include <dt-bindings/usb/pd.h>
35 -#include "rk3588.dtsi"
36 +#include "rk3588-nanopc-t6.dtsi"
37
38 / {
39 model = "FriendlyElec NanoPC-T6";
40 compatible = "friendlyarm,nanopc-t6", "rockchip,rk3588";
41
42 - aliases {
43 - mmc0 = &sdhci;
44 - mmc1 = &sdmmc;
45 - };
46 -
47 - chosen {
48 - stdout-path = "serial2:1500000n8";
49 - };
50 -
51 - leds {
52 - compatible = "gpio-leds";
53 -
54 - sys_led: led-0 {
55 - gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
56 - label = "system-led";
57 - linux,default-trigger = "heartbeat";
58 - pinctrl-names = "default";
59 - pinctrl-0 = <&sys_led_pin>;
60 - };
61 -
62 - usr_led: led-1 {
63 - gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
64 - label = "user-led";
65 - pinctrl-names = "default";
66 - pinctrl-0 = <&usr_led_pin>;
67 - };
68 - };
69 -
70 - sound {
71 - compatible = "simple-audio-card";
72 - pinctrl-names = "default";
73 - pinctrl-0 = <&hp_det>;
74 -
75 - simple-audio-card,name = "realtek,rt5616-codec";
76 - simple-audio-card,format = "i2s";
77 - simple-audio-card,mclk-fs = <256>;
78 -
79 - simple-audio-card,hp-det-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
80 - simple-audio-card,hp-pin-name = "Headphones";
81 -
82 - simple-audio-card,widgets =
83 - "Headphone", "Headphones",
84 - "Microphone", "Microphone Jack";
85 - simple-audio-card,routing =
86 - "Headphones", "HPOL",
87 - "Headphones", "HPOR",
88 - "MIC1", "Microphone Jack",
89 - "Microphone Jack", "micbias1";
90 -
91 - simple-audio-card,cpu {
92 - sound-dai = <&i2s0_8ch>;
93 - };
94 - simple-audio-card,codec {
95 - sound-dai = <&rt5616>;
96 - };
97 - };
98 -
99 - vcc12v_dcin: vcc12v-dcin-regulator {
100 - compatible = "regulator-fixed";
101 - regulator-name = "vcc12v_dcin";
102 - regulator-always-on;
103 - regulator-boot-on;
104 - regulator-min-microvolt = <12000000>;
105 - regulator-max-microvolt = <12000000>;
106 - };
107 -
108 - /* vcc5v0_sys powers peripherals */
109 - vcc5v0_sys: vcc5v0-sys-regulator {
110 - compatible = "regulator-fixed";
111 - regulator-name = "vcc5v0_sys";
112 - regulator-always-on;
113 - regulator-boot-on;
114 - regulator-min-microvolt = <5000000>;
115 - regulator-max-microvolt = <5000000>;
116 - vin-supply = <&vcc12v_dcin>;
117 - };
118 -
119 - /* vcc4v0_sys powers the RK806, RK860's */
120 - vcc4v0_sys: vcc4v0-sys-regulator {
121 - compatible = "regulator-fixed";
122 - regulator-name = "vcc4v0_sys";
123 - regulator-always-on;
124 - regulator-boot-on;
125 - regulator-min-microvolt = <4000000>;
126 - regulator-max-microvolt = <4000000>;
127 - vin-supply = <&vcc12v_dcin>;
128 - };
129 -
130 - vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
131 - compatible = "regulator-fixed";
132 - regulator-name = "vcc-1v1-nldo-s3";
133 - regulator-always-on;
134 - regulator-boot-on;
135 - regulator-min-microvolt = <1100000>;
136 - regulator-max-microvolt = <1100000>;
137 - vin-supply = <&vcc4v0_sys>;
138 - };
139 -
140 - vcc_3v3_pcie20: vcc3v3-pcie20-regulator {
141 - compatible = "regulator-fixed";
142 - regulator-name = "vcc_3v3_pcie20";
143 - regulator-always-on;
144 - regulator-boot-on;
145 - regulator-min-microvolt = <3300000>;
146 - regulator-max-microvolt = <3300000>;
147 - vin-supply = <&vcc_3v3_s3>;
148 - };
149 -
150 - vbus5v0_typec: vbus5v0-typec-regulator {
151 - compatible = "regulator-fixed";
152 - enable-active-high;
153 - gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
154 - pinctrl-names = "default";
155 - pinctrl-0 = <&typec5v_pwren>;
156 - regulator-name = "vbus5v0_typec";
157 - regulator-min-microvolt = <5000000>;
158 - regulator-max-microvolt = <5000000>;
159 - vin-supply = <&vcc5v0_sys>;
160 - };
161 -
162 - vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
163 - compatible = "regulator-fixed";
164 - enable-active-high;
165 - gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
166 - pinctrl-names = "default";
167 - pinctrl-0 = <&pcie_m2_1_pwren>;
168 - regulator-name = "vcc3v3_pcie2x1l0";
169 - regulator-min-microvolt = <3300000>;
170 - regulator-max-microvolt = <3300000>;
171 - vin-supply = <&vcc5v0_sys>;
172 - };
173 -
174 - vcc3v3_pcie30: vcc3v3-pcie30-regulator {
175 - compatible = "regulator-fixed";
176 - enable-active-high;
177 - gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
178 - pinctrl-names = "default";
179 - pinctrl-0 = <&pcie_m2_0_pwren>;
180 - regulator-name = "vcc3v3_pcie30";
181 - regulator-min-microvolt = <3300000>;
182 - regulator-max-microvolt = <3300000>;
183 - vin-supply = <&vcc5v0_sys>;
184 - };
185 -
186 - vcc3v3_sd_s0: vcc3v3-sd-s0-regulator {
187 - compatible = "regulator-fixed";
188 - enable-active-low;
189 - gpio = <&gpio4 RK_PA5 GPIO_ACTIVE_LOW>;
190 - regulator-boot-on;
191 - regulator-max-microvolt = <3300000>;
192 - regulator-min-microvolt = <3300000>;
193 - regulator-name = "vcc3v3_sd_s0";
194 - vin-supply = <&vcc_3v3_s3>;
195 - };
196 -
197 - vdd_4g_3v3: vdd-4g-3v3-regulator {
198 - compatible = "regulator-fixed";
199 - enable-active-high;
200 - gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
201 - pinctrl-names = "default";
202 - pinctrl-0 = <&pin_4g_lte_pwren>;
203 - regulator-name = "vdd_4g_3v3";
204 - regulator-min-microvolt = <3300000>;
205 - regulator-max-microvolt = <3300000>;
206 - vin-supply = <&vcc5v0_sys>;
207 - };
208 -};
209 -
210 -&combphy0_ps {
211 - status = "okay";
212 -};
213 -
214 -&combphy1_ps {
215 - status = "okay";
216 -};
217 -
218 -&combphy2_psu {
219 - status = "okay";
220 -};
221 -
222 -&cpu_l0 {
223 - cpu-supply = <&vdd_cpu_lit_s0>;
224 -};
225 -
226 -&cpu_l1 {
227 - cpu-supply = <&vdd_cpu_lit_s0>;
228 -};
229 -
230 -&cpu_l2 {
231 - cpu-supply = <&vdd_cpu_lit_s0>;
232 -};
233 -
234 -&cpu_l3 {
235 - cpu-supply = <&vdd_cpu_lit_s0>;
236 -};
237 -
238 -&cpu_b0{
239 - cpu-supply = <&vdd_cpu_big0_s0>;
240 -};
241 -
242 -&cpu_b1{
243 - cpu-supply = <&vdd_cpu_big0_s0>;
244 -};
245 -
246 -&cpu_b2{
247 - cpu-supply = <&vdd_cpu_big1_s0>;
248 -};
249 -
250 -&cpu_b3{
251 - cpu-supply = <&vdd_cpu_big1_s0>;
252 -};
253 -
254 -&gpio0 {
255 - gpio-line-names = /* GPIO0 A0-A7 */
256 - "", "", "", "",
257 - "", "", "", "",
258 - /* GPIO0 B0-B7 */
259 - "", "", "", "",
260 - "", "", "", "",
261 - /* GPIO0 C0-C7 */
262 - "", "", "", "",
263 - "HEADER_10", "HEADER_08", "HEADER_32", "",
264 - /* GPIO0 D0-D7 */
265 - "", "", "", "",
266 - "", "", "", "";
267 -};
268 -
269 -&gpio1 {
270 - gpio-line-names = /* GPIO1 A0-A7 */
271 - "HEADER_27", "HEADER_28", "", "",
272 - "", "", "", "HEADER_15",
273 - /* GPIO1 B0-B7 */
274 - "HEADER_26", "HEADER_21", "HEADER_19", "HEADER_23",
275 - "HEADER_24", "HEADER_22", "", "",
276 - /* GPIO1 C0-C7 */
277 - "", "", "", "",
278 - "", "", "", "",
279 - /* GPIO1 D0-D7 */
280 - "", "", "", "",
281 - "", "", "HEADER_05", "HEADER_03";
282 -};
283 -
284 -&gpio2 {
285 - gpio-line-names = /* GPIO2 A0-A7 */
286 - "", "", "", "",
287 - "", "", "", "",
288 - /* GPIO2 B0-B7 */
289 - "", "", "", "",
290 - "", "", "", "",
291 - /* GPIO2 C0-C7 */
292 - "", "CSI1_11", "CSI1_12", "",
293 - "", "", "", "",
294 - /* GPIO2 D0-D7 */
295 - "", "", "", "",
296 - "", "", "", "";
297 -};
298 -
299 -&gpio3 {
300 - gpio-line-names = /* GPIO3 A0-A7 */
301 - "HEADER_35", "HEADER_38", "HEADER_40", "HEADER_36",
302 - "HEADER_37", "", "DSI0_12", "",
303 - /* GPIO3 B0-B7 */
304 - "HEADER_33", "DSI0_10", "HEADER_07", "HEADER_16",
305 - "HEADER_18", "HEADER_29", "HEADER_31", "HEADER_12",
306 - /* GPIO3 C0-C7 */
307 - "DSI0_08", "DSI0_14", "HEADER_11", "HEADER_13",
308 - "", "", "", "",
309 - /* GPIO3 D0-D7 */
310 - "", "", "", "",
311 - "", "DSI1_10", "", "";
312 -};
313 -
314 -&gpio4 {
315 - gpio-line-names = /* GPIO4 A0-A7 */
316 - "DSI1_08", "DSI1_14", "", "DSI1_12",
317 - "", "", "", "",
318 - /* GPIO4 B0-B7 */
319 - "", "", "", "",
320 - "", "", "", "",
321 - /* GPIO4 C0-C7 */
322 - "", "", "", "",
323 - "CSI0_11", "CSI0_12", "", "",
324 - /* GPIO4 D0-D7 */
325 - "", "", "", "",
326 - "", "", "", "";
327 -};
328 -
329 -&i2c0 {
330 - pinctrl-names = "default";
331 - pinctrl-0 = <&i2c0m2_xfer>;
332 - status = "okay";
333 -
334 - vdd_cpu_big0_s0: regulator@42 {
335 - compatible = "rockchip,rk8602";
336 - reg = <0x42>;
337 - fcs,suspend-voltage-selector = <1>;
338 - regulator-name = "vdd_cpu_big0_s0";
339 - regulator-always-on;
340 - regulator-boot-on;
341 - regulator-min-microvolt = <550000>;
342 - regulator-max-microvolt = <1050000>;
343 - regulator-ramp-delay = <2300>;
344 - vin-supply = <&vcc4v0_sys>;
345 -
346 - regulator-state-mem {
347 - regulator-off-in-suspend;
348 - };
349 - };
350 -
351 - vdd_cpu_big1_s0: regulator@43 {
352 - compatible = "rockchip,rk8603", "rockchip,rk8602";
353 - reg = <0x43>;
354 - fcs,suspend-voltage-selector = <1>;
355 - regulator-name = "vdd_cpu_big1_s0";
356 - regulator-always-on;
357 - regulator-boot-on;
358 - regulator-min-microvolt = <550000>;
359 - regulator-max-microvolt = <1050000>;
360 - regulator-ramp-delay = <2300>;
361 - vin-supply = <&vcc4v0_sys>;
362 -
363 - regulator-state-mem {
364 - regulator-off-in-suspend;
365 - };
366 - };
367 -};
368 -
369 -&i2c2 {
370 - status = "okay";
371 -
372 - vdd_npu_s0: regulator@42 {
373 - compatible = "rockchip,rk8602";
374 - reg = <0x42>;
375 - rockchip,suspend-voltage-selector = <1>;
376 - regulator-name = "vdd_npu_s0";
377 - regulator-always-on;
378 - regulator-boot-on;
379 - regulator-min-microvolt = <550000>;
380 - regulator-max-microvolt = <950000>;
381 - regulator-ramp-delay = <2300>;
382 - vin-supply = <&vcc4v0_sys>;
383 -
384 - regulator-state-mem {
385 - regulator-off-in-suspend;
386 - };
387 - };
388 -};
389 -
390 -&i2c6 {
391 - clock-frequency = <200000>;
392 - status = "okay";
393 -
394 - fusb302: typec-portc@22 {
395 - compatible = "fcs,fusb302";
396 - reg = <0x22>;
397 - interrupt-parent = <&gpio0>;
398 - interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
399 - pinctrl-0 = <&usbc0_int>;
400 - pinctrl-names = "default";
401 - vbus-supply = <&vbus5v0_typec>;
402 -
403 - connector {
404 - compatible = "usb-c-connector";
405 - data-role = "dual";
406 - label = "USB-C";
407 - power-role = "dual";
408 - try-power-role = "sink";
409 - source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
410 - sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
411 - op-sink-microwatt = <1000000>;
412 - };
413 - };
414 -
415 - hym8563: rtc@51 {
416 - compatible = "haoyu,hym8563";
417 - reg = <0x51>;
418 - #clock-cells = <0>;
419 - clock-output-names = "hym8563";
420 - pinctrl-names = "default";
421 - pinctrl-0 = <&hym8563_int>;
422 - interrupt-parent = <&gpio0>;
423 - interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
424 - wakeup-source;
425 - };
426 -};
427 -
428 -&i2c7 {
429 - clock-frequency = <200000>;
430 - status = "okay";
431 -
432 - rt5616: codec@1b {
433 - compatible = "realtek,rt5616";
434 - reg = <0x1b>;
435 - clocks = <&cru I2S0_8CH_MCLKOUT>;
436 - clock-names = "mclk";
437 - #sound-dai-cells = <0>;
438 - assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
439 - assigned-clock-rates = <12288000>;
440 -
441 - port {
442 - rt5616_p0_0: endpoint {
443 - remote-endpoint = <&i2s0_8ch_p0_0>;
444 - };
445 - };
446 - };
447 -
448 - /* connected with MIPI-CSI1 */
449 -};
450 -
451 -&i2c8 {
452 - pinctrl-0 = <&i2c8m2_xfer>;
453 -};
454 -
455 -&i2s0_8ch {
456 - pinctrl-names = "default";
457 - pinctrl-0 = <&i2s0_lrck
458 - &i2s0_mclk
459 - &i2s0_sclk
460 - &i2s0_sdi0
461 - &i2s0_sdo0>;
462 - status = "okay";
463 -
464 - i2s0_8ch_p0: port {
465 - i2s0_8ch_p0_0: endpoint {
466 - dai-format = "i2s";
467 - mclk-fs = <256>;
468 - remote-endpoint = <&rt5616_p0_0>;
469 - };
470 - };
471 -};
472 -
473 -&pcie2x1l0 {
474 - reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
475 - vpcie3v3-supply = <&vcc_3v3_pcie20>;
476 - pinctrl-names = "default";
477 - pinctrl-0 = <&pcie2_0_rst>;
478 - status = "okay";
479 -};
480 -
481 -&pcie2x1l1 {
482 - reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
483 - vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
484 - pinctrl-names = "default";
485 - pinctrl-0 = <&pcie2_1_rst>;
486 - status = "okay";
487 -};
488 -
489 -&pcie2x1l2 {
490 - reset-gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
491 - vpcie3v3-supply = <&vcc_3v3_pcie20>;
492 - pinctrl-names = "default";
493 - pinctrl-0 = <&pcie2_2_rst>;
494 - status = "okay";
495 -};
496 -
497 -&pcie30phy {
498 - status = "okay";
499 -};
500 -
501 -&pcie3x4 {
502 - reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
503 - vpcie3v3-supply = <&vcc3v3_pcie30>;
504 - status = "okay";
505 -};
506 -
507 -&pinctrl {
508 - gpio-leds {
509 - sys_led_pin: sys-led-pin {
510 - rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
511 - };
512 -
513 - usr_led_pin: usr-led-pin {
514 - rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
515 - };
516 - };
517 -
518 - headphone {
519 - hp_det: hp-det {
520 - rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
521 - };
522 - };
523 -
524 - hym8563 {
525 - hym8563_int: hym8563-int {
526 - rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
527 - };
528 - };
529 -
530 - pcie {
531 - pcie2_0_rst: pcie2-0-rst {
532 - rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
533 - };
534 -
535 - pcie2_1_rst: pcie2-1-rst {
536 - rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
537 - };
538 -
539 - pcie2_2_rst: pcie2-2-rst {
540 - rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
541 - };
542 -
543 - pcie_m2_0_pwren: pcie-m20-pwren {
544 - rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
545 - };
546 -
547 - pcie_m2_1_pwren: pcie-m21-pwren {
548 - rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
549 - };
550 - };
551 -
552 - usb {
553 - pin_4g_lte_pwren: 4g-lte-pwren {
554 - rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
555 - };
556 -
557 - typec5v_pwren: typec5v-pwren {
558 - rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
559 - };
560 -
561 - usbc0_int: usbc0-int {
562 - rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
563 - };
564 - };
565 -};
566 -
567 -&pwm1 {
568 - pinctrl-0 = <&pwm1m1_pins>;
569 - status = "okay";
570 -};
571 -
572 -&saradc {
573 - vref-supply = <&avcc_1v8_s0>;
574 - status = "okay";
575 -};
576 -
577 -&sdhci {
578 - bus-width = <8>;
579 - no-sdio;
580 - no-sd;
581 - non-removable;
582 - max-frequency = <200000000>;
583 - mmc-hs400-1_8v;
584 - mmc-hs400-enhanced-strobe;
585 - status = "okay";
586 -};
587 -
588 -&sdmmc {
589 - bus-width = <4>;
590 - cap-mmc-highspeed;
591 - cap-sd-highspeed;
592 - cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
593 - disable-wp;
594 - no-mmc;
595 - no-sdio;
596 - sd-uhs-sdr104;
597 - vmmc-supply = <&vcc3v3_sd_s0>;
598 - vqmmc-supply = <&vccio_sd_s0>;
599 - status = "okay";
600 -};
601 -
602 -&spi2 {
603 - status = "okay";
604 - assigned-clocks = <&cru CLK_SPI2>;
605 - assigned-clock-rates = <200000000>;
606 - pinctrl-names = "default";
607 - pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
608 - num-cs = <1>;
609 -
610 - pmic@0 {
611 - compatible = "rockchip,rk806";
612 - spi-max-frequency = <1000000>;
613 - reg = <0x0>;
614 -
615 - interrupt-parent = <&gpio0>;
616 - interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
617 -
618 - pinctrl-names = "default";
619 - pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
620 - <&rk806_dvs2_null>, <&rk806_dvs3_null>;
621 -
622 - system-power-controller;
623 -
624 - vcc1-supply = <&vcc4v0_sys>;
625 - vcc2-supply = <&vcc4v0_sys>;
626 - vcc3-supply = <&vcc4v0_sys>;
627 - vcc4-supply = <&vcc4v0_sys>;
628 - vcc5-supply = <&vcc4v0_sys>;
629 - vcc6-supply = <&vcc4v0_sys>;
630 - vcc7-supply = <&vcc4v0_sys>;
631 - vcc8-supply = <&vcc4v0_sys>;
632 - vcc9-supply = <&vcc4v0_sys>;
633 - vcc10-supply = <&vcc4v0_sys>;
634 - vcc11-supply = <&vcc_2v0_pldo_s3>;
635 - vcc12-supply = <&vcc4v0_sys>;
636 - vcc13-supply = <&vcc_1v1_nldo_s3>;
637 - vcc14-supply = <&vcc_1v1_nldo_s3>;
638 - vcca-supply = <&vcc4v0_sys>;
639 -
640 - gpio-controller;
641 - #gpio-cells = <2>;
642 -
643 - rk806_dvs1_null: dvs1-null-pins {
644 - pins = "gpio_pwrctrl1";
645 - function = "pin_fun0";
646 - };
647 -
648 - rk806_dvs2_null: dvs2-null-pins {
649 - pins = "gpio_pwrctrl2";
650 - function = "pin_fun0";
651 - };
652 -
653 - rk806_dvs3_null: dvs3-null-pins {
654 - pins = "gpio_pwrctrl3";
655 - function = "pin_fun0";
656 - };
657 -
658 - regulators {
659 - vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
660 - regulator-boot-on;
661 - regulator-min-microvolt = <550000>;
662 - regulator-max-microvolt = <950000>;
663 - regulator-ramp-delay = <12500>;
664 - regulator-name = "vdd_gpu_s0";
665 - regulator-enable-ramp-delay = <400>;
666 -
667 - regulator-state-mem {
668 - regulator-off-in-suspend;
669 - };
670 - };
671 -
672 - vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
673 - regulator-always-on;
674 - regulator-boot-on;
675 - regulator-min-microvolt = <550000>;
676 - regulator-max-microvolt = <950000>;
677 - regulator-ramp-delay = <12500>;
678 - regulator-name = "vdd_cpu_lit_s0";
679 -
680 - regulator-state-mem {
681 - regulator-off-in-suspend;
682 - };
683 - };
684 -
685 - vdd_log_s0: dcdc-reg3 {
686 - regulator-always-on;
687 - regulator-boot-on;
688 - regulator-min-microvolt = <675000>;
689 - regulator-max-microvolt = <750000>;
690 - regulator-ramp-delay = <12500>;
691 - regulator-name = "vdd_log_s0";
692 -
693 - regulator-state-mem {
694 - regulator-off-in-suspend;
695 - regulator-suspend-microvolt = <750000>;
696 - };
697 - };
698 -
699 - vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
700 - regulator-always-on;
701 - regulator-boot-on;
702 - regulator-min-microvolt = <550000>;
703 - regulator-max-microvolt = <950000>;
704 - regulator-init-microvolt = <750000>;
705 - regulator-ramp-delay = <12500>;
706 - regulator-name = "vdd_vdenc_s0";
707 -
708 - regulator-state-mem {
709 - regulator-off-in-suspend;
710 - };
711 - };
712 -
713 - vdd_ddr_s0: dcdc-reg5 {
714 - regulator-always-on;
715 - regulator-boot-on;
716 - regulator-min-microvolt = <675000>;
717 - regulator-max-microvolt = <900000>;
718 - regulator-ramp-delay = <12500>;
719 - regulator-name = "vdd_ddr_s0";
720 -
721 - regulator-state-mem {
722 - regulator-off-in-suspend;
723 - regulator-suspend-microvolt = <850000>;
724 - };
725 - };
726 -
727 - vdd2_ddr_s3: dcdc-reg6 {
728 - regulator-always-on;
729 - regulator-boot-on;
730 - regulator-name = "vdd2_ddr_s3";
731 -
732 - regulator-state-mem {
733 - regulator-on-in-suspend;
734 - };
735 - };
736 -
737 - vcc_2v0_pldo_s3: dcdc-reg7 {
738 - regulator-always-on;
739 - regulator-boot-on;
740 - regulator-min-microvolt = <2000000>;
741 - regulator-max-microvolt = <2000000>;
742 - regulator-ramp-delay = <12500>;
743 - regulator-name = "vdd_2v0_pldo_s3";
744 -
745 - regulator-state-mem {
746 - regulator-on-in-suspend;
747 - regulator-suspend-microvolt = <2000000>;
748 - };
749 - };
750 -
751 - vcc_3v3_s3: dcdc-reg8 {
752 - regulator-always-on;
753 - regulator-boot-on;
754 - regulator-min-microvolt = <3300000>;
755 - regulator-max-microvolt = <3300000>;
756 - regulator-name = "vcc_3v3_s3";
757 -
758 - regulator-state-mem {
759 - regulator-on-in-suspend;
760 - regulator-suspend-microvolt = <3300000>;
761 - };
762 - };
763 -
764 - vddq_ddr_s0: dcdc-reg9 {
765 - regulator-always-on;
766 - regulator-boot-on;
767 - regulator-name = "vddq_ddr_s0";
768 -
769 - regulator-state-mem {
770 - regulator-off-in-suspend;
771 - };
772 - };
773 -
774 - vcc_1v8_s3: dcdc-reg10 {
775 - regulator-always-on;
776 - regulator-boot-on;
777 - regulator-min-microvolt = <1800000>;
778 - regulator-max-microvolt = <1800000>;
779 - regulator-name = "vcc_1v8_s3";
780 -
781 - regulator-state-mem {
782 - regulator-on-in-suspend;
783 - regulator-suspend-microvolt = <1800000>;
784 - };
785 - };
786 -
787 - avcc_1v8_s0: pldo-reg1 {
788 - regulator-always-on;
789 - regulator-boot-on;
790 - regulator-min-microvolt = <1800000>;
791 - regulator-max-microvolt = <1800000>;
792 - regulator-name = "avcc_1v8_s0";
793 -
794 - regulator-state-mem {
795 - regulator-off-in-suspend;
796 - };
797 - };
798 -
799 - vcc_1v8_s0: pldo-reg2 {
800 - regulator-always-on;
801 - regulator-boot-on;
802 - regulator-min-microvolt = <1800000>;
803 - regulator-max-microvolt = <1800000>;
804 - regulator-name = "vcc_1v8_s0";
805 -
806 - regulator-state-mem {
807 - regulator-off-in-suspend;
808 - regulator-suspend-microvolt = <1800000>;
809 - };
810 - };
811 -
812 - avdd_1v2_s0: pldo-reg3 {
813 - regulator-always-on;
814 - regulator-boot-on;
815 - regulator-min-microvolt = <1200000>;
816 - regulator-max-microvolt = <1200000>;
817 - regulator-name = "avdd_1v2_s0";
818 -
819 - regulator-state-mem {
820 - regulator-off-in-suspend;
821 - };
822 - };
823 -
824 - vcc_3v3_s0: pldo-reg4 {
825 - regulator-always-on;
826 - regulator-boot-on;
827 - regulator-min-microvolt = <3300000>;
828 - regulator-max-microvolt = <3300000>;
829 - regulator-ramp-delay = <12500>;
830 - regulator-name = "vcc_3v3_s0";
831 -
832 - regulator-state-mem {
833 - regulator-off-in-suspend;
834 - };
835 - };
836 -
837 - vccio_sd_s0: pldo-reg5 {
838 - regulator-always-on;
839 - regulator-boot-on;
840 - regulator-min-microvolt = <1800000>;
841 - regulator-max-microvolt = <3300000>;
842 - regulator-ramp-delay = <12500>;
843 - regulator-name = "vccio_sd_s0";
844 -
845 - regulator-state-mem {
846 - regulator-off-in-suspend;
847 - };
848 - };
849 -
850 - pldo6_s3: pldo-reg6 {
851 - regulator-always-on;
852 - regulator-boot-on;
853 - regulator-min-microvolt = <1800000>;
854 - regulator-max-microvolt = <1800000>;
855 - regulator-name = "pldo6_s3";
856 -
857 - regulator-state-mem {
858 - regulator-on-in-suspend;
859 - regulator-suspend-microvolt = <1800000>;
860 - };
861 - };
862 -
863 - vdd_0v75_s3: nldo-reg1 {
864 - regulator-always-on;
865 - regulator-boot-on;
866 - regulator-min-microvolt = <750000>;
867 - regulator-max-microvolt = <750000>;
868 - regulator-name = "vdd_0v75_s3";
869 -
870 - regulator-state-mem {
871 - regulator-on-in-suspend;
872 - regulator-suspend-microvolt = <750000>;
873 - };
874 - };
875 -
876 - vdd_ddr_pll_s0: nldo-reg2 {
877 - regulator-always-on;
878 - regulator-boot-on;
879 - regulator-min-microvolt = <850000>;
880 - regulator-max-microvolt = <850000>;
881 - regulator-name = "vdd_ddr_pll_s0";
882 -
883 - regulator-state-mem {
884 - regulator-off-in-suspend;
885 - regulator-suspend-microvolt = <850000>;
886 - };
887 - };
888 -
889 - avdd_0v75_s0: nldo-reg3 {
890 - regulator-always-on;
891 - regulator-boot-on;
892 - regulator-min-microvolt = <750000>;
893 - regulator-max-microvolt = <750000>;
894 - regulator-name = "avdd_0v75_s0";
895 -
896 - regulator-state-mem {
897 - regulator-off-in-suspend;
898 - };
899 - };
900 -
901 - vdd_0v85_s0: nldo-reg4 {
902 - regulator-always-on;
903 - regulator-boot-on;
904 - regulator-min-microvolt = <850000>;
905 - regulator-max-microvolt = <850000>;
906 - regulator-name = "vdd_0v85_s0";
907 -
908 - regulator-state-mem {
909 - regulator-off-in-suspend;
910 - };
911 - };
912 -
913 - vdd_0v75_s0: nldo-reg5 {
914 - regulator-always-on;
915 - regulator-boot-on;
916 - regulator-min-microvolt = <750000>;
917 - regulator-max-microvolt = <750000>;
918 - regulator-name = "vdd_0v75_s0";
919 -
920 - regulator-state-mem {
921 - regulator-off-in-suspend;
922 - };
923 - };
924 - };
925 - };
926 -};
927 -
928 -&tsadc {
929 - status = "okay";
930 -};
931 -
932 -&uart2 {
933 - pinctrl-0 = <&uart2m0_xfer>;
934 - status = "okay";
935 -};
936 -
937 -&u2phy2_host {
938 - phy-supply = <&vdd_4g_3v3>;
939 - status = "okay";
940 -};
941 -
942 -&u2phy3_host {
943 - status = "okay";
944 -};
945 -
946 -&u2phy2 {
947 - status = "okay";
948 -};
949 -
950 -&u2phy3 {
951 - status = "okay";
952 -};
953 -
954 -&usb_host0_ehci {
955 - status = "okay";
956 -};
957 -
958 -&usb_host0_ohci {
959 - status = "okay";
960 -};
961 -
962 -&usb_host1_ehci {
963 - status = "okay";
964 -};
965 -
966 -&usb_host1_ohci {
967 - status = "okay";
968 };
969 --- /dev/null
970 +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
971 @@ -0,0 +1,945 @@
972 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
973 +/*
974 + * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
975 + * Copyright (c) 2023 Thomas McKahan
976 + *
977 + */
978 +
979 +/dts-v1/;
980 +
981 +#include <dt-bindings/gpio/gpio.h>
982 +#include <dt-bindings/pinctrl/rockchip.h>
983 +#include <dt-bindings/usb/pd.h>
984 +#include "rk3588.dtsi"
985 +
986 +/ {
987 + model = "FriendlyElec NanoPC-T6";
988 + compatible = "friendlyarm,nanopc-t6", "rockchip,rk3588";
989 +
990 + aliases {
991 + mmc0 = &sdhci;
992 + mmc1 = &sdmmc;
993 + };
994 +
995 + chosen {
996 + stdout-path = "serial2:1500000n8";
997 + };
998 +
999 + leds {
1000 + compatible = "gpio-leds";
1001 +
1002 + sys_led: led-0 {
1003 + gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
1004 + label = "system-led";
1005 + linux,default-trigger = "heartbeat";
1006 + pinctrl-names = "default";
1007 + pinctrl-0 = <&sys_led_pin>;
1008 + };
1009 +
1010 + usr_led: led-1 {
1011 + gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
1012 + label = "user-led";
1013 + pinctrl-names = "default";
1014 + pinctrl-0 = <&usr_led_pin>;
1015 + };
1016 + };
1017 +
1018 + sound {
1019 + compatible = "simple-audio-card";
1020 + pinctrl-names = "default";
1021 + pinctrl-0 = <&hp_det>;
1022 +
1023 + simple-audio-card,name = "realtek,rt5616-codec";
1024 + simple-audio-card,format = "i2s";
1025 + simple-audio-card,mclk-fs = <256>;
1026 +
1027 + simple-audio-card,hp-det-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
1028 + simple-audio-card,hp-pin-name = "Headphones";
1029 +
1030 + simple-audio-card,widgets =
1031 + "Headphone", "Headphones",
1032 + "Microphone", "Microphone Jack";
1033 + simple-audio-card,routing =
1034 + "Headphones", "HPOL",
1035 + "Headphones", "HPOR",
1036 + "MIC1", "Microphone Jack",
1037 + "Microphone Jack", "micbias1";
1038 +
1039 + simple-audio-card,cpu {
1040 + sound-dai = <&i2s0_8ch>;
1041 + };
1042 + simple-audio-card,codec {
1043 + sound-dai = <&rt5616>;
1044 + };
1045 + };
1046 +
1047 + vcc12v_dcin: vcc12v-dcin-regulator {
1048 + compatible = "regulator-fixed";
1049 + regulator-name = "vcc12v_dcin";
1050 + regulator-always-on;
1051 + regulator-boot-on;
1052 + regulator-min-microvolt = <12000000>;
1053 + regulator-max-microvolt = <12000000>;
1054 + };
1055 +
1056 + /* vcc5v0_sys powers peripherals */
1057 + vcc5v0_sys: vcc5v0-sys-regulator {
1058 + compatible = "regulator-fixed";
1059 + regulator-name = "vcc5v0_sys";
1060 + regulator-always-on;
1061 + regulator-boot-on;
1062 + regulator-min-microvolt = <5000000>;
1063 + regulator-max-microvolt = <5000000>;
1064 + vin-supply = <&vcc12v_dcin>;
1065 + };
1066 +
1067 + /* vcc4v0_sys powers the RK806, RK860's */
1068 + vcc4v0_sys: vcc4v0-sys-regulator {
1069 + compatible = "regulator-fixed";
1070 + regulator-name = "vcc4v0_sys";
1071 + regulator-always-on;
1072 + regulator-boot-on;
1073 + regulator-min-microvolt = <4000000>;
1074 + regulator-max-microvolt = <4000000>;
1075 + vin-supply = <&vcc12v_dcin>;
1076 + };
1077 +
1078 + vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator {
1079 + compatible = "regulator-fixed";
1080 + regulator-name = "vcc-1v1-nldo-s3";
1081 + regulator-always-on;
1082 + regulator-boot-on;
1083 + regulator-min-microvolt = <1100000>;
1084 + regulator-max-microvolt = <1100000>;
1085 + vin-supply = <&vcc4v0_sys>;
1086 + };
1087 +
1088 + vcc_3v3_pcie20: vcc3v3-pcie20-regulator {
1089 + compatible = "regulator-fixed";
1090 + regulator-name = "vcc_3v3_pcie20";
1091 + regulator-always-on;
1092 + regulator-boot-on;
1093 + regulator-min-microvolt = <3300000>;
1094 + regulator-max-microvolt = <3300000>;
1095 + vin-supply = <&vcc_3v3_s3>;
1096 + };
1097 +
1098 + vbus5v0_typec: vbus5v0-typec-regulator {
1099 + compatible = "regulator-fixed";
1100 + enable-active-high;
1101 + gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
1102 + pinctrl-names = "default";
1103 + pinctrl-0 = <&typec5v_pwren>;
1104 + regulator-name = "vbus5v0_typec";
1105 + regulator-min-microvolt = <5000000>;
1106 + regulator-max-microvolt = <5000000>;
1107 + vin-supply = <&vcc5v0_sys>;
1108 + };
1109 +
1110 + vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
1111 + compatible = "regulator-fixed";
1112 + enable-active-high;
1113 + gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
1114 + pinctrl-names = "default";
1115 + pinctrl-0 = <&pcie_m2_1_pwren>;
1116 + regulator-name = "vcc3v3_pcie2x1l0";
1117 + regulator-min-microvolt = <3300000>;
1118 + regulator-max-microvolt = <3300000>;
1119 + vin-supply = <&vcc5v0_sys>;
1120 + };
1121 +
1122 + vcc3v3_pcie30: vcc3v3-pcie30-regulator {
1123 + compatible = "regulator-fixed";
1124 + enable-active-high;
1125 + gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
1126 + pinctrl-names = "default";
1127 + pinctrl-0 = <&pcie_m2_0_pwren>;
1128 + regulator-name = "vcc3v3_pcie30";
1129 + regulator-min-microvolt = <3300000>;
1130 + regulator-max-microvolt = <3300000>;
1131 + vin-supply = <&vcc5v0_sys>;
1132 + };
1133 +
1134 + vcc3v3_sd_s0: vcc3v3-sd-s0-regulator {
1135 + compatible = "regulator-fixed";
1136 + enable-active-low;
1137 + gpio = <&gpio4 RK_PA5 GPIO_ACTIVE_LOW>;
1138 + regulator-boot-on;
1139 + regulator-max-microvolt = <3300000>;
1140 + regulator-min-microvolt = <3300000>;
1141 + regulator-name = "vcc3v3_sd_s0";
1142 + vin-supply = <&vcc_3v3_s3>;
1143 + };
1144 +
1145 + vdd_4g_3v3: vdd-4g-3v3-regulator {
1146 + compatible = "regulator-fixed";
1147 + enable-active-high;
1148 + gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
1149 + pinctrl-names = "default";
1150 + pinctrl-0 = <&pin_4g_lte_pwren>;
1151 + regulator-name = "vdd_4g_3v3";
1152 + regulator-min-microvolt = <3300000>;
1153 + regulator-max-microvolt = <3300000>;
1154 + vin-supply = <&vcc5v0_sys>;
1155 + };
1156 +};
1157 +
1158 +&combphy0_ps {
1159 + status = "okay";
1160 +};
1161 +
1162 +&combphy1_ps {
1163 + status = "okay";
1164 +};
1165 +
1166 +&combphy2_psu {
1167 + status = "okay";
1168 +};
1169 +
1170 +&cpu_l0 {
1171 + cpu-supply = <&vdd_cpu_lit_s0>;
1172 +};
1173 +
1174 +&cpu_l1 {
1175 + cpu-supply = <&vdd_cpu_lit_s0>;
1176 +};
1177 +
1178 +&cpu_l2 {
1179 + cpu-supply = <&vdd_cpu_lit_s0>;
1180 +};
1181 +
1182 +&cpu_l3 {
1183 + cpu-supply = <&vdd_cpu_lit_s0>;
1184 +};
1185 +
1186 +&cpu_b0 {
1187 + cpu-supply = <&vdd_cpu_big0_s0>;
1188 +};
1189 +
1190 +&cpu_b1 {
1191 + cpu-supply = <&vdd_cpu_big0_s0>;
1192 +};
1193 +
1194 +&cpu_b2 {
1195 + cpu-supply = <&vdd_cpu_big1_s0>;
1196 +};
1197 +
1198 +&cpu_b3 {
1199 + cpu-supply = <&vdd_cpu_big1_s0>;
1200 +};
1201 +
1202 +&gpio0 {
1203 + gpio-line-names = /* GPIO0 A0-A7 */
1204 + "", "", "", "",
1205 + "", "", "", "",
1206 + /* GPIO0 B0-B7 */
1207 + "", "", "", "",
1208 + "", "", "", "",
1209 + /* GPIO0 C0-C7 */
1210 + "", "", "", "",
1211 + "HEADER_10", "HEADER_08", "HEADER_32", "",
1212 + /* GPIO0 D0-D7 */
1213 + "", "", "", "",
1214 + "", "", "", "";
1215 +};
1216 +
1217 +&gpio1 {
1218 + gpio-line-names = /* GPIO1 A0-A7 */
1219 + "HEADER_27", "HEADER_28", "", "",
1220 + "", "", "", "HEADER_15",
1221 + /* GPIO1 B0-B7 */
1222 + "HEADER_26", "HEADER_21", "HEADER_19", "HEADER_23",
1223 + "HEADER_24", "HEADER_22", "", "",
1224 + /* GPIO1 C0-C7 */
1225 + "", "", "", "",
1226 + "", "", "", "",
1227 + /* GPIO1 D0-D7 */
1228 + "", "", "", "",
1229 + "", "", "HEADER_05", "HEADER_03";
1230 +};
1231 +
1232 +&gpio2 {
1233 + gpio-line-names = /* GPIO2 A0-A7 */
1234 + "", "", "", "",
1235 + "", "", "", "",
1236 + /* GPIO2 B0-B7 */
1237 + "", "", "", "",
1238 + "", "", "", "",
1239 + /* GPIO2 C0-C7 */
1240 + "", "CSI1_11", "CSI1_12", "",
1241 + "", "", "", "",
1242 + /* GPIO2 D0-D7 */
1243 + "", "", "", "",
1244 + "", "", "", "";
1245 +};
1246 +
1247 +&gpio3 {
1248 + gpio-line-names = /* GPIO3 A0-A7 */
1249 + "HEADER_35", "HEADER_38", "HEADER_40", "HEADER_36",
1250 + "HEADER_37", "", "DSI0_12", "",
1251 + /* GPIO3 B0-B7 */
1252 + "HEADER_33", "DSI0_10", "HEADER_07", "HEADER_16",
1253 + "HEADER_18", "HEADER_29", "HEADER_31", "HEADER_12",
1254 + /* GPIO3 C0-C7 */
1255 + "DSI0_08", "DSI0_14", "HEADER_11", "HEADER_13",
1256 + "", "", "", "",
1257 + /* GPIO3 D0-D7 */
1258 + "", "", "", "",
1259 + "", "DSI1_10", "", "";
1260 +};
1261 +
1262 +&gpio4 {
1263 + gpio-line-names = /* GPIO4 A0-A7 */
1264 + "DSI1_08", "DSI1_14", "", "DSI1_12",
1265 + "", "", "", "",
1266 + /* GPIO4 B0-B7 */
1267 + "", "", "", "",
1268 + "", "", "", "",
1269 + /* GPIO4 C0-C7 */
1270 + "", "", "", "",
1271 + "CSI0_11", "CSI0_12", "", "",
1272 + /* GPIO4 D0-D7 */
1273 + "", "", "", "",
1274 + "", "", "", "";
1275 +};
1276 +
1277 +&i2c0 {
1278 + pinctrl-names = "default";
1279 + pinctrl-0 = <&i2c0m2_xfer>;
1280 + status = "okay";
1281 +
1282 + vdd_cpu_big0_s0: regulator@42 {
1283 + compatible = "rockchip,rk8602";
1284 + reg = <0x42>;
1285 + fcs,suspend-voltage-selector = <1>;
1286 + regulator-name = "vdd_cpu_big0_s0";
1287 + regulator-always-on;
1288 + regulator-boot-on;
1289 + regulator-min-microvolt = <550000>;
1290 + regulator-max-microvolt = <1050000>;
1291 + regulator-ramp-delay = <2300>;
1292 + vin-supply = <&vcc4v0_sys>;
1293 +
1294 + regulator-state-mem {
1295 + regulator-off-in-suspend;
1296 + };
1297 + };
1298 +
1299 + vdd_cpu_big1_s0: regulator@43 {
1300 + compatible = "rockchip,rk8603", "rockchip,rk8602";
1301 + reg = <0x43>;
1302 + fcs,suspend-voltage-selector = <1>;
1303 + regulator-name = "vdd_cpu_big1_s0";
1304 + regulator-always-on;
1305 + regulator-boot-on;
1306 + regulator-min-microvolt = <550000>;
1307 + regulator-max-microvolt = <1050000>;
1308 + regulator-ramp-delay = <2300>;
1309 + vin-supply = <&vcc4v0_sys>;
1310 +
1311 + regulator-state-mem {
1312 + regulator-off-in-suspend;
1313 + };
1314 + };
1315 +};
1316 +
1317 +&i2c2 {
1318 + status = "okay";
1319 +
1320 + vdd_npu_s0: regulator@42 {
1321 + compatible = "rockchip,rk8602";
1322 + reg = <0x42>;
1323 + rockchip,suspend-voltage-selector = <1>;
1324 + regulator-name = "vdd_npu_s0";
1325 + regulator-always-on;
1326 + regulator-boot-on;
1327 + regulator-min-microvolt = <550000>;
1328 + regulator-max-microvolt = <950000>;
1329 + regulator-ramp-delay = <2300>;
1330 + vin-supply = <&vcc4v0_sys>;
1331 +
1332 + regulator-state-mem {
1333 + regulator-off-in-suspend;
1334 + };
1335 + };
1336 +};
1337 +
1338 +&i2c6 {
1339 + clock-frequency = <200000>;
1340 + status = "okay";
1341 +
1342 + fusb302: typec-portc@22 {
1343 + compatible = "fcs,fusb302";
1344 + reg = <0x22>;
1345 + interrupt-parent = <&gpio0>;
1346 + interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
1347 + pinctrl-0 = <&usbc0_int>;
1348 + pinctrl-names = "default";
1349 + vbus-supply = <&vbus5v0_typec>;
1350 +
1351 + connector {
1352 + compatible = "usb-c-connector";
1353 + data-role = "dual";
1354 + label = "USB-C";
1355 + power-role = "dual";
1356 + try-power-role = "sink";
1357 + source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
1358 + sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
1359 + op-sink-microwatt = <1000000>;
1360 + };
1361 + };
1362 +
1363 + hym8563: rtc@51 {
1364 + compatible = "haoyu,hym8563";
1365 + reg = <0x51>;
1366 + #clock-cells = <0>;
1367 + clock-output-names = "hym8563";
1368 + pinctrl-names = "default";
1369 + pinctrl-0 = <&hym8563_int>;
1370 + interrupt-parent = <&gpio0>;
1371 + interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
1372 + wakeup-source;
1373 + };
1374 +};
1375 +
1376 +&i2c7 {
1377 + clock-frequency = <200000>;
1378 + status = "okay";
1379 +
1380 + rt5616: codec@1b {
1381 + compatible = "realtek,rt5616";
1382 + reg = <0x1b>;
1383 + clocks = <&cru I2S0_8CH_MCLKOUT>;
1384 + clock-names = "mclk";
1385 + #sound-dai-cells = <0>;
1386 + assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
1387 + assigned-clock-rates = <12288000>;
1388 +
1389 + port {
1390 + rt5616_p0_0: endpoint {
1391 + remote-endpoint = <&i2s0_8ch_p0_0>;
1392 + };
1393 + };
1394 + };
1395 +
1396 + /* connected with MIPI-CSI1 */
1397 +};
1398 +
1399 +&i2c8 {
1400 + pinctrl-0 = <&i2c8m2_xfer>;
1401 +};
1402 +
1403 +&i2s0_8ch {
1404 + pinctrl-names = "default";
1405 + pinctrl-0 = <&i2s0_lrck
1406 + &i2s0_mclk
1407 + &i2s0_sclk
1408 + &i2s0_sdi0
1409 + &i2s0_sdo0>;
1410 + status = "okay";
1411 +
1412 + i2s0_8ch_p0: port {
1413 + i2s0_8ch_p0_0: endpoint {
1414 + dai-format = "i2s";
1415 + mclk-fs = <256>;
1416 + remote-endpoint = <&rt5616_p0_0>;
1417 + };
1418 + };
1419 +};
1420 +
1421 +&pcie2x1l0 {
1422 + reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
1423 + vpcie3v3-supply = <&vcc_3v3_pcie20>;
1424 + pinctrl-names = "default";
1425 + pinctrl-0 = <&pcie2_0_rst>;
1426 + status = "okay";
1427 +};
1428 +
1429 +&pcie2x1l1 {
1430 + reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
1431 + vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
1432 + pinctrl-names = "default";
1433 + pinctrl-0 = <&pcie2_1_rst>;
1434 + status = "okay";
1435 +};
1436 +
1437 +&pcie2x1l2 {
1438 + reset-gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
1439 + vpcie3v3-supply = <&vcc_3v3_pcie20>;
1440 + pinctrl-names = "default";
1441 + pinctrl-0 = <&pcie2_2_rst>;
1442 + status = "okay";
1443 +};
1444 +
1445 +&pcie30phy {
1446 + status = "okay";
1447 +};
1448 +
1449 +&pcie3x4 {
1450 + reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
1451 + vpcie3v3-supply = <&vcc3v3_pcie30>;
1452 + status = "okay";
1453 +};
1454 +
1455 +&pinctrl {
1456 + gpio-leds {
1457 + sys_led_pin: sys-led-pin {
1458 + rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
1459 + };
1460 +
1461 + usr_led_pin: usr-led-pin {
1462 + rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
1463 + };
1464 + };
1465 +
1466 + headphone {
1467 + hp_det: hp-det {
1468 + rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
1469 + };
1470 + };
1471 +
1472 + hym8563 {
1473 + hym8563_int: hym8563-int {
1474 + rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
1475 + };
1476 + };
1477 +
1478 + pcie {
1479 + pcie2_0_rst: pcie2-0-rst {
1480 + rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
1481 + };
1482 +
1483 + pcie2_1_rst: pcie2-1-rst {
1484 + rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
1485 + };
1486 +
1487 + pcie2_2_rst: pcie2-2-rst {
1488 + rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
1489 + };
1490 +
1491 + pcie_m2_0_pwren: pcie-m20-pwren {
1492 + rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
1493 + };
1494 +
1495 + pcie_m2_1_pwren: pcie-m21-pwren {
1496 + rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1497 + };
1498 + };
1499 +
1500 + usb {
1501 + pin_4g_lte_pwren: 4g-lte-pwren {
1502 + rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
1503 + };
1504 +
1505 + typec5v_pwren: typec5v-pwren {
1506 + rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
1507 + };
1508 +
1509 + usbc0_int: usbc0-int {
1510 + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
1511 + };
1512 + };
1513 +};
1514 +
1515 +&pwm1 {
1516 + pinctrl-0 = <&pwm1m1_pins>;
1517 + status = "okay";
1518 +};
1519 +
1520 +&saradc {
1521 + vref-supply = <&avcc_1v8_s0>;
1522 + status = "okay";
1523 +};
1524 +
1525 +&sdhci {
1526 + bus-width = <8>;
1527 + no-sdio;
1528 + no-sd;
1529 + non-removable;
1530 + max-frequency = <200000000>;
1531 + mmc-hs400-1_8v;
1532 + mmc-hs400-enhanced-strobe;
1533 + status = "okay";
1534 +};
1535 +
1536 +&sdmmc {
1537 + bus-width = <4>;
1538 + cap-mmc-highspeed;
1539 + cap-sd-highspeed;
1540 + cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
1541 + disable-wp;
1542 + no-mmc;
1543 + no-sdio;
1544 + sd-uhs-sdr104;
1545 + vmmc-supply = <&vcc3v3_sd_s0>;
1546 + vqmmc-supply = <&vccio_sd_s0>;
1547 + status = "okay";
1548 +};
1549 +
1550 +&spi2 {
1551 + status = "okay";
1552 + assigned-clocks = <&cru CLK_SPI2>;
1553 + assigned-clock-rates = <200000000>;
1554 + pinctrl-names = "default";
1555 + pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
1556 + num-cs = <1>;
1557 +
1558 + pmic@0 {
1559 + compatible = "rockchip,rk806";
1560 + spi-max-frequency = <1000000>;
1561 + reg = <0x0>;
1562 +
1563 + interrupt-parent = <&gpio0>;
1564 + interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
1565 +
1566 + pinctrl-names = "default";
1567 + pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
1568 + <&rk806_dvs2_null>, <&rk806_dvs3_null>;
1569 +
1570 + system-power-controller;
1571 +
1572 + vcc1-supply = <&vcc4v0_sys>;
1573 + vcc2-supply = <&vcc4v0_sys>;
1574 + vcc3-supply = <&vcc4v0_sys>;
1575 + vcc4-supply = <&vcc4v0_sys>;
1576 + vcc5-supply = <&vcc4v0_sys>;
1577 + vcc6-supply = <&vcc4v0_sys>;
1578 + vcc7-supply = <&vcc4v0_sys>;
1579 + vcc8-supply = <&vcc4v0_sys>;
1580 + vcc9-supply = <&vcc4v0_sys>;
1581 + vcc10-supply = <&vcc4v0_sys>;
1582 + vcc11-supply = <&vcc_2v0_pldo_s3>;
1583 + vcc12-supply = <&vcc4v0_sys>;
1584 + vcc13-supply = <&vcc_1v1_nldo_s3>;
1585 + vcc14-supply = <&vcc_1v1_nldo_s3>;
1586 + vcca-supply = <&vcc4v0_sys>;
1587 +
1588 + gpio-controller;
1589 + #gpio-cells = <2>;
1590 +
1591 + rk806_dvs1_null: dvs1-null-pins {
1592 + pins = "gpio_pwrctrl1";
1593 + function = "pin_fun0";
1594 + };
1595 +
1596 + rk806_dvs2_null: dvs2-null-pins {
1597 + pins = "gpio_pwrctrl2";
1598 + function = "pin_fun0";
1599 + };
1600 +
1601 + rk806_dvs3_null: dvs3-null-pins {
1602 + pins = "gpio_pwrctrl3";
1603 + function = "pin_fun0";
1604 + };
1605 +
1606 + regulators {
1607 + vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
1608 + regulator-boot-on;
1609 + regulator-min-microvolt = <550000>;
1610 + regulator-max-microvolt = <950000>;
1611 + regulator-ramp-delay = <12500>;
1612 + regulator-name = "vdd_gpu_s0";
1613 + regulator-enable-ramp-delay = <400>;
1614 +
1615 + regulator-state-mem {
1616 + regulator-off-in-suspend;
1617 + };
1618 + };
1619 +
1620 + vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
1621 + regulator-always-on;
1622 + regulator-boot-on;
1623 + regulator-min-microvolt = <550000>;
1624 + regulator-max-microvolt = <950000>;
1625 + regulator-ramp-delay = <12500>;
1626 + regulator-name = "vdd_cpu_lit_s0";
1627 +
1628 + regulator-state-mem {
1629 + regulator-off-in-suspend;
1630 + };
1631 + };
1632 +
1633 + vdd_log_s0: dcdc-reg3 {
1634 + regulator-always-on;
1635 + regulator-boot-on;
1636 + regulator-min-microvolt = <675000>;
1637 + regulator-max-microvolt = <750000>;
1638 + regulator-ramp-delay = <12500>;
1639 + regulator-name = "vdd_log_s0";
1640 +
1641 + regulator-state-mem {
1642 + regulator-off-in-suspend;
1643 + regulator-suspend-microvolt = <750000>;
1644 + };
1645 + };
1646 +
1647 + vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
1648 + regulator-always-on;
1649 + regulator-boot-on;
1650 + regulator-min-microvolt = <550000>;
1651 + regulator-max-microvolt = <950000>;
1652 + regulator-init-microvolt = <750000>;
1653 + regulator-ramp-delay = <12500>;
1654 + regulator-name = "vdd_vdenc_s0";
1655 +
1656 + regulator-state-mem {
1657 + regulator-off-in-suspend;
1658 + };
1659 + };
1660 +
1661 + vdd_ddr_s0: dcdc-reg5 {
1662 + regulator-always-on;
1663 + regulator-boot-on;
1664 + regulator-min-microvolt = <675000>;
1665 + regulator-max-microvolt = <900000>;
1666 + regulator-ramp-delay = <12500>;
1667 + regulator-name = "vdd_ddr_s0";
1668 +
1669 + regulator-state-mem {
1670 + regulator-off-in-suspend;
1671 + regulator-suspend-microvolt = <850000>;
1672 + };
1673 + };
1674 +
1675 + vdd2_ddr_s3: dcdc-reg6 {
1676 + regulator-always-on;
1677 + regulator-boot-on;
1678 + regulator-name = "vdd2_ddr_s3";
1679 +
1680 + regulator-state-mem {
1681 + regulator-on-in-suspend;
1682 + };
1683 + };
1684 +
1685 + vcc_2v0_pldo_s3: dcdc-reg7 {
1686 + regulator-always-on;
1687 + regulator-boot-on;
1688 + regulator-min-microvolt = <2000000>;
1689 + regulator-max-microvolt = <2000000>;
1690 + regulator-ramp-delay = <12500>;
1691 + regulator-name = "vdd_2v0_pldo_s3";
1692 +
1693 + regulator-state-mem {
1694 + regulator-on-in-suspend;
1695 + regulator-suspend-microvolt = <2000000>;
1696 + };
1697 + };
1698 +
1699 + vcc_3v3_s3: dcdc-reg8 {
1700 + regulator-always-on;
1701 + regulator-boot-on;
1702 + regulator-min-microvolt = <3300000>;
1703 + regulator-max-microvolt = <3300000>;
1704 + regulator-name = "vcc_3v3_s3";
1705 +
1706 + regulator-state-mem {
1707 + regulator-on-in-suspend;
1708 + regulator-suspend-microvolt = <3300000>;
1709 + };
1710 + };
1711 +
1712 + vddq_ddr_s0: dcdc-reg9 {
1713 + regulator-always-on;
1714 + regulator-boot-on;
1715 + regulator-name = "vddq_ddr_s0";
1716 +
1717 + regulator-state-mem {
1718 + regulator-off-in-suspend;
1719 + };
1720 + };
1721 +
1722 + vcc_1v8_s3: dcdc-reg10 {
1723 + regulator-always-on;
1724 + regulator-boot-on;
1725 + regulator-min-microvolt = <1800000>;
1726 + regulator-max-microvolt = <1800000>;
1727 + regulator-name = "vcc_1v8_s3";
1728 +
1729 + regulator-state-mem {
1730 + regulator-on-in-suspend;
1731 + regulator-suspend-microvolt = <1800000>;
1732 + };
1733 + };
1734 +
1735 + avcc_1v8_s0: pldo-reg1 {
1736 + regulator-always-on;
1737 + regulator-boot-on;
1738 + regulator-min-microvolt = <1800000>;
1739 + regulator-max-microvolt = <1800000>;
1740 + regulator-name = "avcc_1v8_s0";
1741 +
1742 + regulator-state-mem {
1743 + regulator-off-in-suspend;
1744 + };
1745 + };
1746 +
1747 + vcc_1v8_s0: pldo-reg2 {
1748 + regulator-always-on;
1749 + regulator-boot-on;
1750 + regulator-min-microvolt = <1800000>;
1751 + regulator-max-microvolt = <1800000>;
1752 + regulator-name = "vcc_1v8_s0";
1753 +
1754 + regulator-state-mem {
1755 + regulator-off-in-suspend;
1756 + regulator-suspend-microvolt = <1800000>;
1757 + };
1758 + };
1759 +
1760 + avdd_1v2_s0: pldo-reg3 {
1761 + regulator-always-on;
1762 + regulator-boot-on;
1763 + regulator-min-microvolt = <1200000>;
1764 + regulator-max-microvolt = <1200000>;
1765 + regulator-name = "avdd_1v2_s0";
1766 +
1767 + regulator-state-mem {
1768 + regulator-off-in-suspend;
1769 + };
1770 + };
1771 +
1772 + vcc_3v3_s0: pldo-reg4 {
1773 + regulator-always-on;
1774 + regulator-boot-on;
1775 + regulator-min-microvolt = <3300000>;
1776 + regulator-max-microvolt = <3300000>;
1777 + regulator-ramp-delay = <12500>;
1778 + regulator-name = "vcc_3v3_s0";
1779 +
1780 + regulator-state-mem {
1781 + regulator-off-in-suspend;
1782 + };
1783 + };
1784 +
1785 + vccio_sd_s0: pldo-reg5 {
1786 + regulator-always-on;
1787 + regulator-boot-on;
1788 + regulator-min-microvolt = <1800000>;
1789 + regulator-max-microvolt = <3300000>;
1790 + regulator-ramp-delay = <12500>;
1791 + regulator-name = "vccio_sd_s0";
1792 +
1793 + regulator-state-mem {
1794 + regulator-off-in-suspend;
1795 + };
1796 + };
1797 +
1798 + pldo6_s3: pldo-reg6 {
1799 + regulator-always-on;
1800 + regulator-boot-on;
1801 + regulator-min-microvolt = <1800000>;
1802 + regulator-max-microvolt = <1800000>;
1803 + regulator-name = "pldo6_s3";
1804 +
1805 + regulator-state-mem {
1806 + regulator-on-in-suspend;
1807 + regulator-suspend-microvolt = <1800000>;
1808 + };
1809 + };
1810 +
1811 + vdd_0v75_s3: nldo-reg1 {
1812 + regulator-always-on;
1813 + regulator-boot-on;
1814 + regulator-min-microvolt = <750000>;
1815 + regulator-max-microvolt = <750000>;
1816 + regulator-name = "vdd_0v75_s3";
1817 +
1818 + regulator-state-mem {
1819 + regulator-on-in-suspend;
1820 + regulator-suspend-microvolt = <750000>;
1821 + };
1822 + };
1823 +
1824 + vdd_ddr_pll_s0: nldo-reg2 {
1825 + regulator-always-on;
1826 + regulator-boot-on;
1827 + regulator-min-microvolt = <850000>;
1828 + regulator-max-microvolt = <850000>;
1829 + regulator-name = "vdd_ddr_pll_s0";
1830 +
1831 + regulator-state-mem {
1832 + regulator-off-in-suspend;
1833 + regulator-suspend-microvolt = <850000>;
1834 + };
1835 + };
1836 +
1837 + avdd_0v75_s0: nldo-reg3 {
1838 + regulator-always-on;
1839 + regulator-boot-on;
1840 + regulator-min-microvolt = <750000>;
1841 + regulator-max-microvolt = <750000>;
1842 + regulator-name = "avdd_0v75_s0";
1843 +
1844 + regulator-state-mem {
1845 + regulator-off-in-suspend;
1846 + };
1847 + };
1848 +
1849 + vdd_0v85_s0: nldo-reg4 {
1850 + regulator-always-on;
1851 + regulator-boot-on;
1852 + regulator-min-microvolt = <850000>;
1853 + regulator-max-microvolt = <850000>;
1854 + regulator-name = "vdd_0v85_s0";
1855 +
1856 + regulator-state-mem {
1857 + regulator-off-in-suspend;
1858 + };
1859 + };
1860 +
1861 + vdd_0v75_s0: nldo-reg5 {
1862 + regulator-always-on;
1863 + regulator-boot-on;
1864 + regulator-min-microvolt = <750000>;
1865 + regulator-max-microvolt = <750000>;
1866 + regulator-name = "vdd_0v75_s0";
1867 +
1868 + regulator-state-mem {
1869 + regulator-off-in-suspend;
1870 + };
1871 + };
1872 + };
1873 + };
1874 +};
1875 +
1876 +&tsadc {
1877 + status = "okay";
1878 +};
1879 +
1880 +&uart2 {
1881 + pinctrl-0 = <&uart2m0_xfer>;
1882 + status = "okay";
1883 +};
1884 +
1885 +&u2phy2_host {
1886 + phy-supply = <&vdd_4g_3v3>;
1887 + status = "okay";
1888 +};
1889 +
1890 +&u2phy3_host {
1891 + status = "okay";
1892 +};
1893 +
1894 +&u2phy2 {
1895 + status = "okay";
1896 +};
1897 +
1898 +&u2phy3 {
1899 + status = "okay";
1900 +};
1901 +
1902 +&usb_host0_ehci {
1903 + status = "okay";
1904 +};
1905 +
1906 +&usb_host0_ohci {
1907 + status = "okay";
1908 +};
1909 +
1910 +&usb_host1_ehci {
1911 + status = "okay";
1912 +};
1913 +
1914 +&usb_host1_ohci {
1915 + status = "okay";
1916 +};