Commit b6755423 authored by Rob Herring's avatar Rob Herring
Browse files

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 <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210104180724.2275098-1-robh@kernel.org
parent 453f617a
Loading
Loading
Loading
Loading
+5 −18
Original line number Diff line number Diff line
@@ -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
+3 −16
Original line number Diff line number Diff line
@@ -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
+3 −16
Original line number Diff line number Diff line
@@ -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
+6 −19
Original line number Diff line number Diff line
@@ -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
+2 −4
Original line number Diff line number Diff line
@@ -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:
Loading