From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Gunjan Gupta <viraniac@gmail.com>
Date: Mon, 26 Jun 2023 13:29:46 +0000
Subject: ARM: dts: sun8i: nanopiduo2: Use key-0 as power button

The onboard button key-0 was not marked as power button. This meant
that once the board was suspended, there was no way to bring it back
to life. Mark key-0 as power button so that it can be used to bring
the board back to life
---
 arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-duo2.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-duo2.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-duo2.dts
index 111111111111..222222222222 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-duo2.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-duo2.dts
@@ -42,8 +42,9 @@ gpio-keys {
 
 		key-0 {
 			label = "k1";
-			linux,code = <BTN_0>;
+			linux,code = <KEY_POWER>;
 			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; /* PL3 */
+			wakeup-source;
 		};
 	};
 
-- 
Armbian

