mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: display: ti,tpd12s015: Convert to DT schema
@ 2026-09-15 12:03 Quchaosheng
  2026-09-29 12:12 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Quchaosheng @ 2026-09-15 12:03 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Tony Lindgren, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
	Roger Quadros, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Luca Ceresoli,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, dri-devel, devicetree,
	linux-omap, linux-arm-kernel, linux-kernel, Quchaosheng

Convert the TPD12S015 HDMI level shifter binding to DT schema.

The TI TPD12S015 is an HDMI companion chip that combines a level shifter
and ESD protection circuitry. Document the two ports it exposes between
the HDMI transmitter and the connector.

The tpd12s016 is described as software compatible with the tpd12s015 and
is listed as a fallback compatible by am57xx-idk-common.dtsi, so accept
both orderings. Boards that also route the DDC lines through the chip
pass five GPIOs rather than three.

Signed-off-by: Quchaosheng <quchaosheng000406@163.com>
---
 .../bindings/display/ti/ti,tpd12s015.txt      | 44 ---------
 .../bindings/display/ti/ti,tpd12s015.yaml     | 93 +++++++++++++++++++
 2 files changed, 93 insertions(+), 44 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt
 create mode 100644 Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml

diff --git a/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt
deleted file mode 100644
index 26e6d32e3..000000000
--- a/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-TPD12S015 HDMI level shifter and ESD protection chip
-====================================================
-
-Required properties:
-- compatible: "ti,tpd12s015"
-
-Optional properties:
-- gpios: CT CP HPD, LS OE and HPD gpios
-
-Required nodes:
-- Video port 0 for HDMI input
-- Video port 1 for HDMI output
-
-Example
--------
-
-tpd12s015: encoder@1 {
-	compatible = "ti,tpd12s015";
-
-	gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
-		<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
-		<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
-
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port@0 {
-			reg = <0>;
-
-			tpd12s015_in: endpoint@0 {
-				remote-endpoint = <&hdmi_out>;
-			};
-		};
-
-		port@1 {
-			reg = <1>;
-
-			tpd12s015_out: endpoint@0 {
-				remote-endpoint = <&hdmi_connector_in>;
-			};
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml
new file mode 100644
index 000000000..b3351b601
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml
@@ -0,0 +1,93 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/ti/ti,tpd12s015.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI TPD12S015 HDMI level shifter and ESD protection chip
+
+maintainers:
+  - Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
+
+description: |
+  The TPD12S015 is an HDMI companion chip that combines a level shifter and
+  ESD protection circuitry. It sits between an HDMI transmitter and the HDMI
+  connector, and provides control over the level shifter enable and the
+  hot-plug detect signals.
+
+properties:
+  compatible:
+    oneOf:
+      - const: ti,tpd12s015
+      - items:
+          - const: ti,tpd12s016
+          - const: ti,tpd12s015
+
+  gpios:
+    description:
+      The CT CP HPD, LS OE and HPD GPIOs, in that order. The first GPIO
+      controls the level shifter, the second enables the level shifter
+      outputs and the third reads the hot-plug detect line. Boards that
+      also route the DDC lines through the chip use five entries, with
+      the SCL and SDA GPIOs appended.
+    minItems: 3
+    maxItems: 5
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description: HDMI input from the transmitter.
+
+      port@1:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description: HDMI output to the connector.
+
+    required:
+      - port@0
+      - port@1
+
+required:
+  - compatible
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    encoder1 {
+        compatible = "ti,tpd12s015";
+
+        gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,    /* 60, CT CP HPD */
+                <&gpio2 9 GPIO_ACTIVE_HIGH>,    /* 41, LS OE */
+                <&gpio2 31 GPIO_ACTIVE_HIGH>;    /* 63, HPD */
+
+        ports {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
+
+                tpd12s015_in: endpoint {
+                    remote-endpoint = <&hdmi_out>;
+                };
+            };
+
+            port@1 {
+                reg = <1>;
+
+                tpd12s015_out: endpoint {
+                    remote-endpoint = <&hdmi_connector_in>;
+                };
+            };
+        };
+    };
+
+...


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

* Re: [PATCH 1/2] dt-bindings: display: ti,tpd12s015: Convert to DT schema
  2026-09-15 12:03 [PATCH 1/2] dt-bindings: display: ti,tpd12s015: Convert to DT schema Quchaosheng
@ 2026-09-29 12:12 ` Laurent Pinchart
  2026-09-30  2:24   ` Chaosheng Qu
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2026-09-29 12:12 UTC (permalink / raw)
  To: Quchaosheng
  Cc: Tomi Valkeinen, Tony Lindgren, Aaro Koskinen, Andreas Kemnade,
	Kevin Hilman, Roger Quadros, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Jonas Karlman, Jernej Skrabec, Luca Ceresoli,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, dri-devel, devicetree,
	linux-omap, linux-arm-kernel, linux-kernel

On Tue, Sep 15, 2026 at 08:03:26PM +0800, Quchaosheng wrote:
> Convert the TPD12S015 HDMI level shifter binding to DT schema.
> 
> The TI TPD12S015 is an HDMI companion chip that combines a level shifter
> and ESD protection circuitry. Document the two ports it exposes between
> the HDMI transmitter and the connector.
> 
> The tpd12s016 is described as software compatible with the tpd12s015 and
> is listed as a fallback compatible by am57xx-idk-common.dtsi, so accept
> both orderings. Boards that also route the DDC lines through the chip
> pass five GPIOs rather than three.

Assisted-by tag missing.

This patch also seems to be missing understanding of what you're doing.
Not only does it combine conversion to YAML and changes to the bindings
in one patch, it also gives no rationale for the changes.

Please don't waste maintainer's time with LLM-generated patches that you
haven't tried to understand.

> Signed-off-by: Quchaosheng <quchaosheng000406@163.com>
> ---
>  .../bindings/display/ti/ti,tpd12s015.txt      | 44 ---------
>  .../bindings/display/ti/ti,tpd12s015.yaml     | 93 +++++++++++++++++++
>  2 files changed, 93 insertions(+), 44 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt
>  create mode 100644 Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt
> deleted file mode 100644
> index 26e6d32e3..000000000
> --- a/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.txt
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -TPD12S015 HDMI level shifter and ESD protection chip
> -====================================================
> -
> -Required properties:
> -- compatible: "ti,tpd12s015"
> -
> -Optional properties:
> -- gpios: CT CP HPD, LS OE and HPD gpios
> -
> -Required nodes:
> -- Video port 0 for HDMI input
> -- Video port 1 for HDMI output
> -
> -Example
> --------
> -
> -tpd12s015: encoder@1 {
> -	compatible = "ti,tpd12s015";
> -
> -	gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,	/* 60, CT CP HPD */
> -		<&gpio2 9 GPIO_ACTIVE_HIGH>,	/* 41, LS OE */
> -		<&gpio2 31 GPIO_ACTIVE_HIGH>;	/* 63, HPD */
> -
> -	ports {
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -
> -		port@0 {
> -			reg = <0>;
> -
> -			tpd12s015_in: endpoint@0 {
> -				remote-endpoint = <&hdmi_out>;
> -			};
> -		};
> -
> -		port@1 {
> -			reg = <1>;
> -
> -			tpd12s015_out: endpoint@0 {
> -				remote-endpoint = <&hdmi_connector_in>;
> -			};
> -		};
> -	};
> -};
> diff --git a/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml
> new file mode 100644
> index 000000000..b3351b601
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/ti/ti,tpd12s015.yaml
> @@ -0,0 +1,93 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/ti/ti,tpd12s015.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI TPD12S015 HDMI level shifter and ESD protection chip
> +
> +maintainers:
> +  - Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> +
> +description: |
> +  The TPD12S015 is an HDMI companion chip that combines a level shifter and
> +  ESD protection circuitry. It sits between an HDMI transmitter and the HDMI
> +  connector, and provides control over the level shifter enable and the
> +  hot-plug detect signals.
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: ti,tpd12s015
> +      - items:
> +          - const: ti,tpd12s016
> +          - const: ti,tpd12s015
> +
> +  gpios:
> +    description:
> +      The CT CP HPD, LS OE and HPD GPIOs, in that order. The first GPIO
> +      controls the level shifter, the second enables the level shifter
> +      outputs and the third reads the hot-plug detect line. Boards that
> +      also route the DDC lines through the chip use five entries, with
> +      the SCL and SDA GPIOs appended.
> +    minItems: 3
> +    maxItems: 5
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +    properties:
> +      port@0:
> +        $ref: /schemas/graph.yaml#/$defs/port-base
> +        unevaluatedProperties: false
> +        description: HDMI input from the transmitter.
> +
> +      port@1:
> +        $ref: /schemas/graph.yaml#/$defs/port-base
> +        unevaluatedProperties: false
> +        description: HDMI output to the connector.
> +
> +    required:
> +      - port@0
> +      - port@1
> +
> +required:
> +  - compatible
> +  - ports
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    encoder1 {
> +        compatible = "ti,tpd12s015";
> +
> +        gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>,    /* 60, CT CP HPD */
> +                <&gpio2 9 GPIO_ACTIVE_HIGH>,    /* 41, LS OE */
> +                <&gpio2 31 GPIO_ACTIVE_HIGH>;    /* 63, HPD */
> +
> +        ports {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            port@0 {
> +                reg = <0>;
> +
> +                tpd12s015_in: endpoint {
> +                    remote-endpoint = <&hdmi_out>;
> +                };
> +            };
> +
> +            port@1 {
> +                reg = <1>;
> +
> +                tpd12s015_out: endpoint {
> +                    remote-endpoint = <&hdmi_connector_in>;
> +                };
> +            };
> +        };
> +    };
> +
> +...
> 

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 1/2] dt-bindings: display: ti,tpd12s015: Convert to DT schema
  2026-09-29 12:12 ` Laurent Pinchart
@ 2026-09-30  2:24   ` Chaosheng Qu
  0 siblings, 0 replies; 3+ messages in thread
From: Chaosheng Qu @ 2026-09-30  2:24 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Tomi Valkeinen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Eduard Bostina, dri-devel, devicetree, linux-omap, linux-kernel

Hi Laurent,

Thank you for taking the time.  Two of the three points came from the v1
posting, one of them is a real miss on my side, and there is a fourth
thing I should have found before posting at all -- I get to that below.

The message you replied to is the 09-15 posting.  v3 went out on 09-16:

  <20260916123210.107841-1-quchaosheng000406@163.com>

and it rewrote the commit message to give the rationale you are missing:
why "ti,tpd12s016" can only be a fallback of "ti,tpd12s015" (the driver
matches on "ti,tpd12s015" alone, so a board using the 016 has to list
both), and why gpios has to take three to five entries.  The v2 version
of that description had capped gpios at three, which broke dtbs_check for
omap5-igep0050.dts -- that board passes the three control/HPD lines plus
the DDC SCL and SDA lines.  Rob Herring gave v3 his Reviewed-by on 09-24.

The Assisted-by tag is a fair hit, and it applies to v3 as well: v3 does
not carry one either.  That is my oversight and I will add it.

Your third point also stands for v3.  The conversion and the gpios
semantics change are still one patch.  Splitting them is right.

Now the part I should have caught myself.  This conversion is not new
work.  Eduard Bostina posted the same conversion on 2026-07-30:

  <20260730092245.52034-1-egbostina@gmail.com>

That series makes the same two binding changes -- the "ti,tpd12s016"
fallback compatible and gpios up to five entries -- and its 2/2 renames
the same tpd12s015 endpoint nodes that mine does.  Rob reviewed it on
08-03.  It did not land: there is no ti,tpd12s015.yaml in mainline, v6.18,
v6.17 or linux-next, and the .txt is still in all of them.  I did not find
it before posting mine, and I have cc'd Eduard here.

I would rather ask than add a fourth revision to the pile.  Which would
you prefer:

  - a v4 of mine, split into a pure conversion plus a separate semantics
    patch, or
  - for me to drop mine and leave this to Eduard's series?

Either way I will not repost the current form.  If there is a reason the
Bostina series stalled that I should not repeat, I would be glad to hear
it.

Thanks,
Chaosheng Qu


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

end of thread, other threads:[~2026-09-30  2:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 12:03 [PATCH 1/2] dt-bindings: display: ti,tpd12s015: Convert to DT schema Quchaosheng
2026-09-29 12:12 ` Laurent Pinchart
2026-09-30  2:24   ` Chaosheng Qu

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

all inboxes | Powered by JetHome®