[PATCH v2 07/10] arm64: dts: qcom: sc8280xp-arcata: Add lid switch
From: Jérôme de Bretagne via B4 Relay
Date: Fri May 22 2026 - 07:09:37 EST
From: Jérôme de Bretagne <jerome.debretagne@xxxxxxxxx>
Enable the lid switch for the Microsoft Surface Pro 9 5G using
GPIO pin 180.
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Signed-off-by: Jérôme de Bretagne <jerome.debretagne@xxxxxxxxx>
---
.../arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
index 4e601eb4165b1eea16d2772786ac0a18f6177e60..f92c37bfe9c72d1854ab9893747991da9cbf033e 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
@@ -7,6 +7,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/gpio-keys.h>
+#include <dt-bindings/input/input.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sc8280xp.dtsi"
@@ -59,7 +60,7 @@ backlight: backlight {
gpio-keys {
compatible = "gpio-keys";
- pinctrl-0 = <&vol_down_n>, <&vol_up_n>;
+ pinctrl-0 = <&hall_int_n_default>, <&vol_down_n>, <&vol_up_n>;
pinctrl-names = "default";
key-vol-down {
@@ -79,6 +80,15 @@ key-vol-up {
linux,can-disable;
wakeup-source;
};
+
+ switch-lid {
+ label = "lid";
+ gpios = <&tlmm 180 GPIO_ACTIVE_LOW>;
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_LID>;
+ wakeup-source;
+ wakeup-event-action = <EV_ACT_DEASSERTED>;
+ };
};
pmic-glink {
@@ -1010,6 +1020,13 @@ edp_reg_en: edp-reg-en-state {
bias-disable;
};
+ hall_int_n_default: hall-int-n-state {
+ pins = "gpio180";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
nvme_reg_en: nvme-reg-en-state {
pins = "gpio135";
function = "gpio";
--
2.47.3