Skip to contentSkip to conversation

dt-bindings: embedded-controller: qcom,hamoa-crd-ec: add Lenovo Yoga Slim 7x

PATCH Superseded Daniel J Blueman 5 participants 8 messages May 26 – Jun 3

Subsystems (4)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 dt-bindings: embedded-controller: qcom,hamoa-crd-ec: add Lenovo Yoga Slim 7x

The Lenovo Yoga Slim 7x uses the same Embedded Controller as the Qualcomm Hamoa X1 CRD. Add a board-specific compatible with qcom,hamoa-crd-ec as the fallback.

---
Changes in v3:
- new patch (binding was missing in v1/v2)

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

 .../bindings/embedded-controller/qcom,hamoa-crd-ec.yaml          | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml +1 -0
index ac5a08f8f76d..813d41769c0b 100644
@@ -20,6 +20,7 @@ properties:
     oneOf:
       - items:
           - enum:
+              - lenovo,yoga-slim7x-ec
               - qcom,glymur-crd-ec
               - qcom,hamoa-iot-evk-ec
           - const: qcom,hamoa-crd-ec
Signature · 1 line
2.53.0
#1 lore raw

PATCH v3 2/2 arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add Embedded Controller node

The Lenovo Slim7x uses the same Embedded Controller as the Qualcomm Hamoa X1 Customer Reference Device. Use the lenovo,yoga-slim7x-ec compatible introduced by patch 1 for fan control, thermal sensor and suspend behaviour.

---
Changes in v3:
- use lenovo,yoga-slim7x-ec compatible (introduced by patch 1)
- v2 link: https://lore.kernel.org/lkml/[email protected]/
Changes in v2:
- corrected DT compatible node
- v1 link: 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..1ee2a2296129 100644
@@ -951,6 +951,22 @@ retimer_ss0_con_sbu_out: endpoint {
 	};
 };
 
+&i2c5 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	embedded-controller@76 {
+		compatible = "lenovo,yoga-slim7x-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
Reviewed-by on v3 2/2
#2 lore raw

Re: [PATCH v3 2/2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add Embedded Controller node

Quoted 47 lines · Daniel J Blueman

The Lenovo Slim7x uses the same Embedded Controller as the Qualcomm Hamoa X1 Customer Reference Device. Use the lenovo,yoga-slim7x-ec compatible introduced by patch 1 for fan control, thermal sensor and suspend behaviour.

---
Changes in v3:
- use lenovo,yoga-slim7x-ec compatible (introduced by patch 1)
- v2 link: https://lore.kernel.org/lkml/[email protected]/
Changes in v2:
- corrected DT compatible node
- v1 link: 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 +16 -0
index beb1475d7fa0..1ee2a2296129 100644
@@ -951,6 +951,22 @@ retimer_ss0_con_sbu_out: endpoint {
  	};
  };
 
+&i2c5 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	embedded-controller@76 {
+		compatible = "lenovo,yoga-slim7x-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 */

arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts &tlmm { · line 1379

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts +6 -0
 
+	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";

---
bod

maintainer Reviewed-by on v3 2/2
#3 lore raw

Re: [PATCH v3 2/2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add Embedded Controller node

In reply to Daniel J Blueman
Quoted 5 lines · Daniel J Blueman

The Lenovo Slim7x uses the same Embedded Controller as the Qualcomm Hamoa X1 Customer Reference Device. Use the lenovo,yoga-slim7x-ec compatible introduced by patch 1 for fan control, thermal sensor and suspend behaviour.

Quoted 8 lines

---
Changes in v3:
- use lenovo,yoga-slim7x-ec compatible (introduced by patch 1)
- v2 link: https://lore.kernel.org/lkml/[email protected]/
Changes in v2:
- corrected DT compatible node
- v1 link: https://lore.kernel.org/all/[email protected]/

Quoted 44 lines
  .../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..1ee2a2296129 100644
@@ -951,6 +951,22 @@ retimer_ss0_con_sbu_out: endpoint {
  	};
  };
 
+&i2c5 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	embedded-controller@76 {
+		compatible = "lenovo,yoga-slim7x-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";
Reviewed-by on v3 2/2
#4 lore raw

Re: [PATCH v3 2/2] arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Add Embedded Controller node

In reply to Daniel J Blueman
Quoted 7 lines · Daniel J Blueman

The Lenovo Slim7x uses the same Embedded Controller as the Qualcomm Hamoa X1 Customer Reference Device. Use the lenovo,yoga-slim7x-ec compatible introduced by patch 1 for fan control, thermal sensor and suspend behaviour.

---

Konrad

Reviewed-by on v3 1/2
#5 lore raw
In reply to Daniel J Blueman
Quoted 20 lines · Daniel J Blueman

The Lenovo Yoga Slim 7x uses the same Embedded Controller as the Qualcomm Hamoa X1 CRD. Add a board-specific compatible with qcom,hamoa-crd-ec as the fallback.

---
Changes in v3:
- new patch (binding was missing in v1/v2)

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

  .../bindings/embedded-controller/qcom,hamoa-crd-ec.yaml          | 1 +
  1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml +0 -0
index ac5a08f8f76d..813d41769c0b 100644

Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml properties: · line 26

Quoted 7 lines
Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml +1 -0
@@ -20,6 +20,7 @@ properties:
      oneOf:
        - items:
            - enum:
+              - lenovo,yoga-slim7x-ec
                - qcom,glymur-crd-ec
                - qcom,hamoa-iot-evk-ec
            - const: qcom,hamoa-crd-ec

---
bod

#7 lore raw
Quoted 5 lines · Krzysztof Kozlowski
Quoted 1 line · Daniel J Blueman

The Lenovo Yoga Slim 7x uses the same Embedded Controller as the Qualcomm

Are you sure it is the same?

Yes, this is validated on my Slim7x. Both devices use the IT8987 EC and Maya's amazing work found similar firmware strings.

Thanks,
Dan

Signature · 1 line
Daniel J Blueman