diff options
author | Thierry Reding <treding@nvidia.com> | 2021-11-08 13:22:00 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2022-02-24 20:06:53 +0100 |
commit | 699349e09be0216875f209e736beebba88cfc1ea (patch) | |
tree | af2d63cfcd9b52cafd8bd1f5e9e99347fae0c549 /arch/arm64 | |
parent | 835553b3c64e2443e09f1043b1dbe871271e6f9a (diff) | |
download | linux-699349e09be0216875f209e736beebba88cfc1ea.tar.bz2 |
arm64: tegra: Enable gpio-keys on Jetson AGX Orin Developer Kit
Expose power, force-recovery and sleep buttons via a gpio-keys device so
that userspace can receive events from them.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 31 | ||||
-rw-r--r-- | arch/arm64/boot/dts/nvidia/tegra234.dtsi | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts index efbbb878ba5a..cf9acabdc50a 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts @@ -1,6 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include <dt-bindings/input/linux-event-codes.h> +#include <dt-bindings/input/gpio-keys.h> + #include "tegra234-p3701-0000.dtsi" #include "tegra234-p3737-0000.dtsi" @@ -18,6 +21,34 @@ stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + status = "okay"; + + force-recovery { + label = "Force Recovery"; + gpios = <&gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>; + linux,input-type = <EV_KEY>; + linux,code = <BTN_1>; + }; + + power-key { + label = "Power"; + gpios = <&gpio_aon TEGRA234_AON_GPIO(EE, 4) GPIO_ACTIVE_LOW>; + linux,input-type = <EV_KEY>; + linux,code = <KEY_POWER>; + wakeup-event-action = <EV_ACT_ASSERTED>; + wakeup-source; + }; + + suspend { + label = "Suspend"; + gpios = <&gpio TEGRA234_MAIN_GPIO(G, 2) GPIO_ACTIVE_LOW>; + linux,input-type = <EV_KEY>; + linux,code = <KEY_SLEEP>; + }; + }; + serial { status = "okay"; }; diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index cbebf1ee5958..02d4d7862f7f 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <dt-bindings/clock/tegra234-clock.h> +#include <dt-bindings/gpio/tegra234-gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/mailbox/tegra186-hsp.h> #include <dt-bindings/memory/tegra234-mc.h> |