Skip to contentSkip to conversation

media: dt-bindings: tc358743: Convert to YAML

PATCH In review [email protected] 3 participants 3 messages Aug 27 – Aug 31

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: dt-bindings: tc358743: Convert to YAML

From: Frank Li <[email protected]>

Convert the Toshiba TC358743 HDMI-RX to MIPI CSI2-TX bridge device tree binding from txt to YAML format.

---
 .../bindings/media/i2c/toshiba,tc358743.txt   | 48 ----------
 .../bindings/media/i2c/toshiba,tc358743.yaml  | 93 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 3 files changed, 94 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt
 create mode 100644 Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml
Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt deleted +0 -48
deleted file mode 100644
index 59102edcf01ea..0000000000000
@@ -1,48 +0,0 @@
-* Toshiba TC358743 HDMI-RX to MIPI CSI2-TX Bridge
-
-The Toshiba TC358743 HDMI-RX to MIPI CSI2-TX (H2C) is a bridge that converts
-a HDMI stream to MIPI CSI-2 TX. It is programmable through I2C.
-
-Required Properties:
-
-- compatible: value should be "toshiba,tc358743"
-- clocks, clock-names: should contain a phandle link to the reference clock
-		       source, the clock input is named "refclk".
-
-Optional Properties:
-
-- reset-gpios: gpio phandle GPIO connected to the reset pin
-- interrupts: GPIO connected to the interrupt pin
-- data-lanes: should be <1 2 3 4> for four-lane operation,
-	      or <1 2> for two-lane operation
-- clock-lanes: should be <0>
-- clock-noncontinuous: Presence of this boolean property decides whether the
-		       MIPI CSI-2 clock is continuous or non-continuous.
-- link-frequencies: List of allowed link frequencies in Hz. Each frequency is
-		    expressed as a 64-bit big-endian integer. The frequency
-		    is half of the bps per lane due to DDR transmission.
-
-For further information on the MIPI CSI-2 endpoint node properties, see
-Documentation/devicetree/bindings/media/video-interfaces.txt.
-
-Example:
-
-	tc358743@f {
-		compatible = "toshiba,tc358743";
-		reg = <0x0f>;
-		clocks = <&hdmi_osc>;
-		clock-names = "refclk";
-		reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
-		interrupt-parent = <&gpio2>;
-		interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
-
-		port {
-			tc358743_out: endpoint {
-				remote-endpoint = <&mipi_csi2_in>;
-				data-lanes = <1 2 3 4>;
-				clock-lanes = <0>;
-				clock-noncontinuous;
-				link-frequencies = /bits/ 64 <297000000>;
-			};
-		};
-	};
Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml new file +93 -0

93 lines not on this page · raw message

MAINTAINERS +1 -1
index fe10d29b7657b..9abeaa3f31ca8 100644
@@ -27673,7 +27673,7 @@ TOSHIBA TC358743 DRIVER
 M:	Hans Verkuil <[email protected]>
 L:	[email protected]
 S:	Maintained
-F:	Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt
+F:	Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml
 F:	drivers/media/i2c/tc358743*
 F:	include/media/i2c/tc358743.h
 
Signature · 1 line
2.43.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The YAML conversion drops the explicit hardware constraint for `clock-lanes`, allowing invalid…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The YAML conversion drops the explicit hardware constraint for clock-lanes, allowing invalid device tree configurations to pass validation. --

commit bdd5e3e786c51b25dcbd6765b03cb6736dcbf134
Author: Frank Li <[email protected]>

media: dt-bindings: tc358743: Convert to YAML

Convert the Toshiba TC358743 HDMI-RX to MIPI CSI2-TX bridge device tree binding from txt to YAML format.

Quoted 5 lines
Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt deleted +0 -0
deleted file mode 100644
index 59102edcf01ea..0000000000000

[ ... ]

Quoted 7 lines
Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt deleted +0 -7
-Optional Properties:
-
-- reset-gpios: gpio phandle GPIO connected to the reset pin
-- interrupts: GPIO connected to the interrupt pin
-- data-lanes: should be <1 2 3 4> for four-lane operation,
-	      or <1 2> for two-lane operation
-- clock-lanes: should be <0>

[ ... ]

Quoted 5 lines
Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml new file +0 -0
new file mode 100644
index 0000000000000..29dd1d58f766f

[ ... ]

Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml line 46

Quoted 12 lines
Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml new file +12 -0
+  port:
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    unevaluatedProperties: false
+
+    properties:
+      endpoint:
+        $ref: /schemas/media/video-interfaces.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          data-lanes:
+            oneOf:

[Severity: Medium]
Does this conversion drop the explicit hardware constraint for clock-lanes?

In the original .txt binding, clock-lanes was required to be <0>. Without explicitly defining clock-lanes with const: 0 here in the endpoint properties, an invalid device tree specifying a non-zero value for clock-lanes will incorrectly pass schema validation. This happens because
unevaluatedProperties: false permits any value up to 8 as defined in the referenced video-interfaces.yaml.

Quoted 3 lines
Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml new file +3 -0
+              - items:
+                  - const: 1
+                  - const: 2
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 5 lines · On Thu, 27 Aug 2026 12:03:07 -0400, [email protected] wrote:

From: Frank Li <[email protected]>

Convert the Toshiba TC358743 HDMI-RX to MIPI CSI2-TX bridge device tree binding from txt to YAML format.

Quoted 9 lines
---
 .../bindings/media/i2c/toshiba,tc358743.txt   | 48 ----------
 .../bindings/media/i2c/toshiba,tc358743.yaml  | 93 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 3 files changed, 94 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt
 create mode 100644 Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml