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"
14 stdout-path = "serial2:1500000n8";
17 clkin_gmac: external-gmac-clock {
18 compatible = "fixed-clock";
19 clock-frequency = <125000000>;
20 clock-output-names = "clkin_gmac";
25 compatible = "gpio-keys";
27 pinctrl-names = "default";
28 pinctrl-0 = <&pwrbtn>;
31 debounce-interval = <100>;
32 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
33 label = "GPIO Key Power";
34 linux,code = <KEY_POWER>;
40 compatible = "gpio-leds";
41 pinctrl-names = "default";
42 pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
47 gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
52 default-state = "off";
53 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
58 compatible = "pwm-fan";
60 fan-supply = <&vcc12v_dcin>;
61 pwms = <&pwm1 0 50000 0>;
64 sdio_pwrseq: sdio-pwrseq {
65 compatible = "mmc-pwrseq-simple";
67 clock-names = "ext_clock";
68 pinctrl-names = "default";
69 pinctrl-0 = <&wifi_enable_h>;
70 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
74 compatible = "audio-graph-card";
75 label = "rockchip,rk3399";
79 vcc12v_dcin: vcc12v-dcin {
80 compatible = "regulator-fixed";
81 regulator-name = "vcc12v_dcin";
84 regulator-min-microvolt = <12000000>;
85 regulator-max-microvolt = <12000000>;
88 /* switched by pmic_sleep */
89 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
90 compatible = "regulator-fixed";
91 regulator-name = "vcc1v8_s3";
94 regulator-min-microvolt = <1800000>;
95 regulator-max-microvolt = <1800000>;
96 vin-supply = <&vcc_1v8>;
99 /* micro SD card power */
100 vcc3v0_sd: vcc3v0-sd {
101 compatible = "regulator-fixed";
103 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
104 pinctrl-names = "default";
105 pinctrl-0 = <&sdmmc0_pwr_h>;
106 regulator-name = "vcc3v0_sd";
108 regulator-min-microvolt = <3000000>;
109 regulator-max-microvolt = <3000000>;
110 vin-supply = <&vcc3v3_sys>;
112 regulator-state-mem {
113 regulator-off-in-suspend;
117 vcc3v3_pcie: vcc3v3-pcie-regulator {
118 compatible = "regulator-fixed";
120 gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
121 pinctrl-names = "default";
122 pinctrl-0 = <&pcie_pwr_en>;
123 regulator-name = "vcc3v3_pcie";
126 vin-supply = <&vcc12v_dcin>;
129 vcc3v3_sys: vcc3v3-sys {
130 compatible = "regulator-fixed";
131 regulator-name = "vcc3v3_sys";
134 regulator-min-microvolt = <3300000>;
135 regulator-max-microvolt = <3300000>;
136 vin-supply = <&vcc5v0_sys>;
139 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
140 vcc5v0_host: vcc5v0-host-regulator {
141 compatible = "regulator-fixed";
143 gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
144 pinctrl-names = "default";
145 pinctrl-0 = <&vcc5v0_host_en>;
146 regulator-name = "vcc5v0_host";
148 vin-supply = <&vcc5v0_usb>;
151 vcc5v0_typec: vcc5v0-typec-regulator {
152 compatible = "regulator-fixed";
154 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
155 pinctrl-names = "default";
156 pinctrl-0 = <&vcc5v0_typec_en>;
157 regulator-name = "vcc5v0_typec";
159 vin-supply = <&vcc5v0_usb>;
162 vcc5v0_sys: vcc5v0-sys {
163 compatible = "regulator-fixed";
164 regulator-name = "vcc5v0_sys";
167 regulator-min-microvolt = <5000000>;
168 regulator-max-microvolt = <5000000>;
169 vin-supply = <&vcc12v_dcin>;
172 vcc5v0_usb: vcc5v0-usb {
173 compatible = "regulator-fixed";
174 regulator-name = "vcc5v0_usb";
177 regulator-min-microvolt = <5000000>;
178 regulator-max-microvolt = <5000000>;
179 vin-supply = <&vcc12v_dcin>;
183 compatible = "pwm-regulator";
184 pwms = <&pwm2 0 25000 1>;
185 regulator-name = "vdd_log";
188 regulator-min-microvolt = <800000>;
189 regulator-max-microvolt = <1700000>;
190 vin-supply = <&vcc5v0_sys>;
195 cpu-supply = <&vdd_cpu_l>;
199 cpu-supply = <&vdd_cpu_l>;
203 cpu-supply = <&vdd_cpu_l>;
207 cpu-supply = <&vdd_cpu_l>;
211 cpu-supply = <&vdd_cpu_b>;
215 cpu-supply = <&vdd_cpu_b>;
223 assigned-clocks = <&cru SCLK_RMII_SRC>;
224 assigned-clock-parents = <&clkin_gmac>;
225 clock_in_out = "input";
226 phy-supply = <&vcc_lan>;
228 pinctrl-names = "default";
229 pinctrl-0 = <&rgmii_pins>;
230 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
231 snps,reset-active-low;
232 snps,reset-delays-us = <0 10000 50000>;
239 ddc-i2c-bus = <&i2c3>;
240 pinctrl-names = "default";
241 pinctrl-0 = <&hdmi_cec>;
250 mali-supply = <&vdd_gpu>;
255 clock-frequency = <400000>;
256 i2c-scl-rising-time-ns = <168>;
257 i2c-scl-falling-time-ns = <4>;
261 compatible = "rockchip,rk808";
263 interrupt-parent = <&gpio3>;
264 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
266 clock-output-names = "xin32k", "rk808-clkout2";
267 pinctrl-names = "default";
268 pinctrl-0 = <&pmic_int_l>;
269 rockchip,system-power-controller;
272 vcc1-supply = <&vcc5v0_sys>;
273 vcc2-supply = <&vcc5v0_sys>;
274 vcc3-supply = <&vcc5v0_sys>;
275 vcc4-supply = <&vcc5v0_sys>;
276 vcc6-supply = <&vcc5v0_sys>;
277 vcc7-supply = <&vcc5v0_sys>;
278 vcc8-supply = <&vcc3v3_sys>;
279 vcc9-supply = <&vcc5v0_sys>;
280 vcc10-supply = <&vcc5v0_sys>;
281 vcc11-supply = <&vcc5v0_sys>;
282 vcc12-supply = <&vcc3v3_sys>;
283 vddio-supply = <&vcca_1v8>;
286 vdd_center: DCDC_REG1 {
287 regulator-name = "vdd_center";
290 regulator-min-microvolt = <750000>;
291 regulator-max-microvolt = <1350000>;
292 regulator-ramp-delay = <6001>;
293 regulator-state-mem {
294 regulator-off-in-suspend;
298 vdd_cpu_l: DCDC_REG2 {
299 regulator-name = "vdd_cpu_l";
302 regulator-min-microvolt = <750000>;
303 regulator-max-microvolt = <1350000>;
304 regulator-ramp-delay = <6001>;
305 regulator-state-mem {
306 regulator-off-in-suspend;
311 regulator-name = "vcc_ddr";
314 regulator-state-mem {
315 regulator-on-in-suspend;
320 regulator-name = "vcc_1v8";
323 regulator-min-microvolt = <1800000>;
324 regulator-max-microvolt = <1800000>;
325 regulator-state-mem {
326 regulator-on-in-suspend;
327 regulator-suspend-microvolt = <1800000>;
331 vcc1v8_dvp: LDO_REG1 {
332 regulator-name = "vcc1v8_dvp";
335 regulator-min-microvolt = <1800000>;
336 regulator-max-microvolt = <1800000>;
337 regulator-state-mem {
338 regulator-off-in-suspend;
342 vcc3v0_touch: LDO_REG2 {
343 regulator-name = "vcc3v0_touch";
346 regulator-min-microvolt = <3000000>;
347 regulator-max-microvolt = <3000000>;
348 regulator-state-mem {
349 regulator-off-in-suspend;
354 regulator-name = "vcca_1v8";
357 regulator-min-microvolt = <1800000>;
358 regulator-max-microvolt = <1800000>;
359 regulator-state-mem {
360 regulator-on-in-suspend;
361 regulator-suspend-microvolt = <1800000>;
366 regulator-name = "vcc_sdio";
369 regulator-min-microvolt = <1800000>;
370 regulator-max-microvolt = <3000000>;
371 regulator-state-mem {
372 regulator-on-in-suspend;
373 regulator-suspend-microvolt = <3000000>;
377 vcca3v0_codec: LDO_REG5 {
378 regulator-name = "vcca3v0_codec";
381 regulator-min-microvolt = <3000000>;
382 regulator-max-microvolt = <3000000>;
383 regulator-state-mem {
384 regulator-off-in-suspend;
389 regulator-name = "vcc_1v5";
392 regulator-min-microvolt = <1500000>;
393 regulator-max-microvolt = <1500000>;
394 regulator-state-mem {
395 regulator-on-in-suspend;
396 regulator-suspend-microvolt = <1500000>;
400 vcca1v8_codec: LDO_REG7 {
401 regulator-name = "vcca1v8_codec";
404 regulator-min-microvolt = <1800000>;
405 regulator-max-microvolt = <1800000>;
406 regulator-state-mem {
407 regulator-off-in-suspend;
412 regulator-name = "vcc_3v0";
415 regulator-min-microvolt = <3000000>;
416 regulator-max-microvolt = <3000000>;
417 regulator-state-mem {
418 regulator-on-in-suspend;
419 regulator-suspend-microvolt = <3000000>;
423 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
424 regulator-name = "vcc3v3_s3";
427 regulator-state-mem {
428 regulator-off-in-suspend;
432 vcc3v3_s0: SWITCH_REG2 {
433 regulator-name = "vcc3v3_s0";
436 regulator-state-mem {
437 regulator-off-in-suspend;
443 vdd_cpu_b: regulator@40 {
444 compatible = "silergy,syr827";
446 fcs,suspend-voltage-selector = <1>;
447 pinctrl-names = "default";
448 pinctrl-0 = <&vsel1_pin>;
449 regulator-name = "vdd_cpu_b";
450 regulator-min-microvolt = <712500>;
451 regulator-max-microvolt = <1500000>;
452 regulator-ramp-delay = <1000>;
455 vin-supply = <&vcc5v0_sys>;
457 regulator-state-mem {
458 regulator-off-in-suspend;
462 vdd_gpu: regulator@41 {
463 compatible = "silergy,syr828";
465 fcs,suspend-voltage-selector = <1>;
466 pinctrl-names = "default";
467 pinctrl-0 = <&vsel2_pin>;
468 regulator-name = "vdd_gpu";
469 regulator-min-microvolt = <712500>;
470 regulator-max-microvolt = <1500000>;
471 regulator-ramp-delay = <1000>;
474 vin-supply = <&vcc5v0_sys>;
476 regulator-state-mem {
477 regulator-off-in-suspend;
483 i2c-scl-rising-time-ns = <300>;
484 i2c-scl-falling-time-ns = <15>;
489 i2c-scl-rising-time-ns = <450>;
490 i2c-scl-falling-time-ns = <15>;
495 i2c-scl-rising-time-ns = <600>;
496 i2c-scl-falling-time-ns = <20>;
499 fusb0: typec-portc@22 {
500 compatible = "fcs,fusb302";
502 interrupt-parent = <&gpio1>;
503 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
504 pinctrl-names = "default";
505 pinctrl-0 = <&fusb0_int>;
506 vbus-supply = <&vcc5v0_typec>;
512 rockchip,playback-channels = <8>;
513 rockchip,capture-channels = <8>;
518 rockchip,playback-channels = <2>;
519 rockchip,capture-channels = <2>;
523 i2s1_p0_0: endpoint {
526 remote-endpoint = <&es8316_p0_0>;
538 bt656-supply = <&vcc1v8_dvp>;
539 audio-supply = <&vcc_3v0>;
540 sdmmc-supply = <&vcc_sdio>;
541 gpio1830-supply = <&vcc_3v0>;
545 ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
547 pinctrl-names = "default";
548 pinctrl-0 = <&pcie_perst>;
549 vpcie12v-supply = <&vcc12v_dcin>;
550 vpcie3v3-supply = <&vcc3v3_pcie>;
559 pmu1830-supply = <&vcc_3v0>;
565 bt_enable_h: bt-enable-h {
566 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
569 bt_host_wake_l: bt-host-wake-l {
570 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
573 bt_wake_l: bt-wake-l {
574 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
580 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
585 fusb0_int: fusb0-int {
586 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
591 work_led_pin: work-led-pin {
592 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
595 diy_led_pin: diy-led-pin {
596 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
601 pcie_perst: pcie-perst {
602 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
605 pcie_pwr_en: pcie-pwr-en {
606 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
611 pmic_int_l: pmic-int-l {
612 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
615 vsel1_pin: vsel1-pin {
616 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
619 vsel2_pin: vsel2-pin {
620 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
625 sdmmc0_pwr_h: sdmmc0-pwr-h {
626 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
632 wifi_enable_h: wifi-enable-h {
633 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
638 vcc5v0_typec_en: vcc5v0_typec_en {
639 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
644 vcc5v0_host_en: vcc5v0-host-en {
645 rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
663 vref-supply = <&vcca1v8_s3>;
672 keep-power-in-suspend;
673 mmc-pwrseq = <&sdio_pwrseq>;
675 pinctrl-names = "default";
676 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
684 cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
686 max-frequency = <150000000>;
687 pinctrl-names = "default";
688 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
689 vmmc-supply = <&vcc3v0_sd>;
690 vqmmc-supply = <&vcc_sdio>;
705 compatible = "jedec,spi-nor";
707 spi-max-frequency = <10000000>;
720 /* tshut mode 0:CRU 1:GPIO */
721 rockchip,hw-tshut-mode = <1>;
722 /* tshut polarity 0:LOW 1:HIGH */
723 rockchip,hw-tshut-polarity = <1>;
730 u2phy0_otg: otg-port {
734 u2phy0_host: host-port {
735 phy-supply = <&vcc5v0_host>;
743 u2phy1_otg: otg-port {
747 u2phy1_host: host-port {
748 phy-supply = <&vcc5v0_host>;
754 pinctrl-names = "default";
755 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
759 compatible = "brcm,bcm43438-bt";
762 device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
763 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
764 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
765 pinctrl-names = "default";
766 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
767 vbat-supply = <&vcc3v3_sys>;
768 vddio-supply = <&vcc_1v8>;