There are actual 2 variants of the rk3288-evb in existence, mainly
differing by their pmic. The one currently in u-boot is using the
act8846 + syr827 ics for power regulation, while the other variant
uses Rockchip's own rk808.

To be able to use u-boot on both, add separate configs and sync down
the devicetrees from the Linux kernel for both variants.

As per [0] the SPDX license designation updated a bit as well
to match the actual licensing.

[0] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fce152a63d9597c108c10a0eb7a71f1edfc9d42e

Signed-off-by: Heiko Stuebner <[email protected]>
---
 arch/arm/dts/Makefile                         |   3 +-
 ...evb.dts => rk3288-evb-act8846-u-boot.dtsi} |  33 +-
 arch/arm/dts/rk3288-evb-act8846.dts           | 188 +++++++
 arch/arm/dts/rk3288-evb-rk808-u-boot.dtsi     |  40 ++
 arch/arm/dts/rk3288-evb-rk808.dts             | 202 +++++++
 arch/arm/dts/rk3288-evb.dtsi                  | 493 ++++++++----------
 ...defconfig => evb-rk3288-act8846_defconfig} |   4 +-
 configs/evb-rk3288-rk808_defconfig            |  87 ++++
 8 files changed, 738 insertions(+), 312 deletions(-)
 rename arch/arm/dts/{rk3288-evb.dts => rk3288-evb-act8846-u-boot.dtsi} (64%)
 create mode 100644 arch/arm/dts/rk3288-evb-act8846.dts
 create mode 100644 arch/arm/dts/rk3288-evb-rk808-u-boot.dtsi
 create mode 100644 arch/arm/dts/rk3288-evb-rk808.dts
 rename configs/{evb-rk3288_defconfig => evb-rk3288-act8846_defconfig} (95%)
 create mode 100644 configs/evb-rk3288-rk808_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 0e2ffdb87f..edbfc34076 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -65,7 +65,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
        rk3128-evb.dtb \
        rk3188-radxarock.dtb \
        rk3229-evb.dtb \
-       rk3288-evb.dtb \
+       rk3288-evb-act8846.dtb \
+       rk3288-evb-rk808.dtb \
        rk3288-fennec.dtb \
        rk3288-firefly.dtb \
        rk3288-miqi.dtb \
diff --git a/arch/arm/dts/rk3288-evb.dts 
b/arch/arm/dts/rk3288-evb-act8846-u-boot.dtsi
similarity index 64%
rename from arch/arm/dts/rk3288-evb.dts
rename to arch/arm/dts/rk3288-evb-act8846-u-boot.dtsi
index 575de44c05..ee49d3787d 100644
--- a/arch/arm/dts/rk3288-evb.dts
+++ b/arch/arm/dts/rk3288-evb-act8846-u-boot.dtsi
@@ -1,20 +1,8 @@
-// SPDX-License-Identifier: GPL-2.0+ OR X11
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
+ * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd.
  */
 
-/dts-v1/;
-#include "rk3288-evb.dtsi"
-
-/ {
-       model = "Evb-RK3288";
-       compatible = "evb-rk3288,evb-rk3288", "rockchip,rk3288";
-
-       chosen {
-               stdout-path = &uart2;
-       };
-};
-
 &dmc {
        rockchip,pctl-timing = <0x215 0xc8 0x0 0x35 0x26 0x2 0x70 0x2000d
                0x6 0x0 0x8 0x4 0x17 0x24 0xd 0x6
@@ -26,31 +14,26 @@
        rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>;
 };
 
-&pinctrl {
+&sdmmc {
        u-boot,dm-pre-reloc;
 };
 
-&pwm1 {
-       status = "okay";
-};
-
-&uart2 {
+&emmc {
        u-boot,dm-pre-reloc;
-       reg-shift = <2>;
 };
 
-&sdmmc {
+&gpio3 {
        u-boot,dm-pre-reloc;
 };
 
-&emmc {
+&gpio8 {
        u-boot,dm-pre-reloc;
 };
 
-&gpio3 {
+&pinctrl {
        u-boot,dm-pre-reloc;
 };
 
-&gpio8 {
+&uart2 {
        u-boot,dm-pre-reloc;
 };
diff --git a/arch/arm/dts/rk3288-evb-act8846.dts 
b/arch/arm/dts/rk3288-evb-act8846.dts
new file mode 100644
index 0000000000..6204f8ce8f
--- /dev/null
+++ b/arch/arm/dts/rk3288-evb-act8846.dts
@@ -0,0 +1,188 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include "rk3288-evb.dtsi"
+#include "rk3288-evb-act8846-u-boot.dtsi"
+
+/ {
+       compatible = "rockchip,rk3288-evb-act8846", "rockchip,rk3288";
+
+       vcc_lcd: vcc-lcd {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio7 RK_PA3 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&lcd_en>;
+               regulator-name = "vcc_lcd";
+               vin-supply = <&vcc_io>;
+       };
+
+       vcc_wl: vcc-wl {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio7 RK_PB1 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_pwr>;
+               regulator-name = "vcc_wl";
+               vin-supply = <&vcc_18>;
+       };
+};
+
+&i2c0 {
+       clock-frequency = <400000>;
+
+       vdd_cpu: syr827@40 {
+               compatible = "silergy,syr827";
+               fcs,suspend-voltage-selector = <1>;
+               reg = <0x40>;
+               regulator-name = "vdd_cpu";
+               regulator-min-microvolt = <850000>;
+               regulator-max-microvolt = <1350000>;
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc_sys>;
+       };
+
+       vdd_gpu: syr828@41 {
+               compatible = "silergy,syr828";
+               fcs,suspend-voltage-selector = <1>;
+               reg = <0x41>;
+               regulator-name = "vdd_gpu";
+               regulator-min-microvolt = <850000>;
+               regulator-max-microvolt = <1350000>;
+               regulator-always-on;
+               vin-supply = <&vcc_sys>;
+       };
+
+       hym8563@51 {
+               compatible = "haoyu,hym8563";
+               reg = <0x51>;
+
+               interrupt-parent = <&gpio0>;
+               interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pmic_int>;
+
+               #clock-cells = <0>;
+               clock-output-names = "xin32k";
+       };
+
+       act8846: act8846@5a {
+               compatible = "active-semi,act8846";
+               reg = <0x5a>;
+               status = "okay";
+
+               vp1-supply = <&vcc_sys>;
+               vp2-supply = <&vcc_sys>;
+               vp3-supply = <&vcc_sys>;
+               vp4-supply = <&vcc_sys>;
+               inl1-supply = <&vcc_io>;
+               inl2-supply = <&vcc_sys>;
+               inl3-supply = <&vcc_20>;
+
+               regulators {
+                       vcc_ddr: REG1 {
+                               regulator-name = "VCC_DDR";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_io: REG2 {
+                               regulator-name = "VCC_IO";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vdd_log: REG3 {
+                               regulator-name = "VDD_LOG";
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_20: REG4 {
+                               regulator-name = "VCC_20";
+                               regulator-min-microvolt = <2000000>;
+                               regulator-max-microvolt = <2000000>;
+                               regulator-always-on;
+                       };
+
+                       vccio_sd: REG5 {
+                               regulator-name = "VCCIO_SD";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vdd10_lcd: REG6 {
+                               regulator-name = "VDD10_LCD";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                       };
+
+                       vcca_codec: REG7 {
+                               regulator-name = "VCCA_CODEC";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_tp: REG8 {
+                               regulator-name = "VCCA_TP";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vccio_pmu: REG9 {
+                               regulator-name = "VCCIO_PMU";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vdd_10: REG10 {
+                               regulator-name = "VDD_10";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_18: REG11 {
+                               regulator-name = "VCC_18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                       };
+
+                       vcc18_lcd: REG12 {
+                               regulator-name = "VCC18_LCD";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&panel {
+       power-supply = <&vcc_lcd>;
+};
+
+&pinctrl {
+       lcd {
+               lcd_en: lcd-en  {
+                       rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       wifi {
+               wifi_pwr: wifi-pwr {
+                       rockchip,pins = <7 9 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
diff --git a/arch/arm/dts/rk3288-evb-rk808-u-boot.dtsi 
b/arch/arm/dts/rk3288-evb-rk808-u-boot.dtsi
new file mode 100644
index 0000000000..3822526512
--- /dev/null
+++ b/arch/arm/dts/rk3288-evb-rk808-u-boot.dtsi
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd.
+ */
+
+&dmc {
+       rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
+               0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
+               0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
+               0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
+               0x5 0x0>;
+       rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
+               0xa60 0x40 0x10 0x0>;
+       /* Add a dummy value to cause of-platdata think this is bytes */
+       rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
+};
+
+&sdmmc {
+       u-boot,dm-pre-reloc;
+};
+
+&emmc {
+       u-boot,dm-pre-reloc;
+};
+
+&gpio3 {
+       u-boot,dm-pre-reloc;
+};
+
+&gpio8 {
+       u-boot,dm-pre-reloc;
+};
+
+&pinctrl {
+       u-boot,dm-pre-reloc;
+};
+
+&uart2 {
+       u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/rk3288-evb-rk808.dts 
b/arch/arm/dts/rk3288-evb-rk808.dts
new file mode 100644
index 0000000000..76d43a2819
--- /dev/null
+++ b/arch/arm/dts/rk3288-evb-rk808.dts
@@ -0,0 +1,202 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+#include "rk3288-evb.dtsi"
+#include "rk3288-evb-rk808-u-boot.dtsi"
+
+/ {
+       compatible = "rockchip,rk3288-evb-rk808", "rockchip,rk3288";
+};
+
+&i2c0 {
+       clock-frequency = <400000>;
+
+       rk808: pmic@1b {
+               compatible = "rockchip,rk808";
+               reg = <0x1b>;
+               interrupt-parent = <&gpio0>;
+               interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pmic_int &global_pwroff>;
+               rockchip,system-power-controller;
+               wakeup-source;
+               #clock-cells = <1>;
+               clock-output-names = "xin32k", "rk808-clkout2";
+
+               vcc1-supply = <&vcc_sys>;
+               vcc2-supply = <&vcc_sys>;
+               vcc3-supply = <&vcc_sys>;
+               vcc4-supply = <&vcc_sys>;
+               vcc6-supply = <&vcc_sys>;
+               vcc7-supply = <&vcc_sys>;
+               vcc8-supply = <&vcc_18>;
+               vcc9-supply = <&vcc_io>;
+               vcc10-supply = <&vcc_io>;
+               vcc11-supply = <&vcc_sys>;
+               vcc12-supply = <&vcc_io>;
+               vddio-supply = <&vccio_pmu>;
+
+               regulators {
+                       vdd_cpu: DCDC_REG1 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-name = "vdd_arm";
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vdd_gpu: DCDC_REG2 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1250000>;
+                               regulator-name = "vdd_gpu";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc_ddr: DCDC_REG3 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-name = "vcc_ddr";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_io: DCDC_REG4 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc_io";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vccio_pmu: LDO_REG1 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vccio_pmu";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcc_tp: LDO_REG2 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc_tp";
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vdd_10: LDO_REG3 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-name = "vdd_10";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc18_lcd: LDO_REG4 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc18_lcd";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vccio_sd: LDO_REG5 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vccio_sd";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vdd10_lcd: LDO_REG6 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-name = "vdd10_lcd";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc_18: LDO_REG7 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc_18";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcca_codec: LDO_REG8 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcca_codec";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcc_wl: SWITCH_REG1 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-name = "vcc_wl";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_lcd: SWITCH_REG2 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-name = "vcc_lcd";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+               };
+       };
+};
+
+&panel {
+       power-supply = <&vcc_lcd>;
+};
diff --git a/arch/arm/dts/rk3288-evb.dtsi b/arch/arm/dts/rk3288-evb.dtsi
index 04902c0bd3..21dfe13171 100644
--- a/arch/arm/dts/rk3288-evb.dtsi
+++ b/arch/arm/dts/rk3288-evb.dtsi
@@ -1,92 +1,58 @@
-// SPDX-License-Identifier: GPL-2.0+ OR X11
-/*
- * (C) Copyright 2016 Rockchip Electronics Co., Ltd
- */
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pwm/pwm.h>
 #include "rk3288.dtsi"
 
 / {
-       memory {
-               reg = <0 0x80000000>;
+       chosen {
+               stdout-path = &uart2;
        };
 
-       ext_gmac: external-gmac-clock {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <125000000>;
-               clock-output-names = "ext_gmac";
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x80000000>;
        };
 
-       keys: gpio-keys {
-               compatible = "gpio-keys";
+       adc-keys {
+               compatible = "adc-keys";
+               io-channels = <&saradc 1>;
+               io-channel-names = "buttons";
+               keyup-threshold-microvolt = <1800000>;
 
-               button@0 {
-                       gpio-key,wakeup = <1>;
-                       gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
-                       label = "GPIO Power";
-                       linux,code = <116>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pwr_key>;
+               button-up {
+                       label = "Volume Up";
+                       linux,code = <KEY_VOLUMEUP>;
+                       press-threshold-microvolt = <100000>;
                };
-       };
-
-       vcc_sys: vsys-regulator {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc_sys";
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               regulator-always-on;
-               regulator-boot-on;
-       };
 
-       vcc_flash: flash-regulator {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc_flash";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <1800000>;
-               vin-supply = <&vcc_io>;
-       };
+               button-down {
+                       label = "Volume Down";
+                       linux,code = <KEY_VOLUMEDOWN>;
+                       press-threshold-microvolt = <300000>;
+               };
 
-       vcc_5v: usb-regulator {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc_5v";
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               regulator-always-on;
-               regulator-boot-on;
-               vin-supply = <&vcc_sys>;
-       };
+               menu {
+                       label = "Menu";
+                       linux,code = <KEY_MENU>;
+                       press-threshold-microvolt = <640000>;
+               };
 
-       vcc_host_5v: usb-host-regulator {
-               compatible = "regulator-fixed";
-               enable-active-high;
-               gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&host_vbus_drv>;
-               regulator-name = "vcc_host_5v";
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               regulator-always-on;
-               vin-supply = <&vcc_5v>;
-       };
+               esc {
+                       label = "Esc";
+                       linux,code = <KEY_ESC>;
+                       press-threshold-microvolt = <1000000>;
+               };
 
-       vcc_otg_5v: usb-otg-regulator {
-               compatible = "regulator-fixed";
-               enable-active-high;
-               gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&otg_vbus_drv>;
-               regulator-name = "vcc_otg_5v";
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               regulator-always-on;
-               vin-supply = <&vcc_5v>;
+               home  {
+                       label = "Home";
+                       linux,code = <KEY_HOME>;
+                       press-threshold-microvolt = <1300000>;
+               };
        };
 
        backlight: backlight {
                compatible = "pwm-backlight";
-               power-supply = <&vcc_sys>;
-               enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
                brightness-levels = <
                          0   1   2   3   4   5   6   7
                          8   9  10  11  12  13  14  15
@@ -120,12 +86,35 @@
                        232 233 234 235 236 237 238 239
                        240 241 242 243 244 245 246 247
                        248 249 250 251 252 253 254 255>;
-               default-brightness-level = <50>;
-               pwms = <&pwm0 0 25000 0>;
+               default-brightness-level = <128>;
+               enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
-               pinctrl-0 = <&pwm0_pin>;
-               pwm-delay-us = <10000>;
-               status = "disabled";
+               pinctrl-0 = <&bl_en>;
+               pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
+       };
+
+       ext_gmac: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "ext_gmac";
+               #clock-cells = <0>;
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               autorepeat;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwrbtn>;
+
+               power {
+                       gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_POWER>;
+                       label = "GPIO Key Power";
+                       linux,input-type = <1>;
+                       wakeup-source;
+                       debounce-interval = <100>;
+               };
        };
 
        panel: panel {
@@ -135,6 +124,57 @@
                enable-gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>;
                status = "disabled";
        };
+
+       /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
+       vcc_host: vcc-host-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&host_vbus_drv>;
+               regulator-name = "vcc_host";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vcc_phy: vcc-phy-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&eth_phy_pwr>;
+               regulator-name = "vcc_phy";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vcc_sys: vsys-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_sys";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       /*
+        * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
+        * vcc_io directly.  Those boards won't be able to power cycle SD cards
+        * but it shouldn't hurt to toggle this pin there anyway.
+        */
+       vcc_sd: sdmmc-regulator {
+               compatible = "regulator-fixed";
+               gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdmmc_pwr>;
+               regulator-name = "vcc_sd";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               startup-delay-us = <100000>;
+               vin-supply = <&vcc_io>;
+       };
 };
 
 &cpu0 {
@@ -142,21 +182,38 @@
 };
 
 &emmc {
-       broken-cd;
        bus-width = <8>;
        cap-mmc-highspeed;
        disable-wp;
        non-removable;
-       num-slots = <1>;
        pinctrl-names = "default";
-       pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
+       pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
+       status = "okay";
+};
+
+&saradc {
+       vref-supply = <&vcc_18>;
        status = "okay";
 };
 
+&sdmmc {
+       bus-width = <4>;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       card-detect-delay = <200>;
+       disable-wp;                     /* wp not hooked up */
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
+       status = "okay";
+       vmmc-supply = <&vcc_sd>;
+       vqmmc-supply = <&vccio_sd>;
+};
+
 &gmac {
+       phy-supply = <&vcc_phy>;
        phy-mode = "rgmii";
        clock_in_out = "input";
-       snps,reset-gpio = <&gpio4 7 0>;
+       snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
        snps,reset-active-low;
        snps,reset-delays-us = <0 10000 1000000>;
        assigned-clocks = <&cru SCLK_MAC>;
@@ -165,6 +222,11 @@
        pinctrl-0 = <&rgmii_pins>;
        tx_delay = <0x30>;
        rx_delay = <0x10>;
+       status = "ok";
+};
+
+&gpu {
+       mali-supply = <&vdd_gpu>;
        status = "okay";
 };
 
@@ -174,253 +236,124 @@
 };
 
 &i2c0 {
-       clock-frequency = <400000>;
        status = "okay";
+};
 
-       vdd_cpu: syr827@40 {
-               compatible = "silergy,syr827";
-               fcs,suspend-voltage-selector = <1>;
-               reg = <0x40>;
-               regulator-name = "vdd_cpu";
-               regulator-min-microvolt = <850000>;
-               regulator-max-microvolt = <1350000>;
-               regulator-always-on;
-               regulator-boot-on;
-               vin-supply = <&vcc_sys>;
-       };
+&i2c5 {
+       status = "okay";
+};
 
-       vdd_gpu: syr828@41 {
-               compatible = "silergy,syr828";
-               fcs,suspend-voltage-selector = <1>;
-               reg = <0x41>;
-               regulator-name = "vdd_gpu";
-               regulator-min-microvolt = <850000>;
-               regulator-max-microvolt = <1350000>;
-               regulator-always-on;
-               vin-supply = <&vcc_sys>;
-       };
+&wdt {
+       status = "okay";
+};
 
-       hym8563: hym8563@51 {
-               compatible = "haoyu,hym8563";
-               reg = <0x51>;
-               #clock-cells = <0>;
-               clock-frequency = <32768>;
-               clock-output-names = "xin32k";
-               interrupt-parent = <&gpio7>;
-               interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&rtc_int>;
-       };
+&pwm0 {
+       status = "okay";
+};
 
-       act8846: act8846@5a {
-               compatible = "active-semi,act8846";
-               reg = <0x5a>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&pwr_hold>;
-               system-power-controller;
-
-               regulators {
-                       vcc_ddr: REG1 {
-                               regulator-name = "vcc_ddr";
-                               regulator-min-microvolt = <1200000>;
-                               regulator-max-microvolt = <1200000>;
-                               regulator-always-on;
-                       };
-
-                       vcc_io: REG2 {
-                               regulator-name = "vcc_io";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                               regulator-always-on;
-                       };
-
-                       vdd_log: REG3 {
-                               regulator-name = "vdd_log";
-                               regulator-min-microvolt = <1100000>;
-                               regulator-max-microvolt = <1100000>;
-                               regulator-always-on;
-                       };
-
-                       vcc_20: REG4 {
-                               regulator-name = "vcc_20";
-                               regulator-min-microvolt = <2000000>;
-                               regulator-max-microvolt = <2000000>;
-                               regulator-always-on;
-                       };
-
-                       vccio_sd: REG5 {
-                               regulator-name = "vccio_sd";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                               regulator-always-on;
-                       };
-
-                       vdd10_lcd: REG6 {
-                               regulator-name = "vdd10_lcd";
-                               regulator-min-microvolt = <1000000>;
-                               regulator-max-microvolt = <1000000>;
-                               regulator-always-on;
-                       };
-
-                       vcca_codec: REG7 {
-                               regulator-name = "vcca_codec";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                       };
-
-                       vcc_tp: REG8 {
-                               regulator-name = "vcca_33";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                       };
-
-                       vccio_pmu: REG9 {
-                               regulator-name = "vccio_pmu";
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
-                       };
-
-                       vdd_10: REG10 {
-                               regulator-name = "vdd_10";
-                               regulator-min-microvolt = <1000000>;
-                               regulator-max-microvolt = <1000000>;
-                               regulator-always-on;
-                       };
-
-                       vcc_18: REG11 {
-                               regulator-name = "vcc_18";
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-always-on;
-                       };
-
-                       vcc18_lcd: REG12 {
-                               regulator-name = "vcc18_lcd";
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-always-on;
-                       };
-               };
-       };
+&uart0 {
+       status = "okay";
+};
+
+&uart1 {
+       status = "okay";
 };
 
-&i2c1 {
+&uart2 {
        status = "okay";
 };
 
-&i2c2 {
+&uart3 {
        status = "okay";
 };
 
-&i2c4 {
+&uart4 {
        status = "okay";
 };
 
-&i2c5 {
+&tsadc {
+       rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
+       rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
        status = "okay";
 };
 
 &pinctrl {
-       pcfg_output_high: pcfg-output-high {
-               output-high;
+       pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
+               drive-strength = <8>;
        };
 
-       pcfg_output_low: pcfg-output-low {
-               output-low;
+       pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
+               bias-pull-up;
+               drive-strength = <8>;
        };
 
-       act8846 {
-               pwr_hold: pwr-hold {
-                       rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_output_high>;
+       backlight {
+               bl_en: bl-en {
+                       rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
-       hym8563 {
-               rtc_int: rtc-int {
-                       rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
+       buttons {
+               pwrbtn: pwrbtn {
+                       rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
-       keys {
-               pwr_key: pwr-key {
-                       rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+       lcd {
+               lcd_cs: lcd-cs {
+                       rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       pmic {
+               pmic_int: pmic-int {
+                       rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        sdmmc {
+               /*
+                * Default drive strength isn't enough to achieve even
+                * high-speed mode on EVB board so bump up to 8ma.
+                */
+               sdmmc_bus4: sdmmc-bus4 {
+                       rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
+                                       <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
+                                       <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
+                                       <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
+               };
+
+               sdmmc_clk: sdmmc-clk {
+                       rockchip,pins = <6 20 RK_FUNC_1 
&pcfg_pull_none_drv_8ma>;
+               };
+
+               sdmmc_cmd: sdmmc-cmd {
+                       rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
+               };
+
                sdmmc_pwr: sdmmc-pwr {
                        rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
-       usb_host {
+       usb {
                host_vbus_drv: host-vbus-drv {
                        rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
-       usb_otg {
-               otg_vbus_drv: otg-vbus-drv {
-                       rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
+       eth_phy {
+               eth_phy_pwr: eth-phy-pwr {
+                       rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 };
 
-&pwm0 {
+&usbphy {
        status = "okay";
 };
 
-&saradc {
-       vref-supply = <&vcc_18>;
-       status = "okay";
-};
-
-&sdio0 {
-       broken-cd;
-       bus-width = <4>;
-       disable-wp;
-       non-removable;
-       num-slots = <1>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
-       vmmc-supply = <&vcc_18>;
-       status = "disabled";
-};
-
-&sdmmc {
-       bus-width = <4>;
-       cap-mmc-highspeed;
-       cap-sd-highspeed;
-       card-detect-delay = <200>;
-       disable-wp;
-       num-slots = <1>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
-       vmmc-supply = <&vccio_sd>;
-       status = "okay";
-};
-
-&spi0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, 
<&spi0_cs1>;
-       status = "okay";
-};
-
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
-       status = "okay";
-};
-
-&uart1 {
-       status = "okay";
-};
-
-&uart2 {
-       status = "okay";
-};
-
-&uart3 {
+&usb_host0_ehci {
        status = "okay";
 };
 
@@ -428,10 +361,6 @@
        status = "okay";
 };
 
-&usb_otg {
-       status = "okay";
-};
-
 &vopb {
        status = "okay";
 };
@@ -470,7 +399,3 @@
                };
        };
 };
-
-&wdt {
-       status = "okay";
-};
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288-act8846_defconfig
similarity index 95%
rename from configs/evb-rk3288_defconfig
rename to configs/evb-rk3288-act8846_defconfig
index 8635fd9aaf..878367dea9 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288-act8846_defconfig
@@ -12,7 +12,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_NR_DRAM_BANKS=1
 # CONFIG_ANDROID_BOOT_IMAGE is not set
 CONFIG_SILENT_CONSOLE=y
-CONFIG_DEFAULT_FDT_FILE="rk3288-evb-rk808.dtb"
+CONFIG_DEFAULT_FDT_FILE="rk3288-evb-act8846.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_STACK_R=y
@@ -33,7 +33,7 @@ CONFIG_CMD_REGULATOR=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SPL_PARTITION_UUIDS=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_DEFAULT_DEVICE_TREE="rk3288-evb"
+CONFIG_DEFAULT_DEVICE_TREE="rk3288-evb-act8846"
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names 
interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/evb-rk3288-rk808_defconfig 
b/configs/evb-rk3288-rk808_defconfig
new file mode 100644
index 0000000000..0cc1b2f601
--- /dev/null
+++ b/configs/evb-rk3288-rk808_defconfig
@@ -0,0 +1,87 @@
+CONFIG_ARM=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SYS_TEXT_BASE=0x00000000
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_ROCKCHIP_RK3288=y
+CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
+CONFIG_TARGET_EVB_RK3288=y
+CONFIG_DEBUG_UART_BASE=0xff690000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_SPL_STACK_R_ADDR=0x80000
+CONFIG_DEBUG_UART=y
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_ANDROID_BOOT_IMAGE is not set
+CONFIG_SILENT_CONSOLE=y
+CONFIG_DEFAULT_FDT_FILE="rk3288-evb-rk808.dtb"
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SPL_PARTITION_UUIDS=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="rk3288-evb-rk808"
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names 
interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_SPI_FLASH=y
+CONFIG_DM_ETH=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_DM_PMIC=y
+# CONFIG_SPL_PMIC_CHILDREN is not set
+CONFIG_PMIC_RK8XX=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_REGULATOR_RK8XX=y
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_RAM=y
+CONFIG_SPL_RAM=y
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_DWC2=y
+CONFIG_ROCKCHIP_USB2_PHY=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
+CONFIG_USB_GADGET_VENDOR_NUM=0x2207
+CONFIG_USB_GADGET_PRODUCT_NUM=0x320a
+CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_FUNCTION_MASS_STORAGE=y
+CONFIG_DM_VIDEO=y
+CONFIG_DISPLAY=y
+CONFIG_VIDEO_ROCKCHIP=y
+CONFIG_VIDEO_ROCKCHIP_MAX_YRES=1200
+CONFIG_DISPLAY_ROCKCHIP_MIPI=y
+CONFIG_USE_TINY_PRINTF=y
+CONFIG_CMD_DHRYSTONE=y
+CONFIG_ERRNO_STR=y
-- 
2.20.1

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to