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