From: Sebastian Reichel <sre@kernel.org>
To: "Sebastian Reichel" <sre@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Mark Pearson" <mpearson-lenovo@squebb.ca>
Cc: "Derek J. Clark" <derekjohn.clark@gmail.com>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Neil Armstrong <neil.armstrong@linaro.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: [PATCH v2 0/3] platform: arm64: thinkpad-t14s-ec: new driver
Date: Fri, 05 Sep 2025 03:09:30 +0200 [thread overview]
Message-ID: <20250905-thinkpad-t14s-ec-v2-0-7da5d70aa423@collabora.com> (raw)
Introduce driver for the ThinkPad T14s Gen6 Snapdragon EC. In theory
it seems to be compatible with the ThinkPad ACPI driver, but these
devices are booted with device tree. As the name implies, the existing
ThinkPad ACPI driver only supports the ACPI interface. Looking at
the implementation, the ACPI DSDT contains many mapping functions
to translate the low level I2C messages into the interface used by
the ThinkPad ACPI driver. Adding DT support to the ThinkPad ACPI driver
would require adding all those translation functions, which would add
more or less the same amount of code as writing a separate driver using
the low level interface directly. I don't think it's sensible to make
the existing ACPI driver even more complicated, so I went for a separate
driver.
I managed to get system LEDs, audio LEDs, extra keys and the keyboard
backlight control working. The EC also seems to be used for some thermal
bits, which I haven't looked into deeply. As far as I understand most
thermal and fan control is handled by a different controller
(0x36@i2c5) anyways.
Apart from that the EC is involved in proper system suspend, which
is something I do not yet understand (I don't have any documentation
apart from the dis-assembled DSDT and existing ACPI driver). Right
now I disabled wake capabilities for the IRQ, since it would wake
up the system when closing the LID. Hopefully a way to mask specific
events will be found in the future.
Changes in v2:
- Link to v1: https://lore.kernel.org/r/20250831-thinkpad-t14s-ec-v1-0-6e06a07afe0f@collabora.com
- Apply Reviewed-by tags from Bryan O'Donoghue
- Apply Tested-by tags from Neil Armstrong
- Update DT binding description, location and examples (Krzysztof Kozlowski)
- Add missing wakeup-source to DT binding (Rob Herring Bot)
- Update DTS newlines, pinctrl order, nodename (Konrad Dybcio)
- Updates to EC driver
- Add bits.h and bitfield.h include (Ilpo Järvinen)
- Drop mutex.h (myself, leftover from development)
- Drop DEBUG define (Ilpo Järvinen)
- Add THINKPAD_T14S_EC_BLINK_RATE_ON_OFF_MS (Bryan O'Donoghue, Ilpo Järvinen)
- Add THINKPAD_T14S_EC_KEY_EVT_OFFSET (Ilpo Järvinen)
- Add THINKPAD_T14S_EC_KEY_ENTRY (myself, to keep line length sane
after THINKPAD_T14S_EC_KEY_EVT_OFFSET)
- Align values of thinkpad_t14s_ec_led_status_t (Ilpo Järvinen)
- Use u8 instead of char for I2C command buffers (Ilpo Järvinen)
- Add some more newlines after goto/return (Bryan O'Donoghue)
- Use FIELD_PREP/FIELD_GET instead of _SHIFT (Ilpo Järvinen)
- Explicitly map to LED_ON/LED_OFF in audio_led_get (Ilpo Järvinen)
- Add missing , after .driver.of_match_table (Ilpo Järvinen)
- Change from KEY_MODE to KEY_PERFORMANCE (myself after seeing a patch
for HID lenovo being sent to the list)
Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
Sebastian Reichel (3):
dt-bindings: platform: Add Lenovo Thinkpad T14s EC
platform: arm64: thinkpad-t14s-ec: new driver
arm64: dts: qcom: x1e80100-t14s: add EC
.../lenovo,thinkpad-t14s-ec.yaml | 50 ++
MAINTAINERS | 6 +
.../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 24 +
drivers/platform/arm64/Kconfig | 20 +
drivers/platform/arm64/Makefile | 1 +
drivers/platform/arm64/lenovo-thinkpad-t14s.c | 610 +++++++++++++++++++++
6 files changed, 711 insertions(+)
---
base-commit: b320789d6883cc00ac78ce83bccbfe7ed58afcf0
change-id: 20250831-thinkpad-t14s-ec-ddeb23dbdafb
Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora.com>
next reply other threads:[~2025-09-05 1:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 1:09 Sebastian Reichel [this message]
2025-09-05 1:09 ` [PATCH v2 1/3] dt-bindings: platform: Add Lenovo Thinkpad T14s EC Sebastian Reichel
2025-09-05 8:19 ` Krzysztof Kozlowski
2025-09-05 1:09 ` [PATCH v2 2/3] platform: arm64: thinkpad-t14s-ec: new driver Sebastian Reichel
2025-09-05 8:57 ` Ilpo Järvinen
2025-09-05 10:27 ` Konrad Dybcio
2025-09-05 1:09 ` [PATCH v2 3/3] arm64: dts: qcom: x1e80100-t14s: add EC Sebastian Reichel
2025-09-05 9:26 ` Bryan O'Donoghue
2025-09-05 10:27 ` Konrad Dybcio
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=20250905-thinkpad-t14s-ec-v2-0-7da5d70aa423@collabora.com \
--to=sre@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=derekjohn.clark@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=hansg@kernel.org \
--cc=hmh@hmh.eng.br \
--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=mpearson-lenovo@squebb.ca \
--cc=neil.armstrong@linaro.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh@kernel.org \
/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®