Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3588-rock-5-itx.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2024 Radxa Limited
4 * Copyright (c) 2024 Heiko Stuebner <[email protected]>
5 */
6
7 /dts-v1/;
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12 #include <dt-bindings/pinctrl/rockchip.h>
13 #include <dt-bindings/pwm/pwm.h>
14 #include <dt-bindings/soc/rockchip,vop2.h>
15 #include "dt-bindings/usb/pd.h"
16 #include "rk3588.dtsi"
17
18 / {
19 model = "Radxa ROCK 5 ITX";
20 compatible = "radxa,rock-5-itx", "rockchip,rk3588";
21
22 aliases {
23 mmc0 = &sdhci;
24 mmc1 = &sdmmc;
25 mmc2 = &sdio;
26 };
27
28 chosen {
29 stdout-path = "serial2:1500000n8";
30 };
31
32 adc_keys: adc-keys {
33 compatible = "adc-keys";
34 io-channels = <&saradc 0>;
35 io-channel-names = "buttons";
36 keyup-threshold-microvolt = <1800000>;
37 poll-interval = <100>;
38
39 button-maskrom {
40 label = "Mask Rom";
41 linux,code = <KEY_SETUP>;
42 press-threshold-microvolt = <1750>;
43 };
44 };
45
46 analog-sound {
47 compatible = "audio-graph-card";
48 label = "rk3588-es8316";
49 dais = <&i2s0_8ch_p0>;
50 hp-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
51 pinctrl-names = "default";
52 pinctrl-0 = <&hp_detect>;
53 routing = "MIC2", "Mic Jack",
54 "Headphones", "HPOL",
55 "Headphones", "HPOR";
56 widgets = "Microphone", "Mic Jack",
57 "Headphone", "Headphones";
58 };
59
60 bridge {
61 compatible = "radxa,ra620";
62
63 ports {
64 #address-cells = <1>;
65 #size-cells = <0>;
66
67 port@0 {
68 reg = <0>;
69
70 hdmi_bridge_in: endpoint {
71 remote-endpoint = <&dp1_out_con>;
72 };
73 };
74
75 port@1 {
76 reg = <1>;
77
78 hdmi_bridge_out: endpoint {
79 remote-endpoint = <&hdmi_con_in>;
80 };
81 };
82 };
83 };
84
85 gpio-leds {
86 compatible = "gpio-leds";
87 pinctrl-names = "default";
88 pinctrl-0 = <&led_pins>;
89
90 power-led1 {
91 default-state = "on";
92 gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
93 };
94
95 hdd-led2 {
96 gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
97 linux,default-trigger = "disk-activity";
98 };
99 };
100
101 hdmi0-con {
102 compatible = "hdmi-connector";
103 type = "a";
104
105 port {
106 hdmi_con_in: endpoint {
107 remote-endpoint = <&hdmi_bridge_out>;
108 };
109 };
110 };
111
112 hdmi1-con {
113 compatible = "hdmi-connector";
114 type = "a";
115
116 port {
117 hdmi1_con_in: endpoint {
118 remote-endpoint = <&hdmi1_out_con>;
119 };
120 };
121 };
122
123 /* Unnamed gated oscillator: 100MHz,3.3V,3225 */
124 pcie30_port0_refclk: pcie30_port1_refclk: pcie-oscillator {
125 compatible = "gated-fixed-clock";
126 #clock-cells = <0>;
127 clock-frequency = <100000000>;
128 clock-output-names = "pcie30_refclk";
129 vdd-supply = <&vcc3v3_pi6c_05>;
130 };
131
132 fan0: pwm-fan {
133 compatible = "pwm-fan";
134 #cooling-cells = <2>;
135 cooling-levels = <0 64 128 192 255>;
136 fan-supply = <&vcc12v_dcin>;
137 pwms = <&pwm14 0 10000 0>;
138 };
139
140 /* M.2 E-KEY */
141 sdio_pwrseq: sdio-pwrseq {
142 compatible = "mmc-pwrseq-simple";
143 clocks = <&hym8563>;
144 clock-names = "ext_clock";
145 pinctrl-names = "default";
146 pinctrl-0 = <&wifi_enable_h>;
147 reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
148 };
149
150 spdif_dit: spdif-dit {
151 compatible = "linux,spdif-dit";
152 #sound-dai-cells = <0>;
153 };
154
155 spdif_sound: spdif-sound {
156 compatible = "simple-audio-card";
157 simple-audio-card,name = "SPDIF";
158
159 simple-audio-card,cpu {
160 sound-dai = <&spdif_tx1>;
161 };
162
163 simple-audio-card,codec {
164 sound-dai = <&spdif_dit>;
165 };
166 };
167
168 typec_vin: regulator-typec-vin {
169 compatible = "regulator-fixed";
170 enable-active-high;
171 gpio = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
172 pinctrl-names = "default";
173 pinctrl-0 = <&vbus5v0_typec_en>;
174 regulator-name = "typec_vin";
175 regulator-min-microvolt = <5000000>;
176 regulator-max-microvolt = <5000000>;
177 vin-supply = <&vcc5v0_sys>;
178 };
179
180 vcc12v_dcin: regulator-vcc12v-dcin {
181 compatible = "regulator-fixed";
182 regulator-name = "vcc12v_dcin";
183 regulator-always-on;
184 regulator-boot-on;
185 regulator-min-microvolt = <12000000>;
186 regulator-max-microvolt = <12000000>;
187 };
188
189 vcc33_io64: regulator-vcc33-io64 {
190 compatible = "regulator-fixed";
191 regulator-name = "vcc33_io64";
192 regulator-always-on;
193 regulator-boot-on;
194 regulator-min-microvolt = <3300000>;
195 regulator-max-microvolt = <3300000>;
196 vin-supply = <&vcc12v_dcin>;
197 };
198
199 vcc3v3_ekey: regulator-vcc3v3-ekey {
200 compatible = "regulator-fixed";
201 enable-active-high;
202 gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
203 pinctrl-names = "default";
204 pinctrl-0 = <&ekey_en>;
205 regulator-name = "vcc3v3_ekey";
206 regulator-always-on;
207 regulator-boot-on;
208 regulator-min-microvolt = <3300000>;
209 regulator-max-microvolt = <3300000>;
210 startup-delay-us = <50000>;
211 vin-supply = <&vcc5v0_sys>;
212 };
213
214 vcc3v3_lan: vcc3v3_lan_phy2: regulator-vcc3v3-lan {
215 compatible = "regulator-fixed";
216 regulator-name = "vcc3v3_lan";
217 regulator-always-on;
218 regulator-boot-on;
219 regulator-min-microvolt = <3300000>;
220 regulator-max-microvolt = <3300000>;
221 vin-supply = <&vcc_3v3_s3>;
222 };
223
224 /* The PCIE30x4_PWREN_H controls two regulators */
225 vcc3v3_mkey: vcc3v3_pi6c_05: regulator-vcc3v3-pi6c-05 {
226 compatible = "regulator-fixed";
227 enable-active-high;
228 gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
229 pinctrl-names = "default";
230 pinctrl-0 = <&pcie30x4_pwren_h>;
231 regulator-name = "vcc3v3_pi6c_05";
232 regulator-min-microvolt = <3300000>;
233 regulator-max-microvolt = <3300000>;
234 startup-delay-us = <5000>;
235 vin-supply = <&vcc5v0_sys>;
236 };
237
238 vcc3v3_sys: regulator-vcc3v3-sys {
239 compatible = "regulator-fixed";
240 regulator-name = "vcc3v3_sys";
241 regulator-always-on;
242 regulator-boot-on;
243 regulator-min-microvolt = <3300000>;
244 regulator-max-microvolt = <3300000>;
245 vin-supply = <&vcc12v_dcin>;
246 };
247
248 vcc5v0_sys: regulator-vcc5v0-sys {
249 compatible = "regulator-fixed";
250 regulator-name = "vcc5v0_sys";
251 regulator-always-on;
252 regulator-boot-on;
253 regulator-min-microvolt = <5000000>;
254 regulator-max-microvolt = <5000000>;
255 vin-supply = <&vcc12v_dcin>;
256 };
257
258 vcc5v0_usb20: vcc5v0_usb12: vcc5v0_usb34: regulator-vcc5v0-usb {
259 compatible = "regulator-fixed";
260 enable-active-high;
261 gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
262 pinctrl-names = "default";
263 pinctrl-0 = <&usb_host_pwren_h>;
264 regulator-name = "vcc5v0_usb";
265 regulator-min-microvolt = <5000000>;
266 regulator-max-microvolt = <5000000>;
267 vin-supply = <&vcc5v0_sys>;
268 };
269
270 vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
271 compatible = "regulator-fixed";
272 regulator-name = "vcc_1v1_nldo_s3";
273 regulator-always-on;
274 regulator-boot-on;
275 regulator-min-microvolt = <1100000>;
276 regulator-max-microvolt = <1100000>;
277 vin-supply = <&vcc5v0_sys>;
278 };
279 };
280
281 &combphy0_ps {
282 status = "okay";
283 };
284
285 &combphy1_ps {
286 status = "okay";
287 };
288
289 &combphy2_psu {
290 status = "okay";
291 };
292
293 &cpu_b0 {
294 cpu-supply = <&vdd_cpu_big0_s0>;
295 };
296
297 &cpu_b1 {
298 cpu-supply = <&vdd_cpu_big0_s0>;
299 };
300
301 &cpu_b2 {
302 cpu-supply = <&vdd_cpu_big1_s0>;
303 };
304
305 &cpu_b3 {
306 cpu-supply = <&vdd_cpu_big1_s0>;
307 };
308
309 &cpu_l0 {
310 cpu-supply = <&vdd_cpu_lit_s0>;
311 };
312
313 &cpu_l1 {
314 cpu-supply = <&vdd_cpu_lit_s0>;
315 };
316
317 &cpu_l2 {
318 cpu-supply = <&vdd_cpu_lit_s0>;
319 };
320
321 &cpu_l3 {
322 cpu-supply = <&vdd_cpu_lit_s0>;
323 };
324
325 &dp1 {
326 status = "okay";
327 pinctrl-names = "default";
328 pinctrl-0 = <&dp1m0_pins>;
329 };
330
331 &dp1_in {
332 dp1_in_vp2: endpoint {
333 remote-endpoint = <&vp2_out_dp1>;
334 };
335 };
336
337 &dp1_out {
338 dp1_out_con: endpoint {
339 remote-endpoint = <&hdmi_bridge_in>;
340 };
341 };
342
343 &gpu {
344 mali-supply = <&vdd_gpu_s0>;
345 status = "okay";
346 };
347
348 &hdmi1 {
349 pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd
350 &hdmim1_tx1_scl &hdmim1_tx1_sda>;
351 status = "okay";
352 };
353
354 &hdmi1_in {
355 hdmi1_in_vp1: endpoint {
356 remote-endpoint = <&vp1_out_hdmi1>;
357 };
358 };
359
360 &hdmi1_out {
361 hdmi1_out_con: endpoint {
362 remote-endpoint = <&hdmi1_con_in>;
363 };
364 };
365
366 &hdmi1_sound {
367 status = "okay";
368 };
369
370 &hdptxphy1 {
371 status = "okay";
372 };
373
374 &i2c0 {
375 pinctrl-names = "default";
376 pinctrl-0 = <&i2c0m2_xfer>;
377 status = "okay";
378
379 vdd_cpu_big0_s0: regulator@42 {
380 compatible = "rockchip,rk8602";
381 reg = <0x42>;
382 fcs,suspend-voltage-selector = <1>;
383 regulator-name = "vdd_cpu_big0_s0";
384 regulator-always-on;
385 regulator-boot-on;
386 regulator-min-microvolt = <550000>;
387 regulator-max-microvolt = <1050000>;
388 regulator-ramp-delay = <2300>;
389 vin-supply = <&vcc5v0_sys>;
390
391 regulator-state-mem {
392 regulator-off-in-suspend;
393 };
394 };
395
396 vdd_cpu_big1_s0: regulator@43 {
397 compatible = "rockchip,rk8603", "rockchip,rk8602";
398 reg = <0x43>;
399 fcs,suspend-voltage-selector = <1>;
400 regulator-name = "vdd_cpu_big1_s0";
401 regulator-always-on;
402 regulator-boot-on;
403 regulator-min-microvolt = <550000>;
404 regulator-max-microvolt = <1050000>;
405 regulator-ramp-delay = <2300>;
406 vin-supply = <&vcc5v0_sys>;
407
408 regulator-state-mem {
409 regulator-off-in-suspend;
410 };
411 };
412 };
413
414 &i2c1 {
415 pinctrl-names = "default";
416 pinctrl-0 = <&i2c1m2_xfer>;
417 status = "okay";
418
419 vdd_npu_s0: regulator@42 {
420 compatible = "rockchip,rk8602";
421 reg = <0x42>;
422 fcs,suspend-voltage-selector = <1>;
423 regulator-name = "vdd_npu_s0";
424 regulator-always-on;
425 regulator-boot-on;
426 regulator-min-microvolt = <550000>;
427 regulator-max-microvolt = <950000>;
428 regulator-ramp-delay = <2300>;
429 vin-supply = <&vcc5v0_sys>;
430
431 regulator-state-mem {
432 regulator-off-in-suspend;
433 };
434 };
435 };
436
437 /* CAM0 connector */
438 &i2c3 {
439 pinctrl-names = "default";
440 pinctrl-0 = <&i2c3m0_xfer>;
441 };
442
443 /* M.2 E-key */
444 &i2c4 {
445 pinctrl-names = "default";
446 pinctrl-0 = <&i2c4m1_xfer>;
447 };
448
449 /* RTC and LCD0 connector */
450 &i2c6 {
451 pinctrl-names = "default";
452 pinctrl-0 = <&i2c6m0_xfer>;
453 status = "okay";
454
455 hym8563: rtc@51 {
456 compatible = "haoyu,hym8563";
457 reg = <0x51>;
458 #clock-cells = <0>;
459 clock-output-names = "wifi_32kout";
460 interrupt-parent = <&gpio0>;
461 interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
462 pinctrl-names = "default";
463 pinctrl-0 = <&rtc_int>;
464 };
465 };
466
467 /* Audio codec and CAM1 connector */
468 &i2c7 {
469 pinctrl-names = "default";
470 pinctrl-0 = <&i2c7m0_xfer>;
471 status = "okay";
472
473 es8316: audio-codec@11 {
474 compatible = "everest,es8316";
475 reg = <0x11>;
476 assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
477 assigned-clock-rates = <12288000>;
478 clocks = <&cru I2S0_8CH_MCLKOUT>;
479 clock-names = "mclk";
480 #sound-dai-cells = <0>;
481
482 port {
483 es8316_p0_0: endpoint {
484 remote-endpoint = <&i2s0_8ch_p0_0>;
485 };
486 };
487 };
488 };
489
490 /* FUSB302 and LCD1 connector */
491 &i2c8 {
492 pinctrl-names = "default";
493 pinctrl-0 = <&i2c8m4_xfer>;
494 status = "okay";
495
496 usbc0: usb-typec@22 {
497 compatible = "fcs,fusb302";
498 reg = <0x22>;
499 interrupt-parent = <&gpio3>;
500 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
501 pinctrl-names = "default";
502 pinctrl-0 = <&usbc0_int>;
503 vbus-supply = <&typec_vin>;
504
505 usb_con: connector {
506 compatible = "usb-c-connector";
507 data-role = "dual";
508 label = "USB-C";
509 power-role = "source";
510 source-pdos =
511 <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
512
513 ports {
514 #address-cells = <1>;
515 #size-cells = <0>;
516
517 port@0 {
518 reg = <0>;
519
520 usbc0_orien_sw: endpoint {
521 remote-endpoint = <&usbdp_phy0_orientation_switch>;
522 };
523 };
524
525 port@1 {
526 reg = <1>;
527
528 usbc0_role_sw: endpoint {
529 remote-endpoint = <&dwc3_0_role_switch>;
530 };
531 };
532
533 port@2 {
534 reg = <2>;
535
536 dp_altmode_mux: endpoint {
537 remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
538 };
539 };
540 };
541 };
542 };
543 };
544
545 &i2c8m4_xfer {
546 rockchip,pins =
547 /* i2c8_scl_m4 */
548 <3 RK_PC2 9 &pcfg_pull_up_drv_level_6>,
549 /* i2c8_sda_m4 */
550 <3 RK_PC3 9 &pcfg_pull_up_drv_level_6>;
551 };
552
553 &i2s0_8ch {
554 pinctrl-names = "default";
555 pinctrl-0 = <&i2s0_lrck
556 &i2s0_mclk
557 &i2s0_sclk
558 &i2s0_sdi0
559 &i2s0_sdo0>;
560 status = "okay";
561
562 i2s0_8ch_p0: port {
563 i2s0_8ch_p0_0: endpoint {
564 dai-format = "i2s";
565 mclk-fs = <256>;
566 remote-endpoint = <&es8316_p0_0>;
567 };
568 };
569 };
570
571 /* HDMI1 ("HDMI TX1 8K") audio */
572 &i2s6_8ch {
573 status = "okay";
574 };
575
576 &package_thermal {
577 polling-delay = <1000>;
578
579 trips {
580 package_fan0: package-fan0 {
581 hysteresis = <2000>;
582 temperature = <50000>;
583 type = "active";
584 };
585
586 package_fan1: package-fan1 {
587 hysteresis = <2000>;
588 temperature = <65000>;
589 type = "active";
590 };
591 };
592
593 cooling-maps {
594 map0 {
595 cooling-device = <&fan0 THERMAL_NO_LIMIT 1>;
596 trip = <&package_fan0>;
597 };
598 map1 {
599 cooling-device = <&fan0 2 THERMAL_NO_LIMIT>;
600 trip = <&package_fan1>;
601 };
602 };
603 };
604
605 /* M.2 E-key */
606 &pcie2x1l0 {
607 pinctrl-names = "default";
608 pinctrl-0 = <&pcie30x1_0_perstn_m1_l>;
609 reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
610 vpcie3v3-supply = <&vcc3v3_ekey>;
611 status = "okay";
612 };
613
614 /* RTL8125B_1 */
615 &pcie2x1l1 {
616 pinctrl-names = "default";
617 pinctrl-0 = <&pcie30x1_1_perstn>;
618 reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
619 vpcie3v3-supply = <&vcc3v3_lan>;
620 status = "okay";
621 };
622
623 /* RTL8125B_2 */
624 &pcie2x1l2 {
625 pinctrl-names = "default";
626 pinctrl-0 = <&pcie20x1_2_perstn>;
627 reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
628 vpcie3v3-supply = <&vcc3v3_lan_phy2>;
629 status = "okay";
630 };
631
632 &pcie30phy {
633 data-lanes = <1 1 2 2>;
634 /* separate clock lines from the clock generator to phy and devices */
635 rockchip,rx-common-refclk-mode = <0 0 0 0>;
636 status = "okay";
637 };
638
639 /* ASMedia ASM1164 Sata controller */
640 &pcie3x2 {
641 /*
642 * The board has a "pcie_refclk" oscillator that needs enabling,
643 * so add it to the list of clocks.
644 */
645 clocks = <&cru ACLK_PCIE_2L_MSTR>, <&cru ACLK_PCIE_2L_SLV>,
646 <&cru ACLK_PCIE_2L_DBI>, <&cru PCLK_PCIE_2L>,
647 <&cru CLK_PCIE_AUX1>, <&cru CLK_PCIE2L_PIPE>,
648 <&pcie30_port1_refclk>;
649 clock-names = "aclk_mst", "aclk_slv",
650 "aclk_dbi", "pclk",
651 "aux", "pipe",
652 "ref";
653 pinctrl-names = "default";
654 pinctrl-0 = <&pcie30x2_perstn_m1_l>;
655 reset-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
656 vpcie3v3-supply = <&vcc33_io64>;
657 status = "okay";
658 };
659
660 /* M.2 M.key */
661 &pcie3x4 {
662 /*
663 * The board has a "pcie_refclk" oscillator that needs enabling,
664 * so add it to the list of clocks.
665 */
666 clocks = <&cru ACLK_PCIE_4L_MSTR>, <&cru ACLK_PCIE_4L_SLV>,
667 <&cru ACLK_PCIE_4L_DBI>, <&cru PCLK_PCIE_4L>,
668 <&cru CLK_PCIE_AUX0>, <&cru CLK_PCIE4L_PIPE>,
669 <&pcie30_port0_refclk>;
670 clock-names = "aclk_mst", "aclk_slv",
671 "aclk_dbi", "pclk",
672 "aux", "pipe",
673 "ref";
674 num-lanes = <2>;
675 pinctrl-names = "default";
676 pinctrl-0 = <&pcie30x4_perstn_m1_l>;
677 reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
678 vpcie3v3-supply = <&vcc3v3_mkey>;
679 status = "okay";
680 };
681
682 &pd_gpu {
683 domain-supply = <&vdd_gpu_s0>;
684 };
685
686 &pinctrl {
687 hym8563 {
688 rtc_int: rtc-int {
689 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
690 };
691 };
692
693 leds {
694 led_pins: led-pins {
695 rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>,
696 <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
697 };
698 };
699
700 mmc {
701 sdmmc_det_pin: sdmmc-det-pin {
702 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
703 };
704 };
705
706 pcie {
707 pcie20x1_2_perstn: pcie20x1-2-perstn {
708 rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
709 };
710
711 pcie30x1_0_perstn_m1_l: pcie30x1-0-perstn-m1-l {
712 rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
713 };
714
715 pcie30x1_1_perstn: pcie30x1-1-perstn {
716 rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
717 };
718
719 pcie30x2_perstn_m1_l: pcie30x2-perstn-m1-l {
720 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
721 };
722
723 pcie30x4_perstn_m1_l: pcie30x4-perstn-m1-l {
724 rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
725 };
726
727 ekey_en: ekey-en {
728 rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_down>;
729 };
730
731 pcie30x4_pwren_h: pcie30x4-pwren-h {
732 rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
733 };
734 };
735
736 sound {
737 hp_detect: hp-detect {
738 rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
739 };
740 };
741
742 usb {
743 usb_host_pwren_h: usb-host-pwren-h {
744 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
745 };
746
747 vcc5v0_otg_en: vcc5v0-otg-en {
748 rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
749 };
750
751 gl3523_reset: rl3523-reset {
752 rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
753 };
754 };
755
756 usb-typec {
757 usbc0_int: usbc0-int {
758 rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
759 };
760
761 vbus5v0_typec_en: vbus5v0-typec-en {
762 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
763 };
764 };
765
766 hdmirx {
767 hdmirx_det: hdmirx-det {
768 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
769 };
770 };
771
772 sdio-pwrseq {
773 wifi_enable_h: wifi-enable-h {
774 rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
775 };
776 };
777
778 wireless-wlan {
779 wifi_host_wake_irq: wifi-host-wake-irq {
780 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;
781 };
782 };
783
784 bt {
785 bt_enable_h: bt-enable-h {
786 rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
787 };
788
789 bt_host_wake_l: bt-host-wake-l {
790 rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
791 };
792
793 bt_wake_l: bt-wake-l {
794 rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
795 };
796 };
797
798 dp {
799 dp1_hpd: dp1-hpd {
800 rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
801 };
802 };
803 };
804
805 &pwm14 {
806 pinctrl-names = "default";
807 pinctrl-0 = <&pwm14m1_pins>;
808 status = "okay";
809 };
810
811 &saradc {
812 vref-supply = <&avcc_1v8_s0>;
813 status = "okay";
814 };
815
816 &sdhci {
817 bus-width = <8>;
818 max-frequency = <150000000>;
819 mmc-hs400-1_8v;
820 mmc-hs400-enhanced-strobe;
821 no-sdio;
822 no-sd;
823 non-removable;
824 status = "okay";
825 };
826
827 &sdmmc {
828 bus-width = <4>;
829 cap-mmc-highspeed;
830 cap-sd-highspeed;
831 cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
832 disable-wp;
833 no-sdio;
834 no-mmc;
835 pinctrl-names = "default";
836 pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det_pin>;
837 sd-uhs-sdr104;
838 vmmc-supply = <&vcc_3v3_s3>;
839 vqmmc-supply = <&vccio_sd_s0>;
840 status = "okay";
841 };
842
843 /* M.2 E-KEY */
844 &sdio {
845 broken-cd;
846 bus-width = <4>;
847 cap-sdio-irq;
848 keep-power-in-suspend;
849 max-frequency = <150000000>;
850 mmc-pwrseq = <&sdio_pwrseq>;
851 no-sd;
852 no-mmc;
853 non-removable;
854 pinctrl-names = "default";
855 pinctrl-0 = <&sdiom0_pins>;
856 sd-uhs-sdr104;
857 vmmc-supply = <&vcc3v3_ekey>;
858 status = "okay";
859 };
860
861 &sfc {
862 pinctrl-names = "default";
863 pinctrl-0 = <&fspim2_pins>;
864 status = "okay";
865
866 spi_flash: flash@0 {
867 compatible = "jedec,spi-nor";
868 reg = <0x0>;
869 spi-max-frequency = <50000000>;
870 spi-rx-bus-width = <4>;
871 spi-tx-bus-width = <1>;
872 };
873 };
874
875 &spdif_tx1 {
876 pinctrl-0 = <&spdif1m2_tx>;
877 status = "okay";
878 };
879
880 &spi2 {
881 status = "okay";
882 assigned-clocks = <&cru CLK_SPI2>;
883 assigned-clock-rates = <200000000>;
884 num-cs = <1>;
885 pinctrl-names = "default";
886 pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
887
888 pmic@0 {
889 compatible = "rockchip,rk806";
890 reg = <0x0>;
891 gpio-controller;
892 #gpio-cells = <2>;
893 interrupt-parent = <&gpio0>;
894 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
895 pinctrl-names = "default";
896 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
897 <&rk806_dvs2_null>, <&rk806_dvs3_null>;
898 spi-max-frequency = <1000000>;
899 system-power-controller;
900
901 vcc1-supply = <&vcc5v0_sys>;
902 vcc2-supply = <&vcc5v0_sys>;
903 vcc3-supply = <&vcc5v0_sys>;
904 vcc4-supply = <&vcc5v0_sys>;
905 vcc5-supply = <&vcc5v0_sys>;
906 vcc6-supply = <&vcc5v0_sys>;
907 vcc7-supply = <&vcc5v0_sys>;
908 vcc8-supply = <&vcc5v0_sys>;
909 vcc9-supply = <&vcc5v0_sys>;
910 vcc10-supply = <&vcc5v0_sys>;
911 vcc11-supply = <&vcc_2v0_pldo_s3>;
912 vcc12-supply = <&vcc5v0_sys>;
913 vcc13-supply = <&vcc_1v1_nldo_s3>;
914 vcc14-supply = <&vcc_1v1_nldo_s3>;
915 vcca-supply = <&vcc5v0_sys>;
916
917 rk806_dvs1_null: dvs1-null-pins {
918 pins = "gpio_pwrctrl1";
919 function = "pin_fun0";
920 };
921
922 rk806_dvs2_null: dvs2-null-pins {
923 pins = "gpio_pwrctrl2";
924 function = "pin_fun0";
925 };
926
927 rk806_dvs3_null: dvs3-null-pins {
928 pins = "gpio_pwrctrl3";
929 function = "pin_fun0";
930 };
931
932 regulators {
933 vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
934 regulator-boot-on;
935 regulator-min-microvolt = <550000>;
936 regulator-max-microvolt = <950000>;
937 regulator-ramp-delay = <12500>;
938 regulator-name = "vdd_gpu_s0";
939 regulator-enable-ramp-delay = <400>;
940
941 regulator-state-mem {
942 regulator-off-in-suspend;
943 };
944 };
945
946 vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
947 regulator-always-on;
948 regulator-boot-on;
949 regulator-min-microvolt = <550000>;
950 regulator-max-microvolt = <950000>;
951 regulator-ramp-delay = <12500>;
952 regulator-name = "vdd_cpu_lit_s0";
953
954 regulator-state-mem {
955 regulator-off-in-suspend;
956 };
957 };
958
959 vdd_log_s0: dcdc-reg3 {
960 regulator-always-on;
961 regulator-boot-on;
962 regulator-min-microvolt = <675000>;
963 regulator-max-microvolt = <750000>;
964 regulator-ramp-delay = <12500>;
965 regulator-name = "vdd_log_s0";
966
967 regulator-state-mem {
968 regulator-on-in-suspend;
969 regulator-suspend-microvolt = <750000>;
970 };
971 };
972
973 vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
974 regulator-always-on;
975 regulator-boot-on;
976 regulator-min-microvolt = <550000>;
977 regulator-max-microvolt = <950000>;
978 regulator-ramp-delay = <12500>;
979 regulator-name = "vdd_vdenc_s0";
980
981 regulator-state-mem {
982 regulator-off-in-suspend;
983 };
984 };
985
986 vdd_ddr_s0: dcdc-reg5 {
987 regulator-always-on;
988 regulator-boot-on;
989 regulator-min-microvolt = <675000>;
990 regulator-max-microvolt = <900000>;
991 regulator-ramp-delay = <12500>;
992 regulator-name = "vdd_ddr_s0";
993
994 regulator-state-mem {
995 regulator-off-in-suspend;
996 regulator-suspend-microvolt = <850000>;
997 };
998 };
999
1000 vdd2_ddr_s3: dcdc-reg6 {
1001 regulator-always-on;
1002 regulator-boot-on;
1003 regulator-name = "vdd2_ddr_s3";
1004
1005 regulator-state-mem {
1006 regulator-on-in-suspend;
1007 };
1008 };
1009
1010 vcc_2v0_pldo_s3: dcdc-reg7 {
1011 regulator-always-on;
1012 regulator-boot-on;
1013 regulator-min-microvolt = <2000000>;
1014 regulator-max-microvolt = <2000000>;
1015 regulator-ramp-delay = <12500>;
1016 regulator-name = "vdd_2v0_pldo_s3";
1017
1018 regulator-state-mem {
1019 regulator-on-in-suspend;
1020 regulator-suspend-microvolt = <2000000>;
1021 };
1022 };
1023
1024 vcc_3v3_s3: dcdc-reg8 {
1025 regulator-always-on;
1026 regulator-boot-on;
1027 regulator-min-microvolt = <3300000>;
1028 regulator-max-microvolt = <3300000>;
1029 regulator-name = "vcc_3v3_s3";
1030
1031 regulator-state-mem {
1032 regulator-on-in-suspend;
1033 regulator-suspend-microvolt = <3300000>;
1034 };
1035 };
1036
1037 vddq_ddr_s0: dcdc-reg9 {
1038 regulator-always-on;
1039 regulator-boot-on;
1040 regulator-name = "vddq_ddr_s0";
1041
1042 regulator-state-mem {
1043 regulator-off-in-suspend;
1044 };
1045 };
1046
1047 vcc_1v8_s3: dcdc-reg10 {
1048 regulator-always-on;
1049 regulator-boot-on;
1050 regulator-min-microvolt = <1800000>;
1051 regulator-max-microvolt = <1800000>;
1052 regulator-name = "vcc_1v8_s3";
1053
1054 regulator-state-mem {
1055 regulator-on-in-suspend;
1056 regulator-suspend-microvolt = <1800000>;
1057 };
1058 };
1059
1060 avcc_1v8_s0: pldo-reg1 {
1061 regulator-always-on;
1062 regulator-boot-on;
1063 regulator-min-microvolt = <1800000>;
1064 regulator-max-microvolt = <1800000>;
1065 regulator-name = "avcc_1v8_s0";
1066
1067 regulator-state-mem {
1068 regulator-on-in-suspend;
1069 regulator-suspend-microvolt = <1800000>;
1070 };
1071 };
1072
1073 vcc_1v8_s0: pldo-reg2 {
1074 regulator-always-on;
1075 regulator-boot-on;
1076 regulator-min-microvolt = <1800000>;
1077 regulator-max-microvolt = <1800000>;
1078 regulator-name = "vcc_1v8_s0";
1079
1080 regulator-state-mem {
1081 regulator-on-in-suspend;
1082 regulator-suspend-microvolt = <1800000>;
1083 };
1084 };
1085
1086 avdd_1v2_s0: pldo-reg3 {
1087 regulator-always-on;
1088 regulator-boot-on;
1089 regulator-min-microvolt = <1200000>;
1090 regulator-max-microvolt = <1200000>;
1091 regulator-name = "avdd_1v2_s0";
1092
1093 regulator-state-mem {
1094 regulator-off-in-suspend;
1095 };
1096 };
1097
1098 vcc_3v3_s0: pldo-reg4 {
1099 regulator-always-on;
1100 regulator-boot-on;
1101 regulator-min-microvolt = <3300000>;
1102 regulator-max-microvolt = <3300000>;
1103 regulator-ramp-delay = <12500>;
1104 regulator-name = "vcc_3v3_s0";
1105
1106 regulator-state-mem {
1107 regulator-on-in-suspend;
1108 regulator-suspend-microvolt = <3300000>;
1109 };
1110 };
1111
1112 vccio_sd_s0: pldo-reg5 {
1113 regulator-always-on;
1114 regulator-boot-on;
1115 regulator-min-microvolt = <1800000>;
1116 regulator-max-microvolt = <3300000>;
1117 regulator-ramp-delay = <12500>;
1118 regulator-name = "vccio_sd_s0";
1119
1120 regulator-state-mem {
1121 regulator-off-in-suspend;
1122 };
1123 };
1124
1125 pldo6_s3: pldo-reg6 {
1126 regulator-always-on;
1127 regulator-boot-on;
1128 regulator-min-microvolt = <1800000>;
1129 regulator-max-microvolt = <1800000>;
1130 regulator-name = "pldo6_s3";
1131
1132 regulator-state-mem {
1133 regulator-on-in-suspend;
1134 regulator-suspend-microvolt = <1800000>;
1135 };
1136 };
1137
1138 vdd_0v75_s3: nldo-reg1 {
1139 regulator-always-on;
1140 regulator-boot-on;
1141 regulator-min-microvolt = <750000>;
1142 regulator-max-microvolt = <750000>;
1143 regulator-name = "vdd_0v75_s3";
1144
1145 regulator-state-mem {
1146 regulator-on-in-suspend;
1147 regulator-suspend-microvolt = <750000>;
1148 };
1149 };
1150
1151 vdd_ddr_pll_s0: nldo-reg2 {
1152 regulator-always-on;
1153 regulator-boot-on;
1154 regulator-min-microvolt = <850000>;
1155 regulator-max-microvolt = <850000>;
1156 regulator-name = "vdd_ddr_pll_s0";
1157
1158 regulator-state-mem {
1159 regulator-on-in-suspend;
1160 regulator-suspend-microvolt = <850000>;
1161 };
1162 };
1163
1164 avdd_0v75_s0: nldo-reg3 {
1165 regulator-always-on;
1166 regulator-boot-on;
1167 regulator-min-microvolt = <750000>;
1168 regulator-max-microvolt = <750000>;
1169 regulator-name = "avdd_0v75_s0";
1170
1171 regulator-state-mem {
1172 regulator-off-in-suspend;
1173 };
1174 };
1175
1176 vdd_0v85_s0: nldo-reg4 {
1177 regulator-always-on;
1178 regulator-boot-on;
1179 regulator-min-microvolt = <850000>;
1180 regulator-max-microvolt = <850000>;
1181 regulator-name = "vdd_0v85_s0";
1182
1183 regulator-state-mem {
1184 regulator-on-in-suspend;
1185 regulator-suspend-microvolt = <837500>;
1186 };
1187 };
1188
1189 vdd_0v75_s0: nldo-reg5 {
1190 regulator-always-on;
1191 regulator-boot-on;
1192 regulator-min-microvolt = <750000>;
1193 regulator-max-microvolt = <750000>;
1194 regulator-name = "vdd_0v75_s0";
1195
1196 regulator-state-mem {
1197 regulator-on-in-suspend;
1198 regulator-suspend-microvolt = <750000>;
1199 };
1200 };
1201 };
1202 };
1203 };
1204
1205 &tsadc {
1206 status = "okay";
1207 };
1208
1209 &uart2 {
1210 pinctrl-0 = <&uart2m0_xfer>;
1211 status = "okay";
1212 };
1213
1214 /* Connected to M.2 E-key */
1215 &uart6 {
1216 pinctrl-names = "default";
1217 pinctrl-0 = <&uart6m1_xfer &uart6m1_ctsn &uart6m1_rtsn>;
1218 status = "okay";
1219 };
1220
1221 &u2phy0 {
1222 status = "okay";
1223 };
1224
1225 &u2phy0_otg {
1226 status = "okay";
1227 };
1228
1229 &u2phy1 {
1230 status = "okay";
1231 };
1232
1233 &u2phy1_otg {
1234 /* connected to USB3 hub, which is powered by vcc5v0_usb12 */
1235 phy-supply = <&vcc5v0_usb12>;
1236 status = "okay";
1237 };
1238
1239 &u2phy2 {
1240 status = "okay";
1241 };
1242
1243 &u2phy2_host {
1244 /* connected to USB2 hub, which is powered by vcc5v0_usb20 */
1245 phy-supply = <&vcc5v0_usb20>;
1246 status = "okay";
1247 };
1248
1249 &u2phy3 {
1250 status = "okay";
1251 };
1252
1253 &u2phy3_host {
1254 phy-supply = <&vcc5v0_usb20>;
1255 status = "okay";
1256 };
1257
1258 &usb_host0_ehci {
1259 status = "okay";
1260 };
1261
1262 &usb_host0_ohci {
1263 status = "okay";
1264 };
1265
1266 &usb_host1_ehci {
1267 status = "okay";
1268 };
1269
1270 &usb_host1_ohci {
1271 status = "okay";
1272 };
1273
1274 &usb_host0_xhci {
1275 usb-role-switch;
1276 status = "okay";
1277
1278 port {
1279 #address-cells = <1>;
1280 #size-cells = <0>;
1281
1282 dwc3_0_role_switch: endpoint@0 {
1283 reg = <0>;
1284 remote-endpoint = <&usbc0_role_sw>;
1285 };
1286 };
1287 };
1288
1289 &usb_host1_xhci {
1290 dr_mode = "host";
1291 #address-cells = <1>;
1292 #size-cells = <0>;
1293 status = "okay";
1294
1295 /* 2.0 hub on port 1 */
1296 hub_2_0: hub@1 {
1297 compatible = "usb5e3,610";
1298 reg = <1>;
1299 peer-hub = <&hub_3_0>;
1300 vdd-supply = <&vcc_3v3_s3>;
1301 };
1302
1303 /* 3.0 hub on port 4 */
1304 hub_3_0: hub@2 {
1305 compatible = "usb5e3,620";
1306 reg = <2>;
1307 peer-hub = <&hub_2_0>;
1308 pinctrl-names = "default";
1309 pinctrl-0 = <&gl3523_reset>;
1310 reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
1311 vdd-supply = <&vcc_3v3_s3>;
1312 };
1313 };
1314
1315 &usbdp_phy0 {
1316 mode-switch;
1317 orientation-switch;
1318 sbu1-dc-gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_HIGH>;
1319 sbu2-dc-gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>;
1320 status = "okay";
1321
1322 port {
1323 #address-cells = <1>;
1324 #size-cells = <0>;
1325 usbdp_phy0_orientation_switch: endpoint@0 {
1326 reg = <0>;
1327 remote-endpoint = <&usbc0_orien_sw>;
1328 };
1329
1330 usbdp_phy0_dp_altmode_mux: endpoint@1 {
1331 reg = <1>;
1332 remote-endpoint = <&dp_altmode_mux>;
1333 };
1334 };
1335 };
1336
1337 &usbdp_phy1 {
1338 rockchip,dp-lane-mux = <2 3>;
1339 status = "okay";
1340 };
1341
1342 &vop {
1343 status = "okay";
1344 };
1345
1346 &vop_mmu {
1347 status = "okay";
1348 };
1349
1350 &vp1 {
1351 vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
1352 reg = <ROCKCHIP_VOP2_EP_HDMI1>;
1353 remote-endpoint = <&hdmi1_in_vp1>;
1354 };
1355 };
1356
1357 &vp2 {
1358 vp2_out_dp1: endpoint@b {
1359 reg = <ROCKCHIP_VOP2_EP_DP1>;
1360 remote-endpoint = <&dp1_in_vp2>;
1361 };
1362 };