arm64: dts: renesas: white-hawk-cpu: Add overlay for CP97/98
Add an overlay to use test points CP97 and CP98 on the White Hawk CPU
board as keys.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- s/whitehawk/white-hawk/.
diff --git a/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu-cp97-98-keys.dtso b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu-cp97-98-keys.dtso
new file mode 100644
index 0000000..306a532
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu-cp97-98-keys.dtso
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Device Tree Overlay for using CP97/98 on the White Hawk CPU board as keys
+//
+// Copyright (C) 2022 Glider bv
+//
+// Pinout:
+// - Key X = CP97
+// - Key O = CP98
+// - GND = TP2
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+&{/} {
+ cp97-cp98-keys {
+ compatible = "gpio-keys";
+
+ key-X {
+ gpios = <&io_expander_a 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_X>;
+ label = "CP97";
+ wakeup-source;
+ debounce-interval = <20>;
+ };
+
+ key-O {
+ gpios = <&io_expander_a 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_O>;
+ label = "CP98";
+ wakeup-source;
+ debounce-interval = <20>;
+ };
+ };
+};