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 1/3] dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC
Date: Sat, 26 Sep 2026 19:54:38 +0000 [thread overview]
Message-ID: <20260926195415.5995-2-alex@ironrobin.net> (raw)
In-Reply-To: <20260926195415.5995-1-alex@ironrobin.net>
Add a standalone binding for the embedded controller in the Lenovo
ThinkPad X13s. Although its I2C command transport resembles that of the
T14s EC, its keyboard-backlight, event and power-management interfaces
differ.
Describe the event interrupt and the separate host-controlled power-state
signal, which is high during normal operation and low in the low-power
state. Require this GPIO and allow wakeup-source to describe wake
capability.
Assisted-by: LLM
Signed-off-by: Clover <alex@ironrobin.net>
---
diff --git a/Documentation/devicetree/bindings/embedded-controller/lenovo,thinkpad-x13s-ec.yaml b/Documentation/devicetree/bindings/embedded-controller/lenovo,thinkpad-x13s-ec.yaml
new file mode 100644
--- /dev/null
+++ b/Documentation/devicetree/bindings/embedded-controller/lenovo,thinkpad-x13s-ec.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/lenovo,thinkpad-x13s-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lenovo ThinkPad X13s Embedded Controller
+
+maintainers:
+ - Clover <alex@ironrobin.net>
+
+description:
+ The Lenovo ThinkPad X13s has an I2C-connected embedded controller (EC)
+ providing keyboard backlight control and event notifications. In addition
+ to its event interrupt, the EC has a separate host-controlled power-state
+ input used during transitions between normal operation and low power.
+
+properties:
+ compatible:
+ const: lenovo,thinkpad-x13s-ec
+
+ reg:
+ const: 0x28
+
+ interrupts:
+ maxItems: 1
+
+ power-state-gpios:
+ maxItems: 1
+ description:
+ GPIO connected to the EC power-state input, driven by the host.
+ The signal is high during normal operation and low in the low-power
+ state. It is used together with I2C power-state commands, rather than
+ as a power-supply enable or reset signal. The GPIO is active high.
+
+ wakeup-source: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - power-state-gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ embedded-controller@28 {
+ compatible = "lenovo,thinkpad-x13s-ec";
+ reg = <0x28>;
+ interrupts-extended = <&gpio 1 IRQ_TYPE_EDGE_FALLING>;
+ power-state-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&ec_int_n>, <&ec_power_state>;
+ pinctrl-names = "default";
+ wakeup-source;
+ };
+ };
+...
next prev parent reply other threads:[~2026-09-26 19:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 19:54 [PATCH v2 0/3] Lenovo ThinkPad X13s embedded controller support Clover
2026-09-26 19:54 ` Clover [this message]
2026-09-27 17:21 ` [PATCH v2 1/3] dt-bindings: embedded-controller: Add Lenovo ThinkPad X13s EC 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-2-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®