Re: [PATCH 2/3] rockchip: px30: sync Odroid Go Advance devicetree from Linux

2020-07-08 Thread Kever Yang



On 2020/7/1 下午5:28, Heiko Stuebner wrote:

From: Heiko Stuebner 

Get the devicetree from mainline Linux and include it for U-Boot uses.

Signed-off-by: Heiko Stuebner 


Reviewed-by: Kever Yang

Thanks,
- Kever


---
  arch/arm/dts/Makefile  |   3 +-
  arch/arm/dts/rk3326-odroid-go2.dts | 716 +
  2 files changed, 718 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/dts/rk3326-odroid-go2.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index db7859cd6c..f274c1232a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -71,7 +71,8 @@ dtb-$(CONFIG_MACH_S700) += \
  
  dtb-$(CONFIG_ROCKCHIP_PX30) += \

px30-evb.dtb \
-   px30-firefly.dtb
+   px30-firefly.dtb \
+   rk3326-odroid-go2.dtb
  
  dtb-$(CONFIG_ROCKCHIP_RK3036) += \

rk3036-sdk.dtb
diff --git a/arch/arm/dts/rk3326-odroid-go2.dts 
b/arch/arm/dts/rk3326-odroid-go2.dts
new file mode 100644
index 00..8cd4688c49
--- /dev/null
+++ b/arch/arm/dts/rk3326-odroid-go2.dts
@@ -0,0 +1,716 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd
+ * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
+ */
+
+/dts-v1/;
+#include 
+#include 
+#include 
+#include "rk3326.dtsi"
+
+/ {
+   model = "ODROID-GO Advance";
+   compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326";
+
+   chosen {
+   stdout-path = "serial2:115200n8";
+   };
+
+   backlight: backlight {
+   compatible = "pwm-backlight";
+   power-supply = <_bl>;
+   pwms = < 0 25000 0>;
+   };
+
+   adc-joystick {
+   compatible = "adc-joystick";
+   io-channels = < 1>,
+ < 2>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   axis@0 {
+   reg = <0>;
+   abs-range = <172 772>;
+   abs-fuzz = <10>;
+   abs-flat = <10>;
+   linux,code = ;
+   };
+
+   axis@1 {
+   reg = <1>;
+   abs-range = <278 815>;
+   abs-fuzz = <10>;
+   abs-flat = <10>;
+   linux,code = ;
+   };
+   };
+
+   gpio-keys {
+   compatible = "gpio-keys";
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+
+   /*
+*  *** ODROIDGO2-Advance Switch layout ***
+* ||
+* | sw15  sw16 |
+* ||
+* | sw1  |---|  sw8|
+* |  sw3   sw4   |   |   sw7   sw5 |
+* | sw2  |LCD Display|  sw6|
+* |  |   | |
+* |  |---| |
+* | sw9 sw10   sw11 sw12   sw13 sw14   |
+* ||
+*/
+
+   sw1 {
+   gpios = < RK_PB4 GPIO_ACTIVE_LOW>;
+   label = "DPAD-UP";
+   linux,code = ;
+   };
+   sw2 {
+   gpios = < RK_PB5 GPIO_ACTIVE_LOW>;
+   label = "DPAD-DOWN";
+   linux,code = ;
+   };
+   sw3 {
+   gpios = < RK_PB6 GPIO_ACTIVE_LOW>;
+   label = "DPAD-LEFT";
+   linux,code = ;
+   };
+   sw4 {
+   gpios = < RK_PB7 GPIO_ACTIVE_LOW>;
+   label = "DPAD-RIGHT";
+   linux,code = ;
+   };
+   sw5 {
+   gpios = < RK_PA2 GPIO_ACTIVE_LOW>;
+   label = "BTN-A";
+   linux,code = ;
+   };
+   sw6 {
+   gpios = < RK_PA5 GPIO_ACTIVE_LOW>;
+   label = "BTN-B";
+   linux,code = ;
+   };
+   sw7 {
+   gpios = < RK_PA6 GPIO_ACTIVE_LOW>;
+   label = "BTN-Y";
+   linux,code = ;
+   };
+   sw8 {
+   gpios = < RK_PA7 GPIO_ACTIVE_LOW>;
+   label = "BTN-X";
+   linux,code = ;
+   };
+   sw9 {
+   gpios = < RK_PA0 GPIO_ACTIVE_LOW>;
+   label = "F1";
+   linux,code = ;
+   };
+   sw10 {
+  

[PATCH 2/3] rockchip: px30: sync Odroid Go Advance devicetree from Linux

2020-07-02 Thread Heiko Stuebner
From: Heiko Stuebner 

Get the devicetree from mainline Linux and include it for U-Boot uses.

Signed-off-by: Heiko Stuebner 
---
 arch/arm/dts/Makefile  |   3 +-
 arch/arm/dts/rk3326-odroid-go2.dts | 716 +
 2 files changed, 718 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/rk3326-odroid-go2.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index db7859cd6c..f274c1232a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -71,7 +71,8 @@ dtb-$(CONFIG_MACH_S700) += \
 
 dtb-$(CONFIG_ROCKCHIP_PX30) += \
px30-evb.dtb \
-   px30-firefly.dtb
+   px30-firefly.dtb \
+   rk3326-odroid-go2.dtb
 
 dtb-$(CONFIG_ROCKCHIP_RK3036) += \
rk3036-sdk.dtb
diff --git a/arch/arm/dts/rk3326-odroid-go2.dts 
b/arch/arm/dts/rk3326-odroid-go2.dts
new file mode 100644
index 00..8cd4688c49
--- /dev/null
+++ b/arch/arm/dts/rk3326-odroid-go2.dts
@@ -0,0 +1,716 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 Hardkernel Co., Ltd
+ * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
+ */
+
+/dts-v1/;
+#include 
+#include 
+#include 
+#include "rk3326.dtsi"
+
+/ {
+   model = "ODROID-GO Advance";
+   compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326";
+
+   chosen {
+   stdout-path = "serial2:115200n8";
+   };
+
+   backlight: backlight {
+   compatible = "pwm-backlight";
+   power-supply = <_bl>;
+   pwms = < 0 25000 0>;
+   };
+
+   adc-joystick {
+   compatible = "adc-joystick";
+   io-channels = < 1>,
+ < 2>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   axis@0 {
+   reg = <0>;
+   abs-range = <172 772>;
+   abs-fuzz = <10>;
+   abs-flat = <10>;
+   linux,code = ;
+   };
+
+   axis@1 {
+   reg = <1>;
+   abs-range = <278 815>;
+   abs-fuzz = <10>;
+   abs-flat = <10>;
+   linux,code = ;
+   };
+   };
+
+   gpio-keys {
+   compatible = "gpio-keys";
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins>;
+
+   /*
+*  *** ODROIDGO2-Advance Switch layout ***
+* ||
+* | sw15  sw16 |
+* ||
+* | sw1  |---|  sw8|
+* |  sw3   sw4   |   |   sw7   sw5 |
+* | sw2  |LCD Display|  sw6|
+* |  |   | |
+* |  |---| |
+* | sw9 sw10   sw11 sw12   sw13 sw14   |
+* ||
+*/
+
+   sw1 {
+   gpios = < RK_PB4 GPIO_ACTIVE_LOW>;
+   label = "DPAD-UP";
+   linux,code = ;
+   };
+   sw2 {
+   gpios = < RK_PB5 GPIO_ACTIVE_LOW>;
+   label = "DPAD-DOWN";
+   linux,code = ;
+   };
+   sw3 {
+   gpios = < RK_PB6 GPIO_ACTIVE_LOW>;
+   label = "DPAD-LEFT";
+   linux,code = ;
+   };
+   sw4 {
+   gpios = < RK_PB7 GPIO_ACTIVE_LOW>;
+   label = "DPAD-RIGHT";
+   linux,code = ;
+   };
+   sw5 {
+   gpios = < RK_PA2 GPIO_ACTIVE_LOW>;
+   label = "BTN-A";
+   linux,code = ;
+   };
+   sw6 {
+   gpios = < RK_PA5 GPIO_ACTIVE_LOW>;
+   label = "BTN-B";
+   linux,code = ;
+   };
+   sw7 {
+   gpios = < RK_PA6 GPIO_ACTIVE_LOW>;
+   label = "BTN-Y";
+   linux,code = ;
+   };
+   sw8 {
+   gpios = < RK_PA7 GPIO_ACTIVE_LOW>;
+   label = "BTN-X";
+   linux,code = ;
+   };
+   sw9 {
+   gpios = < RK_PA0 GPIO_ACTIVE_LOW>;
+   label = "F1";
+   linux,code = ;
+   };
+   sw10 {
+   gpios = < RK_PA1 GPIO_ACTIVE_LOW>;
+   label = "F2";
+