devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: platform: Add bindings for Lenovo Yoga Slim 7x EC
@ 2024-09-27 18:53 Maya Matuszczyk
  2024-09-27 18:53 ` [PATCH 3/3] arm64: dts: qcom: Add EC to Lenovo Yoga Slim 7x Maya Matuszczyk
  2024-09-27 22:58 ` [PATCH 1/3] dt-bindings: platform: Add bindings for Lenovo Yoga Slim 7x EC Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Maya Matuszczyk @ 2024-09-27 18:53 UTC (permalink / raw)
  To: Maya Matuszczyk, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-kernel

This patch adds devicetree binding documentation for Lenovo Yoga Slim 7x
EC driver.

Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
---
 .../platform/lenovo,yoga-slim7x-ec.yaml       | 50 +++++++++++++++++++
 MAINTAINERS                                   |  5 ++
 2 files changed, 55 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml

diff --git a/Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml b/Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml
new file mode 100644
index 000000000000..32f8a0b5d667
--- /dev/null
+++ b/Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/platform/lenovo,yoga-slim7x-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lenovo Yoga Slim 7x Embedded Controller.
+
+maintainers:
+  - Maya Matuszczyk <maccraft123mc@gmail.com>
+
+description:
+  The Lenovo Yoga Slim 7x has an EC which handles some minor functions, like
+  power LED or some special keys on the keyboard. This bindings describes
+  how it is connected
+
+properties:
+  compatible:
+    const: lenovo,yoga-slim7x-ec
+
+  reg:
+    const: 0x76
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |+
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c5 {
+        clock-frequency = <400000>;
+
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        embedded-controller@76 {
+            compatible = "lenovo,yoga-slim7x-ec";
+            reg = <0x76>;
+
+            interrupts-extended = <&tlmm 66 IRQ_TYPE_LEVEL_HIGH>;
+        };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 00716c1faff6..0d4bfdde166d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12902,6 +12902,11 @@ S:	Maintained
 W:	http://legousb.sourceforge.net/
 F:	drivers/usb/misc/legousbtower.c
 
+LENOVO YOGA SLIM 7X EC DRIVER
+M:	Maya Matuszczyk <maccraft123mc@gmail.com>
+S:	Maintained
+F:	Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml
+
 LETSKETCH HID TABLET DRIVER
 M:	Hans de Goede <hdegoede@redhat.com>
 L:	linux-input@vger.kernel.org
-- 
2.45.2


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

* [PATCH 3/3] arm64: dts: qcom: Add EC to Lenovo Yoga Slim 7x
  2024-09-27 18:53 [PATCH 1/3] dt-bindings: platform: Add bindings for Lenovo Yoga Slim 7x EC Maya Matuszczyk
@ 2024-09-27 18:53 ` Maya Matuszczyk
  2024-09-30  3:10   ` Bjorn Andersson
  2024-09-30 12:45   ` Konrad Dybcio
  2024-09-27 22:58 ` [PATCH 1/3] dt-bindings: platform: Add bindings for Lenovo Yoga Slim 7x EC Rob Herring
  1 sibling, 2 replies; 5+ messages in thread
From: Maya Matuszczyk @ 2024-09-27 18:53 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Maya Matuszczyk, linux-arm-msm, devicetree, linux-kernel

This device has an EC on i2c5 bus at address 0x76, driver for the EC was
added in a previous patch.

Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.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 3c13331a9ef4..63b627f60ec7 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -536,6 +536,22 @@ keyboard@3a {
 	};
 };
 
+&i2c5 {
+	clock-frequency = <400000>;
+
+	status = "okay";
+
+	embedded-controller@76 {
+		compatible = "lenovo,yoga-slim7x-ec";
+		reg = <0x76>;
+
+		interrupts-extended = <&tlmm 66 IRQ_TYPE_EDGE_FALLING>;
+
+		pinctrl-0 = <&ec_int_n_default>;
+		pinctrl-names = "default";
+	};
+};
+
 &i2c8 {
 	clock-frequency = <400000>;
 
@@ -794,6 +810,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.45.2


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

* Re: [PATCH 1/3] dt-bindings: platform: Add bindings for Lenovo Yoga Slim 7x EC
  2024-09-27 18:53 [PATCH 1/3] dt-bindings: platform: Add bindings for Lenovo Yoga Slim 7x EC Maya Matuszczyk
  2024-09-27 18:53 ` [PATCH 3/3] arm64: dts: qcom: Add EC to Lenovo Yoga Slim 7x Maya Matuszczyk
@ 2024-09-27 22:58 ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2024-09-27 22:58 UTC (permalink / raw)
  To: Maya Matuszczyk
  Cc: Krzysztof Kozlowski, Conor Dooley, devicetree, linux-kernel

On Fri, Sep 27, 2024 at 08:53:40PM +0200, Maya Matuszczyk wrote:
> This patch adds devicetree binding documentation for Lenovo Yoga Slim 7x
> EC driver.
> 
> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
> ---
>  .../platform/lenovo,yoga-slim7x-ec.yaml       | 50 +++++++++++++++++++
>  MAINTAINERS                                   |  5 ++
>  2 files changed, 55 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml
> 
> diff --git a/Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml b/Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml
> new file mode 100644
> index 000000000000..32f8a0b5d667
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/platform/lenovo,yoga-slim7x-ec.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Lenovo Yoga Slim 7x Embedded Controller.
> +
> +maintainers:
> +  - Maya Matuszczyk <maccraft123mc@gmail.com>
> +
> +description:
> +  The Lenovo Yoga Slim 7x has an EC which handles some minor functions, like
> +  power LED or some special keys on the keyboard. This bindings describes
> +  how it is connected
> +
> +properties:
> +  compatible:
> +    const: lenovo,yoga-slim7x-ec
> +
> +  reg:
> +    const: 0x76
> +
> +  interrupts:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |+

Drop the '+'

> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c5 {

i2c {

> +        clock-frequency = <400000>;

Not really relevant for the example.

> +
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        embedded-controller@76 {
> +            compatible = "lenovo,yoga-slim7x-ec";
> +            reg = <0x76>;
> +
> +            interrupts-extended = <&tlmm 66 IRQ_TYPE_LEVEL_HIGH>;
> +        };
> +    };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 00716c1faff6..0d4bfdde166d 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -12902,6 +12902,11 @@ S:	Maintained
>  W:	http://legousb.sourceforge.net/
>  F:	drivers/usb/misc/legousbtower.c
>  
> +LENOVO YOGA SLIM 7X EC DRIVER
> +M:	Maya Matuszczyk <maccraft123mc@gmail.com>
> +S:	Maintained
> +F:	Documentation/devicetree/bindings/platform/lenovo,yoga-slim7x-ec.yaml
> +
>  LETSKETCH HID TABLET DRIVER
>  M:	Hans de Goede <hdegoede@redhat.com>
>  L:	linux-input@vger.kernel.org
> -- 
> 2.45.2
> 

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

* Re: [PATCH 3/3] arm64: dts: qcom: Add EC to Lenovo Yoga Slim 7x
  2024-09-27 18:53 ` [PATCH 3/3] arm64: dts: qcom: Add EC to Lenovo Yoga Slim 7x Maya Matuszczyk
@ 2024-09-30  3:10   ` Bjorn Andersson
  2024-09-30 12:45   ` Konrad Dybcio
  1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2024-09-30  3:10 UTC (permalink / raw)
  To: Maya Matuszczyk
  Cc: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel

On Fri, Sep 27, 2024 at 08:53:42PM GMT, Maya Matuszczyk wrote:
> This device has an EC on i2c5 bus at address 0x76, driver for the EC was
> added in a previous patch.
> 

No concerns with this patch, but please Cc: at least all the mailing
lists on each patch, so that I get all the patches in the series.

Or better yet, take a look at
https://b4.docs.kernel.org/en/latest/contributor/overview.html which
magically handles this for you (b4 prep --auto-to-cc).

Regards,
Bjorn

> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.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 3c13331a9ef4..63b627f60ec7 100644
> --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> @@ -536,6 +536,22 @@ keyboard@3a {
>  	};
>  };
>  
> +&i2c5 {
> +	clock-frequency = <400000>;
> +
> +	status = "okay";
> +
> +	embedded-controller@76 {
> +		compatible = "lenovo,yoga-slim7x-ec";
> +		reg = <0x76>;
> +
> +		interrupts-extended = <&tlmm 66 IRQ_TYPE_EDGE_FALLING>;
> +
> +		pinctrl-0 = <&ec_int_n_default>;
> +		pinctrl-names = "default";
> +	};
> +};
> +
>  &i2c8 {
>  	clock-frequency = <400000>;
>  
> @@ -794,6 +810,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.45.2
> 

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

* Re: [PATCH 3/3] arm64: dts: qcom: Add EC to Lenovo Yoga Slim 7x
  2024-09-27 18:53 ` [PATCH 3/3] arm64: dts: qcom: Add EC to Lenovo Yoga Slim 7x Maya Matuszczyk
  2024-09-30  3:10   ` Bjorn Andersson
@ 2024-09-30 12:45   ` Konrad Dybcio
  1 sibling, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2024-09-30 12:45 UTC (permalink / raw)
  To: Maya Matuszczyk, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 27.09.2024 8:53 PM, Maya Matuszczyk wrote:
> This device has an EC on i2c5 bus at address 0x76, driver for the EC was
> added in a previous patch.
> 
> Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
> ---

Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>

Konrad

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

end of thread, other threads:[~2024-09-30 12:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-27 18:53 [PATCH 1/3] dt-bindings: platform: Add bindings for Lenovo Yoga Slim 7x EC Maya Matuszczyk
2024-09-27 18:53 ` [PATCH 3/3] arm64: dts: qcom: Add EC to Lenovo Yoga Slim 7x Maya Matuszczyk
2024-09-30  3:10   ` Bjorn Andersson
2024-09-30 12:45   ` Konrad Dybcio
2024-09-27 22:58 ` [PATCH 1/3] dt-bindings: platform: Add bindings for Lenovo Yoga Slim 7x EC Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).