lid suspend/resume support for SGB4E

Marcus Glocker <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <epskhu5fvogmfj5br4sykd7fte64vb674disipg24aeuidytjn@tnvng7a6fjc3>
This adds the missing nodes to the Samsung Galaxy Book4 Edge DTS, so
that gpiokeys(4) can attach, and suspend/resume gets triggered by lid
close/open.

Ok?


Index: sysutils/firmware/arm64-qcom-dtb/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/firmware/arm64-qcom-dtb/Makefile,v
diff -u -p -u -p -r1.31 Makefile
--- sysutils/firmware/arm64-qcom-dtb/Makefile	2 Jun 2026 09:51:42 -0000	1.31
+++ sysutils/firmware/arm64-qcom-dtb/Makefile	7 Jun 2026 20:05:56 -0000
@@ -1,6 +1,6 @@
 FW_DRIVER=	arm64-qcom-dtb
 FW_VER=		2.7
-REVISION=	3
+REVISION=	4
 
 DISTNAME=	devicetree-rebasing-6.17-dts
 
Index: sysutils/firmware/arm64-qcom-dtb/patches/patch-src_arm64_qcom_x1e80100-samsung-galaxy-book4-edge_dts
===================================================================
RCS file: /cvs/ports/sysutils/firmware/arm64-qcom-dtb/patches/patch-src_arm64_qcom_x1e80100-samsung-galaxy-book4-edge_dts,v
diff -u -p -u -p -r1.4 patch-src_arm64_qcom_x1e80100-samsung-galaxy-book4-edge_dts
--- sysutils/firmware/arm64-qcom-dtb/patches/patch-src_arm64_qcom_x1e80100-samsung-galaxy-book4-edge_dts	26 May 2026 09:14:05 -0000	1.4
+++ sysutils/firmware/arm64-qcom-dtb/patches/patch-src_arm64_qcom_x1e80100-samsung-galaxy-book4-edge_dts	7 Jun 2026 20:05:56 -0000
@@ -1,6 +1,6 @@
 --- src/arm64/qcom/x1e80100-samsung-galaxy-book4-edge.dts.orig
 +++ src/arm64/qcom/x1e80100-samsung-galaxy-book4-edge.dts
-@@ -0,0 +1,1001 @@
+@@ -0,0 +1,1024 @@
 +// SPDX-License-Identifier: BSD-3-Clause
 +/*
 + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
@@ -9,6 +9,8 @@
 +/dts-v1/;
 +
 +#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/gpio-keys.h>
++#include <dt-bindings/input/input.h>
 +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 +
@@ -20,6 +22,21 @@
 +	compatible = "samsung,galaxy-book4-edge", "qcom,x1e80100";
 +	chassis-type = "laptop";
 +
++	gpio-keys {
++		compatible = "gpio-keys";
++
++		pinctrl-0 = <&hall_int_n_default>;
++		pinctrl-names = "default";
++
++		switch-lid {
++			gpios = <&tlmm 92 GPIO_ACTIVE_LOW>;
++			linux,input-type = <EV_SW>;
++			linux,code = <SW_LID>;
++			wakeup-source;
++			wakeup-event-action = <EV_ACT_DEASSERTED>;
++		};
++	};
++
 +	pmic-glink {
 +		compatible = "qcom,x1e80100-pmic-glink",
 +			     "qcom,sm8550-pmic-glink",
@@ -865,6 +882,12 @@
 +		pins = "gpio70";
 +		function = "gpio";
 +		drive-strength = <16>;
++		bias-disable;
++	};
++
++	hall_int_n_default: hall-int-n-state {
++		pins = "gpio92";
++		function = "gpio";
 +		bias-disable;
 +	};
 +
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.