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/interrupt-controller/irq.h>
10 #include <dt-bindings/pwm/pwm.h>
11 #include "rk3399.dtsi"
12 #include "rk3399-opp.dtsi"
22 stdout-path = "serial2:1500000n8";
25 clkin_gmac: external-gmac-clock {
26 compatible = "fixed-clock";
27 clock-frequency = <125000000>;
28 clock-output-names = "clkin_gmac";
32 sdio_pwrseq: sdio-pwrseq {
33 compatible = "mmc-pwrseq-simple";
35 clock-names = "ext_clock";
36 pinctrl-names = "default";
37 pinctrl-0 = <&wifi_enable_h>;
40 * On the module itself this is one of these (depending
41 * on the actual card populated):
42 * - SDIO_RESET_L_WL_REG_ON
43 * - PDN (power down when low)
45 reset-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_LOW>;
48 /* switched by pmic_sleep */
49 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
50 compatible = "regulator-fixed";
51 regulator-name = "vcc1v8_s3";
54 regulator-min-microvolt = <1800000>;
55 regulator-max-microvolt = <1800000>;
56 vin-supply = <&vcc_1v8>;
59 vcc3v3_pcie: vcc3v3-pcie-regulator {
60 compatible = "regulator-fixed";
61 regulator-name = "vcc3v3_pcie";
64 regulator-min-microvolt = <3300000>;
65 regulator-max-microvolt = <3300000>;
66 vin-supply = <&vsys_3v3>;
69 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
70 vcc5v0_host: vcc5v0-host-regulator {
71 compatible = "regulator-fixed";
73 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
74 pinctrl-names = "default";
75 pinctrl-0 = <&vcc5v0_host_en>;
76 regulator-name = "vcc5v0_host";
78 vin-supply = <&vsys_5v0>;
82 compatible = "pwm-regulator";
83 pwms = <&pwm2 0 25000 1>;
84 pwm-supply = <&vsys_3v3>;
85 regulator-name = "vdd_log";
88 regulator-min-microvolt = <800000>;
89 regulator-max-microvolt = <1400000>;
93 compatible = "regulator-fixed";
94 regulator-name = "vsys";
100 compatible = "regulator-fixed";
101 regulator-name = "vsys_3v3";
104 regulator-min-microvolt = <3300000>;
105 regulator-max-microvolt = <3300000>;
106 vin-supply = <&vsys>;
110 compatible = "regulator-fixed";
111 regulator-name = "vsys_5v0";
114 regulator-min-microvolt = <5000000>;
115 regulator-max-microvolt = <5000000>;
116 vin-supply = <&vsys>;
120 compatible = "adc-keys";
121 io-channels = <&saradc 1>;
122 io-channel-names = "buttons";
123 keyup-threshold-microvolt = <1800000>;
124 poll-interval = <100>;
128 linux,code = <KEY_VENDOR>;
129 press-threshold-microvolt = <18000>;
134 compatible = "gpio-keys";
136 pinctrl-names = "default";
137 pinctrl-0 = <&pwrbtn>;
140 debounce-interval = <100>;
141 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
142 label = "GPIO Key Power";
143 linux,code = <KEY_POWER>;
149 compatible = "gpio-ir-receiver";
150 gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
151 linux,rc-map-name = "rc-khadas";
152 pinctrl-names = "default";
153 pinctrl-0 = <&ir_rx>;
157 compatible = "gpio-leds";
158 pinctrl-names = "default";
159 pinctrl-0 = <&sys_led_pin>, <&user_led_pin>;
163 linux,default-trigger = "heartbeat";
164 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
169 default-state = "off";
170 gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
175 compatible = "pwm-fan";
176 cooling-levels = <0 150 200 255>;
177 #cooling-cells = <2>;
178 fan-supply = <&vsys_5v0>;
179 pwms = <&pwm0 0 40000 0>;
184 cpu-supply = <&vdd_cpu_l>;
188 cpu-supply = <&vdd_cpu_l>;
192 cpu-supply = <&vdd_cpu_l>;
196 cpu-supply = <&vdd_cpu_l>;
200 cpu-supply = <&vdd_cpu_b>;
204 cpu-supply = <&vdd_cpu_b>;
210 temperature = <55000>;
216 temperature = <65000>;
225 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
230 cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
240 assigned-clocks = <&cru SCLK_RMII_SRC>;
241 assigned-clock-parents = <&clkin_gmac>;
242 clock_in_out = "input";
243 phy-supply = <&vcc_lan>;
245 pinctrl-names = "default";
246 pinctrl-0 = <&rgmii_pins>;
247 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
248 snps,reset-active-low;
249 snps,reset-delays-us = <0 10000 50000>;
255 mali-supply = <&vdd_gpu>;
262 temperature = <55000>;
268 temperature = <65000>;
277 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
282 cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
288 ddc-i2c-bus = <&i2c3>;
289 pinctrl-names = "default";
290 pinctrl-0 = <&hdmi_cec>;
299 i2c-scl-rising-time-ns = <450>;
300 i2c-scl-falling-time-ns = <15>;
305 clock-frequency = <400000>;
306 i2c-scl-rising-time-ns = <168>;
307 i2c-scl-falling-time-ns = <4>;
311 compatible = "rockchip,rk808";
313 interrupt-parent = <&gpio1>;
314 interrupts = <RK_PC6 IRQ_TYPE_LEVEL_LOW>;
316 clock-output-names = "xin32k", "rk808-clkout2";
317 pinctrl-names = "default";
318 pinctrl-0 = <&pmic_int_l>;
319 rockchip,system-power-controller;
322 vcc1-supply = <&vsys_3v3>;
323 vcc2-supply = <&vsys_3v3>;
324 vcc3-supply = <&vsys_3v3>;
325 vcc4-supply = <&vsys_3v3>;
326 vcc6-supply = <&vsys_3v3>;
327 vcc7-supply = <&vsys_3v3>;
328 vcc8-supply = <&vsys_3v3>;
329 vcc9-supply = <&vsys_3v3>;
330 vcc10-supply = <&vsys_3v3>;
331 vcc11-supply = <&vsys_3v3>;
332 vcc12-supply = <&vsys_3v3>;
333 vddio-supply = <&vcc_1v8>;
336 vdd_center: DCDC_REG1 {
337 regulator-name = "vdd_center";
340 regulator-min-microvolt = <750000>;
341 regulator-max-microvolt = <1350000>;
342 regulator-ramp-delay = <6001>;
344 regulator-state-mem {
345 regulator-off-in-suspend;
349 vdd_cpu_l: DCDC_REG2 {
350 regulator-name = "vdd_cpu_l";
353 regulator-min-microvolt = <750000>;
354 regulator-max-microvolt = <1350000>;
355 regulator-ramp-delay = <6001>;
357 regulator-state-mem {
358 regulator-off-in-suspend;
363 regulator-name = "vcc_ddr";
367 regulator-state-mem {
368 regulator-on-in-suspend;
373 regulator-name = "vcc_1v8";
376 regulator-min-microvolt = <1800000>;
377 regulator-max-microvolt = <1800000>;
379 regulator-state-mem {
380 regulator-on-in-suspend;
381 regulator-suspend-microvolt = <1800000>;
385 vcc1v8_apio2: LDO_REG1 {
386 regulator-name = "vcc1v8_apio2";
389 regulator-min-microvolt = <1800000>;
390 regulator-max-microvolt = <1800000>;
392 regulator-state-mem {
393 regulator-off-in-suspend;
397 vcc_vldo2: LDO_REG2 {
398 regulator-name = "vcc_vldo2";
401 regulator-min-microvolt = <3000000>;
402 regulator-max-microvolt = <3000000>;
404 regulator-state-mem {
405 regulator-off-in-suspend;
409 vcc1v8_pmupll: LDO_REG3 {
410 regulator-name = "vcc1v8_pmupll";
413 regulator-min-microvolt = <1800000>;
414 regulator-max-microvolt = <1800000>;
416 regulator-state-mem {
417 regulator-on-in-suspend;
418 regulator-suspend-microvolt = <1800000>;
423 regulator-name = "vccio_sd";
426 regulator-min-microvolt = <1800000>;
427 regulator-max-microvolt = <3000000>;
429 regulator-state-mem {
430 regulator-on-in-suspend;
431 regulator-suspend-microvolt = <3000000>;
435 vcc_vldo5: LDO_REG5 {
436 regulator-name = "vcc_vldo5";
439 regulator-min-microvolt = <3000000>;
440 regulator-max-microvolt = <3000000>;
442 regulator-state-mem {
443 regulator-off-in-suspend;
448 regulator-name = "vcc_1v5";
451 regulator-min-microvolt = <1500000>;
452 regulator-max-microvolt = <1500000>;
454 regulator-state-mem {
455 regulator-on-in-suspend;
456 regulator-suspend-microvolt = <1500000>;
460 vcc1v8_codec: LDO_REG7 {
461 regulator-name = "vcc1v8_codec";
464 regulator-min-microvolt = <1800000>;
465 regulator-max-microvolt = <1800000>;
467 regulator-state-mem {
468 regulator-off-in-suspend;
473 regulator-name = "vcc_3v0";
476 regulator-min-microvolt = <3000000>;
477 regulator-max-microvolt = <3000000>;
479 regulator-state-mem {
480 regulator-on-in-suspend;
481 regulator-suspend-microvolt = <3000000>;
485 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
486 regulator-name = "vcc3v3_s3";
490 regulator-state-mem {
491 regulator-off-in-suspend;
495 vcc3v3_s0: SWITCH_REG2 {
496 regulator-name = "vcc3v3_s0";
500 regulator-state-mem {
501 regulator-off-in-suspend;
507 vdd_cpu_b: regulator@40 {
508 compatible = "silergy,syr827";
510 fcs,suspend-voltage-selector = <1>;
511 pinctrl-names = "default";
512 pinctrl-0 = <&cpu_b_sleep>;
513 regulator-name = "vdd_cpu_b";
514 regulator-min-microvolt = <712500>;
515 regulator-max-microvolt = <1500000>;
516 regulator-ramp-delay = <1000>;
519 vin-supply = <&vsys_3v3>;
521 regulator-state-mem {
522 regulator-off-in-suspend;
526 vdd_gpu: regulator@41 {
527 compatible = "silergy,syr828";
529 fcs,suspend-voltage-selector = <1>;
530 pinctrl-names = "default";
531 pinctrl-0 = <&gpu_sleep>;
532 regulator-name = "vdd_gpu";
533 regulator-min-microvolt = <712500>;
534 regulator-max-microvolt = <1500000>;
535 regulator-ramp-delay = <1000>;
538 vin-supply = <&vsys_3v3>;
540 regulator-state-mem {
541 regulator-off-in-suspend;
547 clock-frequency = <400000>;
548 i2c-scl-rising-time-ns = <160>;
549 i2c-scl-falling-time-ns = <30>;
554 rockchip,playback-channels = <8>;
555 rockchip,capture-channels = <8>;
560 rockchip,playback-channels = <2>;
561 rockchip,capture-channels = <2>;
570 bt656-supply = <&vcc1v8_apio2>;
571 audio-supply = <&vcc1v8_codec>;
572 sdmmc-supply = <&vccio_sd>;
573 gpio1830-supply = <&vcc_3v0>;
578 pmu1830-supply = <&vcc_1v8>;
584 bt_host_wake_l: bt-host-wake-l {
585 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
588 bt_reg_on_h: bt-reg-on-h {
589 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
592 bt_wake_l: bt-wake-l {
593 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
599 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
605 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
610 sys_led_pin: sys-led-pin {
611 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
614 user_led_pin: user-led-pin {
615 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
620 pmic_int_l: pmic-int-l {
621 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
624 cpu_b_sleep: cpu-b-sleep {
625 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
628 gpu_sleep: gpu-sleep {
629 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
634 wifi_enable_h: wifi-enable-h {
635 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
640 vcc5v0_host_en: vcc5v0-host-en {
641 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
646 wifi_host_wake_l: wifi-host-wake-l {
647 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
661 vref-supply = <&vcca1v8_s3>;
666 /* WiFi & BT combo module Ampak AP6356S */
670 keep-power-in-suspend;
671 mmc-pwrseq = <&sdio_pwrseq>;
673 pinctrl-names = "default";
674 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
676 vqmmc-supply = <&vcc1v8_s3>;
677 vmmc-supply = <&vccio_sd>;
678 #address-cells = <1>;
684 compatible = "brcm,bcm4329-fmac";
685 interrupt-parent = <&gpio0>;
686 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
687 interrupt-names = "host-wake";
688 brcm,drive-strength = <5>;
689 pinctrl-names = "default";
690 pinctrl-0 = <&wifi_host_wake_l>;
698 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
700 max-frequency = <150000000>;
701 pinctrl-names = "default";
702 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
717 compatible = "winbond,w25q128fw", "jedec,spi-nor";
719 spi-max-frequency = <104000000>;
732 /* tshut mode 0:CRU 1:GPIO */
733 rockchip,hw-tshut-mode = <1>;
734 /* tshut polarity 0:LOW 1:HIGH */
735 rockchip,hw-tshut-polarity = <1>;
742 u2phy0_otg: otg-port {
746 u2phy0_host: host-port {
747 phy-supply = <&vcc5v0_host>;
755 u2phy1_otg: otg-port {
759 u2phy1_host: host-port {
760 phy-supply = <&vcc5v0_host>;
766 pinctrl-names = "default";
767 pinctrl-0 = <&uart0_xfer &uart0_rts &uart0_cts>;
771 compatible = "brcm,bcm43438-bt";
774 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
775 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
776 shutdown-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
777 max-speed = <4000000>;
778 pinctrl-names = "default";
779 pinctrl-0 = <&bt_reg_on_h &bt_host_wake_l &bt_wake_l>;
780 vbat-supply = <&vsys_3v3>;
781 vddio-supply = <&vcc_1v8>;