]> git.ipfire.org Git - thirdparty/linux.git/blame - arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
Merge tag 'io_uring-5.7-2020-05-22' of git://git.kernel.dk/linux-block
[thirdparty/linux.git] / arch / arm64 / boot / dts / rockchip / rk3399-pinebook-pro.dts
CommitLineData
5a65505a
TS
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com>
5 * Copyright (c) 2020 Tobias Schramm <t.schramm@manjaro.org>
6 */
7
8/dts-v1/;
9#include <dt-bindings/input/gpio-keys.h>
10#include <dt-bindings/input/linux-event-codes.h>
11#include <dt-bindings/pwm/pwm.h>
12#include <dt-bindings/usb/pd.h>
13#include <dt-bindings/leds/common.h>
14#include "rk3399.dtsi"
15#include "rk3399-opp.dtsi"
16
17/ {
18 model = "Pine64 Pinebook Pro";
19 compatible = "pine64,pinebook-pro", "rockchip,rk3399";
20
21 chosen {
22 stdout-path = "serial2:1500000n8";
23 };
24
25 backlight: edp-backlight {
26 compatible = "pwm-backlight";
27 power-supply = <&vcc_12v>;
28 pwms = <&pwm0 0 740740 0>;
29 };
30
31 edp_panel: edp-panel {
32 compatible = "boe,nv140fhmn49";
33 backlight = <&backlight>;
34 enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
35 pinctrl-names = "default";
36 pinctrl-0 = <&panel_en_gpio>;
37 power-supply = <&vcc3v3_panel>;
38
39 ports {
40 #address-cells = <1>;
41 #size-cells = <0>;
42
43 port@0 {
44 reg = <0>;
45 #address-cells = <1>;
46 #size-cells = <0>;
47
48 panel_in_edp: endpoint@0 {
49 reg = <0>;
50 remote-endpoint = <&edp_out_panel>;
51 };
52 };
53 };
54 };
55
56 /*
57 * Use separate nodes for gpio-keys to allow for selective deactivation
58 * of wakeup sources via sysfs without disabling the whole key
59 */
60 gpio-key-lid {
61 compatible = "gpio-keys";
62 pinctrl-names = "default";
63 pinctrl-0 = <&lidbtn_gpio>;
64
65 lid {
66 debounce-interval = <20>;
67 gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_LOW>;
68 label = "Lid";
69 linux,code = <SW_LID>;
70 linux,input-type = <EV_SW>;
71 wakeup-event-action = <EV_ACT_DEASSERTED>;
72 wakeup-source;
73 };
74 };
75
76 gpio-key-power {
77 compatible = "gpio-keys";
78 pinctrl-names = "default";
79 pinctrl-0 = <&pwrbtn_gpio>;
80
81 power {
82 debounce-interval = <20>;
83 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
84 label = "Power";
85 linux,code = <KEY_POWER>;
86 wakeup-source;
87 };
88 };
89
90 leds {
91 compatible = "gpio-leds";
92 pinctrl-names = "default";
93 pinctrl-0 = <&pwrled_gpio &slpled_gpio>;
94
95 green-led {
96 color = <LED_COLOR_ID_GREEN>;
97 default-state = "on";
98 function = LED_FUNCTION_POWER;
99 gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
100 label = "green:power";
101 };
102
103 red-led {
104 color = <LED_COLOR_ID_RED>;
105 default-state = "off";
106 function = LED_FUNCTION_STANDBY;
107 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
108 label = "red:standby";
109 panic-indicator;
110 retain-state-suspended;
111 };
112 };
113
114 /* Power sequence for SDIO WiFi module */
115 sdio_pwrseq: sdio-pwrseq {
116 compatible = "mmc-pwrseq-simple";
117 clocks = <&rk808 1>;
118 clock-names = "ext_clock";
119 pinctrl-names = "default";
120 pinctrl-0 = <&wifi_enable_h_gpio>;
121 post-power-on-delay-ms = <100>;
122 power-off-delay-us = <500000>;
123
124 /* WL_REG_ON on module */
125 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
126 };
127
128 /* Audio components */
129 es8316-sound {
130 compatible = "simple-audio-card";
131 pinctrl-names = "default";
132 pinctrl-0 = <&hp_det_gpio>;
133 simple-audio-card,name = "rockchip,es8316-codec";
134 simple-audio-card,format = "i2s";
135 simple-audio-card,mclk-fs = <256>;
136
137 simple-audio-card,widgets =
138 "Microphone", "Mic Jack",
139 "Headphone", "Headphones",
140 "Speaker", "Speaker";
141 simple-audio-card,routing =
142 "MIC1", "Mic Jack",
143 "Headphones", "HPOL",
144 "Headphones", "HPOR",
145 "Speaker Amplifier INL", "HPOL",
146 "Speaker Amplifier INR", "HPOR",
147 "Speaker", "Speaker Amplifier OUTL",
148 "Speaker", "Speaker Amplifier OUTR";
149
40df91a8 150 simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
5a65505a
TS
151 simple-audio-card,aux-devs = <&speaker_amp>;
152 simple-audio-card,pin-switches = "Speaker";
153
154 simple-audio-card,cpu {
155 sound-dai = <&i2s1>;
156 };
157
158 simple-audio-card,codec {
159 sound-dai = <&es8316>;
160 };
161 };
162
163 speaker_amp: speaker-amplifier {
164 compatible = "simple-audio-amplifier";
165 enable-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>;
166 sound-name-prefix = "Speaker Amplifier";
167 VCC-supply = <&pa_5v>;
168 };
169
170 /* Power tree */
171 /* Root power source */
172 vcc_sysin: vcc-sysin {
173 compatible = "regulator-fixed";
174 regulator-name = "vcc_sysin";
175 regulator-always-on;
176 regulator-boot-on;
177 };
178
179 /* Regulators supplied by vcc_sysin */
180 /* LCD backlight supply */
181 vcc_12v: vcc-12v {
182 compatible = "regulator-fixed";
183 regulator-name = "vcc_12v";
184 regulator-always-on;
185 regulator-boot-on;
186 regulator-min-microvolt = <12000000>;
187 regulator-max-microvolt = <12000000>;
188 vin-supply = <&vcc_sysin>;
189
190 regulator-state-mem {
191 regulator-off-in-suspend;
192 };
193 };
194
195 /* Main 3.3 V supply */
196 vcc3v3_sys: wifi_bat: vcc3v3-sys {
197 compatible = "regulator-fixed";
198 regulator-name = "vcc3v3_sys";
199 regulator-always-on;
200 regulator-boot-on;
201 regulator-min-microvolt = <3300000>;
202 regulator-max-microvolt = <3300000>;
203 vin-supply = <&vcc_sysin>;
204
205 regulator-state-mem {
206 regulator-on-in-suspend;
207 };
208 };
209
210 /* 5 V USB power supply */
211 vcc5v0_usb: pa_5v: vcc5v0-usb-regulator {
212 compatible = "regulator-fixed";
213 enable-active-high;
214 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
215 pinctrl-names = "default";
216 pinctrl-0 = <&pwr_5v_gpio>;
217 regulator-name = "vcc5v0_usb";
218 regulator-always-on;
219 regulator-min-microvolt = <5000000>;
220 regulator-max-microvolt = <5000000>;
221 vin-supply = <&vcc_sysin>;
222
223 regulator-state-mem {
224 regulator-off-in-suspend;
225 };
226 };
227
228 /* RK3399 logic supply */
229 vdd_log: vdd-log {
230 compatible = "pwm-regulator";
231 pwms = <&pwm2 0 25000 1>;
232 regulator-name = "vdd_log";
233 regulator-always-on;
234 regulator-boot-on;
235 regulator-min-microvolt = <800000>;
236 regulator-max-microvolt = <1400000>;
237 vin-supply = <&vcc_sysin>;
238
239 regulator-state-mem {
240 regulator-on-in-suspend;
241 };
242 };
243
244 /* Regulators supplied by vcc3v3_sys */
245 /* 0.9 V supply, always on */
246 vcc_0v9: vcc-0v9 {
247 compatible = "regulator-fixed";
248 regulator-name = "vcc_0v9";
249 regulator-always-on;
250 regulator-boot-on;
251 regulator-min-microvolt = <900000>;
252 regulator-max-microvolt = <900000>;
253 vin-supply = <&vcc3v3_sys>;
254 };
255
256 /* S3 1.8 V supply, switched by vcc1v8_s3 */
257 vcca1v8_s3: vcc1v8-s3 {
258 compatible = "regulator-fixed";
259 regulator-name = "vcca1v8_s3";
260 regulator-always-on;
261 regulator-boot-on;
262 regulator-min-microvolt = <1800000>;
263 regulator-max-microvolt = <1800000>;
264 vin-supply = <&vcc3v3_sys>;
265 };
266
267 /* micro SD card power */
268 vcc3v0_sd: vcc3v0-sd {
269 compatible = "regulator-fixed";
270 enable-active-high;
271 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
272 pinctrl-names = "default";
273 pinctrl-0 = <&sdmmc0_pwr_h_gpio>;
274 regulator-name = "vcc3v0_sd";
275 regulator-always-on;
276 regulator-min-microvolt = <3000000>;
277 regulator-max-microvolt = <3000000>;
278 vin-supply = <&vcc3v3_sys>;
279
280 regulator-state-mem {
281 regulator-off-in-suspend;
282 };
283 };
284
285 /* LCD panel power, called VCC3V3_S0 in schematic */
286 vcc3v3_panel: vcc3v3-panel {
287 compatible = "regulator-fixed";
288 enable-active-high;
289 gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
290 pinctrl-names = "default";
291 pinctrl-0 = <&lcdvcc_en_gpio>;
292 regulator-name = "vcc3v3_panel";
293 regulator-always-on;
294 regulator-min-microvolt = <3300000>;
295 regulator-max-microvolt = <3300000>;
296 regulator-enable-ramp-delay = <100000>;
297 vin-supply = <&vcc3v3_sys>;
298
299 regulator-state-mem {
300 regulator-off-in-suspend;
301 };
302 };
303
304 /* M.2 adapter power, switched by vcc1v8_s3 */
305 vcc3v3_ssd: vcc3v3-ssd {
306 compatible = "regulator-fixed";
307 regulator-name = "vcc3v3_ssd";
308 regulator-min-microvolt = <3300000>;
309 regulator-max-microvolt = <3300000>;
310 vin-supply = <&vcc3v3_sys>;
311 };
312
313 /* Regulators supplied by vcc5v0_usb */
314 /* USB 3 port power supply regulator */
315 vcc5v0_otg: vcc5v0-otg {
316 compatible = "regulator-fixed";
317 enable-active-high;
318 gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
319 pinctrl-names = "default";
320 pinctrl-0 = <&vcc5v0_host_en_gpio>;
321 regulator-name = "vcc5v0_otg";
322 regulator-always-on;
323 regulator-min-microvolt = <5000000>;
324 regulator-max-microvolt = <5000000>;
325 vin-supply = <&vcc5v0_usb>;
326
327 regulator-state-mem {
328 regulator-off-in-suspend;
329 };
330 };
331
332 /* Regulators supplied by vcc5v0_usb */
333 /* Type C port power supply regulator */
334 vbus_5vout: vbus_typec: vbus-5vout {
335 compatible = "regulator-fixed";
336 enable-active-high;
337 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
338 pinctrl-names = "default";
339 pinctrl-0 = <&vcc5v0_typec0_en_gpio>;
340 regulator-name = "vbus_5vout";
341 regulator-min-microvolt = <5000000>;
342 regulator-max-microvolt = <5000000>;
343 vin-supply = <&vcc5v0_usb>;
344
345 regulator-state-mem {
346 regulator-off-in-suspend;
347 };
348 };
349
350 /* Regulators supplied by vcc_1v8 */
351 /* Primary 0.9 V LDO */
352 vcca0v9_s3: vcca0v9-s3 {
353 compatible = "regulator-fixed";
354 regulator-name = "vcc0v9_s3";
355 regulator-min-microvolt = <5000000>;
356 regulator-max-microvolt = <5000000>;
357 vin-supply = <&vcc_1v8>;
358
359 regulator-state-mem {
360 regulator-on-in-suspend;
361 };
362 };
363
364 mains_charger: dc-charger {
365 compatible = "gpio-charger";
366 charger-type = "mains";
367 gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_LOW>;
368
369 /* Also triggered by USB charger */
370 pinctrl-names = "default";
371 pinctrl-0 = <&dc_det_gpio>;
372 };
373};
374
375&cdn_dp {
376 status = "okay";
377};
378
379&cpu_b0 {
380 cpu-supply = <&vdd_cpu_b>;
381};
382
383&cpu_b1 {
384 cpu-supply = <&vdd_cpu_b>;
385};
386
387&cpu_l0 {
388 cpu-supply = <&vdd_cpu_l>;
389};
390
391&cpu_l1 {
392 cpu-supply = <&vdd_cpu_l>;
393};
394
395&cpu_l2 {
396 cpu-supply = <&vdd_cpu_l>;
397};
398
399&cpu_l3 {
400 cpu-supply = <&vdd_cpu_l>;
401};
402
403&edp {
404 force-hpd;
405 pinctrl-names = "default";
406 pinctrl-0 = <&edp_hpd>;
407 status = "okay";
408
409 ports {
410 edp_out: port@1 {
411 reg = <1>;
412 #address-cells = <1>;
413 #size-cells = <0>;
414
415 edp_out_panel: endpoint@0 {
416 reg = <0>;
417 remote-endpoint = <&panel_in_edp>;
418 };
419 };
420 };
421};
422
423&emmc_phy {
424 status = "okay";
425};
426
427&gpu {
428 mali-supply = <&vdd_gpu>;
429 status = "okay";
430};
431
432&hdmi_sound {
433 status = "okay";
434};
435
436&i2c0 {
437 clock-frequency = <400000>;
438 i2c-scl-falling-time-ns = <4>;
439 i2c-scl-rising-time-ns = <168>;
440 status = "okay";
441
442 rk808: pmic@1b {
443 compatible = "rockchip,rk808";
444 reg = <0x1b>;
445 #clock-cells = <1>;
446 clock-output-names = "xin32k", "rk808-clkout2";
447 interrupt-parent = <&gpio3>;
448 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
449 pinctrl-names = "default";
450 pinctrl-0 = <&pmic_int_l_gpio>;
451 rockchip,system-power-controller;
452 wakeup-source;
453
454 vcc1-supply = <&vcc_sysin>;
455 vcc2-supply = <&vcc_sysin>;
456 vcc3-supply = <&vcc_sysin>;
457 vcc4-supply = <&vcc_sysin>;
458 vcc6-supply = <&vcc_sysin>;
459 vcc7-supply = <&vcc_sysin>;
460 vcc8-supply = <&vcc3v3_sys>;
461 vcc9-supply = <&vcc_sysin>;
462 vcc10-supply = <&vcc_sysin>;
463 vcc11-supply = <&vcc_sysin>;
464 vcc12-supply = <&vcc3v3_sys>;
465 vcc13-supply = <&vcc_sysin>;
466 vcc14-supply = <&vcc_sysin>;
467
468 regulators {
469 /* rk3399 center logic supply */
470 vdd_center: DCDC_REG1 {
471 regulator-name = "vdd_center";
472 regulator-always-on;
473 regulator-boot-on;
474 regulator-min-microvolt = <750000>;
475 regulator-max-microvolt = <1350000>;
476 regulator-ramp-delay = <6001>;
477
478 regulator-state-mem {
479 regulator-off-in-suspend;
480 };
481 };
482
483 vdd_cpu_l: DCDC_REG2 {
484 regulator-name = "vdd_cpu_l";
485 regulator-always-on;
486 regulator-boot-on;
487 regulator-min-microvolt = <750000>;
488 regulator-max-microvolt = <1350000>;
489 regulator-ramp-delay = <6001>;
490
491 regulator-state-mem {
492 regulator-off-in-suspend;
493 };
494 };
495
496 vcc_ddr: DCDC_REG3 {
497 regulator-name = "vcc_ddr";
498 regulator-always-on;
499 regulator-boot-on;
500
501 regulator-state-mem {
502 regulator-on-in-suspend;
503 };
504 };
505
506 vcc_1v8: vcc_wl: DCDC_REG4 {
507 regulator-name = "vcc_1v8";
508 regulator-always-on;
509 regulator-boot-on;
510 regulator-min-microvolt = <1800000>;
511 regulator-max-microvolt = <1800000>;
512
513 regulator-state-mem {
514 regulator-on-in-suspend;
515 regulator-suspend-microvolt = <1800000>;
516 };
517 };
518
519 /* not used */
520 LDO_REG1 {
521 };
522
523 /* not used */
524 LDO_REG2 {
525 };
526
527 vcc1v8_pmupll: LDO_REG3 {
528 regulator-name = "vcc1v8_pmupll";
529 regulator-always-on;
530 regulator-boot-on;
531 regulator-min-microvolt = <1800000>;
532 regulator-max-microvolt = <1800000>;
533
534 regulator-state-mem {
535 regulator-on-in-suspend;
536 regulator-suspend-microvolt = <1800000>;
537 };
538 };
539
540 vcc_sdio: LDO_REG4 {
541 regulator-name = "vcc_sdio";
542 regulator-always-on;
543 regulator-boot-on;
544 regulator-min-microvolt = <1800000>;
545 regulator-max-microvolt = <3000000>;
546
547 regulator-state-mem {
548 regulator-on-in-suspend;
549 regulator-suspend-microvolt = <3000000>;
550 };
551 };
552
553 vcca3v0_codec: LDO_REG5 {
554 regulator-name = "vcca3v0_codec";
555 regulator-always-on;
556 regulator-boot-on;
557 regulator-min-microvolt = <3000000>;
558 regulator-max-microvolt = <3000000>;
559
560 regulator-state-mem {
561 regulator-off-in-suspend;
562 };
563 };
564
565 vcc_1v5: LDO_REG6 {
566 regulator-name = "vcc_1v5";
567 regulator-always-on;
568 regulator-boot-on;
569 regulator-min-microvolt = <1500000>;
570 regulator-max-microvolt = <1500000>;
571
572 regulator-state-mem {
573 regulator-on-in-suspend;
574 regulator-suspend-microvolt = <1500000>;
575 };
576 };
577
578 vcca1v8_codec: LDO_REG7 {
579 regulator-name = "vcca1v8_codec";
580 regulator-always-on;
581 regulator-boot-on;
582 regulator-min-microvolt = <1800000>;
583 regulator-max-microvolt = <1800000>;
584
585 regulator-state-mem {
586 regulator-off-in-suspend;
587 };
588 };
589
590 vcc_3v0: LDO_REG8 {
591 regulator-name = "vcc_3v0";
592 regulator-always-on;
593 regulator-boot-on;
594 regulator-min-microvolt = <3000000>;
595 regulator-max-microvolt = <3000000>;
596
597 regulator-state-mem {
598 regulator-on-in-suspend;
599 regulator-suspend-microvolt = <3000000>;
600 };
601 };
602
603 vcc3v3_s3: SWITCH_REG1 {
604 regulator-name = "vcc3v3_s3";
605 regulator-always-on;
606 regulator-boot-on;
607
608 regulator-state-mem {
609 regulator-off-in-suspend;
610 };
611 };
612
613 vcc3v3_s0: SWITCH_REG2 {
614 regulator-name = "vcc3v3_s0";
615 regulator-always-on;
616 regulator-boot-on;
617
618 regulator-state-mem {
619 regulator-off-in-suspend;
620 };
621 };
622 };
623 };
624
625 vdd_cpu_b: regulator@40 {
626 compatible = "silergy,syr827";
627 reg = <0x40>;
628 fcs,suspend-voltage-selector = <1>;
629 pinctrl-names = "default";
630 pinctrl-0 = <&vsel1_gpio>;
631 regulator-name = "vdd_cpu_b";
632 regulator-always-on;
633 regulator-boot-on;
634 regulator-min-microvolt = <712500>;
635 regulator-max-microvolt = <1500000>;
636 regulator-ramp-delay = <1000>;
637 vin-supply = <&vcc_1v8>;
638
639 regulator-state-mem {
640 regulator-off-in-suspend;
641 };
642 };
643
644 vdd_gpu: regulator@41 {
645 compatible = "silergy,syr828";
646 reg = <0x41>;
647 fcs,suspend-voltage-selector = <1>;
648 pinctrl-names = "default";
649 pinctrl-0 = <&vsel2_gpio>;
650 regulator-name = "vdd_gpu";
651 regulator-always-on;
652 regulator-boot-on;
653 regulator-min-microvolt = <712500>;
654 regulator-max-microvolt = <1500000>;
655 regulator-ramp-delay = <1000>;
656 vin-supply = <&vcc_1v8>;
657
658 regulator-state-mem {
659 regulator-off-in-suspend;
660 };
661 };
662};
663
664&i2c1 {
665 clock-frequency = <100000>;
666 i2c-scl-falling-time-ns = <4>;
667 i2c-scl-rising-time-ns = <168>;
668 status = "okay";
669
670 es8316: es8316@11 {
671 compatible = "everest,es8316";
672 reg = <0x11>;
673 clocks = <&cru SCLK_I2S_8CH_OUT>;
674 clock-names = "mclk";
675 #sound-dai-cells = <0>;
676 };
677};
678
679&i2c3 {
680 i2c-scl-falling-time-ns = <15>;
681 i2c-scl-rising-time-ns = <450>;
682 status = "okay";
683};
684
685&i2c4 {
686 i2c-scl-falling-time-ns = <20>;
687 i2c-scl-rising-time-ns = <600>;
688 status = "okay";
689
690 fusb0: fusb30x@22 {
691 compatible = "fcs,fusb302";
692 reg = <0x22>;
89ee3ace
RM
693 interrupt-parent = <&gpio1>;
694 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
5a65505a
TS
695 pinctrl-names = "default";
696 pinctrl-0 = <&fusb0_int_gpio>;
697 vbus-supply = <&vbus_typec>;
698
699 connector {
700 compatible = "usb-c-connector";
701 data-role = "host";
702 label = "USB-C";
703 op-sink-microwatt = <1000000>;
704 power-role = "dual";
705 sink-pdos =
706 <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
707 source-pdos =
708 <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
709 try-power-role = "sink";
710
711 ports {
712 #address-cells = <1>;
713 #size-cells = <0>;
714
715 port@0 {
716 reg = <0>;
717
718 usbc_hs: endpoint {
719 remote-endpoint =
720 <&u2phy0_typec_hs>;
721 };
722 };
723
724 port@1 {
725 reg = <1>;
726
727 usbc_ss: endpoint {
728 remote-endpoint =
729 <&tcphy0_typec_ss>;
730 };
731 };
732
733 port@2 {
734 reg = <2>;
735
736 usbc_dp: endpoint {
737 remote-endpoint =
738 <&tcphy0_typec_dp>;
739 };
740 };
741 };
742 };
743 };
744};
745
746&i2s1 {
747 #sound-dai-cells = <0>;
748 pinctrl-names = "default";
749 pinctrl-0 = <&i2s_8ch_mclk_gpio>, <&i2s1_2ch_bus>;
750 rockchip,capture-channels = <8>;
751 rockchip,playback-channels = <8>;
752 status = "okay";
753};
754
755&io_domains {
756 audio-supply = <&vcc_3v0>;
757 gpio1830-supply = <&vcc_3v0>;
758 sdmmc-supply = <&vcc_sdio>;
759 status = "okay";
760};
761
762&pcie_phy {
763 status = "okay";
764};
765
766&pcie0 {
767 bus-scan-delay-ms = <1000>;
768 ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
769 max-link-speed = <2>;
770 num-lanes = <4>;
771 pinctrl-names = "default";
772 pinctrl-0 = <&pcie_clkreqn_cpm>;
773 vpcie0v9-supply = <&vcca0v9_s3>;
774 vpcie1v8-supply = <&vcca1v8_s3>;
775 vpcie3v3-supply = <&vcc3v3_ssd>;
776 status = "okay";
777};
778
779&pinctrl {
780 buttons {
781 pwrbtn_gpio: pwrbtn-gpio {
782 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
783 };
784
785 lidbtn_gpio: lidbtn-gpio {
786 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
787 };
788 };
789
790 dc-charger {
791 dc_det_gpio: dc-det-gpio {
7a87adbc 792 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
5a65505a
TS
793 };
794 };
795
796 es8316 {
797 hp_det_gpio: hp-det-gpio {
40df91a8 798 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
5a65505a
TS
799 };
800 };
801
802 fusb302x {
803 fusb0_int_gpio: fusb0-int-gpio {
804 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
805 };
806 };
807
808 i2s1 {
809 i2s_8ch_mclk_gpio: i2s-8ch-mclk-gpio {
810 rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
811 };
812 };
813
814 lcd-panel {
815 lcdvcc_en_gpio: lcdvcc-en-gpio {
816 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
817 };
818
819 panel_en_gpio: panel-en-gpio {
820 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
821 };
822
823 lcd_panel_reset_gpio: lcd-panel-reset-gpio {
824 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
825 };
826 };
827
828 leds {
829 pwrled_gpio: pwrled_gpio {
830 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
831 };
832
833 slpled_gpio: slpled_gpio {
834 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
835 };
836 };
837
838 pmic {
839 pmic_int_l_gpio: pmic-int-l-gpio {
840 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
841 };
842
843 vsel1_gpio: vsel1-gpio {
844 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
845 };
846
847 vsel2_gpio: vsel2-gpio {
848 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
849 };
850 };
851
852 sdcard {
853 sdmmc0_pwr_h_gpio: sdmmc0-pwr-h-gpio {
854 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
855 };
856
857 };
858
859 sdio-pwrseq {
860 wifi_enable_h_gpio: wifi-enable-h-gpio {
861 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
862 };
863 };
864
865 usb-typec {
866 vcc5v0_typec0_en_gpio: vcc5v0-typec0-en-gpio {
867 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
868 };
869 };
870
871 usb2 {
872 pwr_5v_gpio: pwr-5v-gpio {
873 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
874 };
875
876 vcc5v0_host_en_gpio: vcc5v0-host-en-gpio {
877 rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
878 };
879 };
880
881 wireless-bluetooth {
882 bt_wake_gpio: bt-wake-gpio {
883 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
884 };
885
886 bt_host_wake_gpio: bt-host-wake-gpio {
887 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
888 };
889
890 bt_reset_gpio: bt-reset-gpio {
891 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
892 };
893 };
894};
895
896&pmu_io_domains {
897 pmu1830-supply = <&vcc_3v0>;
898 status = "okay";
899};
900
901&pwm0 {
902 status = "okay";
903};
904
905&pwm2 {
906 status = "okay";
907};
908
909&saradc {
910 vref-supply = <&vcca1v8_s3>;
911 status = "okay";
912};
913
914&sdmmc {
915 bus-width = <4>;
916 cap-mmc-highspeed;
917 cap-sd-highspeed;
918 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
919 disable-wp;
920 pinctrl-names = "default";
921 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
922 sd-uhs-sdr104;
923 vmmc-supply = <&vcc3v0_sd>;
924 vqmmc-supply = <&vcc_sdio>;
925 status = "okay";
926};
927
928&sdio0 {
929 bus-width = <4>;
930 cap-sd-highspeed;
931 cap-sdio-irq;
932 keep-power-in-suspend;
933 mmc-pwrseq = <&sdio_pwrseq>;
934 non-removable;
935 pinctrl-names = "default";
936 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
937 sd-uhs-sdr104;
938 status = "okay";
939};
940
941&sdhci {
942 bus-width = <8>;
943 mmc-hs200-1_8v;
944 non-removable;
945 status = "okay";
946};
947
948&spi1 {
949 max-freq = <10000000>;
950 status = "okay";
951
952 spiflash: flash@0 {
953 compatible = "jedec,spi-nor";
954 reg = <0>;
955 m25p,fast-read;
956 spi-max-frequency = <10000000>;
957 };
958};
959
960&tcphy0 {
961 status = "okay";
962};
963
964&tcphy0_dp {
965 port {
966 tcphy0_typec_dp: endpoint {
967 remote-endpoint = <&usbc_dp>;
968 };
969 };
970};
971
972&tcphy0_usb3 {
973 port {
974 tcphy0_typec_ss: endpoint {
975 remote-endpoint = <&usbc_ss>;
976 };
977 };
978};
979
980&tcphy1 {
981 status = "okay";
982};
983
984&tsadc {
985 /* tshut mode 0:CRU 1:GPIO */
986 rockchip,hw-tshut-mode = <1>;
987 /* tshut polarity 0:LOW 1:HIGH */
988 rockchip,hw-tshut-polarity = <1>;
989 status = "okay";
990};
991
992&u2phy0 {
993 status = "okay";
994
995 u2phy0_otg: otg-port {
996 status = "okay";
997 };
998
999 u2phy0_host: host-port {
1000 phy-supply = <&vcc5v0_otg>;
1001 status = "okay";
1002 };
1003
1004 port {
1005 u2phy0_typec_hs: endpoint {
1006 remote-endpoint = <&usbc_hs>;
1007 };
1008 };
1009};
1010
1011&u2phy1 {
1012 status = "okay";
1013
1014 u2phy1_otg: otg-port {
1015 status = "okay";
1016 };
1017
1018 u2phy1_host: host-port {
1019 phy-supply = <&vcc5v0_otg>;
1020 status = "okay";
1021 };
1022};
1023
1024&uart0 {
1025 pinctrl-names = "default";
1026 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
1027 uart-has-rtscts;
1028 status = "okay";
1029
1030 bluetooth {
1031 compatible = "brcm,bcm4345c5";
1032 clocks = <&rk808 1>;
1033 clock-names = "lpo";
1034 device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
1035 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
1036 max-speed = <1500000>;
1037 pinctrl-names = "default";
1038 pinctrl-0 = <&bt_host_wake_gpio &bt_wake_gpio &bt_reset_gpio>;
1039 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
1040 vbat-supply = <&wifi_bat>;
1041 vddio-supply = <&vcc_wl>;
1042 };
1043};
1044
1045&uart2 {
1046 status = "okay";
1047};
1048
1049&usb_host0_ehci {
1050 status = "okay";
1051};
1052
1053&usb_host0_ohci {
1054 status = "okay";
1055};
1056
1057&usb_host1_ehci {
1058 status = "okay";
1059};
1060
1061&usb_host1_ohci {
1062 status = "okay";
1063};
1064
1065&usbdrd3_0 {
1066 status = "okay";
1067};
1068
1069&usbdrd_dwc3_0 {
1070 dr_mode = "host";
1071 status = "okay";
1072};
1073
1074&usbdrd3_1 {
1075 status = "okay";
1076};
1077
1078&usbdrd_dwc3_1 {
1079 dr_mode = "host";
1080 status = "okay";
1081};
1082
1083&vopb {
1084 status = "okay";
1085};
1086
1087&vopb_mmu {
1088 status = "okay";
1089};
1090
1091&vopl {
1092 status = "okay";
1093};
1094
1095&vopl_mmu {
1096 status = "okay";
1097};