Index | Thread | Search

From:
"Theo de Raadt" <deraadt@openbsd.org>
Subject:
Re: lid suspend/resume support for SGB4E
To:
Marcus Glocker <marcus@nazgul.ch>
Cc:
tech@cvs.openbsd.org
Date:
Mon, 08 Jun 2026 22:00:07 -0600

Download raw body.

Thread
Of course you should do this, since you have the machine.
If someone late tells you to tweak it, you will do that.

> On Sun, Jun 07, 2026 at 10:44:45PM +0200, Marcus Glocker wrote:
> 
> > 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?
> 
> Anyone?  This will only impact the Samsung Galaxy Book4 Edge, and it's
> working fine here.
>  
> > 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;
> >  +	};
> >  +
> > 
>