From e26059dd6e91e0532b3620d7f0d3be47775b4ed1 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Sat, 30 Jan 2021 18:18:32 +0100 Subject: [PATCH] Allwinner: linux: make power keys wake up source --- .../0045-h3-h5-power-key-wake-up-source.patch | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 projects/Allwinner/patches/linux/0045-h3-h5-power-key-wake-up-source.patch diff --git a/projects/Allwinner/patches/linux/0045-h3-h5-power-key-wake-up-source.patch b/projects/Allwinner/patches/linux/0045-h3-h5-power-key-wake-up-source.patch new file mode 100644 index 0000000000..60a2ef447d --- /dev/null +++ b/projects/Allwinner/patches/linux/0045-h3-h5-power-key-wake-up-source.patch @@ -0,0 +1,105 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jernej Skrabec +Date: Sat, 30 Jan 2021 18:12:26 +0100 +Subject: [PATCH] h3/h5: power key wake up source + +--- + arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++ + arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 1 + + arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 3 ++- + arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 3 ++- + arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 3 ++- + arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi | 1 + + 6 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts +index 45a24441ff18..24aff65f82ca 100644 +--- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts ++++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts +@@ -111,6 +111,17 @@ spdif_out: spdif-out { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + }; ++ ++ r_gpio_keys { ++ compatible = "gpio-keys"; ++ ++ power { ++ label = "power"; ++ linux,code = ; ++ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ wakeup-source; ++ }; ++ }; + }; + + &de { +diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi +index 4df29a65316d..684a0a1f8886 100644 +--- a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi ++++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi +@@ -81,6 +81,7 @@ k1 { + label = "k1"; + linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ wakeup-source; + }; + }; + }; +diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts +index 597c425d08ec..9daffd90c12f 100644 +--- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts ++++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts +@@ -99,8 +99,9 @@ sw2 { + + sw4 { + label = "sw4"; +- linux,code = ; ++ linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ wakeup-source; + }; + }; + +diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +index 5aff8ecc66cb..90f75fa85e68 100644 +--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts ++++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +@@ -91,8 +91,9 @@ r_gpio_keys { + + sw4 { + label = "sw4"; +- linux,code = ; ++ linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ wakeup-source; + }; + }; + }; +diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi +index 8e5cb3b3fd68..b1066dedc1a2 100644 +--- a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi ++++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi +@@ -82,8 +82,9 @@ gpio_keys { + + sw4 { + label = "power"; +- linux,code = ; ++ linux,code = ; + gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; ++ wakeup-source; + }; + }; + +diff --git a/arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi b/arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi +index c44fd726945a..9e14fe5fdcde 100644 +--- a/arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi ++++ b/arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi +@@ -49,6 +49,7 @@ power { + label = "power"; + linux,code = ; + gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ ++ wakeup-source; + }; + }; +