From: Magnus Damm <damm+renesas@xxxxxxxxxxxxx> Add support for SW2 via "gpio-keys" on the R-Car V3M Eagle board. Signed-off-by: Magnus Damm <damm+renesas@xxxxxxxxxxxxx> --- arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) --- 0001/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts +++ work/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts 2021-06-19 19:26:28.399714892 +0900 @@ -8,6 +8,8 @@ /dts-v1/; #include "r8a77970.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> / { model = "Renesas Eagle board based on r8a77970"; @@ -43,6 +45,42 @@ }; }; + keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&keys_pins>; + pinctrl-names = "default"; + + key-1 { + gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; + linux,code = <KEY_1>; + label = "SW2-1"; + wakeup-source; + debounce-interval = <20>; + }; + key-2 { + gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; + linux,code = <KEY_2>; + label = "SW2-2"; + wakeup-source; + debounce-interval = <20>; + }; + key-3 { + gpios = <&gpio1 23 GPIO_ACTIVE_LOW>; + linux,code = <KEY_3>; + label = "SW2-3"; + wakeup-source; + debounce-interval = <20>; + }; + key-4 { + gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; + linux,code = <KEY_4>; + label = "SW2-4"; + wakeup-source; + debounce-interval = <20>; + }; + }; + lvds-decoder { compatible = "thine,thc63lvd1024"; @@ -196,6 +234,11 @@ function = "i2c0"; }; + keys_pins: keys { + pins = "GP_1_21", "GP_1_22", "GP_1_23", "GP_1_24"; + bias-pull-up; + }; + qspi0_pins: qspi0 { groups = "qspi0_ctrl", "qspi0_data4"; function = "qspi0";