1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
8 #include "dt-bindings/pwm/pwm.h"
9 #include "dt-bindings/input/input.h"
10 #include <dt-bindings/interrupt-controller/irq.h>
11 #include "dt-bindings/usb/pd.h"
12 #include "rk3399.dtsi"
13 #include "rk3399-opp.dtsi"
16 model = "Orange Pi RK3399 Board";
17 compatible = "rockchip,rk3399-orangepi", "rockchip,rk3399";
26 stdout-path = "serial2:1500000n8";
29 clkin_gmac: external-gmac-clock {
30 compatible = "fixed-clock";
31 clock-frequency = <125000000>;
32 clock-output-names = "clkin_gmac";
37 compatible = "adc-keys";
38 io-channels = <&saradc 1>;
39 io-channel-names = "buttons";
40 keyup-threshold-microvolt = <1800000>;
41 poll-interval = <100>;
45 linux,code = <KEY_VOLUMEUP>;
46 press-threshold-microvolt = <100000>;
50 label = "Volume Down";
51 linux,code = <KEY_VOLUMEDOWN>;
52 press-threshold-microvolt = <300000>;
57 linux,code = <KEY_BACK>;
58 press-threshold-microvolt = <985000>;
63 linux,code = <KEY_MENU>;
64 press-threshold-microvolt = <1314000>;
69 compatible = "regulator-fixed";
70 regulator-name = "dc_12v";
73 regulator-min-microvolt = <12000000>;
74 regulator-max-microvolt = <12000000>;
78 compatible = "gpio-keys";
82 debounce-interval = <100>;
83 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
85 linux,code = <KEY_POWER>;
86 linux,input-type = <1>;
87 pinctrl-names = "default";
88 pinctrl-0 = <&pwr_btn>;
93 sdio_pwrseq: sdio-pwrseq {
94 compatible = "mmc-pwrseq-simple";
96 clock-names = "ext_clock";
97 pinctrl-names = "default";
98 pinctrl-0 = <&wifi_reg_on_h>;
99 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
102 /* switched by pmic_sleep */
103 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
104 compatible = "regulator-fixed";
105 regulator-name = "vcc1v8_s3";
108 regulator-min-microvolt = <1800000>;
109 regulator-max-microvolt = <1800000>;
110 vin-supply = <&vcc_1v8>;
113 vcc3v0_sd: vcc3v0-sd {
114 compatible = "regulator-fixed";
116 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
117 pinctrl-names = "default";
118 pinctrl-0 = <&sdmmc0_pwr_h>;
120 regulator-max-microvolt = <3000000>;
121 regulator-min-microvolt = <3000000>;
122 regulator-name = "vcc3v0_sd";
123 vin-supply = <&vcc3v3_sys>;
126 vcc3v3_sys: vcc3v3-sys {
127 compatible = "regulator-fixed";
128 regulator-name = "vcc3v3_sys";
131 regulator-min-microvolt = <3300000>;
132 regulator-max-microvolt = <3300000>;
133 vin-supply = <&vcc_sys>;
136 vcc5v0_host: vcc5v0-host-regulator {
137 compatible = "regulator-fixed";
139 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
140 pinctrl-names = "default";
141 pinctrl-0 = <&vcc5v0_host_en>;
142 regulator-name = "vcc5v0_host";
144 vin-supply = <&vcc_sys>;
147 vbus_typec: vbus-typec-regulator {
148 compatible = "regulator-fixed";
150 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
151 pinctrl-names = "default";
152 pinctrl-0 = <&vcc5v0_typec_en>;
153 regulator-name = "vbus_typec";
154 vin-supply = <&vcc_sys>;
158 compatible = "regulator-fixed";
159 regulator-name = "vcc_sys";
162 regulator-min-microvolt = <5000000>;
163 regulator-max-microvolt = <5000000>;
164 vin-supply = <&dc_12v>;
168 compatible = "pwm-regulator";
169 pwms = <&pwm2 0 25000 1>;
170 pwm-supply = <&vcc_sys>;
171 regulator-name = "vdd_log";
174 regulator-min-microvolt = <800000>;
175 regulator-max-microvolt = <1400000>;
180 cpu-supply = <&vdd_cpu_l>;
184 cpu-supply = <&vdd_cpu_l>;
188 cpu-supply = <&vdd_cpu_l>;
192 cpu-supply = <&vdd_cpu_l>;
196 cpu-supply = <&vdd_cpu_b>;
200 cpu-supply = <&vdd_cpu_b>;
208 assigned-clocks = <&cru SCLK_RMII_SRC>;
209 assigned-clock-parents = <&clkin_gmac>;
210 clock_in_out = "input";
211 phy-supply = <&vcc3v3_s3>;
213 phy-handle = <&rtl8211e>;
214 pinctrl-names = "default";
215 pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>;
221 compatible = "snps,dwmac-mdio";
222 #address-cells = <1>;
225 rtl8211e: ethernet-phy@1 {
227 interrupt-parent = <&gpio3>;
228 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
229 reset-assert-us = <10000>;
230 reset-deassert-us = <30000>;
231 reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
237 mali-supply = <&vdd_gpu>;
242 ddc-i2c-bus = <&i2c3>;
251 clock-frequency = <400000>;
252 i2c-scl-rising-time-ns = <168>;
253 i2c-scl-falling-time-ns = <4>;
257 compatible = "rockchip,rk808";
259 interrupt-parent = <&gpio1>;
260 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
262 clock-output-names = "rtc_clko_soc", "rtc_clko_wifi";
263 pinctrl-names = "default";
264 pinctrl-0 = <&pmic_int_l>;
265 rockchip,system-power-controller;
268 vcc1-supply = <&vcc3v3_sys>;
269 vcc2-supply = <&vcc3v3_sys>;
270 vcc3-supply = <&vcc3v3_sys>;
271 vcc4-supply = <&vcc3v3_sys>;
272 vcc6-supply = <&vcc3v3_sys>;
273 vcc7-supply = <&vcc3v3_sys>;
274 vcc8-supply = <&vcc3v3_sys>;
275 vcc9-supply = <&vcc3v3_sys>;
276 vcc10-supply = <&vcc3v3_sys>;
277 vcc11-supply = <&vcc3v3_sys>;
278 vcc12-supply = <&vcc3v3_sys>;
279 vddio-supply = <&vcc_3v0>;
282 vdd_center: DCDC_REG1 {
283 regulator-name = "vdd_center";
286 regulator-min-microvolt = <700000>;
287 regulator-max-microvolt = <1500000>;
288 regulator-ramp-delay = <6001>;
289 regulator-state-mem {
290 regulator-off-in-suspend;
294 vdd_cpu_l: DCDC_REG2 {
295 regulator-name = "vdd_cpu_l";
298 regulator-min-microvolt = <700000>;
299 regulator-max-microvolt = <1500000>;
300 regulator-ramp-delay = <6001>;
301 regulator-state-mem {
302 regulator-off-in-suspend;
307 regulator-name = "vcc_ddr";
310 regulator-state-mem {
311 regulator-on-in-suspend;
316 regulator-name = "vcc_1v8";
319 regulator-min-microvolt = <1800000>;
320 regulator-max-microvolt = <3300000>;
321 regulator-state-mem {
322 regulator-on-in-suspend;
323 regulator-suspend-microvolt = <1800000>;
327 vcc1v8_dvp: LDO_REG1 {
328 regulator-name = "vcc1v8_dvp";
331 regulator-min-microvolt = <1800000>;
332 regulator-max-microvolt = <3400000>;
333 regulator-state-mem {
334 regulator-off-in-suspend;
338 vcc3v0_tp: LDO_REG2 {
339 regulator-name = "vcc3v0_tp";
342 regulator-min-microvolt = <1800000>;
343 regulator-max-microvolt = <3400000>;
344 regulator-state-mem {
345 regulator-off-in-suspend;
349 vcc1v8_pmupll: LDO_REG3 {
350 regulator-name = "vcc1v8_pmupll";
353 regulator-min-microvolt = <800000>;
354 regulator-max-microvolt = <2500000>;
355 regulator-state-mem {
356 regulator-on-in-suspend;
357 regulator-suspend-microvolt = <1800000>;
362 regulator-name = "vcc_sdio";
365 regulator-min-microvolt = <1800000>;
366 regulator-max-microvolt = <3400000>;
367 regulator-state-mem {
368 regulator-on-in-suspend;
369 regulator-suspend-microvolt = <3000000>;
373 vcca3v0_codec: LDO_REG5 {
374 regulator-name = "vcca3v0_codec";
377 regulator-min-microvolt = <1800000>;
378 regulator-max-microvolt = <3400000>;
379 regulator-state-mem {
380 regulator-off-in-suspend;
385 regulator-name = "vcc_1v5";
388 regulator-min-microvolt = <800000>;
389 regulator-max-microvolt = <2500000>;
390 regulator-state-mem {
391 regulator-on-in-suspend;
392 regulator-suspend-microvolt = <1500000>;
396 vcca1v8_codec: LDO_REG7 {
397 regulator-name = "vcca1v8_codec";
400 regulator-min-microvolt = <800000>;
401 regulator-max-microvolt = <2500000>;
402 regulator-state-mem {
403 regulator-off-in-suspend;
408 regulator-name = "vcc_3v0";
411 regulator-min-microvolt = <1800000>;
412 regulator-max-microvolt = <3400000>;
413 regulator-state-mem {
414 regulator-on-in-suspend;
415 regulator-suspend-microvolt = <3000000>;
419 vcc3v3_s3: SWITCH_REG1 {
420 regulator-name = "vcc3v3_s3";
423 regulator-state-mem {
424 regulator-off-in-suspend;
428 vcc3v3_s0: SWITCH_REG2 {
429 regulator-name = "vcc3v3_s0";
432 regulator-state-mem {
433 regulator-off-in-suspend;
439 vdd_cpu_b: regulator@40 {
440 compatible = "silergy,syr827";
442 fcs,suspend-voltage-selector = <1>;
443 pinctrl-names = "default";
444 pinctrl-0 = <&cpu_b_sleep>;
445 regulator-name = "vdd_cpu_b";
446 regulator-min-microvolt = <712500>;
447 regulator-max-microvolt = <1500000>;
448 regulator-ramp-delay = <1000>;
451 vin-supply = <&vcc3v3_sys>;
453 regulator-state-mem {
454 regulator-off-in-suspend;
458 vdd_gpu: regulator@41 {
459 compatible = "silergy,syr828";
461 fcs,suspend-voltage-selector = <1>;
462 pinctrl-names = "default";
463 pinctrl-0 = <&gpu_sleep>;
464 regulator-name = "vdd_gpu";
465 regulator-min-microvolt = <712500>;
466 regulator-max-microvolt = <1500000>;
467 regulator-ramp-delay = <1000>;
470 vin-supply = <&vcc3v3_sys>;
472 regulator-state-mem {
473 regulator-off-in-suspend;
479 i2c-scl-rising-time-ns = <450>;
480 i2c-scl-falling-time-ns = <15>;
485 i2c-scl-rising-time-ns = <450>;
486 i2c-scl-falling-time-ns = <15>;
491 clock-frequency = <400000>;
492 i2c-scl-rising-time-ns = <450>;
493 i2c-scl-falling-time-ns = <15>;
497 compatible = "asahi-kasei,ak09911";
499 vdd-supply = <&vcc3v3_s3>;
500 vid-supply = <&vcc3v3_s3>;
504 compatible = "invensense,mpu6500";
506 interrupt-parent = <&gpio1>;
507 interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
508 pinctrl-names = "default";
509 pinctrl-0 = <&gsensor_int_l>;
510 vddio-supply = <&vcc3v3_s3>;
514 compatible = "st,lsm6ds3";
516 interrupt-parent = <&gpio1>;
517 interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>;
518 pinctrl-names = "default";
519 pinctrl-0 = <&gyr_int_l>;
520 vdd-supply = <&vcc3v3_s3>;
521 vddio-supply = <&vcc3v3_s3>;
525 compatible = "capella,cm32181";
527 interrupt-parent = <&gpio4>;
528 interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>;
529 pinctrl-names = "default";
530 pinctrl-0 = <&light_int_l>;
531 vdd-supply = <&vcc3v3_s3>;
535 compatible = "fcs,fusb302";
537 interrupt-parent = <&gpio1>;
538 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
539 pinctrl-names = "default";
540 pinctrl-0 = <&chg_cc_int_l>;
541 vbus-supply = <&vbus_typec>;
543 typec_con: connector {
544 compatible = "usb-c-connector";
547 op-sink-microwatt = <1000000>;
550 <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
552 <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
553 try-power-role = "sink";
556 #address-cells = <1>;
562 remote-endpoint = <&u2phy0_typec_hs>;
568 remote-endpoint = <&tcphy0_typec_ss>;
574 remote-endpoint = <&tcphy0_typec_dp>;
584 bt656-supply = <&vcc_3v0>;
585 audio-supply = <&vcca1v8_codec>;
586 sdmmc-supply = <&vcc_sdio>;
587 gpio1830-supply = <&vcc_3v0>;
592 pmu1830-supply = <&vcc_3v0>;
598 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
604 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
608 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
613 cpu_b_sleep: cpu-b-sleep {
614 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
617 gpu_sleep: gpu-sleep {
618 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
621 pmic_int_l: pmic-int-l {
623 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
628 sdmmc0_pwr_h: sdmmc0-pwr-h {
630 <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
635 vcc5v0_host_en: vcc5v0-host-en {
637 <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
640 vcc5v0_typec_en: vcc5v0-typec-en {
642 <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
647 wifi_reg_on_h: wifi-reg-on-h {
648 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
653 wifi_host_wake_l: wifi-host-wake-l {
654 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
659 bt_reg_on_h: bt-enable-h {
660 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
663 bt_host_wake_l: bt-host-wake-l {
664 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
667 bt_wake_l: bt-wake-l {
668 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
673 gsensor_int_l: gsensor-int-l {
674 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
679 gyr_int_l: gyr-int-l {
680 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
685 light_int_l: light-int-l {
686 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
691 chg_cc_int_l: chg-cc-int-l {
692 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
706 vref-supply = <&vcca1v8_s3>;
713 mmc-hs400-enhanced-strobe;
722 clock-frequency = <50000000>;
724 keep-power-in-suspend;
725 max-frequency = <50000000>;
726 mmc-pwrseq = <&sdio_pwrseq>;
728 pinctrl-names = "default";
729 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
731 #address-cells = <1>;
737 compatible = "brcm,bcm4329-fmac";
738 interrupt-parent = <&gpio0>;
739 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
740 interrupt-names = "host-wake";
741 pinctrl-names = "default";
742 pinctrl-0 = <&wifi_host_wake_l>;
750 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
751 clock-frequency = <150000000>;
753 max-frequency = <150000000>;
754 pinctrl-names = "default";
755 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
756 vmmc-supply = <&vcc3v0_sd>;
757 vqmmc-supply = <&vcc_sdio>;
767 tcphy0_typec_dp: endpoint {
768 remote-endpoint = <&typec_dp>;
775 tcphy0_typec_ss: endpoint {
776 remote-endpoint = <&typec_ss>;
786 rockchip,hw-tshut-mode = <1>;
787 rockchip,hw-tshut-polarity = <1>;
794 u2phy0_otg: otg-port {
795 phy-supply = <&vbus_typec>;
799 u2phy0_host: host-port {
800 phy-supply = <&vcc5v0_host>;
805 u2phy0_typec_hs: endpoint {
806 remote-endpoint = <&typec_hs>;
814 u2phy1_otg: otg-port {
818 u2phy1_host: host-port {
819 phy-supply = <&vcc5v0_host>;
825 pinctrl-names = "default";
826 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
830 compatible = "brcm,bcm43438-bt";
833 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
834 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
835 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
836 pinctrl-names = "default";
837 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_reg_on_h>;
838 vbat-supply = <&vcc3v3_sys>;
839 vddio-supply = <&vcc_1v8>;