Skip to contentSkip to conversation

dt-bindings: display: imx: Add television encoder (TVE) for imx53

PATCH In review Frank Li 3 participants 3 messages May 12 – May 19

Subsystems (5)
lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: display: imx: Add television encoder (TVE) for imx53

Add television encoder (TVE) for legacy i.MX53 (over 15 years) to fix below
DTB_CHECK warnings:
arch/arm/boot/dts/nxp/imx/imx53-ard.dtb: /soc/bus@60000000/tve@63ff0000: failed to match any schema with compatible: ['fsl,imx53-tve']

---
About cleanup 300 lines warnings for i.MX ARM platform

---
 .../bindings/display/imx/fsl,imx53-tve.yaml   | 102 ++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml
Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml new file +102 -0
new file mode 100644
index 0000000000000..a7c971be1959b
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/imx/fsl,imx53-tve.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX53 Television Encoder (TVE)
+
+maintainers:
+  - Frank Li <[email protected]>
+
+description:
+  The Television Encoder (TVE) is a hardware block in the i.MX53 SoC that
+  converts digital video data into analog TV signals (NTSC/PAL).
+
+properties:
+  compatible:
+    const: fsl,imx53-tve
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: TVE gate clock
+      - description: Display interface selector clock
+
+  clock-names:
+    items:
+      - const: tve
+      - const: di_sel
+
+  ddc-i2c-bus:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Phandle to the I2C bus used for DDC (Display Data Channel) communication
+      to read EDID information from the connected display.
+
+  dac-supply:
+    description:
+      Regulator supply for the TVE DAC (Digital-to-Analog Converter).
+
+  fsl,tve-mode:
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      TVE output mode selection.
+    enum:
+      - ntsc
+      - pal
+      - vga
+
+  fsl,hsync-pin:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Pin number for horizontal sync signal in VGA mode.
+    minimum: 0
+    maximum: 8
+
+  fsl,vsync-pin:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Pin number for vertical sync signal in VGA mode.
+    minimum: 0
+    maximum: 8
+
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description:
+      Port node with one endpoint connected to the IPU display interface.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx5-clock.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    tve@63ff0000 {
+        compatible = "fsl,imx53-tve";
+        reg = <0x63ff0000 0x1000>;
+        interrupts = <92>;
+        clocks = <&clks IMX5_CLK_TVE_GATE>,
+                 <&clks IMX5_CLK_IPU_DI1_SEL>;
+        clock-names = "tve", "di_sel";
+
+        port {
+            endpoint {
+                remote-endpoint = <&ipu_di1_tve>;
+            };
+        };
+    };
+
Signature · 1 line
2.43.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] Missing conditional constraints for VGA mode sync pins. - [Low] The `fsl,tve-mode` property lacks a…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Missing conditional constraints for VGA mode sync pins.
- [Low] The fsl,tve-mode property lacks a defined default and is not required. --

commit 18cf39d8e659ce17f310f753763d63085e707e24
Author: Frank Li <[email protected]>

dt-bindings: display: imx: Add television encoder (TVE) for imx53

This commit adds the device tree binding schema for the Freescale i.MX53 Television Encoder (TVE). It documents properties required to configure the TVE module, which converts digital video to analog TV signals.

Quoted 6 lines
Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml new file +0 -0
new file mode 100644
index 0000000000000..a7c971be1959b
@@ -0,0 +1,102 @@

[ ... ]

Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml line 53

Quoted 8 lines
Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml new file +8 -0
+  fsl,tve-mode:
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      TVE output mode selection.
+    enum:
+      - ntsc
+      - pal
+      - vga

Since fsl,tve-mode is not listed in the required properties, should it have a default value defined to clarify what output mode the device assumes when this property is absent?

Quoted 4 lines
Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml new file +4 -0
+
+  fsl,hsync-pin:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:

Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml line 67

Quoted 10 lines
Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml new file +10 -0
+      Pin number for horizontal sync signal in VGA mode.
+    minimum: 0
+    maximum: 8
+
+  fsl,vsync-pin:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Pin number for vertical sync signal in VGA mode.
+    minimum: 0
+    maximum: 8

Is it necessary to add an allOf conditional block to enforce the dependency between these sync pins and VGA mode?

Without it, device trees could pass validation while specifying these pins for incompatible modes like NTSC or PAL, or they might omit them entirely when VGA mode is selected.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Frank Li

Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml line 46

Quoted 11 lines · Frank Li
Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml new file +11 -0
+  ddc-i2c-bus:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Phandle to the I2C bus used for DDC (Display Data Channel) communication
+      to read EDID information from the connected display.
+
+  dac-supply:
+    description:
+      Regulator supply for the TVE DAC (Digital-to-Analog Converter).
+
+  fsl,tve-mode:

This should be a required property, based on current driver code.

Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml line 53

Quoted 7 lines
Documentation/devicetree/bindings/display/imx/fsl,imx53-tve.yaml new file +7 -0
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      TVE output mode selection.
+    enum:
+      - ntsc
+      - pal
+      - vga

Best regards,
Krzysztof