Skip to contentSkip to conversation

dt-bindings: display: Use OF graph schema

PATCH In review Rob Herring 2 participants 2 messages Jan 4, 2021 – Jan 5, 2021

Subsystems (26)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: display: Use OF graph schema

Now that we have a graph schema, rework the display related schemas to use it. Mostly this is adding a reference to graph.yaml and dropping duplicate parts from schemas.

In panel-common.yaml, 'ports' is dropped. Any binding using 'ports' should be one with more than 1 port node, and the binding must define what each port is.

Note that ti,sn65dsi86.yaml, ti,tfp410,yaml and toshiba,tc358768.yaml will need further updates to use video-interfaces.yaml once that lands.

Cc Thierry Reding <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Thomas Zimmermann <[email protected]>

---
v3:
- Rework based on graph.yaml changes. 'port' nodes now have a $ref and endpoint nodes do too if they define additional properties.
- Convert ste,mcde.yaml

v2:
- Drop 'type: object' where we have a $ref
- Drop any common properties like 'reg', '#address-cells', "#size-cells', 'remote-endpoint'
- Keep description in ti,k2g-dss.yaml

---
 .../allwinner,sun4i-a10-display-backend.yaml  |  23 +---
 .../allwinner,sun4i-a10-display-frontend.yaml |  19 +--
 .../display/allwinner,sun4i-a10-hdmi.yaml     |  19 +--
 .../display/allwinner,sun4i-a10-tcon.yaml     |  25 +---
 .../allwinner,sun4i-a10-tv-encoder.yaml       |   6 +-
 .../display/allwinner,sun6i-a31-drc.yaml      |  19 +--
 .../display/allwinner,sun6i-a31-mipi-dsi.yaml |   6 +-
 .../allwinner,sun8i-a83t-de2-mixer.yaml       |  19 +--
 .../display/allwinner,sun8i-a83t-dw-hdmi.yaml |  19 +--
 .../display/allwinner,sun8i-r40-tcon-top.yaml | 110 ++----------------
 .../display/allwinner,sun9i-a80-deu.yaml      |  19 +--
 .../display/amlogic,meson-dw-hdmi.yaml        |   4 +-
 .../bindings/display/amlogic,meson-vpu.yaml   |   4 +-
 .../bindings/display/brcm,bcm2835-dpi.yaml    |   7 +-
 .../display/bridge/analogix,anx7625.yaml      |   6 +-
 .../display/bridge/analogix,anx7814.yaml      |  19 +--
 .../bindings/display/bridge/anx6345.yaml      |  18 +--
 .../display/bridge/cdns,mhdp8546.yaml         |  22 +---
 .../display/bridge/chrontel,ch7033.yaml       |   6 +-
 .../display/bridge/intel,keembay-dsi.yaml     |  14 +--
 .../bindings/display/bridge/ite,it6505.yaml   |   2 +-
 .../display/bridge/lontium,lt9611.yaml        |  70 ++---------
 .../bindings/display/bridge/lvds-codec.yaml   |  18 +--
 .../bindings/display/bridge/nwl-dsi.yaml      |  41 ++-----
 .../bindings/display/bridge/ps8640.yaml       |  24 +---
 .../bindings/display/bridge/renesas,lvds.yaml |  18 +--
 .../display/bridge/simple-bridge.yaml         |  18 +--
 .../display/bridge/snps,dw-mipi-dsi.yaml      |   7 +-
 .../display/bridge/thine,thc63lvd1024.yaml    |  21 +---
 .../bindings/display/bridge/ti,sn65dsi86.yaml |  45 +------
 .../bindings/display/bridge/ti,tfp410.yaml    |  24 +---
 .../display/bridge/toshiba,tc358762.yaml      |  52 +--------
 .../display/bridge/toshiba,tc358768.yaml      |  48 +-------
 .../display/bridge/toshiba,tc358775.yaml      |  19 +--
 .../connector/analog-tv-connector.yaml        |   1 +
 .../display/connector/dvi-connector.yaml      |   1 +
 .../display/connector/hdmi-connector.yaml     |   1 +
 .../display/connector/vga-connector.yaml      |   1 +
 .../bindings/display/imx/nxp,imx8mq-dcss.yaml |   2 +-
 .../bindings/display/ingenic,lcd.yaml         |  10 +-
 .../display/intel,keembay-display.yaml        |   2 +-
 .../display/panel/advantech,idk-2121wr.yaml   |  21 ++--
 .../bindings/display/panel/panel-common.yaml  |  11 +-
 .../rockchip/rockchip,rk3066-hdmi.yaml        |  16 +--
 .../display/rockchip/rockchip-vop.yaml        |   5 +-
 .../bindings/display/st,stm32-dsi.yaml        |  12 +-
 .../bindings/display/st,stm32-ltdc.yaml       |   8 +-
 .../devicetree/bindings/display/ste,mcde.yaml |   5 +-
 .../bindings/display/ti/ti,am65x-dss.yaml     |  19 +--
 .../bindings/display/ti/ti,j721e-dss.yaml     |  23 +---
 .../bindings/display/ti/ti,k2g-dss.yaml       |   3 +-
 51 files changed, 185 insertions(+), 747 deletions(-)
Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml +5 -18
index 86057d541065..12a7df0e38b2 100644
@@ -84,36 +84,23 @@ properties:
     const: dma-mem
 
   ports:
-    type: object
-    description: |
-      A ports node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
-        description: |
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
           Input endpoints of the controller.
 
       port@1:
-        type: object
-        description: |
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
           Output endpoints of the controller.
 
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@0
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-frontend.yaml +3 -16
index 3eb1c2bbf4e7..055157fbf3bf 100644
@@ -57,35 +57,22 @@ properties:
     maxItems: 1
 
   ports:
-    type: object
-    description: |
-      A ports node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Input endpoints of the controller.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Output endpoints of the controller.
 
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/allwinner,sun4i-a10-hdmi.yaml +3 -16
index 75e6479397a5..7f11452539f4 100644
@@ -76,37 +76,24 @@ properties:
       - const: audio-tx
 
   ports:
-    type: object
-    description: |
-      A ports node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Input endpoints of the controller.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Output endpoints of the controller. Usually an HDMI
           connector.
 
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@0
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml +6 -19
index 4c15a2644a7c..c13faf3e6581 100644
@@ -115,31 +115,24 @@ properties:
           - const: lvds
 
   ports:
-    type: object
-    description: |
-      A ports node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Input endpoints of the controller.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description: |
           Output endpoints of the controller.
 
         patternProperties:
           "^endpoint(@[0-9])$":
-            type: object
+            $ref: /schemas/graph.yaml#/$defs/endpoint-base
+            unevaluatedProperties: false
 
             properties:
               allwinner,tcon-channel:
@@ -156,16 +149,10 @@ properties:
                   property is not present, the endpoint number will be
                   used as the channel number.
 
-            unevaluatedProperties: true
-
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@0
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tv-encoder.yaml +2 -4
index 6009324be967..afc0ed799e0e 100644
@@ -24,11 +24,9 @@ properties:
     maxItems: 1
 
   port:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
-      A port node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt. The
-      first port should be the input endpoint, usually coming from the
+      The first port should be the input endpoint, usually coming from the
       associated TCON.
 
 required:
Documentation/devicetree/bindings/display/allwinner,sun6i-a31-drc.yaml +3 -16
index 0c1ce55940e1..71cce5687580 100644
@@ -46,36 +46,23 @@ properties:
     maxItems: 1
 
   ports:
-    type: object
-    description: |
-      A ports node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Input endpoints of the controller.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Output endpoints of the controller.
 
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@0
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml +2 -4
index 7aa330dabc44..a738d7c12a97 100644
@@ -47,11 +47,9 @@ properties:
     const: dphy
 
   port:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
-      A port node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt. That
-      port should be the input endpoint, usually coming from the
+      The port should be the input endpoint, usually coming from the
       associated TCON.
 
 required:
Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-de2-mixer.yaml +3 -16
index c040eef56518..4f91eec26de9 100644
@@ -43,35 +43,22 @@ properties:
     maxItems: 1
 
   ports:
-    type: object
-    description: |
-      A ports node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Input endpoints of the controller.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Output endpoints of the controller.
 
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-dw-hdmi.yaml +3 -16
index fa4769a0b26e..b3e9992525c2 100644
@@ -93,38 +93,25 @@ properties:
       The VCC power supply of the controller
 
   ports:
-    type: object
-    description: |
-      A ports node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Input endpoints of the controller. Usually the associated
           TCON.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Output endpoints of the controller. Usually an HDMI
           connector.
 
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@0
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/allwinner,sun8i-r40-tcon-top.yaml +7 -103

148 lines not on this page · raw message

Documentation/devicetree/bindings/display/allwinner,sun9i-a80-deu.yaml +3 -16
index 96de41d32b3e..637372ec4614 100644
@@ -40,36 +40,23 @@ properties:
     maxItems: 1
 
   ports:
-    type: object
-    description: |
-      A ports node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Input endpoints of the controller.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Output endpoints of the controller.
 
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@0
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml +2 -2
index 0da42ab8fd3a..cf5a208f2f10 100644
@@ -81,12 +81,12 @@ properties:
     description: phandle to an external 5V regulator to power the HDMI logic
 
   port@0:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
       A port node pointing to the VENC Input port node.
 
   port@1:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
       A port node pointing to the TMDS Output port node.
 
Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml +2 -2
index a8d202c9d004..851cb0781217 100644
@@ -83,12 +83,12 @@ properties:
     description: phandle to the associated power domain
 
   port@0:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
       A port node pointing to the CVBS VDAC port node.
 
   port@1:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
       A port node pointing to the HDMI-TX port node.
 
Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml +3 -4
index 5c1024bbc1b3..c9ad0ecc9b6d 100644
@@ -27,10 +27,9 @@ properties:
       - const: pixel
 
   port:
-    type: object
-    description: >
-      Port node with a single endpoint connecting to the panel, as
-      defined in Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/port
+    description:
+      Port node with a single endpoint connecting to the panel.
 
 required:
   - compatible
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +3 -3
index 60585a4fc22b..d08b71dc5f75 100644
@@ -35,16 +35,16 @@ properties:
     maxItems: 1
 
   ports:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Video port for MIPI DSI input.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Video port for panel or connector.
 
Documentation/devicetree/bindings/display/bridge/analogix,anx7814.yaml +3 -16
index 3ba477aefdd7..8e13f27b28ed 100644
@@ -42,31 +42,18 @@ properties:
     description: Regulator for 1.0V digital core power.
 
   ports:
-    type: object
-    description:
-      A node containing input and output port nodes with endpoint
-      definitions as documented in
-      Documentation/devicetree/bindings/media/video-interfaces.txt
-      Documentation/devicetree/bindings/graph.txt
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: Video port for HDMI input.
 
-        properties:
-          reg:
-            const: 0
-
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Video port for SlimPort, DisplayPort, eDP or MyDP output.
 
-        properties:
-          reg:
-            const: 1
-
     required:
       - port@0
       - port@1
Documentation/devicetree/bindings/display/bridge/anx6345.yaml +5 -13
index 8c0e4f285fbc..ccf41688f0bb 100644
@@ -34,31 +34,23 @@ properties:
     description: Regulator for 2.5V digital core power.
 
   ports:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      '#address-cells':
-        const: 1
-
-      '#size-cells':
-        const: 0
-
       port@0:
-        type: object
-        description: |
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
           Video port for LVTTL input
 
       port@1:
-        type: object
-        description: |
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
           Video port for eDP output (panel or connector).
           May be omitted if EDID works reliably.
 
     required:
       - port@0
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/bridge/cdns,mhdp8546.yaml +6 -16
index 74d675fc6e7b..63427878715e 100644
@@ -57,47 +57,37 @@ properties:
     maxItems: 1
 
   ports:
-    type: object
-    description:
-      Ports as described in Documentation/devicetree/bindings/graph.txt.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      '#address-cells':
-        const: 1
-
-      '#size-cells':
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           First input port representing the DP bridge input.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Second input port representing the DP bridge input.
 
       port@2:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Third input port representing the DP bridge input.
 
       port@3:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Fourth input port representing the DP bridge input.
 
       port@4:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Output port representing the DP bridge output.
 
     required:
       - port@0
       - port@4
-      - '#address-cells'
-      - '#size-cells'
 
 allOf:
   - if:
Documentation/devicetree/bindings/display/bridge/chrontel,ch7033.yaml +3 -3
index 9f38f55fc990..bb6289c7d375 100644
@@ -19,16 +19,16 @@ properties:
     description: I2C address of the device
 
   ports:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Video port for RGB input.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           DVI port, should be connected to a node compatible with the
           dvi-connector binding.
Documentation/devicetree/bindings/display/bridge/intel,keembay-dsi.yaml +3 -11
index ab5be2625224..dcb1336ee2a5 100644
@@ -35,29 +35,21 @@ properties:
       - const: clk_mipi_cfg
 
   ports:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      '#address-cells':
-       const: 1
-
-      '#size-cells':
-       const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: MIPI DSI input port.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: DSI output port.
 
     required:
       - port@0
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml +1 -1
index efbb3d0117dc..eedf8b7f5173 100644
@@ -55,7 +55,7 @@ properties:
     description: extcon specifier for the Power Delivery
 
   port:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description: A port node pointing to DPI host port node
 
 required:
Documentation/devicetree/bindings/display/bridge/lontium,lt9611.yaml +7 -63

89 lines not on this page · raw message

Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml +4 -14
index e5e3c72630cf..717d09fffd11 100644
@@ -45,25 +45,17 @@ properties:
           - thine,thc63lvdm83d # For the THC63LVDM83D LVDS serializer
 
   ports:
-    type: object
-    description: |
-      This device has two video ports. Their connections are modeled using the
-      OF graph bindings specified in Documentation/devicetree/bindings/graph.txt
-    properties:
-      '#address-cells':
-        const: 1
-
-      '#size-cells':
-        const: 0
+    $ref: /schemas/graph.yaml#/properties/ports
 
+    properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           For LVDS encoders, port 0 is the parallel input
           For LVDS decoders, port 0 is the LVDS input
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           For LVDS encoders, port 1 is the LVDS output
           For LVDS decoders, port 1 is the parallel output
@@ -72,8 +64,6 @@ properties:
       - port@0
       - port@1
 
-    additionalProperties: false
-
   powerdown-gpios:
     description:
       The GPIO used to control the power down line of this device.
Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml +7 -34

75 lines not on this page · raw message

Documentation/devicetree/bindings/display/bridge/ps8640.yaml +6 -18
index 7e27cfcf770d..db85e12e7b98 100644
@@ -43,34 +43,22 @@ properties:
     description: Regulator for 3.3V digital core power.
 
   ports:
-    type: object
-    description:
-      A node containing DSI input & output port nodes with endpoint
-      definitions as documented in
-      Documentation/devicetree/bindings/media/video-interfaces.txt
-      Documentation/devicetree/bindings/graph.txt
-    properties:
-      '#address-cells':
-        const: 1
-
-      '#size-cells':
-        const: 0
+    $ref: /schemas/graph.yaml#/properties/ports
 
+    properties:
       port@0:
-        type: object
-        description: |
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
           Video port for DSI input
 
       port@1:
-        type: object
-        description: |
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
           Video port for eDP output (panel or connector).
 
     required:
       - port@0
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml +3 -15
index e5b163951b91..d74022cc6e29 100644
@@ -49,33 +49,21 @@ properties:
     maxItems: 1
 
   ports:
-    type: object
-    description: |
-      This device has two video ports. Their connections are modelled using the
-      OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
-      Each port shall have a single endpoint.
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      '#address-cells':
-        const: 1
-
-      '#size-cells':
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: Parallel RGB input port
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: LVDS output port
 
     required:
       - port@0
       - port@1
 
-    additionalProperties: false
-
   power-domains:
     maxItems: 1
 
Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml +4 -14
index 3ddb35fcf0a2..45f8701d0514 100644
@@ -30,31 +30,21 @@ properties:
           - ti,ths8135
 
   ports:
-    type: object
-    description: |
-      This device has two video ports. Their connections are modeled using the
-      OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
-    properties:
-      '#address-cells':
-        const: 1
-
-      '#size-cells':
-        const: 0
+    $ref: /schemas/graph.yaml#/properties/ports
 
+    properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: The bridge input
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: The bridge output
 
     required:
       - port@0
       - port@1
 
-    additionalProperties: false
-
   enable-gpios:
     maxItems: 1
     description: GPIO controlling bridge enable
Documentation/devicetree/bindings/display/bridge/snps,dw-mipi-dsi.yaml +4 -3
index e42cb610f545..3c3e51af154b 100644
@@ -47,14 +47,15 @@ properties:
     const: apb
 
   ports:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: Input node to receive pixel data.
+
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: DSI output node to panel.
 
     required:
Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml +5 -16
index 469ac4a34273..4f19a72122bd 100644
@@ -25,11 +25,8 @@ properties:
     const: thine,thc63lvd1024
 
   ports:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
     description: |
-      This device has four video ports. Their connections are modeled using the
-      OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
-
       The device can operate in single-link mode or dual-link mode. In
       single-link mode, all pixels are received on port@0, and port@1 shall not
       contain any endpoint. In dual-link mode, even-numbered pixels are
@@ -37,34 +34,26 @@ properties:
       port@1 shall contain endpoints.
 
     properties:
-      '#address-cells':
-        const: 1
-
-      '#size-cells':
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: First LVDS input port
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: Second LVDS input port
 
       port@2:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: First digital CMOS/TTL parallel output
 
       port@3:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: Second digital CMOS/TTL parallel output
 
     required:
       - port@0
       - port@2
 
-    additionalProperties: false
-
   oe-gpios:
     maxItems: 1
     description: Output enable GPIO signal, pin name "OE", active high.
Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml +6 -39

72 lines not on this page · raw message

Documentation/devicetree/bindings/display/bridge/ti,tfp410.yaml +6 -18
index 605831c1e836..4c5dd8ec2951 100644
@@ -31,23 +31,18 @@ properties:
     maximum: 7
 
   ports:
-    description:
-      A node containing input and output port nodes with endpoint
-      definitions as documented in
-      Documentation/devicetree/bindings/media/video-interfaces.txt
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
       port@0:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description: DPI input port.
-        type: object
 
         properties:
-          reg:
-            const: 0
-
           endpoint:
-            type: object
+            $ref: /schemas/graph.yaml#/$defs/endpoint-base
+            unevaluatedProperties: false
 
             properties:
               pclk-sample:
@@ -67,15 +62,8 @@ properties:
                 default: 24
 
       port@1:
+        $ref: /schemas/graph.yaml#/properties/port
         description: DVI output port.
-        type: object
-
-        properties:
-          reg:
-            const: 1
-
-          endpoint:
-            type: object
 
     required:
       - port@0
Documentation/devicetree/bindings/display/bridge/toshiba,tc358762.yaml +5 -47

67 lines not on this page · raw message

Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml +6 -42

75 lines not on this page · raw message

Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml +5 -14
index fd3113aa9ccd..f018cabf0e44 100644
@@ -44,31 +44,22 @@ properties:
     description: Hardware reset, Low active
 
   ports:
-    type: object
-    description:
-      A node containing input and output port nodes with endpoint definitions
-      as documented in
-      Documentation/devicetree/bindings/media/video-interfaces.txt
-    properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
+    $ref: /schemas/graph.yaml#/properties/ports
 
+    properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           DSI Input. The remote endpoint phandle should be a
           reference to a valid mipi_dsi_host device node.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Video port for LVDS output (panel or connector).
 
       port@2:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: |
           Video port for Dual link LVDS output (panel or connector).
 
Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml +1 -0
index eebe88fed999..a31ca2d52b86 100644
@@ -25,6 +25,7 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32
 
   port:
+    $ref: /schemas/graph.yaml#/properties/port
     description: Connection to controller providing analog TV signals
 
 required:
Documentation/devicetree/bindings/display/connector/dvi-connector.yaml +1 -0
index 71cb9220fa59..93eb14294e68 100644
@@ -36,6 +36,7 @@ properties:
     description: the connector has pins for DVI dual-link
 
   port:
+    $ref: /schemas/graph.yaml#/properties/port
     description: Connection to controller providing DVI signals
 
 required:
Documentation/devicetree/bindings/display/connector/hdmi-connector.yaml +1 -0
index 14d7128af592..83c0d008265b 100644
@@ -37,6 +37,7 @@ properties:
     maxItems: 1
 
   port:
+    $ref: /schemas/graph.yaml#/properties/port
     description: Connection to controller providing HDMI signals
 
 required:
Documentation/devicetree/bindings/display/connector/vga-connector.yaml +1 -0
index 5782c4bb3252..25f868002000 100644
@@ -20,6 +20,7 @@ properties:
     $ref: /schemas/types.yaml#/definitions/phandle
 
   port:
+    $ref: /schemas/graph.yaml#/properties/port
     description: Connection to controller providing VGA signals
 
 required:
Documentation/devicetree/bindings/display/imx/nxp,imx8mq-dcss.yaml +1 -1
index f1f25aa794d9..0091df9dd73b 100644
@@ -74,7 +74,7 @@ properties:
       - description: Must be 400 MHz
 
   port:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
       A port node pointing to the input port of a HDMI/DP or MIPI display bridge.
 
Documentation/devicetree/bindings/display/ingenic,lcd.yaml +5 -5
index 768050f30dba..50d2b0a50e8a 100644
@@ -39,18 +39,18 @@ properties:
     minItems: 1
 
   port:
-    description: OF graph bindings (specified in bindings/graph.txt).
+    $ref: /schemas/graph.yaml#/properties/port
 
   ports:
-    description: OF graph bindings (specified in bindings/graph.txt).
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
+
     properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: DPI output, to interface with TFT panels.
 
       port@8:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description: Link to the Image Processing Unit (IPU).
           (See ingenic,ipu.yaml).
 
Documentation/devicetree/bindings/display/intel,keembay-display.yaml +1 -1
index 0a697d45c2ad..bc6622b010ca 100644
@@ -36,7 +36,7 @@ properties:
     maxItems: 1
 
   port:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description: Display output node to DSI.
 
 required:
Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml +10 -11
index 6b7fddc80c41..67682fe77f10 100644
@@ -37,34 +37,33 @@ properties:
   panel-timing: true
 
   ports:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
+
     properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description: The sink for odd pixels.
         properties:
-          reg:
-            const: 0
-
           dual-lvds-odd-pixels: true
 
         required:
-          - reg
           - dual-lvds-odd-pixels
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description: The sink for even pixels.
         properties:
-          reg:
-            const: 1
-
           dual-lvds-even-pixels: true
 
         required:
-          - reg
           - dual-lvds-even-pixels
 
+    required:
+      - port@0
+      - port@1
+
 additionalProperties: false
 
 required:
Documentation/devicetree/bindings/display/panel/panel-common.yaml +1 -10
index cd6dc5461721..5b38dc89cb21 100644
@@ -68,16 +68,7 @@ properties:
 
   # Connectivity
   port:
-    type: object
-
-  ports:
-    type: object
-    description:
-      Panels receive video data through one or multiple connections. While
-      the nature of those connections is specific to the panel type, the
-      connectivity is expressed in a standard fashion using ports as specified
-      in the device graph bindings defined in
-      Documentation/devicetree/bindings/graph.txt.
+    $ref: /schemas/graph.yaml#/properties/port
 
   ddc-i2c-bus:
     $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/display/rockchip/rockchip,rk3066-hdmi.yaml +3 -13
index 4110d003ce1f..008c144257cb 100644
@@ -43,34 +43,24 @@ properties:
       This soc uses GRF regs to switch the HDMI TX input between vop0 and vop1.
 
   ports:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/ports
 
     properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
-
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Port node with two endpoints, numbered 0 and 1,
           connected respectively to vop0 and vop1.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           Port node with one endpoint connected to a hdmi-connector node.
 
     required:
-      - "#address-cells"
-      - "#size-cells"
       - port@0
       - port@1
 
-    additionalProperties: false
-
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/display/rockchip/rockchip-vop.yaml +1 -4
index ed8148e26e24..6f43d885c9b3 100644
@@ -70,10 +70,7 @@ properties:
       - const: dclk
 
   port:
-    type: object
-    description:
-      A port node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt.
+    $ref: /schemas/graph.yaml#/properties/port
 
   assigned-clocks:
     maxItems: 2
Documentation/devicetree/bindings/display/st,stm32-dsi.yaml +4 -8
index 327a14d85df8..679daed4124e 100644
@@ -51,20 +51,16 @@ properties:
       Phandle of the regulator that provides the supply voltage.
 
   ports:
-    type: object
-    description:
-      A node containing DSI input & output port nodes with endpoint
-      definitions as documented in
-      Documentation/devicetree/bindings/media/video-interfaces.txt
-      Documentation/devicetree/bindings/graph.txt
+    $ref: /schemas/graph.yaml#/properties/ports
+
     properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           DSI input port node, connected to the ltdc rgb output port.
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           DSI output port node, connected to a panel or a bridge input port"
 
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml +3 -5
index bf8ad916e9b0..d54f9ca207af 100644
@@ -35,15 +35,13 @@ properties:
     maxItems: 1
 
   port:
-    type: object
-    description:
-      "Video port for DPI RGB output.
+    $ref: /schemas/graph.yaml#/properties/port
+    description: |
+      Video port for DPI RGB output.
       ltdc has one video port with up to 2 endpoints:
       - for external dpi rgb panel or bridge, using gpios.
       - for internal dpi input of the MIPI DSI host controller.
       Note: These 2 endpoints cannot be activated simultaneously.
-      Please refer to the bindings defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt."
 
 required:
   - compatible
Documentation/devicetree/bindings/display/ste,mcde.yaml +2 -3
index 830c9b4091cc..de0c678b3c29 100644
@@ -42,10 +42,9 @@ properties:
     description: a phandle to the analog voltage regulator
 
   port:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
-      A DPI port node with endpoint definitions as defined in
-      Documentation/devicetree/bindings/media/video-interfaces.txt
+      A DPI port node
 
   "#address-cells":
     const: 1
Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml +4 -15
index 4dc30738ee57..781c1868b0b8 100644
@@ -74,30 +74,19 @@ properties:
     type: boolean
 
   ports:
-    type: object
-    description:
-      Ports as described in Documentation/devicetree/bindings/graph.txt
-    properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
+    $ref: /schemas/graph.yaml#/properties/ports
 
+    properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           The DSS OLDI output port node form video port 1
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           The DSS DPI output port node from video port 2
 
-    required:
-      - "#address-cells"
-      - "#size-cells"
-
   ti,am65x-oldi-io-ctrl:
     $ref: "/schemas/types.yaml#/definitions/phandle-array"
     maxItems: 1
Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml +6 -17
index c9a947d55fa4..2986f9acc9f0 100644
@@ -107,40 +107,29 @@ properties:
     type: boolean
 
   ports:
-    type: object
-    description:
-      Ports as described in Documentation/devicetree/bindings/graph.txt
-    properties:
-      "#address-cells":
-        const: 1
-
-      "#size-cells":
-        const: 0
+    $ref: /schemas/graph.yaml#/properties/ports
 
+    properties:
       port@0:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           The output port node form video port 1
 
       port@1:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           The output port node from video port 2
 
       port@2:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           The output port node from video port 3
 
       port@3:
-        type: object
+        $ref: /schemas/graph.yaml#/properties/port
         description:
           The output port node from video port 4
 
-    required:
-      - "#address-cells"
-      - "#size-cells"
-
   max-memory-bandwidth:
     $ref: /schemas/types.yaml#/definitions/uint32
     description:
Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml +1 -2
index 8f87b82c6695..7ce7bbad5780 100644
@@ -54,9 +54,8 @@ properties:
     description: phandle to the associated power domain
 
   port:
-    type: object
+    $ref: /schemas/graph.yaml#/properties/port
     description:
-      Port as described in Documentation/devicetree/bindings/graph.txt.
       The DSS DPI output port node
 
   max-memory-bandwidth:
Signature · 6 lines
2.27.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi Rob,

Thank you for the patch.

Quoted 11 lines · Rob Herring

Now that we have a graph schema, rework the display related schemas to use it. Mostly this is adding a reference to graph.yaml and dropping duplicate parts from schemas.

In panel-common.yaml, 'ports' is dropped. Any binding using 'ports' should be one with more than 1 port node, and the binding must define what each port is.

Note that ti,sn65dsi86.yaml, ti,tfp410,yaml and toshiba,tc358768.yaml will need further updates to use video-interfaces.yaml once that lands.

Quoted 7 lines
Cc Thierry Reding <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Quoted 64 lines

---
v3:
- Rework based on graph.yaml changes. 'port' nodes now have a $ref and endpoint nodes do too if they define additional properties.
- Convert ste,mcde.yaml

v2:
- Drop 'type: object' where we have a $ref
- Drop any common properties like 'reg', '#address-cells', "#size-cells', 'remote-endpoint'
- Keep description in ti,k2g-dss.yaml

---
 .../allwinner,sun4i-a10-display-backend.yaml  |  23 +---
 .../allwinner,sun4i-a10-display-frontend.yaml |  19 +--
 .../display/allwinner,sun4i-a10-hdmi.yaml     |  19 +--
 .../display/allwinner,sun4i-a10-tcon.yaml     |  25 +---
 .../allwinner,sun4i-a10-tv-encoder.yaml       |   6 +-
 .../display/allwinner,sun6i-a31-drc.yaml      |  19 +--
 .../display/allwinner,sun6i-a31-mipi-dsi.yaml |   6 +-
 .../allwinner,sun8i-a83t-de2-mixer.yaml       |  19 +--
 .../display/allwinner,sun8i-a83t-dw-hdmi.yaml |  19 +--
 .../display/allwinner,sun8i-r40-tcon-top.yaml | 110 ++----------------
 .../display/allwinner,sun9i-a80-deu.yaml      |  19 +--
 .../display/amlogic,meson-dw-hdmi.yaml        |   4 +-
 .../bindings/display/amlogic,meson-vpu.yaml   |   4 +-
 .../bindings/display/brcm,bcm2835-dpi.yaml    |   7 +-
 .../display/bridge/analogix,anx7625.yaml      |   6 +-
 .../display/bridge/analogix,anx7814.yaml      |  19 +--
 .../bindings/display/bridge/anx6345.yaml      |  18 +--
 .../display/bridge/cdns,mhdp8546.yaml         |  22 +---
 .../display/bridge/chrontel,ch7033.yaml       |   6 +-
 .../display/bridge/intel,keembay-dsi.yaml     |  14 +--
 .../bindings/display/bridge/ite,it6505.yaml   |   2 +-
 .../display/bridge/lontium,lt9611.yaml        |  70 ++---------
 .../bindings/display/bridge/lvds-codec.yaml   |  18 +--
 .../bindings/display/bridge/nwl-dsi.yaml      |  41 ++-----
 .../bindings/display/bridge/ps8640.yaml       |  24 +---
 .../bindings/display/bridge/renesas,lvds.yaml |  18 +--
 .../display/bridge/simple-bridge.yaml         |  18 +--
 .../display/bridge/snps,dw-mipi-dsi.yaml      |   7 +-
 .../display/bridge/thine,thc63lvd1024.yaml    |  21 +---
 .../bindings/display/bridge/ti,sn65dsi86.yaml |  45 +------
 .../bindings/display/bridge/ti,tfp410.yaml    |  24 +---
 .../display/bridge/toshiba,tc358762.yaml      |  52 +--------
 .../display/bridge/toshiba,tc358768.yaml      |  48 +-------
 .../display/bridge/toshiba,tc358775.yaml      |  19 +--
 .../connector/analog-tv-connector.yaml        |   1 +
 .../display/connector/dvi-connector.yaml      |   1 +
 .../display/connector/hdmi-connector.yaml     |   1 +
 .../display/connector/vga-connector.yaml      |   1 +
 .../bindings/display/imx/nxp,imx8mq-dcss.yaml |   2 +-
 .../bindings/display/ingenic,lcd.yaml         |  10 +-
 .../display/intel,keembay-display.yaml        |   2 +-
 .../display/panel/advantech,idk-2121wr.yaml   |  21 ++--
 .../bindings/display/panel/panel-common.yaml  |  11 +-
 .../rockchip/rockchip,rk3066-hdmi.yaml        |  16 +--
 .../display/rockchip/rockchip-vop.yaml        |   5 +-
 .../bindings/display/st,stm32-dsi.yaml        |  12 +-
 .../bindings/display/st,stm32-ltdc.yaml       |   8 +-
 .../devicetree/bindings/display/ste,mcde.yaml |   5 +-
 .../bindings/display/ti/ti,am65x-dss.yaml     |  19 +--
 .../bindings/display/ti/ti,j721e-dss.yaml     |  23 +---
 .../bindings/display/ti/ti,k2g-dss.yaml       |   3 +-
 51 files changed, 185 insertions(+), 747 deletions(-)
Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel