ARM: dts: sun8i: Adjust power key nodes
authorJernej Skrabec <jernej.skrabec@gmail.com>
Mon, 29 Nov 2021 16:55:10 +0000 (17:55 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 1 Dec 2021 08:21:06 +0000 (09:21 +0100)
Several H3 and one H2+ board have power key nodes, which are slightly
off. Some are missing wakeup-source property and some have BTN_0 code
assigned instead of KEY_POWER.

Adjust them, so they can function as intended by designer.

Co-developed-by: Michael Klein <michael@fossekall.de>
Signed-off-by: Michael Klein <michael@fossekall.de>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20211129165510.370717-1-jernej.skrabec@gmail.com
arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi

index 8e8634f..d5c7b79 100644 (file)
@@ -52,8 +52,9 @@
 
                sw4 {
                        label = "power";
-                       linux,code = <BTN_0>;
+                       linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 
index c7c3e7d..fc45d5a 100644 (file)
@@ -81,6 +81,7 @@
                        label = "k1";
                        linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 };
index 597c425..9daffd9 100644 (file)
@@ -99,8 +99,9 @@
 
                sw4 {
                        label = "sw4";
-                       linux,code = <BTN_0>;
+                       linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 
index 5aff8ec..90f75fa 100644 (file)
@@ -91,8 +91,9 @@
 
                sw4 {
                        label = "sw4";
-                       linux,code = <BTN_0>;
+                       linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 };
index 7a6af54..d03f585 100644 (file)
@@ -82,8 +82,9 @@
 
                sw4 {
                        label = "power";
-                       linux,code = <BTN_0>;
+                       linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+                       wakeup-source;
                };
        };
 
index c44fd72..9e14fe5 100644 (file)
@@ -49,6 +49,7 @@
                        label = "power";
                        linux,code = <KEY_POWER>;
                        gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
+                       wakeup-source;
                };
        };