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"
21 stdout-path = "serial2:1500000n8";
24 clkin_gmac: external-gmac-clock {
25 compatible = "fixed-clock";
26 clock-frequency = <125000000>;
27 clock-output-names = "clkin_gmac";
31 sdio_pwrseq: sdio-pwrseq {
32 compatible = "mmc-pwrseq-simple";
34 clock-names = "ext_clock";
35 pinctrl-names = "default";
36 pinctrl-0 = <&wifi_enable_h>;
39 * On the module itself this is one of these (depending
40 * on the actual card populated):
41 * - SDIO_RESET_L_WL_REG_ON
42 * - PDN (power down when low)
44 reset-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_LOW>;
47 /* switched by pmic_sleep */
48 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
49 compatible = "regulator-fixed";
50 regulator-name = "vcc1v8_s3";
53 regulator-min-microvolt = <1800000>;
54 regulator-max-microvolt = <1800000>;
55 vin-supply = <&vcc_1v8>;
58 vcc3v3_pcie: vcc3v3-pcie-regulator {
59 compatible = "regulator-fixed";
60 regulator-name = "vcc3v3_pcie";
63 regulator-min-microvolt = <3300000>;
64 regulator-max-microvolt = <3300000>;
65 vin-supply = <&vsys_3v3>;
68 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
69 vcc5v0_host: vcc5v0-host-regulator {
70 compatible = "regulator-fixed";
72 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
73 pinctrl-names = "default";
74 pinctrl-0 = <&vcc5v0_host_en>;
75 regulator-name = "vcc5v0_host";
77 vin-supply = <&vsys_5v0>;
81 compatible = "pwm-regulator";
82 pwms = <&pwm2 0 25000 1>;
83 regulator-name = "vdd_log";
86 regulator-min-microvolt = <800000>;
87 regulator-max-microvolt = <1400000>;
88 vin-supply = <&vsys_3v3>;
92 compatible = "regulator-fixed";
93 regulator-name = "vsys";
99 compatible = "regulator-fixed";
100 regulator-name = "vsys_3v3";
103 regulator-min-microvolt = <3300000>;
104 regulator-max-microvolt = <3300000>;
105 vin-supply = <&vsys>;
109 compatible = "regulator-fixed";
110 regulator-name = "vsys_5v0";
113 regulator-min-microvolt = <5000000>;
114 regulator-max-microvolt = <5000000>;
115 vin-supply = <&vsys>;
119 compatible = "adc-keys";
120 io-channels = <&saradc 1>;
121 io-channel-names = "buttons";
122 keyup-threshold-microvolt = <1800000>;
123 poll-interval = <100>;
127 linux,code = <KEY_VENDOR>;
128 press-threshold-microvolt = <18000>;
133 compatible = "gpio-keys";
135 pinctrl-names = "default";
136 pinctrl-0 = <&pwrbtn>;
139 debounce-interval = <100>;
140 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
141 label = "GPIO Key Power";
142 linux,code = <KEY_POWER>;
148 compatible = "gpio-ir-receiver";
149 gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
150 linux,rc-map-name = "rc-khadas";
151 pinctrl-names = "default";
152 pinctrl-0 = <&ir_rx>;
156 compatible = "gpio-leds";
157 pinctrl-names = "default";
158 pinctrl-0 = <&sys_led_pin>, <&user_led_pin>;
162 linux,default-trigger = "heartbeat";
163 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
168 default-state = "off";
169 gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
174 compatible = "pwm-fan";
175 cooling-levels = <0 150 200 255>;
176 #cooling-cells = <2>;
177 fan-supply = <&vsys_5v0>;
178 pwms = <&pwm0 0 40000 0>;
183 cpu-supply = <&vdd_cpu_l>;
187 cpu-supply = <&vdd_cpu_l>;
191 cpu-supply = <&vdd_cpu_l>;
195 cpu-supply = <&vdd_cpu_l>;
199 cpu-supply = <&vdd_cpu_b>;
203 cpu-supply = <&vdd_cpu_b>;
209 temperature = <55000>;
215 temperature = <65000>;
224 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
229 cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
239 assigned-clocks = <&cru SCLK_RMII_SRC>;
240 assigned-clock-parents = <&clkin_gmac>;
241 clock_in_out = "input";
242 phy-supply = <&vcc_lan>;
244 pinctrl-names = "default";
245 pinctrl-0 = <&rgmii_pins>;
246 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
247 snps,reset-active-low;
248 snps,reset-delays-us = <0 10000 50000>;
254 mali-supply = <&vdd_gpu>;
261 temperature = <55000>;
267 temperature = <65000>;
276 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
281 cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
287 ddc-i2c-bus = <&i2c3>;
288 pinctrl-names = "default";
289 pinctrl-0 = <&hdmi_cec>;
298 i2c-scl-rising-time-ns = <450>;
299 i2c-scl-falling-time-ns = <15>;
304 clock-frequency = <400000>;
305 i2c-scl-rising-time-ns = <168>;
306 i2c-scl-falling-time-ns = <4>;
310 compatible = "rockchip,rk808";
312 interrupt-parent = <&gpio1>;
313 interrupts = <RK_PC6 IRQ_TYPE_LEVEL_LOW>;
315 clock-output-names = "xin32k", "rk808-clkout2";
316 pinctrl-names = "default";
317 pinctrl-0 = <&pmic_int_l>;
318 rockchip,system-power-controller;
321 vcc1-supply = <&vsys_3v3>;
322 vcc2-supply = <&vsys_3v3>;
323 vcc3-supply = <&vsys_3v3>;
324 vcc4-supply = <&vsys_3v3>;
325 vcc6-supply = <&vsys_3v3>;
326 vcc7-supply = <&vsys_3v3>;
327 vcc8-supply = <&vsys_3v3>;
328 vcc9-supply = <&vsys_3v3>;
329 vcc10-supply = <&vsys_3v3>;
330 vcc11-supply = <&vsys_3v3>;
331 vcc12-supply = <&vsys_3v3>;
332 vddio-supply = <&vcc_1v8>;
335 vdd_center: DCDC_REG1 {
336 regulator-name = "vdd_center";
339 regulator-min-microvolt = <750000>;
340 regulator-max-microvolt = <1350000>;
341 regulator-ramp-delay = <6001>;
343 regulator-state-mem {
344 regulator-off-in-suspend;
348 vdd_cpu_l: DCDC_REG2 {
349 regulator-name = "vdd_cpu_l";
352 regulator-min-microvolt = <750000>;
353 regulator-max-microvolt = <1350000>;
354 regulator-ramp-delay = <6001>;
356 regulator-state-mem {
357 regulator-off-in-suspend;
362 regulator-name = "vcc_ddr";
366 regulator-state-mem {
367 regulator-on-in-suspend;
372 regulator-name = "vcc_1v8";
375 regulator-min-microvolt = <1800000>;
376 regulator-max-microvolt = <1800000>;
378 regulator-state-mem {
379 regulator-on-in-suspend;
380 regulator-suspend-microvolt = <1800000>;
384 vcc1v8_apio2: LDO_REG1 {
385 regulator-name = "vcc1v8_apio2";
388 regulator-min-microvolt = <1800000>;
389 regulator-max-microvolt = <1800000>;
391 regulator-state-mem {
392 regulator-off-in-suspend;
396 vcc_vldo2: LDO_REG2 {
397 regulator-name = "vcc_vldo2";
400 regulator-min-microvolt = <3000000>;
401 regulator-max-microvolt = <3000000>;
403 regulator-state-mem {
404 regulator-off-in-suspend;
408 vcc1v8_pmupll: LDO_REG3 {
409 regulator-name = "vcc1v8_pmupll";
412 regulator-min-microvolt = <1800000>;
413 regulator-max-microvolt = <1800000>;
415 regulator-state-mem {
416 regulator-on-in-suspend;
417 regulator-suspend-microvolt = <1800000>;
422 regulator-name = "vccio_sd";
425 regulator-min-microvolt = <1800000>;
426 regulator-max-microvolt = <3000000>;
428 regulator-state-mem {
429 regulator-on-in-suspend;
430 regulator-suspend-microvolt = <3000000>;
434 vcc_vldo5: LDO_REG5 {
435 regulator-name = "vcc_vldo5";
438 regulator-min-microvolt = <3000000>;
439 regulator-max-microvolt = <3000000>;
441 regulator-state-mem {
442 regulator-off-in-suspend;
447 regulator-name = "vcc_1v5";
450 regulator-min-microvolt = <1500000>;
451 regulator-max-microvolt = <1500000>;
453 regulator-state-mem {
454 regulator-on-in-suspend;
455 regulator-suspend-microvolt = <1500000>;
459 vcc1v8_codec: LDO_REG7 {
460 regulator-name = "vcc1v8_codec";
463 regulator-min-microvolt = <1800000>;
464 regulator-max-microvolt = <1800000>;
466 regulator-state-mem {
467 regulator-off-in-suspend;
472 regulator-name = "vcc_3v0";
475 regulator-min-microvolt = <3000000>;
476 regulator-max-microvolt = <3000000>;
478 regulator-state-mem {
479 regulator-on-in-suspend;
480 regulator-suspend-microvolt = <3000000>;
484 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
485 regulator-name = "vcc3v3_s3";
489 regulator-state-mem {
490 regulator-off-in-suspend;
494 vcc3v3_s0: SWITCH_REG2 {
495 regulator-name = "vcc3v3_s0";
499 regulator-state-mem {
500 regulator-off-in-suspend;
506 vdd_cpu_b: regulator@40 {
507 compatible = "silergy,syr827";
509 fcs,suspend-voltage-selector = <1>;
510 pinctrl-names = "default";
511 pinctrl-0 = <&cpu_b_sleep>;
512 regulator-name = "vdd_cpu_b";
513 regulator-min-microvolt = <712500>;
514 regulator-max-microvolt = <1500000>;
515 regulator-ramp-delay = <1000>;
518 vin-supply = <&vsys_3v3>;
520 regulator-state-mem {
521 regulator-off-in-suspend;
525 vdd_gpu: regulator@41 {
526 compatible = "silergy,syr828";
528 fcs,suspend-voltage-selector = <1>;
529 pinctrl-names = "default";
530 pinctrl-0 = <&gpu_sleep>;
531 regulator-name = "vdd_gpu";
532 regulator-min-microvolt = <712500>;
533 regulator-max-microvolt = <1500000>;
534 regulator-ramp-delay = <1000>;
537 vin-supply = <&vsys_3v3>;
539 regulator-state-mem {
540 regulator-off-in-suspend;
546 clock-frequency = <400000>;
547 i2c-scl-rising-time-ns = <160>;
548 i2c-scl-falling-time-ns = <30>;
553 rockchip,playback-channels = <8>;
554 rockchip,capture-channels = <8>;
559 rockchip,playback-channels = <2>;
560 rockchip,capture-channels = <2>;
569 bt656-supply = <&vcc1v8_apio2>;
570 audio-supply = <&vcc1v8_codec>;
571 sdmmc-supply = <&vccio_sd>;
572 gpio1830-supply = <&vcc_3v0>;
577 pmu1830-supply = <&vcc_1v8>;
583 bt_host_wake_l: bt-host-wake-l {
584 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
587 bt_reg_on_h: bt-reg-on-h {
588 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
591 bt_wake_l: bt-wake-l {
592 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
598 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
604 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
609 sys_led_pin: sys-led-pin {
610 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
613 user_led_pin: user-led-pin {
614 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
619 pmic_int_l: pmic-int-l {
620 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
623 cpu_b_sleep: cpu-b-sleep {
624 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
627 gpu_sleep: gpu-sleep {
628 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
633 wifi_enable_h: wifi-enable-h {
634 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
639 vcc5v0_host_en: vcc5v0-host-en {
640 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
645 wifi_host_wake_l: wifi-host-wake-l {
646 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
660 vref-supply = <&vcca1v8_s3>;
665 /* WiFi & BT combo module Ampak AP6356S */
669 keep-power-in-suspend;
670 mmc-pwrseq = <&sdio_pwrseq>;
672 pinctrl-names = "default";
673 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
675 vqmmc-supply = <&vcc1v8_s3>;
676 vmmc-supply = <&vccio_sd>;
677 #address-cells = <1>;
683 compatible = "brcm,bcm4329-fmac";
684 interrupt-parent = <&gpio0>;
685 interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
686 interrupt-names = "host-wake";
687 brcm,drive-strength = <5>;
688 pinctrl-names = "default";
689 pinctrl-0 = <&wifi_host_wake_l>;
697 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
699 max-frequency = <150000000>;
700 pinctrl-names = "default";
701 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
708 mmc-hs400-enhanced-strobe;
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>;