public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: qcom: slim7x: Add Embedded Controller node
@ 2026-05-02  6:35 Daniel J Blueman
  2026-05-04  9:25 ` Konrad Dybcio
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel J Blueman @ 2026-05-02  6:35 UTC (permalink / raw)
  To: Sibi Sankar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Hans de Goede, Bryan O'Donoghue, Bjorn Andersson,
	Konrad Dybcio, Randy Dunlap
  Cc: linux-arm-msm, devicetree, linux-kernel, Anvesh Jain P,
	Maya Matuszczyk, Krzysztof Kozlowski, Dmitry Baryshkov,
	Konrad Dybcio, Akhil P Oommen, Abel Vesa, Gaurav Kohli,
	Daniel J Blueman

The Lenovo Slim7x uses the same Embedded Controller as the Qualcomm
Hamoa Customer Reference Device (X1). Wire it up for fan control,
thermal sensor and suspend behaviour.

Signed-off-by: Daniel J Blueman <daniel@quora.org>
---
Changes in v2:
- corrected DT compatible node
- v1 link: https://lore.kernel.org/all/20260429103301.17449-1-daniel@quora.org/

Dependencies:
https://lore.kernel.org/all/20260427-add-driver-for-ec-v8-0-702f74e495f7@oss.qualcomm.com/

 .../dts/qcom/x1e80100-lenovo-yoga-slim7x.dts  | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
index beb1475d7fa0..1ee2a2296129 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -951,6 +951,22 @@ retimer_ss0_con_sbu_out: endpoint {
 	};
 };
 
+&i2c5 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	embedded-controller@76 {
+		compatible = "qcom,hamoa-crd-ec";
+		reg = <0x76>;
+
+		interrupts-extended = <&tlmm 66 IRQ_TYPE_EDGE_FALLING>;
+
+		pinctrl-0 = <&ec_int_n_default>;
+		pinctrl-names = "default";
+	};
+};
+
 &i2c7 {
 	clock-frequency = <400000>;
 
@@ -1352,6 +1368,12 @@ &tlmm {
 			       <44 4>, /* SPI (TPM) */
 			       <238 1>; /* UFS Reset */
 
+	ec_int_n_default: ec-int-n-state {
+		pins = "gpio66";
+		function = "gpio";
+		bias-disable;
+	};
+
 	edp_reg_en: edp-reg-en-state {
 		pins = "gpio70";
 		function = "gpio";
-- 
2.53.0


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

* Re: [PATCH v2] arm64: dts: qcom: slim7x: Add Embedded Controller node
  2026-05-02  6:35 [PATCH v2] arm64: dts: qcom: slim7x: Add Embedded Controller node Daniel J Blueman
@ 2026-05-04  9:25 ` Konrad Dybcio
  0 siblings, 0 replies; 2+ messages in thread
From: Konrad Dybcio @ 2026-05-04  9:25 UTC (permalink / raw)
  To: Daniel J Blueman, Sibi Sankar, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Hans de Goede, Bryan O'Donoghue,
	Bjorn Andersson, Konrad Dybcio, Randy Dunlap
  Cc: linux-arm-msm, devicetree, linux-kernel, Anvesh Jain P,
	Maya Matuszczyk, Krzysztof Kozlowski, Dmitry Baryshkov,
	Akhil P Oommen, Abel Vesa, Gaurav Kohli

On 5/2/26 8:35 AM, Daniel J Blueman wrote:
> The Lenovo Slim7x uses the same Embedded Controller as the Qualcomm
> Hamoa Customer Reference Device (X1). Wire it up for fan control,
> thermal sensor and suspend behaviour.
> 
> Signed-off-by: Daniel J Blueman <daniel@quora.org>
> ---
> Changes in v2:
> - corrected DT compatible node

You still need to introduce one specific to your actual hardware,
even if the driver receives no changes at the moment.

This is a measure to enable retroactively enabling quirks for users
that update their kernel but not their DTB, so that if a year from
now it turns out that the yoga EC requires some special handling (but
other users of qcom,hamoa-crd-ec don't), we can easily quirk it out

i.e., the desired outcome here is something like:

compatible = "lenovo,yoga-slim7x-ec",
	     "qcom,hamoa-crd-ec";

(the first compatible is ignored by the driver matching code today,
the other ("fallback") one is matched on)

This will need an accompanying change, adding the new Lenovo
compatible to the dt-bindings file

Konrad

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

end of thread, other threads:[~2026-05-04  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-02  6:35 [PATCH v2] arm64: dts: qcom: slim7x: Add Embedded Controller node Daniel J Blueman
2026-05-04  9:25 ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox