mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Lenovo ThinkPad X13s embedded controller support
@ 2026-09-26 19:54 Clover
  2026-09-26 19:54 ` [PATCH v2 1/3] dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC Clover
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Clover @ 2026-09-26 19:54 UTC (permalink / raw)
  To: Hans de Goede, Ilpo Järvinen
  Cc: Bryan O'Donoghue, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Steev Klimaszewski,
	platform-driver-x86, linux-arm-msm, devicetree, linux-kernel

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-28  2:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-26 19:54 [PATCH v2 0/3] Lenovo ThinkPad X13s embedded controller support Clover
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

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®