[U-Boot] [PATCH v2 3/4] sunxi: Move gpio-keys from NanoPi dtsi to dts

Mylène Josserand
2017-05-10T06:26:09Z

Move the gpio-keys node from the NanoPi dtsi to NanoPi
Neo and NanoPi M1 dts files. It allows to have a more generic
dtsi file to be able to use it for other NanoPi platforms.

Signed-off-by: MylÃ¨ne Josserand <mylene.josserand@free-electrons.com>
---
arch/arm/dts/sun8i-h3-nanopi-m1.dts | 13 +++++++++++++
arch/arm/dts/sun8i-h3-nanopi-neo.dts | 13 +++++++++++++
arch/arm/dts/sun8i-h3-nanopi.dtsi | 13 -------------
3 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/arch/arm/dts/sun8i-h3-nanopi-m1.dts b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
index ec63d104b4..5e1d756cf6 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-m1.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
@@ -45,6 +45,19 @@
/ {
model = "FriendlyArm NanoPi M1";
compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+
+ r_gpio_keys {
+ compatible = "gpio-keys";
+ input-name = "k1";
+ pinctrl-names = "default";
+ pinctrl-0 = <&sw_r_npi>;
+
+ k1 at 0 {
+ label = "k1";
+ linux,code = <KEY_POWER>;
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+ };
+ };
};

&ehci1 {
diff --git a/arch/arm/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
index 5113059098..80a1b18a64 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
@@ -45,6 +45,19 @@
/ {
model = "FriendlyARM NanoPi NEO";
compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
+
+ r_gpio_keys {
+ compatible = "gpio-keys";
+ input-name = "k1";
+ pinctrl-names = "default";
+ pinctrl-0 = <&sw_r_npi>;
+
+ k1 at 0 {
+ label = "k1";
+ linux,code = <KEY_POWER>;
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+ };
+ };
};

&emac {
diff --git a/arch/arm/dts/sun8i-h3-nanopi.dtsi b/arch/arm/dts/sun8i-h3-nanopi.dtsi
index c6decee41a..5b9a39aa55 100644
--- a/arch/arm/dts/sun8i-h3-nanopi.dtsi
+++ b/arch/arm/dts/sun8i-h3-nanopi.dtsi
@@ -74,19 +74,6 @@
default-state = "on";
};
};
-
- r_gpio_keys {
- compatible = "gpio-keys";
- input-name = "k1";
- pinctrl-names = "default";
- pinctrl-0 = <&sw_r_npi>;
-
- k1 at 0 {
- label = "k1";
- linux,code = <KEY_POWER>;
- gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
- };
- };
};

&ehci3 {
--
2.11.0