Thread (7 messages) 7 messages, 4 authors, 5d ago

[PATCH v3 3/3] arm64: dts: qcom: sc8280xp-x13s: Add embedded controller

COOLING5d

From: Alex Robinson <hidden>
Date: 2026-09-28 22:21:57
Also in: linux-arm-msm, lkml, platform-driver-x86
Subsystem: arm/qualcomm mailing list, arm/qualcomm support, the rest · Maintainers: Bjorn Andersson, Konrad Dybcio, Linus Torvalds

Revision v3 of 5 in this series.

Revisions (5)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current
  4. v4 [diff vs current]
  5. v5 [diff vs current]
Enable the embedded controller at address 0x28 on i2c8, with GPIO103 as
its falling-edge, wake-capable event interrupt.

Configure the QUP8 bus on GPIO43 and GPIO44 with 2 mA drive strength and
pull-ups, matching the working firmware-established pin configuration.

Configure GPIO103 as an input without overriding its existing pull
configuration. Describe GPIO176 as the separate active-high power-state
output and configure it initially high with bias disabled.

Assisted-by: LLM
Signed-off-by: Alex Robinson <redacted>

---
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 218573a97785b04528854b03a99c837558a33c1e..1b875809773dac3bb0d1dafb1c9bb41a88f5027f 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -806,6 +806,25 @@ &i2c4 {
 	};
 };
 
+&i2c8 {
+	clock-frequency = <400000>;
+
+	pinctrl-0 = <&i2c8_default>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	embedded-controller@28 {
+		compatible = "lenovo,thinkpad-x13s-ec";
+		reg = <0x28>;
+		interrupts-extended = <&tlmm 103 IRQ_TYPE_EDGE_FALLING>;
+		power-state-gpios = <&tlmm 176 GPIO_ACTIVE_HIGH>;
+		pinctrl-0 = <&ec_int_n>, <&ec_power_state>;
+		pinctrl-names = "default";
+		wakeup-source;
+	};
+};
+
 &i2c11 {
 	clock-frequency = <400000>;
 
@@ -1571,6 +1590,21 @@ cam_rgb_default: cam-rgb-default-state {
 		};
 	};
 
+	ec_int_n: ec-int-n-state {
+		pins = "gpio103";
+		function = "gpio";
+		input-enable;
+		/* Preserve firmware pull configuration; no bias override. */
+	};
+
+	ec_power_state: ec-power-state {
+		pins = "gpio176";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		output-high;
+	};
+
 	edp_reg_en: edp-reg-en-state {
 		pins = "gpio25";
 		function = "gpio";
@@ -1591,6 +1625,13 @@ i2c4_default: i2c4-default-state {
 		bias-disable;
 	};
 
+	i2c8_default: i2c8-default-state {
+		pins = "gpio43", "gpio44";
+		function = "qup8";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
 	i2c11_default: i2c11-default-state {
 		pins = "gpio18", "gpio19";
 		function = "qup11";
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help