1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com>
7 #include <dt-bindings/input/linux-event-codes.h>
8 #include <dt-bindings/pwm/pwm.h>
10 #include "rk3399-opp.dtsi"
20 stdout-path = "serial2:1500000n8";
23 /* enable for panel backlight support */
24 backlight: backlight {
25 compatible = "pwm-backlight";
26 brightness-levels = <0 4 8 16 32 64 128 255>;
27 default-brightness-level = <5>;
28 pwms = <&pwm0 0 1000000 0>;
32 clkin_gmac: external-gmac-clock {
33 compatible = "fixed-clock";
34 clock-frequency = <125000000>;
35 clock-output-names = "clkin_gmac";
40 compatible = "gpio-keys";
42 pinctrl-names = "default";
43 pinctrl-0 = <&pwrbtn>;
46 debounce-interval = <100>;
47 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
48 label = "GPIO Key Power";
49 linux,code = <KEY_POWER>;
55 compatible = "gpio-ir-receiver";
56 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
57 pinctrl-0 = <&ir_int>;
58 pinctrl-names = "default";
62 compatible = "gpio-leds";
63 pinctrl-names = "default";
64 pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
69 gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
74 default-state = "off";
75 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
80 compatible = "pwm-fan";
81 cooling-levels = <0 100 150 200 255>;
83 fan-supply = <&vcc12v_dcin>;
84 pwms = <&pwm1 0 50000 0>;
87 sdio_pwrseq: sdio-pwrseq {
88 compatible = "mmc-pwrseq-simple";
90 clock-names = "ext_clock";
91 pinctrl-names = "default";
92 pinctrl-0 = <&wifi_enable_h>;
93 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
97 compatible = "audio-graph-card";
103 compatible = "audio-graph-card";
109 compatible = "linux,spdif-dit";
110 #sound-dai-cells = <0>;
114 remote-endpoint = <&spdif_p0_0>;
119 avdd: avdd-regulator {
120 compatible = "regulator-fixed";
121 regulator-name = "avdd";
122 regulator-min-microvolt = <11000000>;
123 regulator-max-microvolt = <11000000>;
124 vin-supply = <&vcc3v3_s0>;
127 vcc12v_dcin: vcc12v-dcin {
128 compatible = "regulator-fixed";
129 regulator-name = "vcc12v_dcin";
132 regulator-min-microvolt = <12000000>;
133 regulator-max-microvolt = <12000000>;
136 /* switched by pmic_sleep */
137 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
138 compatible = "regulator-fixed";
139 regulator-name = "vcc1v8_s3";
142 regulator-min-microvolt = <1800000>;
143 regulator-max-microvolt = <1800000>;
144 vin-supply = <&vcc_1v8>;
147 /* micro SD card power */
148 vcc3v0_sd: vcc3v0-sd {
149 compatible = "regulator-fixed";
151 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
152 pinctrl-names = "default";
153 pinctrl-0 = <&sdmmc0_pwr_h>;
154 regulator-name = "vcc3v0_sd";
156 regulator-min-microvolt = <3000000>;
157 regulator-max-microvolt = <3000000>;
158 vin-supply = <&vcc3v3_sys>;
160 regulator-state-mem {
161 regulator-off-in-suspend;
165 vcc3v3_pcie: vcc3v3-pcie-regulator {
166 compatible = "regulator-fixed";
168 gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
169 pinctrl-names = "default";
170 pinctrl-0 = <&pcie_pwr_en>;
171 regulator-name = "vcc3v3_pcie";
174 vin-supply = <&vcc12v_dcin>;
177 vcc3v3_sys: vcc3v3-sys {
178 compatible = "regulator-fixed";
179 regulator-name = "vcc3v3_sys";
182 regulator-min-microvolt = <3300000>;
183 regulator-max-microvolt = <3300000>;
184 vin-supply = <&vcc5v0_sys>;
187 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
188 vcc5v0_host: vcc5v0-host-regulator {
189 compatible = "regulator-fixed";
191 gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
192 pinctrl-names = "default";
193 pinctrl-0 = <&vcc5v0_host_en>;
194 regulator-name = "vcc5v0_host";
196 vin-supply = <&vcc5v0_usb>;
199 vcc5v0_typec: vcc5v0-typec-regulator {
200 compatible = "regulator-fixed";
202 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
203 pinctrl-names = "default";
204 pinctrl-0 = <&vcc5v0_typec_en>;
205 regulator-name = "vcc5v0_typec";
207 vin-supply = <&vcc5v0_usb>;
210 vcc5v0_sys: vcc5v0-sys {
211 compatible = "regulator-fixed";
212 regulator-name = "vcc5v0_sys";
215 regulator-min-microvolt = <5000000>;
216 regulator-max-microvolt = <5000000>;
217 vin-supply = <&vcc12v_dcin>;
220 vcc5v0_usb: vcc5v0-usb {
221 compatible = "regulator-fixed";
222 regulator-name = "vcc5v0_usb";
225 regulator-min-microvolt = <5000000>;
226 regulator-max-microvolt = <5000000>;
227 vin-supply = <&vcc12v_dcin>;
231 compatible = "pwm-regulator";
232 pwms = <&pwm2 0 25000 1>;
233 pwm-supply = <&vcc5v0_sys>;
234 regulator-name = "vdd_log";
237 regulator-min-microvolt = <800000>;
238 regulator-max-microvolt = <1700000>;
243 cpu-supply = <&vdd_cpu_l>;
247 cpu-supply = <&vdd_cpu_l>;
251 cpu-supply = <&vdd_cpu_l>;
255 cpu-supply = <&vdd_cpu_l>;
259 cpu-supply = <&vdd_cpu_b>;
263 cpu-supply = <&vdd_cpu_b>;
269 temperature = <55000>;
275 temperature = <65000>;
284 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
289 cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
299 assigned-clocks = <&cru SCLK_RMII_SRC>;
300 assigned-clock-parents = <&clkin_gmac>;
301 clock_in_out = "input";
302 phy-supply = <&vcc_lan>;
304 pinctrl-names = "default";
305 pinctrl-0 = <&rgmii_pins>;
306 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
307 snps,reset-active-low;
308 snps,reset-delays-us = <0 10000 50000>;
315 ddc-i2c-bus = <&i2c3>;
316 pinctrl-names = "default";
317 pinctrl-0 = <&hdmi_cec>;
326 mali-supply = <&vdd_gpu>;
331 clock-frequency = <400000>;
332 i2c-scl-rising-time-ns = <168>;
333 i2c-scl-falling-time-ns = <4>;
337 compatible = "rockchip,rk808";
339 interrupt-parent = <&gpio3>;
340 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
342 clock-output-names = "xin32k", "rk808-clkout2";
343 pinctrl-names = "default";
344 pinctrl-0 = <&pmic_int_l>;
345 rockchip,system-power-controller;
348 vcc1-supply = <&vcc5v0_sys>;
349 vcc2-supply = <&vcc5v0_sys>;
350 vcc3-supply = <&vcc5v0_sys>;
351 vcc4-supply = <&vcc5v0_sys>;
352 vcc6-supply = <&vcc5v0_sys>;
353 vcc7-supply = <&vcc5v0_sys>;
354 vcc8-supply = <&vcc3v3_sys>;
355 vcc9-supply = <&vcc5v0_sys>;
356 vcc10-supply = <&vcc5v0_sys>;
357 vcc11-supply = <&vcc5v0_sys>;
358 vcc12-supply = <&vcc3v3_sys>;
359 vddio-supply = <&vcca_1v8>;
362 vdd_center: DCDC_REG1 {
363 regulator-name = "vdd_center";
366 regulator-min-microvolt = <750000>;
367 regulator-max-microvolt = <1350000>;
368 regulator-ramp-delay = <6001>;
369 regulator-state-mem {
370 regulator-off-in-suspend;
374 vdd_cpu_l: DCDC_REG2 {
375 regulator-name = "vdd_cpu_l";
378 regulator-min-microvolt = <750000>;
379 regulator-max-microvolt = <1350000>;
380 regulator-ramp-delay = <6001>;
381 regulator-state-mem {
382 regulator-off-in-suspend;
387 regulator-name = "vcc_ddr";
390 regulator-state-mem {
391 regulator-on-in-suspend;
396 regulator-name = "vcc_1v8";
399 regulator-min-microvolt = <1800000>;
400 regulator-max-microvolt = <1800000>;
401 regulator-state-mem {
402 regulator-on-in-suspend;
403 regulator-suspend-microvolt = <1800000>;
407 vcc1v8_dvp: LDO_REG1 {
408 regulator-name = "vcc1v8_dvp";
411 regulator-min-microvolt = <1800000>;
412 regulator-max-microvolt = <1800000>;
413 regulator-state-mem {
414 regulator-off-in-suspend;
418 vcc3v0_touch: LDO_REG2 {
419 regulator-name = "vcc3v0_touch";
420 regulator-min-microvolt = <3000000>;
421 regulator-max-microvolt = <3000000>;
422 regulator-state-mem {
423 regulator-off-in-suspend;
428 regulator-name = "vcca_1v8";
431 regulator-min-microvolt = <1800000>;
432 regulator-max-microvolt = <1800000>;
433 regulator-state-mem {
434 regulator-on-in-suspend;
435 regulator-suspend-microvolt = <1800000>;
440 regulator-name = "vcc_sdio";
443 regulator-min-microvolt = <1800000>;
444 regulator-max-microvolt = <3000000>;
445 regulator-state-mem {
446 regulator-on-in-suspend;
447 regulator-suspend-microvolt = <3000000>;
451 vcca3v0_codec: LDO_REG5 {
452 regulator-name = "vcca3v0_codec";
455 regulator-min-microvolt = <3000000>;
456 regulator-max-microvolt = <3000000>;
457 regulator-state-mem {
458 regulator-off-in-suspend;
463 regulator-name = "vcc_1v5";
466 regulator-min-microvolt = <1500000>;
467 regulator-max-microvolt = <1500000>;
468 regulator-state-mem {
469 regulator-on-in-suspend;
470 regulator-suspend-microvolt = <1500000>;
474 vcca1v8_codec: LDO_REG7 {
475 regulator-name = "vcca1v8_codec";
478 regulator-min-microvolt = <1800000>;
479 regulator-max-microvolt = <1800000>;
480 regulator-state-mem {
481 regulator-off-in-suspend;
486 regulator-name = "vcc_3v0";
489 regulator-min-microvolt = <3000000>;
490 regulator-max-microvolt = <3000000>;
491 regulator-state-mem {
492 regulator-on-in-suspend;
493 regulator-suspend-microvolt = <3000000>;
497 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
498 regulator-name = "vcc3v3_s3";
501 regulator-state-mem {
502 regulator-off-in-suspend;
506 vcc3v3_s0: SWITCH_REG2 {
507 regulator-name = "vcc3v3_s0";
508 regulator-state-mem {
509 regulator-off-in-suspend;
515 vdd_cpu_b: regulator@40 {
516 compatible = "silergy,syr827";
518 fcs,suspend-voltage-selector = <1>;
519 pinctrl-names = "default";
520 pinctrl-0 = <&vsel1_pin>;
521 regulator-name = "vdd_cpu_b";
522 regulator-min-microvolt = <712500>;
523 regulator-max-microvolt = <1500000>;
524 regulator-ramp-delay = <1000>;
527 vin-supply = <&vcc5v0_sys>;
529 regulator-state-mem {
530 regulator-off-in-suspend;
534 vdd_gpu: regulator@41 {
535 compatible = "silergy,syr828";
537 fcs,suspend-voltage-selector = <1>;
538 pinctrl-names = "default";
539 pinctrl-0 = <&vsel2_pin>;
540 regulator-name = "vdd_gpu";
541 regulator-min-microvolt = <712500>;
542 regulator-max-microvolt = <1500000>;
543 regulator-ramp-delay = <1000>;
546 vin-supply = <&vcc5v0_sys>;
548 regulator-state-mem {
549 regulator-off-in-suspend;
555 i2c-scl-rising-time-ns = <300>;
556 i2c-scl-falling-time-ns = <15>;
561 i2c-scl-rising-time-ns = <450>;
562 i2c-scl-falling-time-ns = <15>;
567 i2c-scl-rising-time-ns = <600>;
568 i2c-scl-falling-time-ns = <20>;
571 fusb0: typec-portc@22 {
572 compatible = "fcs,fusb302";
574 interrupt-parent = <&gpio1>;
575 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
576 pinctrl-names = "default";
577 pinctrl-0 = <&fusb0_int>;
578 vbus-supply = <&vcc5v0_typec>;
582 /* enable for pine64 touch screen support */
583 touch: touchscreen@5d {
584 compatible = "goodix,gt911";
586 interrupt-parent = <&gpio4>;
587 interrupts = <RK_PD5 IRQ_TYPE_EDGE_FALLING>;
588 AVDD28-supply = <&vcc3v0_touch>;
589 VDDIO-supply = <&vcc3v0_touch>;
590 irq-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
591 reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
597 rockchip,playback-channels = <8>;
598 rockchip,capture-channels = <8>;
603 rockchip,playback-channels = <2>;
604 rockchip,capture-channels = <2>;
608 i2s1_p0_0: endpoint {
611 remote-endpoint = <&es8316_p0_0>;
623 bt656-supply = <&vcc1v8_dvp>;
624 audio-supply = <&vcc_3v0>;
625 sdmmc-supply = <&vcc_sdio>;
626 gpio1830-supply = <&vcc_3v0>;
629 /* enable for pine64 panel display support */
638 mipi_out_panel: endpoint {
639 remote-endpoint = <&mipi_in_panel>;
644 mipi_panel: panel@0 {
645 compatible = "feiyang,fy07024di26a30d";
647 avdd-supply = <&avdd>;
648 backlight = <&backlight>;
649 dvdd-supply = <&vcc3v3_s0>;
652 mipi_in_panel: endpoint {
653 remote-endpoint = <&mipi_out_panel>;
660 ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
662 pinctrl-names = "default";
663 pinctrl-0 = <&pcie_perst>;
664 vpcie12v-supply = <&vcc12v_dcin>;
665 vpcie3v3-supply = <&vcc3v3_pcie>;
674 pmu1830-supply = <&vcc_3v0>;
680 bt_enable_h: bt-enable-h {
681 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
684 bt_host_wake_l: bt-host-wake-l {
685 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
688 bt_wake_l: bt-wake-l {
689 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
695 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
700 fusb0_int: fusb0-int {
701 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
707 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
712 work_led_pin: work-led-pin {
713 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
716 diy_led_pin: diy-led-pin {
717 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
722 pcie_perst: pcie-perst {
723 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
726 pcie_pwr_en: pcie-pwr-en {
727 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
732 pmic_int_l: pmic-int-l {
733 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
736 vsel1_pin: vsel1-pin {
737 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
740 vsel2_pin: vsel2-pin {
741 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
746 sdmmc0_pwr_h: sdmmc0-pwr-h {
747 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
753 wifi_enable_h: wifi-enable-h {
754 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
759 vcc5v0_typec_en: vcc5v0_typec_en {
760 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
765 vcc5v0_host_en: vcc5v0-host-en {
766 rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
784 vref-supply = <&vcca1v8_s3>;
793 keep-power-in-suspend;
794 mmc-pwrseq = <&sdio_pwrseq>;
796 pinctrl-names = "default";
797 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
805 cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
807 max-frequency = <150000000>;
808 pinctrl-names = "default";
809 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
810 vmmc-supply = <&vcc3v0_sd>;
811 vqmmc-supply = <&vcc_sdio>;
823 pinctrl-0 = <&spdif_bus_1>;
826 spdif_p0_0: endpoint {
827 remote-endpoint = <&dit_p0_0>;
836 compatible = "jedec,spi-nor";
838 spi-max-frequency = <10000000>;
851 /* tshut mode 0:CRU 1:GPIO */
852 rockchip,hw-tshut-mode = <1>;
853 /* tshut polarity 0:LOW 1:HIGH */
854 rockchip,hw-tshut-polarity = <1>;
861 u2phy0_otg: otg-port {
865 u2phy0_host: host-port {
866 phy-supply = <&vcc5v0_host>;
874 u2phy1_otg: otg-port {
878 u2phy1_host: host-port {
879 phy-supply = <&vcc5v0_host>;
885 pinctrl-names = "default";
886 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
890 compatible = "brcm,bcm43438-bt";
893 device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
894 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
895 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
896 pinctrl-names = "default";
897 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
898 vbat-supply = <&vcc3v3_sys>;
899 vddio-supply = <&vcc_1v8>;