Skip to contentSkip to conversation

arm64: dts: qcom: slim7x: Add Embedded Controller node

PATCH Superseded Daniel J Blueman 2 participants 2 messages Apr 29

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: qcom: slim7x: Add Embedded Controller node

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.

Dependencies:
https://lore.kernel.org/all/[email protected]/

---
 .../dts/qcom/x1e80100-lenovo-yoga-slim7x.dts  | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts +22 -0
index beb1475d7fa0..22c4ad34a2a4 100644
@@ -951,6 +951,22 @@ retimer_ss0_con_sbu_out: endpoint {
 	};
 };
 
+&i2c5 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	embedded-controller@76 {
+		compatible = "qcom,glymur-crd-ec", "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";
Signature · 1 line
2.53.0
#1 lore raw
Quoted 6 lines · 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.

Dependencies:
https://lore.kernel.org/all/[email protected]/

This should not be part of the commit message - please put it under the --- line, so git doesn't keep it in history

Quoted 11 lines
---
 .../dts/qcom/x1e80100-lenovo-yoga-slim7x.dts  | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts +0 -0
index beb1475d7fa0..22c4ad34a2a4 100644

arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts retimer_ss0_con_sbu_out: endpoint { · line 960

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts +7 -0
@@ -951,6 +951,22 @@ retimer_ss0_con_sbu_out: endpoint {
 	};
 };
 
+&i2c5 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	embedded-controller@76 {
+		compatible = "qcom,glymur-crd-ec", "qcom,hamoa-crd-ec";

This should have its own compatible. The Glymur CRD is a different laptop, with a different SoC. That will need a change to

Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml

so that dt validation passes

Konrad