From: Thierry Reding <thierry.reding@kernel.org>
To: Thierry Reding <thierry.reding@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org,
Thierry Reding <treding@nvidia.com>
Subject: [PATCH 2/2] arm64: tegra: Enable GPIO keys on Jetson AGX Thor
Date: Thu, 27 Aug 2026 16:54:19 +0200 [thread overview]
Message-ID: <20260827-tegra264-gpio-keys-v1-2-89518c5fb29f@nvidia.com> (raw)
In-Reply-To: <20260827-tegra264-gpio-keys-v1-0-89518c5fb29f@nvidia.com>
From: Thierry Reding <treding@nvidia.com>
The power and force-recovery keys are mapped to standard GPIOs so they
can be enabled for all derived boards. In addition, the power key can be
used to wake the system from sleep, so it needs to be marked as a wakeup
source.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
.../boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi | 23 ++++++++++++++++++++++
arch/arm64/boot/dts/nvidia/tegra264.dtsi | 1 +
2 files changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
index 45f8df9bbfd6..c4ba3322ed9a 100644
--- a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
@@ -1,5 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/input/gpio-keys.h>
+
/ {
aliases {
serial0 = &{/bus@0/serial@c4e0000};
@@ -9,4 +12,24 @@ aliases {
chosen {
stdout-path = "serial0:115200n8";
};
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key-force-recovery {
+ label = "Force Recovery";
+ gpios = <&gpio_aon TEGRA264_AON_GPIO(EE, 1) GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_KEY>;
+ linux,code = <KEY_SLEEP>;
+ };
+
+ key-power {
+ label = "Power";
+ gpios = <&gpio_aon TEGRA264_AON_GPIO(AA, 5) GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_KEY>;
+ linux,code = <KEY_POWER>;
+ wakeup-event-action = <EV_ACT_ASSERTED>;
+ wakeup-source;
+ };
+ };
};
diff --git a/arch/arm64/boot/dts/nvidia/tegra264.dtsi b/arch/arm64/boot/dts/nvidia/tegra264.dtsi
index 013228a81723..a1a86022d638 100644
--- a/arch/arm64/boot/dts/nvidia/tegra264.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra264.dtsi
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
#include <dt-bindings/clock/nvidia,tegra264.h>
+#include <dt-bindings/gpio/nvidia,tegra264-gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/mailbox/tegra186-hsp.h>
#include <dt-bindings/memory/nvidia,tegra264.h>
--
2.55.0
prev parent reply other threads:[~2026-08-27 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 14:54 [PATCH 0/2] arm64: tegra: Add gpio-keys for Jetson AGX Thor DevKit Thierry Reding
2026-08-27 14:54 ` [PATCH 1/2] arm64: tegra: Use consistent key code for force-recovery button Thierry Reding
2026-08-27 14:54 ` Thierry Reding [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260827-tegra264-gpio-keys-v1-2-89518c5fb29f@nvidia.com \
--to=thierry.reding@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh@kernel.org \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox