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/usb/pd.h"
11 #include "rk3399.dtsi"
12 #include "rk3399-opp.dtsi"
15 model = "Orange Pi RK3399 Board";
16 compatible = "rockchip,rk3399-orangepi", "rockchip,rk3399";
25 stdout-path = "serial2:1500000n8";
28 clkin_gmac: external-gmac-clock {
29 compatible = "fixed-clock";
30 clock-frequency = <125000000>;
31 clock-output-names = "clkin_gmac";
36 compatible = "adc-keys";
37 io-channels = <&saradc 1>;
38 io-channel-names = "buttons";
39 keyup-threshold-microvolt = <1800000>;
40 poll-interval = <100>;
44 linux,code = <KEY_VOLUMEUP>;
45 press-threshold-microvolt = <100000>;
49 label = "Volume Down";
50 linux,code = <KEY_VOLUMEDOWN>;
51 press-threshold-microvolt = <300000>;
56 linux,code = <KEY_BACK>;
57 press-threshold-microvolt = <985000>;
62 linux,code = <KEY_MENU>;
63 press-threshold-microvolt = <1314000>;
68 compatible = "regulator-fixed";
69 regulator-name = "dc_12v";
72 regulator-min-microvolt = <12000000>;
73 regulator-max-microvolt = <12000000>;
77 compatible = "gpio-keys";
81 debounce-interval = <100>;
82 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
84 linux,code = <KEY_POWER>;
85 linux,input-type = <1>;
86 pinctrl-names = "default";
87 pinctrl-0 = <&pwr_btn>;
92 sdio_pwrseq: sdio-pwrseq {
93 compatible = "mmc-pwrseq-simple";
95 clock-names = "ext_clock";
96 pinctrl-names = "default";
97 pinctrl-0 = <&wifi_reg_on_h>;
98 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
101 /* switched by pmic_sleep */
102 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
103 compatible = "regulator-fixed";
104 regulator-name = "vcc1v8_s3";
107 regulator-min-microvolt = <1800000>;
108 regulator-max-microvolt = <1800000>;
109 vin-supply = <&vcc_1v8>;
112 vcc3v0_sd: vcc3v0-sd {
113 compatible = "regulator-fixed";
115 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
116 pinctrl-names = "default";
117 pinctrl-0 = <&sdmmc0_pwr_h>;
119 regulator-max-microvolt = <3000000>;
120 regulator-min-microvolt = <3000000>;
121 regulator-name = "vcc3v0_sd";
122 vin-supply = <&vcc3v3_sys>;
125 vcc3v3_sys: vcc3v3-sys {
126 compatible = "regulator-fixed";
127 regulator-name = "vcc3v3_sys";
130 regulator-min-microvolt = <3300000>;
131 regulator-max-microvolt = <3300000>;
132 vin-supply = <&vcc_sys>;
135 vcc5v0_host: vcc5v0-host-regulator {
136 compatible = "regulator-fixed";
138 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&vcc5v0_host_en>;
141 regulator-name = "vcc5v0_host";
143 vin-supply = <&vcc_sys>;
146 vbus_typec: vbus-typec-regulator {
147 compatible = "regulator-fixed";
149 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
150 pinctrl-names = "default";
151 pinctrl-0 = <&vcc5v0_typec_en>;
152 regulator-name = "vbus_typec";
153 vin-supply = <&vcc_sys>;
157 compatible = "regulator-fixed";
158 regulator-name = "vcc_sys";
161 regulator-min-microvolt = <5000000>;
162 regulator-max-microvolt = <5000000>;
163 vin-supply = <&dc_12v>;
167 compatible = "pwm-regulator";
168 pwms = <&pwm2 0 25000 1>;
169 regulator-name = "vdd_log";
172 regulator-min-microvolt = <800000>;
173 regulator-max-microvolt = <1400000>;
174 vin-supply = <&vcc_sys>;
179 cpu-supply = <&vdd_cpu_l>;
183 cpu-supply = <&vdd_cpu_l>;
187 cpu-supply = <&vdd_cpu_l>;
191 cpu-supply = <&vdd_cpu_l>;
195 cpu-supply = <&vdd_cpu_b>;
199 cpu-supply = <&vdd_cpu_b>;
207 assigned-clocks = <&cru SCLK_RMII_SRC>;
208 assigned-clock-parents = <&clkin_gmac>;
209 clock_in_out = "input";
210 phy-supply = <&vcc3v3_s3>;
212 phy-handle = <&rtl8211e>;
213 pinctrl-names = "default";
214 pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>;
220 compatible = "snps,dwmac-mdio";
221 #address-cells = <1>;
224 rtl8211e: ethernet-phy@1 {
226 interrupt-parent = <&gpio3>;
227 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
228 reset-assert-us = <10000>;
229 reset-deassert-us = <30000>;
230 reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
236 mali-supply = <&vdd_gpu>;
241 ddc-i2c-bus = <&i2c3>;
250 clock-frequency = <400000>;
251 i2c-scl-rising-time-ns = <168>;
252 i2c-scl-falling-time-ns = <4>;
256 compatible = "rockchip,rk808";
258 interrupt-parent = <&gpio1>;
259 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
261 clock-output-names = "rtc_clko_soc", "rtc_clko_wifi";
262 pinctrl-names = "default";
263 pinctrl-0 = <&pmic_int_l>;
264 rockchip,system-power-controller;
267 vcc1-supply = <&vcc3v3_sys>;
268 vcc2-supply = <&vcc3v3_sys>;
269 vcc3-supply = <&vcc3v3_sys>;
270 vcc4-supply = <&vcc3v3_sys>;
271 vcc6-supply = <&vcc3v3_sys>;
272 vcc7-supply = <&vcc3v3_sys>;
273 vcc8-supply = <&vcc3v3_sys>;
274 vcc9-supply = <&vcc3v3_sys>;
275 vcc10-supply = <&vcc3v3_sys>;
276 vcc11-supply = <&vcc3v3_sys>;
277 vcc12-supply = <&vcc3v3_sys>;
278 vddio-supply = <&vcc_3v0>;
281 vdd_center: DCDC_REG1 {
282 regulator-name = "vdd_center";
285 regulator-min-microvolt = <700000>;
286 regulator-max-microvolt = <1500000>;
287 regulator-ramp-delay = <6001>;
288 regulator-state-mem {
289 regulator-off-in-suspend;
293 vdd_cpu_l: DCDC_REG2 {
294 regulator-name = "vdd_cpu_l";
297 regulator-min-microvolt = <700000>;
298 regulator-max-microvolt = <1500000>;
299 regulator-ramp-delay = <6001>;
300 regulator-state-mem {
301 regulator-off-in-suspend;
306 regulator-name = "vcc_ddr";
309 regulator-state-mem {
310 regulator-on-in-suspend;
315 regulator-name = "vcc_1v8";
318 regulator-min-microvolt = <1800000>;
319 regulator-max-microvolt = <3300000>;
320 regulator-state-mem {
321 regulator-on-in-suspend;
322 regulator-suspend-microvolt = <1800000>;
326 vcc1v8_dvp: LDO_REG1 {
327 regulator-name = "vcc1v8_dvp";
330 regulator-min-microvolt = <1800000>;
331 regulator-max-microvolt = <3400000>;
332 regulator-state-mem {
333 regulator-off-in-suspend;
337 vcc3v0_tp: LDO_REG2 {
338 regulator-name = "vcc3v0_tp";
341 regulator-min-microvolt = <1800000>;
342 regulator-max-microvolt = <3400000>;
343 regulator-state-mem {
344 regulator-off-in-suspend;
348 vcc1v8_pmupll: LDO_REG3 {
349 regulator-name = "vcc1v8_pmupll";
352 regulator-min-microvolt = <800000>;
353 regulator-max-microvolt = <2500000>;
354 regulator-state-mem {
355 regulator-on-in-suspend;
356 regulator-suspend-microvolt = <1800000>;
361 regulator-name = "vcc_sdio";
364 regulator-min-microvolt = <1800000>;
365 regulator-max-microvolt = <3400000>;
366 regulator-state-mem {
367 regulator-on-in-suspend;
368 regulator-suspend-microvolt = <3000000>;
372 vcca3v0_codec: LDO_REG5 {
373 regulator-name = "vcca3v0_codec";
376 regulator-min-microvolt = <1800000>;
377 regulator-max-microvolt = <3400000>;
378 regulator-state-mem {
379 regulator-off-in-suspend;
384 regulator-name = "vcc_1v5";
387 regulator-min-microvolt = <800000>;
388 regulator-max-microvolt = <2500000>;
389 regulator-state-mem {
390 regulator-on-in-suspend;
391 regulator-suspend-microvolt = <1500000>;
395 vcca1v8_codec: LDO_REG7 {
396 regulator-name = "vcca1v8_codec";
399 regulator-min-microvolt = <800000>;
400 regulator-max-microvolt = <2500000>;
401 regulator-state-mem {
402 regulator-off-in-suspend;
407 regulator-name = "vcc_3v0";
410 regulator-min-microvolt = <1800000>;
411 regulator-max-microvolt = <3400000>;
412 regulator-state-mem {
413 regulator-on-in-suspend;
414 regulator-suspend-microvolt = <3000000>;
418 vcc3v3_s3: SWITCH_REG1 {
419 regulator-name = "vcc3v3_s3";
422 regulator-state-mem {
423 regulator-off-in-suspend;
427 vcc3v3_s0: SWITCH_REG2 {
428 regulator-name = "vcc3v3_s0";
431 regulator-state-mem {
432 regulator-off-in-suspend;
438 vdd_cpu_b: regulator@40 {
439 compatible = "silergy,syr827";
441 fcs,suspend-voltage-selector = <1>;
442 pinctrl-names = "default";
443 pinctrl-0 = <&cpu_b_sleep>;
444 regulator-name = "vdd_cpu_b";
445 regulator-min-microvolt = <712500>;
446 regulator-max-microvolt = <1500000>;
447 regulator-ramp-delay = <1000>;
450 vin-supply = <&vcc3v3_sys>;
452 regulator-state-mem {
453 regulator-off-in-suspend;
457 vdd_gpu: regulator@41 {
458 compatible = "silergy,syr828";
460 fcs,suspend-voltage-selector = <1>;
461 pinctrl-names = "default";
462 pinctrl-0 = <&gpu_sleep>;
463 regulator-name = "vdd_gpu";
464 regulator-min-microvolt = <712500>;
465 regulator-max-microvolt = <1500000>;
466 regulator-ramp-delay = <1000>;
469 vin-supply = <&vcc3v3_sys>;
471 regulator-state-mem {
472 regulator-off-in-suspend;
478 i2c-scl-rising-time-ns = <450>;
479 i2c-scl-falling-time-ns = <15>;
484 i2c-scl-rising-time-ns = <450>;
485 i2c-scl-falling-time-ns = <15>;
490 clock-frequency = <400000>;
491 i2c-scl-rising-time-ns = <450>;
492 i2c-scl-falling-time-ns = <15>;
496 compatible = "asahi-kasei,ak09911";
498 vdd-supply = <&vcc3v3_s3>;
499 vid-supply = <&vcc3v3_s3>;
503 compatible = "invensense,mpu6500";
505 interrupt-parent = <&gpio1>;
506 interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
507 pinctrl-names = "default";
508 pinctrl-0 = <&gsensor_int_l>;
509 vddio-supply = <&vcc3v3_s3>;
513 compatible = "st,lsm6ds3";
515 interrupt-parent = <&gpio1>;
516 interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>;
517 pinctrl-names = "default";
518 pinctrl-0 = <&gyr_int_l>;
519 vdd-supply = <&vcc3v3_s3>;
520 vddio-supply = <&vcc3v3_s3>;
524 compatible = "capella,cm32181";
526 interrupt-parent = <&gpio4>;
527 interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>;
528 pinctrl-names = "default";
529 pinctrl-0 = <&light_int_l>;
530 vdd-supply = <&vcc3v3_s3>;
534 compatible = "fcs,fusb302";
536 interrupt-parent = <&gpio1>;
537 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
538 pinctrl-names = "default";
539 pinctrl-0 = <&chg_cc_int_l>;
540 vbus-supply = <&vbus_typec>;
542 typec_con: connector {
543 compatible = "usb-c-connector";
546 op-sink-microwatt = <1000000>;
549 <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
551 <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
552 try-power-role = "sink";
555 #address-cells = <1>;
561 remote-endpoint = <&u2phy0_typec_hs>;
567 remote-endpoint = <&tcphy0_typec_ss>;
573 remote-endpoint = <&tcphy0_typec_dp>;
583 bt656-supply = <&vcc_3v0>;
584 audio-supply = <&vcca1v8_codec>;
585 sdmmc-supply = <&vcc_sdio>;
586 gpio1830-supply = <&vcc_3v0>;
591 pmu1830-supply = <&vcc_3v0>;
597 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
603 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
607 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
612 cpu_b_sleep: cpu-b-sleep {
613 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
616 gpu_sleep: gpu-sleep {
617 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
620 pmic_int_l: pmic-int-l {
622 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
627 sdmmc0_pwr_h: sdmmc0-pwr-h {
629 <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
634 vcc5v0_host_en: vcc5v0-host-en {
636 <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
639 vcc5v0_typec_en: vcc5v0-typec-en {
641 <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
646 wifi_reg_on_h: wifi-reg-on-h {
647 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
652 wifi_host_wake_l: wifi-host-wake-l {
653 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
658 bt_reg_on_h: bt-enable-h {
659 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
662 bt_host_wake_l: bt-host-wake-l {
663 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
666 bt_wake_l: bt-wake-l {
667 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
672 gsensor_int_l: gsensor-int-l {
673 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
678 gyr_int_l: gyr-int-l {
679 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
684 light_int_l: light-int-l {
685 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
690 chg_cc_int_l: chg-cc-int-l {
691 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
705 vref-supply = <&vcca1v8_s3>;
712 mmc-hs400-enhanced-strobe;
721 clock-frequency = <50000000>;
723 keep-power-in-suspend;
724 max-frequency = <50000000>;
725 mmc-pwrseq = <&sdio_pwrseq>;
727 pinctrl-names = "default";
728 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
730 #address-cells = <1>;
736 compatible = "brcm,bcm4329-fmac";
737 interrupt-parent = <&gpio0>;
738 interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
739 interrupt-names = "host-wake";
740 pinctrl-names = "default";
741 pinctrl-0 = <&wifi_host_wake_l>;
749 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
750 clock-frequency = <150000000>;
752 max-frequency = <150000000>;
753 pinctrl-names = "default";
754 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
755 vmmc-supply = <&vcc3v0_sd>;
756 vqmmc-supply = <&vcc_sdio>;
766 tcphy0_typec_dp: endpoint {
767 remote-endpoint = <&typec_dp>;
774 tcphy0_typec_ss: endpoint {
775 remote-endpoint = <&typec_ss>;
785 rockchip,hw-tshut-mode = <1>;
786 rockchip,hw-tshut-polarity = <1>;
793 u2phy0_otg: otg-port {
794 phy-supply = <&vbus_typec>;
798 u2phy0_host: host-port {
799 phy-supply = <&vcc5v0_host>;
804 u2phy0_typec_hs: endpoint {
805 remote-endpoint = <&typec_hs>;
813 u2phy1_otg: otg-port {
817 u2phy1_host: host-port {
818 phy-supply = <&vcc5v0_host>;
824 pinctrl-names = "default";
825 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
829 compatible = "brcm,bcm43438-bt";
832 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
833 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
834 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
835 pinctrl-names = "default";
836 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_reg_on_h>;
837 vbat-supply = <&vcc3v3_sys>;
838 vddio-supply = <&vcc_1v8>;