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_gpio>, <&diy_led_gpio>;
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 vcc3v3_pcie: vcc3v3-pcie-regulator {
100 compatible = "regulator-fixed";
102 gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
103 pinctrl-names = "default";
104 pinctrl-0 = <&pcie_pwr_en>;
105 regulator-name = "vcc3v3_pcie";
108 vin-supply = <&vcc12v_dcin>;
111 vcc3v3_sys: vcc3v3-sys {
112 compatible = "regulator-fixed";
113 regulator-name = "vcc3v3_sys";
116 regulator-min-microvolt = <3300000>;
117 regulator-max-microvolt = <3300000>;
118 vin-supply = <&vcc5v0_sys>;
121 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
122 vcc5v0_host: vcc5v0-host-regulator {
123 compatible = "regulator-fixed";
125 gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
126 pinctrl-names = "default";
127 pinctrl-0 = <&vcc5v0_host_en>;
128 regulator-name = "vcc5v0_host";
130 vin-supply = <&vcc5v0_usb>;
133 vcc5v0_typec: vcc5v0-typec-regulator {
134 compatible = "regulator-fixed";
136 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
137 pinctrl-names = "default";
138 pinctrl-0 = <&vcc5v0_typec_en>;
139 regulator-name = "vcc5v0_typec";
141 vin-supply = <&vcc5v0_usb>;
144 vcc5v0_sys: vcc5v0-sys {
145 compatible = "regulator-fixed";
146 regulator-name = "vcc5v0_sys";
149 regulator-min-microvolt = <5000000>;
150 regulator-max-microvolt = <5000000>;
151 vin-supply = <&vcc12v_dcin>;
154 vcc5v0_usb: vcc5v0-usb {
155 compatible = "regulator-fixed";
156 regulator-name = "vcc5v0_usb";
159 regulator-min-microvolt = <5000000>;
160 regulator-max-microvolt = <5000000>;
161 vin-supply = <&vcc12v_dcin>;
165 compatible = "pwm-regulator";
166 pwms = <&pwm2 0 25000 1>;
167 regulator-name = "vdd_log";
170 regulator-min-microvolt = <800000>;
171 regulator-max-microvolt = <1700000>;
172 vin-supply = <&vcc5v0_sys>;
177 cpu-supply = <&vdd_cpu_l>;
181 cpu-supply = <&vdd_cpu_l>;
185 cpu-supply = <&vdd_cpu_l>;
189 cpu-supply = <&vdd_cpu_l>;
193 cpu-supply = <&vdd_cpu_b>;
197 cpu-supply = <&vdd_cpu_b>;
205 assigned-clocks = <&cru SCLK_RMII_SRC>;
206 assigned-clock-parents = <&clkin_gmac>;
207 clock_in_out = "input";
208 phy-supply = <&vcc_lan>;
210 pinctrl-names = "default";
211 pinctrl-0 = <&rgmii_pins>;
212 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
213 snps,reset-active-low;
214 snps,reset-delays-us = <0 10000 50000>;
221 ddc-i2c-bus = <&i2c3>;
222 pinctrl-names = "default";
223 pinctrl-0 = <&hdmi_cec>;
232 mali-supply = <&vdd_gpu>;
237 clock-frequency = <400000>;
238 i2c-scl-rising-time-ns = <168>;
239 i2c-scl-falling-time-ns = <4>;
243 compatible = "rockchip,rk808";
245 interrupt-parent = <&gpio3>;
246 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
248 clock-output-names = "xin32k", "rk808-clkout2";
249 pinctrl-names = "default";
250 pinctrl-0 = <&pmic_int_l>;
251 rockchip,system-power-controller;
254 vcc1-supply = <&vcc5v0_sys>;
255 vcc2-supply = <&vcc5v0_sys>;
256 vcc3-supply = <&vcc5v0_sys>;
257 vcc4-supply = <&vcc5v0_sys>;
258 vcc6-supply = <&vcc5v0_sys>;
259 vcc7-supply = <&vcc5v0_sys>;
260 vcc8-supply = <&vcc3v3_sys>;
261 vcc9-supply = <&vcc5v0_sys>;
262 vcc10-supply = <&vcc5v0_sys>;
263 vcc11-supply = <&vcc5v0_sys>;
264 vcc12-supply = <&vcc3v3_sys>;
265 vddio-supply = <&vcca_1v8>;
268 vdd_center: DCDC_REG1 {
269 regulator-name = "vdd_center";
272 regulator-min-microvolt = <750000>;
273 regulator-max-microvolt = <1350000>;
274 regulator-ramp-delay = <6001>;
275 regulator-state-mem {
276 regulator-off-in-suspend;
280 vdd_cpu_l: DCDC_REG2 {
281 regulator-name = "vdd_cpu_l";
284 regulator-min-microvolt = <750000>;
285 regulator-max-microvolt = <1350000>;
286 regulator-ramp-delay = <6001>;
287 regulator-state-mem {
288 regulator-off-in-suspend;
293 regulator-name = "vcc_ddr";
296 regulator-state-mem {
297 regulator-on-in-suspend;
302 regulator-name = "vcc_1v8";
305 regulator-min-microvolt = <1800000>;
306 regulator-max-microvolt = <1800000>;
307 regulator-state-mem {
308 regulator-on-in-suspend;
309 regulator-suspend-microvolt = <1800000>;
313 vcc1v8_dvp: LDO_REG1 {
314 regulator-name = "vcc1v8_dvp";
317 regulator-min-microvolt = <1800000>;
318 regulator-max-microvolt = <1800000>;
319 regulator-state-mem {
320 regulator-off-in-suspend;
324 vcc3v0_touch: LDO_REG2 {
325 regulator-name = "vcc3v0_touch";
328 regulator-min-microvolt = <3000000>;
329 regulator-max-microvolt = <3000000>;
330 regulator-state-mem {
331 regulator-off-in-suspend;
336 regulator-name = "vcca_1v8";
339 regulator-min-microvolt = <1800000>;
340 regulator-max-microvolt = <1800000>;
341 regulator-state-mem {
342 regulator-on-in-suspend;
343 regulator-suspend-microvolt = <1800000>;
348 regulator-name = "vcc_sdio";
351 regulator-min-microvolt = <1800000>;
352 regulator-max-microvolt = <3000000>;
353 regulator-state-mem {
354 regulator-on-in-suspend;
355 regulator-suspend-microvolt = <3000000>;
359 vcca3v0_codec: LDO_REG5 {
360 regulator-name = "vcca3v0_codec";
363 regulator-min-microvolt = <3000000>;
364 regulator-max-microvolt = <3000000>;
365 regulator-state-mem {
366 regulator-off-in-suspend;
371 regulator-name = "vcc_1v5";
374 regulator-min-microvolt = <1500000>;
375 regulator-max-microvolt = <1500000>;
376 regulator-state-mem {
377 regulator-on-in-suspend;
378 regulator-suspend-microvolt = <1500000>;
382 vcca1v8_codec: LDO_REG7 {
383 regulator-name = "vcca1v8_codec";
386 regulator-min-microvolt = <1800000>;
387 regulator-max-microvolt = <1800000>;
388 regulator-state-mem {
389 regulator-off-in-suspend;
394 regulator-name = "vcc_3v0";
397 regulator-min-microvolt = <3000000>;
398 regulator-max-microvolt = <3000000>;
399 regulator-state-mem {
400 regulator-on-in-suspend;
401 regulator-suspend-microvolt = <3000000>;
405 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
406 regulator-name = "vcc3v3_s3";
409 regulator-state-mem {
410 regulator-off-in-suspend;
414 vcc3v3_s0: SWITCH_REG2 {
415 regulator-name = "vcc3v3_s0";
418 regulator-state-mem {
419 regulator-off-in-suspend;
425 vdd_cpu_b: regulator@40 {
426 compatible = "silergy,syr827";
428 fcs,suspend-voltage-selector = <1>;
429 pinctrl-names = "default";
430 pinctrl-0 = <&vsel1_gpio>;
431 regulator-name = "vdd_cpu_b";
432 regulator-min-microvolt = <712500>;
433 regulator-max-microvolt = <1500000>;
434 regulator-ramp-delay = <1000>;
437 vin-supply = <&vcc5v0_sys>;
439 regulator-state-mem {
440 regulator-off-in-suspend;
444 vdd_gpu: regulator@41 {
445 compatible = "silergy,syr828";
447 fcs,suspend-voltage-selector = <1>;
448 pinctrl-names = "default";
449 pinctrl-0 = <&vsel2_gpio>;
450 regulator-name = "vdd_gpu";
451 regulator-min-microvolt = <712500>;
452 regulator-max-microvolt = <1500000>;
453 regulator-ramp-delay = <1000>;
456 vin-supply = <&vcc5v0_sys>;
458 regulator-state-mem {
459 regulator-off-in-suspend;
465 i2c-scl-rising-time-ns = <300>;
466 i2c-scl-falling-time-ns = <15>;
471 i2c-scl-rising-time-ns = <450>;
472 i2c-scl-falling-time-ns = <15>;
477 i2c-scl-rising-time-ns = <600>;
478 i2c-scl-falling-time-ns = <20>;
481 fusb0: typec-portc@22 {
482 compatible = "fcs,fusb302";
484 interrupt-parent = <&gpio1>;
485 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
486 pinctrl-names = "default";
487 pinctrl-0 = <&fusb0_int>;
488 vbus-supply = <&vcc5v0_typec>;
494 rockchip,playback-channels = <8>;
495 rockchip,capture-channels = <8>;
500 rockchip,playback-channels = <2>;
501 rockchip,capture-channels = <2>;
505 i2s1_p0_0: endpoint {
508 remote-endpoint = <&es8316_p0_0>;
520 bt656-supply = <&vcc1v8_dvp>;
521 audio-supply = <&vcc_3v0>;
522 sdmmc-supply = <&vcc_sdio>;
523 gpio1830-supply = <&vcc_3v0>;
527 ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
529 pinctrl-names = "default";
530 pinctrl-0 = <&pcie_perst>;
531 vpcie12v-supply = <&vcc12v_dcin>;
532 vpcie3v3-supply = <&vcc3v3_pcie>;
541 pmu1830-supply = <&vcc_3v0>;
547 bt_enable_h: bt-enable-h {
548 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
551 bt_host_wake_l: bt-host-wake-l {
552 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
555 bt_wake_l: bt-wake-l {
556 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
562 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
567 fusb0_int: fusb0-int {
568 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
573 work_led_gpio: work_led-gpio {
574 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
577 diy_led_gpio: diy_led-gpio {
578 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
583 pcie_perst: pcie-perst {
584 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
587 pcie_pwr_en: pcie-pwr-en {
588 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
593 pmic_int_l: pmic-int-l {
594 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
597 vsel1_gpio: vsel1-gpio {
598 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
601 vsel2_gpio: vsel2-gpio {
602 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
607 wifi_enable_h: wifi-enable-h {
608 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
613 vcc5v0_typec_en: vcc5v0_typec_en {
614 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
619 vcc5v0_host_en: vcc5v0-host-en {
620 rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
638 vref-supply = <&vcca1v8_s3>;
647 keep-power-in-suspend;
648 mmc-pwrseq = <&sdio_pwrseq>;
650 pinctrl-names = "default";
651 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
659 cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
661 max-frequency = <150000000>;
662 pinctrl-names = "default";
663 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
678 compatible = "jedec,spi-nor";
680 spi-max-frequency = <10000000>;
693 /* tshut mode 0:CRU 1:GPIO */
694 rockchip,hw-tshut-mode = <1>;
695 /* tshut polarity 0:LOW 1:HIGH */
696 rockchip,hw-tshut-polarity = <1>;
703 u2phy0_otg: otg-port {
707 u2phy0_host: host-port {
708 phy-supply = <&vcc5v0_host>;
716 u2phy1_otg: otg-port {
720 u2phy1_host: host-port {
721 phy-supply = <&vcc5v0_host>;
727 pinctrl-names = "default";
728 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
732 compatible = "brcm,bcm43438-bt";
735 device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
736 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
737 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
738 pinctrl-names = "default";
739 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
740 vbat-supply = <&vcc3v3_sys>;
741 vddio-supply = <&vcc_1v8>;