From: Clover <alex@ironrobin.net>
To: "Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Steev Klimaszewski <threeway@gmail.com>,
platform-driver-x86@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] Lenovo ThinkPad X13s embedded controller support
Date: Sat, 26 Sep 2026 19:54:29 +0000 [thread overview]
Message-ID: <20260926195415.5995-1-alex@ironrobin.net> (raw)
Add support for the embedded controller found in the Lenovo ThinkPad X13s.
The X13s EC uses an I2C command transport similar to the ThinkPad T14s EC,
but its event, keyboard backlight, and power-management interfaces differ
enough to warrant a separate driver.
The EC event interrupt is provided by GPIO103. GPIO176 is a separate
host-controlled power-state signal used during low-power transitions. The
driver follows the EC command and GPIO sequencing described by the X13s
ACPI DSDT and defers EC event queries during suspend until the I2C
controller is available again on resume.
This initial series provides EC transport and power-management support,
wake handling, and keyboard-backlight control. Other EC events have been
left for follow-up work rather than exposing unverified input mappings.
This follows earlier X13s EC work by Konrad Dybcio and Steev Klimaszewski.
Development was assisted by an LLM, including analysis of the decompiled
X13s ACPI DSDT and review of the resulting implementation. The resulting
behavior was verified against the hardware.
This series is based on Linux v7.3-rc4.
The series has been tested on a Lenovo ThinkPad X13s, including keyboard
backlight control and firmware-driven brightness changes, s2idle
suspend/resume, keyboard-backlight state restoration across lid close/open,
and wake from EC events. The QUP8 pin configuration was also verified on
hardware, including Linux ownership of GPIO43 and GPIO44 and the expected
mux, drive-strength, and pull configuration.
The binding passes dt_binding_check. The X13s DTB has also been validated
against the binding, and the driver builds cleanly with W=1.
Changes in v2:
- Make keyboard-backlight snapshot and EC power-management operations
best-effort so EC failures do not prevent system suspend or resume.
- Save firmware-selected keyboard-backlight brightness in the EC on
Fn+Space, following the DSDT's SCMS(0x20) operation.
- Save software-selected keyboard-backlight brightness in the EC so lid
opening does not restore a stale setting.
- Restore the EC-saved keyboard-backlight brightness on lid open,
following the DSDT's SCMS(0x21) operation.
- Process deferred EC events after the normal resume brightness restore
so a lid-open restore takes precedence.
- Add the QUP8 pinctrl state for GPIO43 and GPIO44 using the configuration
observed on the running hardware.
- Fix the placement and ordering of the i2c8 and EC pinctrl nodes.
Link: https://lore.kernel.org/all/20260925215358.33417-1-alex@ironrobin.net/
Clover (3):
dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC
platform: arm64: Add Lenovo ThinkPad X13s EC driver
arm64: dts: qcom: sc8280xp-x13s: Add embedded controller
next reply other threads:[~2026-09-26 19:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 19:54 Clover [this message]
2026-09-26 19:54 ` [PATCH v2 1/3] dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC Clover
2026-09-27 17:21 ` Krzysztof Kozlowski
2026-09-28 2:53 ` Alex R
2026-09-26 19:54 ` [PATCH v2 2/3] platform: arm64: Add Lenovo ThinkPad X13s EC driver Clover
2026-09-26 19:54 ` [PATCH v2 3/3] arm64: dts: qcom: sc8280xp-x13s: Add embedded controller Clover
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=20260926195415.5995-1-alex@ironrobin.net \
--to=alex@ironrobin.net \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@kernel.org \
--cc=threeway@gmail.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
all inboxes | Powered by JetHome®