* [PATCH v1 1/1] media: dt-bindings: tc358743: Convert to YAML
@ 2026-08-27 16:03 Frank.Li
2026-08-27 16:10 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Frank.Li @ 2026-08-27 16:03 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Hans Verkuil, Frank Li,
open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Cc: imx
From: Frank Li <Frank.Li@nxp.com>
Convert the Toshiba TC358743 HDMI-RX to MIPI CSI2-TX bridge device
tree binding from txt to YAML format.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
.../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
diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt
deleted file mode 100644
index 59102edcf01ea..0000000000000
--- a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt
+++ /dev/null
@@ -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>;
- };
- };
- };
diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml
new file mode 100644
index 0000000000000..29dd1d58f766f
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml
@@ -0,0 +1,93 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/toshiba,tc358743.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Toshiba TC358743 HDMI-RX to MIPI CSI2-TX Bridge
+
+maintainers:
+ - Hans Verkuil <hverkuil@kernel.org>
+
+description:
+ 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.
+
+properties:
+ compatible:
+ const: toshiba,tc358743
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: refclk
+
+ reset-gpios:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ data-lanes:
+ oneOf:
+ - items:
+ - const: 1
+ - const: 2
+ - items:
+ - const: 1
+ - const: 2
+ - const: 3
+ - const: 4
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ bridge@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 {
+ endpoint {
+ remote-endpoint = <&mipi_csi2_in>;
+ data-lanes = <1 2 3 4>;
+ clock-lanes = <0>;
+ clock-noncontinuous;
+ link-frequencies = /bits/ 64 <297000000>;
+ };
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index fe10d29b7657b..9abeaa3f31ca8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -27673,7 +27673,7 @@ TOSHIBA TC358743 DRIVER
M: Hans Verkuil <hverkuil@kernel.org>
L: linux-media@vger.kernel.org
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
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v1 1/1] media: dt-bindings: tc358743: Convert to YAML
2026-08-27 16:03 [PATCH v1 1/1] media: dt-bindings: tc358743: Convert to YAML Frank.Li
@ 2026-08-27 16:10 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-08-27 16:10 UTC (permalink / raw)
To: Frank.Li; +Cc: robh, conor+dt, media-ci, devicetree, Frank.Li, imx
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 <Frank.Li@nxp.com>
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.
> diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt
> deleted file mode 100644
> index 59102edcf01ea..0000000000000
> --- a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.txt
> +++ /dev/null
[ ... ]
> -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>
[ ... ]
> diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml
> new file mode 100644
> index 0000000000000..29dd1d58f766f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358743.yaml
[ ... ]
> + 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.
> + - items:
> + - const: 1
> + - const: 2
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260827160312.4113159-1-Frank.Li@oss.nxp.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-27 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 16:03 [PATCH v1 1/1] media: dt-bindings: tc358743: Convert to YAML Frank.Li
2026-08-27 16:10 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox