1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
4 * (https://www.khadas.com)
8 #include <dt-bindings/input/linux-event-codes.h>
9 #include <dt-bindings/pwm/pwm.h>
10 #include "rk3399.dtsi"
11 #include "rk3399-opp.dtsi"
15 stdout-path = "serial2:1500000n8";
18 clkin_gmac: external-gmac-clock {
19 compatible = "fixed-clock";
20 clock-frequency = <125000000>;
21 clock-output-names = "clkin_gmac";
25 sdio_pwrseq: sdio-pwrseq {
26 compatible = "mmc-pwrseq-simple";
28 clock-names = "ext_clock";
29 pinctrl-names = "default";
30 pinctrl-0 = <&wifi_enable_h>;
33 * On the module itself this is one of these (depending
34 * on the actual card populated):
35 * - SDIO_RESET_L_WL_REG_ON
36 * - PDN (power down when low)
38 reset-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_LOW>;
41 /* switched by pmic_sleep */
42 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
43 compatible = "regulator-fixed";
44 regulator-name = "vcc1v8_s3";
47 regulator-min-microvolt = <1800000>;
48 regulator-max-microvolt = <1800000>;
49 vin-supply = <&vcc_1v8>;
52 vcc3v3_pcie: vcc3v3-pcie-regulator {
53 compatible = "regulator-fixed";
54 regulator-name = "vcc3v3_pcie";
57 regulator-min-microvolt = <3300000>;
58 regulator-max-microvolt = <3300000>;
59 vin-supply = <&vsys_3v3>;
62 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
63 vcc5v0_host: vcc5v0-host-regulator {
64 compatible = "regulator-fixed";
66 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
67 pinctrl-names = "default";
68 pinctrl-0 = <&vcc5v0_host_en>;
69 regulator-name = "vcc5v0_host";
71 vin-supply = <&vsys_5v0>;
75 compatible = "pwm-regulator";
76 pwms = <&pwm2 0 25000 1>;
77 regulator-name = "vdd_log";
80 regulator-min-microvolt = <800000>;
81 regulator-max-microvolt = <1400000>;
82 vin-supply = <&vsys_3v3>;
86 compatible = "regulator-fixed";
87 regulator-name = "vsys";
93 compatible = "regulator-fixed";
94 regulator-name = "vsys_3v3";
97 regulator-min-microvolt = <3300000>;
98 regulator-max-microvolt = <3300000>;
103 compatible = "regulator-fixed";
104 regulator-name = "vsys_5v0";
107 regulator-min-microvolt = <5000000>;
108 regulator-max-microvolt = <5000000>;
109 vin-supply = <&vsys>;
113 compatible = "adc-keys";
114 io-channels = <&saradc 1>;
115 io-channel-names = "buttons";
116 keyup-threshold-microvolt = <1800000>;
117 poll-interval = <100>;
121 linux,code = <KEY_VENDOR>;
122 press-threshold-microvolt = <18000>;
127 compatible = "gpio-keys";
129 pinctrl-names = "default";
130 pinctrl-0 = <&pwrbtn>;
133 debounce-interval = <100>;
134 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
135 label = "GPIO Key Power";
136 linux,code = <KEY_POWER>;
142 compatible = "gpio-ir-receiver";
143 gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
144 linux,rc-map-name = "rc-khadas";
145 pinctrl-names = "default";
146 pinctrl-0 = <&ir_rx>;
150 compatible = "gpio-leds";
151 pinctrl-names = "default";
152 pinctrl-0 = <&sys_led_pin>, <&user_led_pin>;
156 linux,default-trigger = "heartbeat";
157 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
162 default-state = "off";
163 gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
168 compatible = "pwm-fan";
169 cooling-levels = <0 150 200 255>;
170 #cooling-cells = <2>;
171 fan-supply = <&vsys_5v0>;
172 pwms = <&pwm0 0 40000 0>;
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>;
203 temperature = <55000>;
209 temperature = <65000>;
218 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
223 cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
233 assigned-clocks = <&cru SCLK_RMII_SRC>;
234 assigned-clock-parents = <&clkin_gmac>;
235 clock_in_out = "input";
236 phy-supply = <&vcc_lan>;
238 pinctrl-names = "default";
239 pinctrl-0 = <&rgmii_pins>;
240 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
241 snps,reset-active-low;
242 snps,reset-delays-us = <0 10000 50000>;
248 mali-supply = <&vdd_gpu>;
255 temperature = <55000>;
261 temperature = <65000>;
270 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
275 cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
281 ddc-i2c-bus = <&i2c3>;
282 pinctrl-names = "default";
283 pinctrl-0 = <&hdmi_cec>;
292 i2c-scl-rising-time-ns = <450>;
293 i2c-scl-falling-time-ns = <15>;
298 clock-frequency = <400000>;
299 i2c-scl-rising-time-ns = <168>;
300 i2c-scl-falling-time-ns = <4>;
304 compatible = "rockchip,rk808";
306 interrupt-parent = <&gpio1>;
307 interrupts = <RK_PC6 IRQ_TYPE_LEVEL_LOW>;
309 clock-output-names = "xin32k", "rk808-clkout2";
310 pinctrl-names = "default";
311 pinctrl-0 = <&pmic_int_l>;
312 rockchip,system-power-controller;
315 vcc1-supply = <&vsys_3v3>;
316 vcc2-supply = <&vsys_3v3>;
317 vcc3-supply = <&vsys_3v3>;
318 vcc4-supply = <&vsys_3v3>;
319 vcc6-supply = <&vsys_3v3>;
320 vcc7-supply = <&vsys_3v3>;
321 vcc8-supply = <&vsys_3v3>;
322 vcc9-supply = <&vsys_3v3>;
323 vcc10-supply = <&vsys_3v3>;
324 vcc11-supply = <&vsys_3v3>;
325 vcc12-supply = <&vsys_3v3>;
326 vddio-supply = <&vcc_1v8>;
329 vdd_center: DCDC_REG1 {
330 regulator-name = "vdd_center";
333 regulator-min-microvolt = <750000>;
334 regulator-max-microvolt = <1350000>;
335 regulator-ramp-delay = <6001>;
337 regulator-state-mem {
338 regulator-off-in-suspend;
342 vdd_cpu_l: DCDC_REG2 {
343 regulator-name = "vdd_cpu_l";
346 regulator-min-microvolt = <750000>;
347 regulator-max-microvolt = <1350000>;
348 regulator-ramp-delay = <6001>;
350 regulator-state-mem {
351 regulator-off-in-suspend;
356 regulator-name = "vcc_ddr";
360 regulator-state-mem {
361 regulator-on-in-suspend;
366 regulator-name = "vcc_1v8";
369 regulator-min-microvolt = <1800000>;
370 regulator-max-microvolt = <1800000>;
372 regulator-state-mem {
373 regulator-on-in-suspend;
374 regulator-suspend-microvolt = <1800000>;
378 vcc1v8_apio2: LDO_REG1 {
379 regulator-name = "vcc1v8_apio2";
382 regulator-min-microvolt = <1800000>;
383 regulator-max-microvolt = <1800000>;
385 regulator-state-mem {
386 regulator-off-in-suspend;
390 vcc_vldo2: LDO_REG2 {
391 regulator-name = "vcc_vldo2";
394 regulator-min-microvolt = <3000000>;
395 regulator-max-microvolt = <3000000>;
397 regulator-state-mem {
398 regulator-off-in-suspend;
402 vcc1v8_pmupll: LDO_REG3 {
403 regulator-name = "vcc1v8_pmupll";
406 regulator-min-microvolt = <1800000>;
407 regulator-max-microvolt = <1800000>;
409 regulator-state-mem {
410 regulator-on-in-suspend;
411 regulator-suspend-microvolt = <1800000>;
416 regulator-name = "vccio_sd";
419 regulator-min-microvolt = <1800000>;
420 regulator-max-microvolt = <3000000>;
422 regulator-state-mem {
423 regulator-on-in-suspend;
424 regulator-suspend-microvolt = <3000000>;
428 vcc_vldo5: LDO_REG5 {
429 regulator-name = "vcc_vldo5";
432 regulator-min-microvolt = <3000000>;
433 regulator-max-microvolt = <3000000>;
435 regulator-state-mem {
436 regulator-off-in-suspend;
441 regulator-name = "vcc_1v5";
444 regulator-min-microvolt = <1500000>;
445 regulator-max-microvolt = <1500000>;
447 regulator-state-mem {
448 regulator-on-in-suspend;
449 regulator-suspend-microvolt = <1500000>;
453 vcc1v8_codec: LDO_REG7 {
454 regulator-name = "vcc1v8_codec";
457 regulator-min-microvolt = <1800000>;
458 regulator-max-microvolt = <1800000>;
460 regulator-state-mem {
461 regulator-off-in-suspend;
466 regulator-name = "vcc_3v0";
469 regulator-min-microvolt = <3000000>;
470 regulator-max-microvolt = <3000000>;
472 regulator-state-mem {
473 regulator-on-in-suspend;
474 regulator-suspend-microvolt = <3000000>;
478 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
479 regulator-name = "vcc3v3_s3";
483 regulator-state-mem {
484 regulator-off-in-suspend;
488 vcc3v3_s0: SWITCH_REG2 {
489 regulator-name = "vcc3v3_s0";
493 regulator-state-mem {
494 regulator-off-in-suspend;
500 vdd_cpu_b: regulator@40 {
501 compatible = "silergy,syr827";
503 fcs,suspend-voltage-selector = <1>;
504 pinctrl-names = "default";
505 pinctrl-0 = <&cpu_b_sleep>;
506 regulator-name = "vdd_cpu_b";
507 regulator-min-microvolt = <712500>;
508 regulator-max-microvolt = <1500000>;
509 regulator-ramp-delay = <1000>;
512 vin-supply = <&vsys_3v3>;
514 regulator-state-mem {
515 regulator-off-in-suspend;
519 vdd_gpu: regulator@41 {
520 compatible = "silergy,syr828";
522 fcs,suspend-voltage-selector = <1>;
523 pinctrl-names = "default";
524 pinctrl-0 = <&gpu_sleep>;
525 regulator-name = "vdd_gpu";
526 regulator-min-microvolt = <712500>;
527 regulator-max-microvolt = <1500000>;
528 regulator-ramp-delay = <1000>;
531 vin-supply = <&vsys_3v3>;
533 regulator-state-mem {
534 regulator-off-in-suspend;
540 clock-frequency = <400000>;
541 i2c-scl-rising-time-ns = <160>;
542 i2c-scl-falling-time-ns = <30>;
547 rockchip,playback-channels = <8>;
548 rockchip,capture-channels = <8>;
553 rockchip,playback-channels = <2>;
554 rockchip,capture-channels = <2>;
563 bt656-supply = <&vcc1v8_apio2>;
564 audio-supply = <&vcc1v8_codec>;
565 sdmmc-supply = <&vccio_sd>;
566 gpio1830-supply = <&vcc_3v0>;
571 pmu1830-supply = <&vcc_1v8>;
577 bt_host_wake_l: bt-host-wake-l {
578 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
581 bt_reg_on_h: bt-reg-on-h {
582 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
585 bt_wake_l: bt-wake-l {
586 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
592 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
598 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
603 sys_led_pin: sys-led-pin {
604 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
607 user_led_pin: user-led-pin {
608 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
613 pmic_int_l: pmic-int-l {
614 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
617 cpu_b_sleep: cpu-b-sleep {
618 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
621 gpu_sleep: gpu-sleep {
622 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
627 wifi_enable_h: wifi-enable-h {
628 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
633 vcc5v0_host_en: vcc5v0-host-en {
634 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
639 wifi_host_wake_l: wifi-host-wake-l {
640 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
654 vref-supply = <&vcca1v8_s3>;
659 /* WiFi & BT combo module Ampak AP6356S */
663 keep-power-in-suspend;
664 mmc-pwrseq = <&sdio_pwrseq>;
666 pinctrl-names = "default";
667 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
669 vqmmc-supply = <&vcc1v8_s3>;
670 vmmc-supply = <&vccio_sd>;
671 #address-cells = <1>;
677 compatible = "brcm,bcm4329-fmac";
678 interrupt-parent = <&gpio0>;
679 interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
680 interrupt-names = "host-wake";
681 brcm,drive-strength = <5>;
682 pinctrl-names = "default";
683 pinctrl-0 = <&wifi_host_wake_l>;
691 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
693 max-frequency = <150000000>;
694 pinctrl-names = "default";
695 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
702 mmc-hs400-enhanced-strobe;
711 compatible = "winbond,w25q128fw", "jedec,spi-nor";
713 spi-max-frequency = <104000000>;
726 /* tshut mode 0:CRU 1:GPIO */
727 rockchip,hw-tshut-mode = <1>;
728 /* tshut polarity 0:LOW 1:HIGH */
729 rockchip,hw-tshut-polarity = <1>;
736 u2phy0_otg: otg-port {
740 u2phy0_host: host-port {
741 phy-supply = <&vcc5v0_host>;
749 u2phy1_otg: otg-port {
753 u2phy1_host: host-port {
754 phy-supply = <&vcc5v0_host>;
760 pinctrl-names = "default";
761 pinctrl-0 = <&uart0_xfer &uart0_rts &uart0_cts>;
765 compatible = "brcm,bcm43438-bt";
768 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
769 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
770 shutdown-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
771 max-speed = <4000000>;
772 pinctrl-names = "default";
773 pinctrl-0 = <&bt_reg_on_h &bt_host_wake_l &bt_wake_l>;
774 vbat-supply = <&vsys_3v3>;
775 vddio-supply = <&vcc_1v8>;