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";
27 stdout-path = "serial2:1500000n8";
30 clkin_gmac: external-gmac-clock {
31 compatible = "fixed-clock";
32 clock-frequency = <125000000>;
33 clock-output-names = "clkin_gmac";
38 compatible = "adc-keys";
39 io-channels = <&saradc 1>;
40 io-channel-names = "buttons";
41 keyup-threshold-microvolt = <1800000>;
42 poll-interval = <100>;
46 linux,code = <KEY_VOLUMEUP>;
47 press-threshold-microvolt = <100000>;
51 label = "Volume Down";
52 linux,code = <KEY_VOLUMEDOWN>;
53 press-threshold-microvolt = <300000>;
58 linux,code = <KEY_BACK>;
59 press-threshold-microvolt = <985000>;
64 linux,code = <KEY_MENU>;
65 press-threshold-microvolt = <1314000>;
70 compatible = "regulator-fixed";
71 regulator-name = "dc_12v";
74 regulator-min-microvolt = <12000000>;
75 regulator-max-microvolt = <12000000>;
79 compatible = "gpio-keys";
83 debounce-interval = <100>;
84 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_POWER>;
87 linux,input-type = <1>;
88 pinctrl-names = "default";
89 pinctrl-0 = <&pwr_btn>;
94 sdio_pwrseq: sdio-pwrseq {
95 compatible = "mmc-pwrseq-simple";
97 clock-names = "ext_clock";
98 pinctrl-names = "default";
99 pinctrl-0 = <&wifi_reg_on_h>;
100 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
103 /* switched by pmic_sleep */
104 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
105 compatible = "regulator-fixed";
106 regulator-name = "vcc1v8_s3";
109 regulator-min-microvolt = <1800000>;
110 regulator-max-microvolt = <1800000>;
111 vin-supply = <&vcc_1v8>;
114 vcc3v0_sd: vcc3v0-sd {
115 compatible = "regulator-fixed";
117 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
118 pinctrl-names = "default";
119 pinctrl-0 = <&sdmmc0_pwr_h>;
121 regulator-max-microvolt = <3000000>;
122 regulator-min-microvolt = <3000000>;
123 regulator-name = "vcc3v0_sd";
124 vin-supply = <&vcc3v3_sys>;
127 vcc3v3_sys: vcc3v3-sys {
128 compatible = "regulator-fixed";
129 regulator-name = "vcc3v3_sys";
132 regulator-min-microvolt = <3300000>;
133 regulator-max-microvolt = <3300000>;
134 vin-supply = <&vcc_sys>;
137 vcc5v0_host: vcc5v0-host-regulator {
138 compatible = "regulator-fixed";
140 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
141 pinctrl-names = "default";
142 pinctrl-0 = <&vcc5v0_host_en>;
143 regulator-name = "vcc5v0_host";
145 vin-supply = <&vcc_sys>;
148 vbus_typec: vbus-typec-regulator {
149 compatible = "regulator-fixed";
151 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
152 pinctrl-names = "default";
153 pinctrl-0 = <&vcc5v0_typec_en>;
154 regulator-name = "vbus_typec";
155 vin-supply = <&vcc_sys>;
159 compatible = "regulator-fixed";
160 regulator-name = "vcc_sys";
163 regulator-min-microvolt = <5000000>;
164 regulator-max-microvolt = <5000000>;
165 vin-supply = <&dc_12v>;
169 compatible = "pwm-regulator";
170 pwms = <&pwm2 0 25000 1>;
171 pwm-supply = <&vcc_sys>;
172 regulator-name = "vdd_log";
175 regulator-min-microvolt = <800000>;
176 regulator-max-microvolt = <1400000>;
181 cpu-supply = <&vdd_cpu_l>;
185 cpu-supply = <&vdd_cpu_l>;
189 cpu-supply = <&vdd_cpu_l>;
193 cpu-supply = <&vdd_cpu_l>;
197 cpu-supply = <&vdd_cpu_b>;
201 cpu-supply = <&vdd_cpu_b>;
209 assigned-clocks = <&cru SCLK_RMII_SRC>;
210 assigned-clock-parents = <&clkin_gmac>;
211 clock_in_out = "input";
212 phy-supply = <&vcc3v3_s3>;
214 phy-handle = <&rtl8211e>;
215 pinctrl-names = "default";
216 pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>;
222 compatible = "snps,dwmac-mdio";
223 #address-cells = <1>;
226 rtl8211e: ethernet-phy@1 {
228 interrupt-parent = <&gpio3>;
229 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
230 reset-assert-us = <10000>;
231 reset-deassert-us = <30000>;
232 reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
238 mali-supply = <&vdd_gpu>;
243 ddc-i2c-bus = <&i2c3>;
252 clock-frequency = <400000>;
253 i2c-scl-rising-time-ns = <168>;
254 i2c-scl-falling-time-ns = <4>;
258 compatible = "rockchip,rk808";
260 interrupt-parent = <&gpio1>;
261 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
263 clock-output-names = "rtc_clko_soc", "rtc_clko_wifi";
264 pinctrl-names = "default";
265 pinctrl-0 = <&pmic_int_l>;
266 rockchip,system-power-controller;
269 vcc1-supply = <&vcc3v3_sys>;
270 vcc2-supply = <&vcc3v3_sys>;
271 vcc3-supply = <&vcc3v3_sys>;
272 vcc4-supply = <&vcc3v3_sys>;
273 vcc6-supply = <&vcc3v3_sys>;
274 vcc7-supply = <&vcc3v3_sys>;
275 vcc8-supply = <&vcc3v3_sys>;
276 vcc9-supply = <&vcc3v3_sys>;
277 vcc10-supply = <&vcc3v3_sys>;
278 vcc11-supply = <&vcc3v3_sys>;
279 vcc12-supply = <&vcc3v3_sys>;
280 vddio-supply = <&vcc_3v0>;
283 vdd_center: DCDC_REG1 {
284 regulator-name = "vdd_center";
287 regulator-min-microvolt = <700000>;
288 regulator-max-microvolt = <1500000>;
289 regulator-ramp-delay = <6001>;
290 regulator-state-mem {
291 regulator-off-in-suspend;
295 vdd_cpu_l: DCDC_REG2 {
296 regulator-name = "vdd_cpu_l";
299 regulator-min-microvolt = <700000>;
300 regulator-max-microvolt = <1500000>;
301 regulator-ramp-delay = <6001>;
302 regulator-state-mem {
303 regulator-off-in-suspend;
308 regulator-name = "vcc_ddr";
311 regulator-state-mem {
312 regulator-on-in-suspend;
317 regulator-name = "vcc_1v8";
320 regulator-min-microvolt = <1800000>;
321 regulator-max-microvolt = <3300000>;
322 regulator-state-mem {
323 regulator-on-in-suspend;
324 regulator-suspend-microvolt = <1800000>;
328 vcc1v8_dvp: LDO_REG1 {
329 regulator-name = "vcc1v8_dvp";
332 regulator-min-microvolt = <1800000>;
333 regulator-max-microvolt = <3400000>;
334 regulator-state-mem {
335 regulator-off-in-suspend;
339 vcc3v0_tp: LDO_REG2 {
340 regulator-name = "vcc3v0_tp";
343 regulator-min-microvolt = <1800000>;
344 regulator-max-microvolt = <3400000>;
345 regulator-state-mem {
346 regulator-off-in-suspend;
350 vcc1v8_pmupll: LDO_REG3 {
351 regulator-name = "vcc1v8_pmupll";
354 regulator-min-microvolt = <800000>;
355 regulator-max-microvolt = <2500000>;
356 regulator-state-mem {
357 regulator-on-in-suspend;
358 regulator-suspend-microvolt = <1800000>;
363 regulator-name = "vcc_sdio";
366 regulator-min-microvolt = <1800000>;
367 regulator-max-microvolt = <3400000>;
368 regulator-state-mem {
369 regulator-on-in-suspend;
370 regulator-suspend-microvolt = <3000000>;
374 vcca3v0_codec: LDO_REG5 {
375 regulator-name = "vcca3v0_codec";
378 regulator-min-microvolt = <1800000>;
379 regulator-max-microvolt = <3400000>;
380 regulator-state-mem {
381 regulator-off-in-suspend;
386 regulator-name = "vcc_1v5";
389 regulator-min-microvolt = <800000>;
390 regulator-max-microvolt = <2500000>;
391 regulator-state-mem {
392 regulator-on-in-suspend;
393 regulator-suspend-microvolt = <1500000>;
397 vcca1v8_codec: LDO_REG7 {
398 regulator-name = "vcca1v8_codec";
401 regulator-min-microvolt = <800000>;
402 regulator-max-microvolt = <2500000>;
403 regulator-state-mem {
404 regulator-off-in-suspend;
409 regulator-name = "vcc_3v0";
412 regulator-min-microvolt = <1800000>;
413 regulator-max-microvolt = <3400000>;
414 regulator-state-mem {
415 regulator-on-in-suspend;
416 regulator-suspend-microvolt = <3000000>;
420 vcc3v3_s3: SWITCH_REG1 {
421 regulator-name = "vcc3v3_s3";
424 regulator-state-mem {
425 regulator-off-in-suspend;
429 vcc3v3_s0: SWITCH_REG2 {
430 regulator-name = "vcc3v3_s0";
433 regulator-state-mem {
434 regulator-off-in-suspend;
440 vdd_cpu_b: regulator@40 {
441 compatible = "silergy,syr827";
443 fcs,suspend-voltage-selector = <1>;
444 pinctrl-names = "default";
445 pinctrl-0 = <&cpu_b_sleep>;
446 regulator-name = "vdd_cpu_b";
447 regulator-min-microvolt = <712500>;
448 regulator-max-microvolt = <1500000>;
449 regulator-ramp-delay = <1000>;
452 vin-supply = <&vcc3v3_sys>;
454 regulator-state-mem {
455 regulator-off-in-suspend;
459 vdd_gpu: regulator@41 {
460 compatible = "silergy,syr828";
462 fcs,suspend-voltage-selector = <1>;
463 pinctrl-names = "default";
464 pinctrl-0 = <&gpu_sleep>;
465 regulator-name = "vdd_gpu";
466 regulator-min-microvolt = <712500>;
467 regulator-max-microvolt = <1500000>;
468 regulator-ramp-delay = <1000>;
471 vin-supply = <&vcc3v3_sys>;
473 regulator-state-mem {
474 regulator-off-in-suspend;
480 i2c-scl-rising-time-ns = <450>;
481 i2c-scl-falling-time-ns = <15>;
486 i2c-scl-rising-time-ns = <450>;
487 i2c-scl-falling-time-ns = <15>;
492 clock-frequency = <400000>;
493 i2c-scl-rising-time-ns = <450>;
494 i2c-scl-falling-time-ns = <15>;
498 compatible = "asahi-kasei,ak09911";
500 vdd-supply = <&vcc3v3_s3>;
501 vid-supply = <&vcc3v3_s3>;
505 compatible = "invensense,mpu6500";
507 interrupt-parent = <&gpio1>;
508 interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
509 pinctrl-names = "default";
510 pinctrl-0 = <&gsensor_int_l>;
511 vddio-supply = <&vcc3v3_s3>;
515 compatible = "st,lsm6ds3";
517 interrupt-parent = <&gpio1>;
518 interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>;
519 pinctrl-names = "default";
520 pinctrl-0 = <&gyr_int_l>;
521 vdd-supply = <&vcc3v3_s3>;
522 vddio-supply = <&vcc3v3_s3>;
526 compatible = "capella,cm32181";
528 interrupt-parent = <&gpio4>;
529 interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>;
530 pinctrl-names = "default";
531 pinctrl-0 = <&light_int_l>;
532 vdd-supply = <&vcc3v3_s3>;
536 compatible = "fcs,fusb302";
538 interrupt-parent = <&gpio1>;
539 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
540 pinctrl-names = "default";
541 pinctrl-0 = <&chg_cc_int_l>;
542 vbus-supply = <&vbus_typec>;
544 typec_con: connector {
545 compatible = "usb-c-connector";
548 op-sink-microwatt = <1000000>;
551 <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
553 <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
554 try-power-role = "sink";
557 #address-cells = <1>;
563 remote-endpoint = <&u2phy0_typec_hs>;
569 remote-endpoint = <&tcphy0_typec_ss>;
575 remote-endpoint = <&tcphy0_typec_dp>;
585 bt656-supply = <&vcc_3v0>;
586 audio-supply = <&vcca1v8_codec>;
587 sdmmc-supply = <&vcc_sdio>;
588 gpio1830-supply = <&vcc_3v0>;
593 pmu1830-supply = <&vcc_3v0>;
599 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
605 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
609 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
614 cpu_b_sleep: cpu-b-sleep {
615 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
618 gpu_sleep: gpu-sleep {
619 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
622 pmic_int_l: pmic-int-l {
624 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
629 sdmmc0_pwr_h: sdmmc0-pwr-h {
631 <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
636 vcc5v0_host_en: vcc5v0-host-en {
638 <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
641 vcc5v0_typec_en: vcc5v0-typec-en {
643 <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
648 wifi_reg_on_h: wifi-reg-on-h {
649 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
654 wifi_host_wake_l: wifi-host-wake-l {
655 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
660 bt_reg_on_h: bt-enable-h {
661 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
664 bt_host_wake_l: bt-host-wake-l {
665 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
668 bt_wake_l: bt-wake-l {
669 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
674 gsensor_int_l: gsensor-int-l {
675 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
680 gyr_int_l: gyr-int-l {
681 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
686 light_int_l: light-int-l {
687 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
692 chg_cc_int_l: chg-cc-int-l {
693 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
707 vref-supply = <&vcca1v8_s3>;
714 mmc-hs400-enhanced-strobe;
723 clock-frequency = <50000000>;
725 keep-power-in-suspend;
726 max-frequency = <50000000>;
727 mmc-pwrseq = <&sdio_pwrseq>;
729 pinctrl-names = "default";
730 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
732 #address-cells = <1>;
738 compatible = "brcm,bcm4329-fmac";
739 interrupt-parent = <&gpio0>;
740 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
741 interrupt-names = "host-wake";
742 pinctrl-names = "default";
743 pinctrl-0 = <&wifi_host_wake_l>;
751 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
752 clock-frequency = <150000000>;
754 max-frequency = <150000000>;
755 pinctrl-names = "default";
756 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
757 vmmc-supply = <&vcc3v0_sd>;
758 vqmmc-supply = <&vcc_sdio>;
768 tcphy0_typec_dp: endpoint {
769 remote-endpoint = <&typec_dp>;
776 tcphy0_typec_ss: endpoint {
777 remote-endpoint = <&typec_ss>;
787 rockchip,hw-tshut-mode = <1>;
788 rockchip,hw-tshut-polarity = <1>;
795 u2phy0_otg: otg-port {
796 phy-supply = <&vbus_typec>;
800 u2phy0_host: host-port {
801 phy-supply = <&vcc5v0_host>;
806 u2phy0_typec_hs: endpoint {
807 remote-endpoint = <&typec_hs>;
815 u2phy1_otg: otg-port {
819 u2phy1_host: host-port {
820 phy-supply = <&vcc5v0_host>;
826 pinctrl-names = "default";
827 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
831 compatible = "brcm,bcm43438-bt";
834 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
835 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
836 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
837 pinctrl-names = "default";
838 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_reg_on_h>;
839 vbat-supply = <&vcc3v3_sys>;
840 vddio-supply = <&vcc_1v8>;