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 "rk3399.dtsi"
11 #include "rk3399-opp.dtsi"
14 model = "Orange Pi RK3399 Board";
15 compatible = "rockchip,rk3399-orangepi", "rockchip,rk3399";
18 stdout-path = "serial2:1500000n8";
21 clkin_gmac: external-gmac-clock {
22 compatible = "fixed-clock";
23 clock-frequency = <125000000>;
24 clock-output-names = "clkin_gmac";
29 compatible = "adc-keys";
30 io-channels = <&saradc 1>;
31 io-channel-names = "buttons";
32 keyup-threshold-microvolt = <1800000>;
33 poll-interval = <100>;
37 linux,code = <KEY_VOLUMEUP>;
38 press-threshold-microvolt = <100000>;
42 label = "Volume Down";
43 linux,code = <KEY_VOLUMEDOWN>;
44 press-threshold-microvolt = <300000>;
49 linux,code = <KEY_BACK>;
50 press-threshold-microvolt = <985000>;
55 linux,code = <KEY_MENU>;
56 press-threshold-microvolt = <1314000>;
61 compatible = "regulator-fixed";
62 regulator-name = "dc_12v";
65 regulator-min-microvolt = <12000000>;
66 regulator-max-microvolt = <12000000>;
70 compatible = "gpio-keys";
74 debounce-interval = <100>;
75 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_POWER>;
78 linux,input-type = <1>;
79 pinctrl-names = "default";
80 pinctrl-0 = <&pwr_btn>;
85 sdio_pwrseq: sdio-pwrseq {
86 compatible = "mmc-pwrseq-simple";
88 clock-names = "ext_clock";
89 pinctrl-names = "default";
90 pinctrl-0 = <&wifi_reg_on_h>;
91 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
94 /* switched by pmic_sleep */
95 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
96 compatible = "regulator-fixed";
97 regulator-name = "vcc1v8_s3";
100 regulator-min-microvolt = <1800000>;
101 regulator-max-microvolt = <1800000>;
102 vin-supply = <&vcc_1v8>;
105 vcc3v0_sd: vcc3v0-sd {
106 compatible = "regulator-fixed";
108 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
109 pinctrl-names = "default";
110 pinctrl-0 = <&sdmmc0_pwr_h>;
112 regulator-max-microvolt = <3000000>;
113 regulator-min-microvolt = <3000000>;
114 regulator-name = "vcc3v0_sd";
115 vin-supply = <&vcc3v3_sys>;
118 vcc3v3_sys: vcc3v3-sys {
119 compatible = "regulator-fixed";
120 regulator-name = "vcc3v3_sys";
123 regulator-min-microvolt = <3300000>;
124 regulator-max-microvolt = <3300000>;
125 vin-supply = <&vcc_sys>;
128 vcc5v0_host: vcc5v0-host-regulator {
129 compatible = "regulator-fixed";
131 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
132 pinctrl-names = "default";
133 pinctrl-0 = <&vcc5v0_host_en>;
134 regulator-name = "vcc5v0_host";
136 vin-supply = <&vcc_sys>;
139 vbus_typec: vbus-typec-regulator {
140 compatible = "regulator-fixed";
142 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
143 pinctrl-names = "default";
144 pinctrl-0 = <&vcc5v0_typec_en>;
145 regulator-name = "vbus_typec";
146 vin-supply = <&vcc_sys>;
150 compatible = "regulator-fixed";
151 regulator-name = "vcc_sys";
154 regulator-min-microvolt = <5000000>;
155 regulator-max-microvolt = <5000000>;
156 vin-supply = <&dc_12v>;
160 compatible = "pwm-regulator";
161 pwms = <&pwm2 0 25000 1>;
162 regulator-name = "vdd_log";
165 regulator-min-microvolt = <800000>;
166 regulator-max-microvolt = <1400000>;
167 vin-supply = <&vcc_sys>;
172 cpu-supply = <&vdd_cpu_l>;
176 cpu-supply = <&vdd_cpu_l>;
180 cpu-supply = <&vdd_cpu_l>;
184 cpu-supply = <&vdd_cpu_l>;
188 cpu-supply = <&vdd_cpu_b>;
192 cpu-supply = <&vdd_cpu_b>;
200 assigned-clocks = <&cru SCLK_RMII_SRC>;
201 assigned-clock-parents = <&clkin_gmac>;
202 clock_in_out = "input";
203 phy-supply = <&vcc3v3_s3>;
205 phy-handle = <&rtl8211e>;
206 pinctrl-names = "default";
207 pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>;
213 compatible = "snps,dwmac-mdio";
214 #address-cells = <1>;
219 interrupt-parent = <&gpio3>;
220 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
221 reset-assert-us = <10000>;
222 reset-deassert-us = <30000>;
223 reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
229 mali-supply = <&vdd_gpu>;
234 ddc-i2c-bus = <&i2c3>;
243 clock-frequency = <400000>;
244 i2c-scl-rising-time-ns = <168>;
245 i2c-scl-falling-time-ns = <4>;
249 compatible = "rockchip,rk808";
251 interrupt-parent = <&gpio1>;
252 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
254 clock-output-names = "rtc_clko_soc", "rtc_clko_wifi";
255 pinctrl-names = "default";
256 pinctrl-0 = <&pmic_int_l>;
257 rockchip,system-power-controller;
260 vcc1-supply = <&vcc3v3_sys>;
261 vcc2-supply = <&vcc3v3_sys>;
262 vcc3-supply = <&vcc3v3_sys>;
263 vcc4-supply = <&vcc3v3_sys>;
264 vcc6-supply = <&vcc3v3_sys>;
265 vcc7-supply = <&vcc3v3_sys>;
266 vcc8-supply = <&vcc3v3_sys>;
267 vcc9-supply = <&vcc3v3_sys>;
268 vcc10-supply = <&vcc3v3_sys>;
269 vcc11-supply = <&vcc3v3_sys>;
270 vcc12-supply = <&vcc3v3_sys>;
271 vddio-supply = <&vcc_3v0>;
274 vdd_center: DCDC_REG1 {
275 regulator-name = "vdd_center";
278 regulator-min-microvolt = <700000>;
279 regulator-max-microvolt = <1500000>;
280 regulator-ramp-delay = <6001>;
281 regulator-state-mem {
282 regulator-off-in-suspend;
286 vdd_cpu_l: DCDC_REG2 {
287 regulator-name = "vdd_cpu_l";
290 regulator-min-microvolt = <700000>;
291 regulator-max-microvolt = <1500000>;
292 regulator-ramp-delay = <6001>;
293 regulator-state-mem {
294 regulator-off-in-suspend;
299 regulator-name = "vcc_ddr";
302 regulator-state-mem {
303 regulator-on-in-suspend;
308 regulator-name = "vcc_1v8";
311 regulator-min-microvolt = <1800000>;
312 regulator-max-microvolt = <3300000>;
313 regulator-state-mem {
314 regulator-on-in-suspend;
315 regulator-suspend-microvolt = <1800000>;
319 vcc1v8_dvp: LDO_REG1 {
320 regulator-name = "vcc1v8_dvp";
323 regulator-min-microvolt = <1800000>;
324 regulator-max-microvolt = <3400000>;
325 regulator-state-mem {
326 regulator-off-in-suspend;
330 vcc3v0_tp: LDO_REG2 {
331 regulator-name = "vcc3v0_tp";
334 regulator-min-microvolt = <1800000>;
335 regulator-max-microvolt = <3400000>;
336 regulator-state-mem {
337 regulator-off-in-suspend;
341 vcc1v8_pmupll: LDO_REG3 {
342 regulator-name = "vcc1v8_pmupll";
345 regulator-min-microvolt = <800000>;
346 regulator-max-microvolt = <2500000>;
347 regulator-state-mem {
348 regulator-on-in-suspend;
349 regulator-suspend-microvolt = <1800000>;
354 regulator-name = "vcc_sdio";
357 regulator-min-microvolt = <1800000>;
358 regulator-max-microvolt = <3400000>;
359 regulator-state-mem {
360 regulator-on-in-suspend;
361 regulator-suspend-microvolt = <3000000>;
365 vcca3v0_codec: LDO_REG5 {
366 regulator-name = "vcca3v0_codec";
369 regulator-min-microvolt = <1800000>;
370 regulator-max-microvolt = <3400000>;
371 regulator-state-mem {
372 regulator-off-in-suspend;
377 regulator-name = "vcc_1v5";
380 regulator-min-microvolt = <800000>;
381 regulator-max-microvolt = <2500000>;
382 regulator-state-mem {
383 regulator-on-in-suspend;
384 regulator-suspend-microvolt = <1500000>;
388 vcca1v8_codec: LDO_REG7 {
389 regulator-name = "vcca1v8_codec";
392 regulator-min-microvolt = <800000>;
393 regulator-max-microvolt = <2500000>;
394 regulator-state-mem {
395 regulator-off-in-suspend;
400 regulator-name = "vcc_3v0";
403 regulator-min-microvolt = <1800000>;
404 regulator-max-microvolt = <3400000>;
405 regulator-state-mem {
406 regulator-on-in-suspend;
407 regulator-suspend-microvolt = <3000000>;
411 vcc3v3_s3: SWITCH_REG1 {
412 regulator-name = "vcc3v3_s3";
415 regulator-state-mem {
416 regulator-off-in-suspend;
420 vcc3v3_s0: SWITCH_REG2 {
421 regulator-name = "vcc3v3_s0";
424 regulator-state-mem {
425 regulator-off-in-suspend;
431 vdd_cpu_b: regulator@40 {
432 compatible = "silergy,syr827";
434 fcs,suspend-voltage-selector = <1>;
435 pinctrl-names = "default";
436 pinctrl-0 = <&cpu_b_sleep>;
437 regulator-name = "vdd_cpu_b";
438 regulator-min-microvolt = <712500>;
439 regulator-max-microvolt = <1500000>;
440 regulator-ramp-delay = <1000>;
443 vin-supply = <&vcc3v3_sys>;
445 regulator-state-mem {
446 regulator-off-in-suspend;
450 vdd_gpu: regulator@41 {
451 compatible = "silergy,syr828";
453 fcs,suspend-voltage-selector = <1>;
454 pinctrl-names = "default";
455 pinctrl-0 = <&gpu_sleep>;
456 regulator-name = "vdd_gpu";
457 regulator-min-microvolt = <712500>;
458 regulator-max-microvolt = <1500000>;
459 regulator-ramp-delay = <1000>;
462 vin-supply = <&vcc3v3_sys>;
464 regulator-state-mem {
465 regulator-off-in-suspend;
471 i2c-scl-rising-time-ns = <450>;
472 i2c-scl-falling-time-ns = <15>;
477 i2c-scl-rising-time-ns = <450>;
478 i2c-scl-falling-time-ns = <15>;
483 clock-frequency = <400000>;
484 i2c-scl-rising-time-ns = <450>;
485 i2c-scl-falling-time-ns = <15>;
489 compatible = "asahi-kasei,ak09911";
491 vdd-supply = <&vcc3v3_s3>;
492 vid-supply = <&vcc3v3_s3>;
496 compatible = "invensense,mpu6500";
498 interrupt-parent = <&gpio1>;
499 interrupts = <RK_PC6 IRQ_TYPE_EDGE_RISING>;
500 pinctrl-names = "default";
501 pinctrl-0 = <&gsensor_int_l>;
502 vddio-supply = <&vcc3v3_s3>;
506 compatible = "st,lsm6ds3";
508 interrupt-parent = <&gpio1>;
509 interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>;
510 pinctrl-names = "default";
511 pinctrl-0 = <&gyr_int_l>;
512 vdd-supply = <&vcc3v3_s3>;
513 vddio-supply = <&vcc3v3_s3>;
517 compatible = "capella,cm32181";
519 interrupt-parent = <&gpio4>;
520 interrupts = <RK_PD0 IRQ_TYPE_EDGE_RISING>;
521 pinctrl-names = "default";
522 pinctrl-0 = <&light_int_l>;
523 vdd-supply = <&vcc3v3_s3>;
527 compatible = "fcs,fusb302";
529 interrupt-parent = <&gpio1>;
530 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
531 pinctrl-names = "default";
532 pinctrl-0 = <&chg_cc_int_l>;
533 vbus-supply = <&vbus_typec>;
539 bt656-supply = <&vcc_3v0>;
540 audio-supply = <&vcca1v8_codec>;
541 sdmmc-supply = <&vcc_sdio>;
542 gpio1830-supply = <&vcc_3v0>;
547 pmu1830-supply = <&vcc_3v0>;
553 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
559 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
563 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
568 cpu_b_sleep: cpu-b-sleep {
569 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
572 gpu_sleep: gpu-sleep {
573 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
576 pmic_int_l: pmic-int-l {
578 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
583 sdmmc0_pwr_h: sdmmc0-pwr-h {
585 <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
590 vcc5v0_host_en: vcc5v0-host-en {
592 <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
595 vcc5v0_typec_en: vcc5v0-typec-en {
597 <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
602 wifi_reg_on_h: wifi-reg-on-h {
603 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
608 wifi_host_wake_l: wifi-host-wake-l {
609 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
614 bt_reg_on_h: bt-enable-h {
615 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
618 bt_host_wake_l: bt-host-wake-l {
619 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
622 bt_wake_l: bt-wake-l {
623 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
628 gsensor_int_l: gsensor-int-l {
629 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
634 gyr_int_l: gyr-int-l {
635 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
640 light_int_l: light-int-l {
641 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
646 chg_cc_int_l: chg-cc-int-l {
647 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
661 vref-supply = <&vcca1v8_s3>;
668 mmc-hs400-enhanced-strobe;
677 clock-frequency = <50000000>;
679 keep-power-in-suspend;
680 max-frequency = <50000000>;
681 mmc-pwrseq = <&sdio_pwrseq>;
683 pinctrl-names = "default";
684 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
686 #address-cells = <1>;
692 compatible = "brcm,bcm4329-fmac";
693 interrupt-parent = <&gpio0>;
694 interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
695 interrupt-names = "host-wake";
696 pinctrl-names = "default";
697 pinctrl-0 = <&wifi_host_wake_l>;
705 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
706 clock-frequency = <150000000>;
708 max-frequency = <150000000>;
709 pinctrl-names = "default";
710 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
711 vmmc-supply = <&vcc3v0_sd>;
712 vqmmc-supply = <&vcc_sdio>;
725 rockchip,hw-tshut-mode = <1>;
726 rockchip,hw-tshut-polarity = <1>;
733 u2phy0_otg: otg-port {
734 phy-supply = <&vbus_typec>;
738 u2phy0_host: host-port {
739 phy-supply = <&vcc5v0_host>;
747 u2phy1_otg: otg-port {
751 u2phy1_host: host-port {
752 phy-supply = <&vcc5v0_host>;
758 pinctrl-names = "default";
759 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
763 compatible = "brcm,bcm43438-bt";
766 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
767 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
768 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
769 pinctrl-names = "default";
770 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_reg_on_h>;
771 vbat-supply = <&vcc3v3_sys>;
772 vddio-supply = <&vcc_1v8>;