Commit f61eb7bc authored by Rob Herring's avatar Rob Herring Committed by Mauro Carvalho Chehab

media: dt-bindings: media: Use OF graph schema

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

Cc: Maxime Ripard <mripard@kernel.org>
Cc: Jacopo Mondi <jacopo@jmondi.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 7fe1d445
...@@ -70,6 +70,7 @@ properties: ...@@ -70,6 +70,7 @@ properties:
# See ./video-interfaces.txt for details # See ./video-interfaces.txt for details
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
additionalProperties: false additionalProperties: false
properties: properties:
......
...@@ -43,6 +43,7 @@ properties: ...@@ -43,6 +43,7 @@ properties:
# See ./video-interfaces.txt for details # See ./video-interfaces.txt for details
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
properties: properties:
endpoint: endpoint:
......
...@@ -36,17 +36,9 @@ properties: ...@@ -36,17 +36,9 @@ properties:
maxItems: 1 maxItems: 1
port: port:
type: object $ref: /schemas/graph.yaml#/properties/port
description:
A node containing a single endpoint as doucmented in ports: true
Documentation/devicetree/bindings/media/video-interfaces.txt
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
additionalProperties: false additionalProperties: false
...@@ -80,24 +72,19 @@ allOf: ...@@ -80,24 +72,19 @@ allOf:
then: then:
properties: properties:
ports: ports:
$ref: /schemas/graph.yaml#/properties/ports
properties: properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
port@3: port@3:
type: object
description: Output port description: Output port
patternProperties: patternProperties:
"^port@[0-2]$": "^port@[0-2]$":
type: object
description: Input port description: Input port
required: required:
- port@3 - port@3
additionalProperties: false unevaluatedProperties: false
required: required:
- ports - ports
...@@ -110,24 +97,20 @@ allOf: ...@@ -110,24 +97,20 @@ allOf:
then: then:
properties: properties:
ports: ports:
$ref: /schemas/graph.yaml#/properties/ports
properties: properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
port@6: port@6:
type: object type: object
description: Output port description: Output port
patternProperties: patternProperties:
"^port@[0-5]$": "^port@[0-5]$":
type: object
description: Input port description: Input port
required: required:
- port@6 - port@6
additionalProperties: false unevaluatedProperties: false
required: required:
- ports - ports
......
...@@ -64,16 +64,12 @@ properties: ...@@ -64,16 +64,12 @@ properties:
description: description:
Select which input is selected after reset. Select which input is selected after reset.
ports: ports: true
type: object
description:
A node containing input and output port nodes with endpoint definitions
as documented in
Documentation/devicetree/bindings/media/video-interfaces.txt
required: required:
- compatible - compatible
- reg - reg
- ports
additionalProperties: false additionalProperties: false
...@@ -86,25 +82,17 @@ allOf: ...@@ -86,25 +82,17 @@ allOf:
then: then:
properties: properties:
ports: ports:
$ref: /schemas/graph.yaml#/properties/ports
properties: properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
port@0: port@0:
type: object
description: Input port description: Input port
port@1: port@1:
type: object
description: Output port description: Output port
required: required:
- port@1 - port@1
additionalProperties: false unevaluatedProperties: false
required:
- ports
- if: - if:
properties: properties:
...@@ -114,27 +102,19 @@ allOf: ...@@ -114,27 +102,19 @@ allOf:
then: then:
properties: properties:
ports: ports:
$ref: /schemas/graph.yaml#/properties/ports
properties: properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
port@2: port@2:
type: object
description: Output port description: Output port
patternProperties: patternProperties:
"^port@[0-1]$": "^port@[0-1]$":
type: object
description: Input port description: Input port
required: required:
- port@2 - port@2
additionalProperties: false unevaluatedProperties: false
required:
- ports
examples: examples:
- | - |
......
...@@ -41,7 +41,7 @@ properties: ...@@ -41,7 +41,7 @@ properties:
maxItems: 1 maxItems: 1
port: port:
type: object $ref: /schemas/graph.yaml#/properties/port
description: | description: |
Output video port. See ../video-interfaces.txt. Output video port. See ../video-interfaces.txt.
......
...@@ -86,33 +86,12 @@ properties: ...@@ -86,33 +86,12 @@ properties:
maxItems: 3 maxItems: 3
port: port:
type: object $ref: /schemas/graph.yaml#/properties/port
additionalProperties: false description:
description: -|
Connection to the remote GMSL endpoint are modelled using the OF graph Connection to the remote GMSL endpoint are modelled using the OF graph
bindings in accordance with the video interface bindings defined in bindings in accordance with the video interface bindings defined in
Documentation/devicetree/bindings/media/video-interfaces.txt. Documentation/devicetree/bindings/media/video-interfaces.txt.
The device node contains a single "port" child node with a single
"endpoint" sub-device.
properties:
endpoint:
type: object
additionalProperties: false
properties:
remote-endpoint:
description: -|
phandle to the remote GMSL endpoint sub-node in the remote node
port.
maxItems: 1
required:
- remote-endpoint
required:
- endpoint
required: required:
- compatible - compatible
......
...@@ -47,6 +47,8 @@ properties: ...@@ -47,6 +47,8 @@ properties:
# See ../video-interfaces.txt for more details # See ../video-interfaces.txt for more details
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
properties: properties:
endpoint: endpoint:
type: object type: object
...@@ -74,6 +76,8 @@ properties: ...@@ -74,6 +76,8 @@ properties:
required: required:
- link-frequencies - link-frequencies
additionalProperties: false
required: required:
- compatible - compatible
- reg - reg
......
...@@ -53,56 +53,25 @@ properties: ...@@ -53,56 +53,25 @@ properties:
ports: ports:
type: object type: object
description: | $ref: /schemas/graph.yaml#/properties/ports
The connections to the MAX9286 GMSL and its endpoint nodes are modelled
using the OF graph bindings in accordance with the video interface
bindings defined in
Documentation/devicetree/bindings/media/video-interfaces.txt.
The following table lists the port number corresponding to each device
port.
Port Description
----------------------------------------
Port 0 GMSL Input 0
Port 1 GMSL Input 1
Port 2 GMSL Input 2
Port 3 GMSL Input 3
Port 4 CSI-2 Output
properties: properties:
'#address-cells': port@0:
const: 1 description: GMSL Input 0
'#size-cells':
const: 0
port@[0-3]: port@1:
type: object description: GMSL Input 1
properties:
reg:
enum: [ 0, 1, 2, 3 ]
endpoint: port@2:
type: object description: GMSL Input 2
properties: port@3:
remote-endpoint: description: GMSL Input 3
description: |
phandle to the remote GMSL source endpoint subnode in the
remote node port.
required:
- remote-endpoint
required:
- reg
- endpoint
additionalProperties: false
port@4: port@4:
type: object type: object
description: CSI-2 Output
properties: properties:
reg: reg:
const: 4 const: 4
...@@ -130,6 +99,8 @@ properties: ...@@ -130,6 +99,8 @@ properties:
required: required:
- port@4 - port@4
unevaluatedProperties: false
i2c-mux: i2c-mux:
type: object type: object
description: | description: |
...@@ -184,25 +155,8 @@ properties: ...@@ -184,25 +155,8 @@ properties:
requirements of the currently connected remote device. requirements of the currently connected remote device.
port: port:
type: object $ref: /schemas/graph.yaml#/properties/port
description: Connection to the MAX9286 sink.
properties:
endpoint:
type: object
properties:
remote-endpoint:
description: phandle to the MAX9286 sink endpoint.
required:
- remote-endpoint
additionalProperties: false
required:
- endpoint
additionalProperties: false
required: required:
- compatible - compatible
......
...@@ -32,10 +32,7 @@ properties: ...@@ -32,10 +32,7 @@ properties:
port: port:
type: object type: object
description: |- $ref: /schemas/graph.yaml#/properties/port
Should contain one endpoint sub-node used to model connection to the
video receiver according to the specification defined in
Documentation/devicetree/bindings/media/video-interfaces.txt.
properties: properties:
endpoint: endpoint:
......
...@@ -58,11 +58,8 @@ properties: ...@@ -58,11 +58,8 @@ properties:
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
additionalProperties: false additionalProperties: false
description:
A node containing an output port node with an endpoint definition
as documented in
Documentation/devicetree/bindings/media/video-interfaces.txt
properties: properties:
endpoint: endpoint:
......
...@@ -38,6 +38,7 @@ properties: ...@@ -38,6 +38,7 @@ properties:
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
description: | description: |
Video output port. See ../video-interfaces.txt. Video output port. See ../video-interfaces.txt.
......
...@@ -55,6 +55,7 @@ properties: ...@@ -55,6 +55,7 @@ properties:
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
description: | description: |
Video output port. See ../video-interfaces.txt. Video output port. See ../video-interfaces.txt.
......
...@@ -44,8 +44,7 @@ properties: ...@@ -44,8 +44,7 @@ properties:
maxItems: 1 maxItems: 1
port: port:
type: object $ref: /schemas/graph.yaml#/properties/port
description: Output video port. See ../video-interfaces.txt.
required: required:
- compatible - compatible
......
...@@ -25,6 +25,7 @@ properties: ...@@ -25,6 +25,7 @@ properties:
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
additionalProperties: false additionalProperties: false
properties: properties:
......
...@@ -35,6 +35,7 @@ properties: ...@@ -35,6 +35,7 @@ properties:
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
additionalProperties: false additionalProperties: false
properties: properties:
......
...@@ -47,10 +47,7 @@ properties: ...@@ -47,10 +47,7 @@ properties:
ports: ports:
type: object type: object
description: $ref: /schemas/graph.yaml#/properties/ports
A node containing input and output port nodes with endpoint definitions
as documented in
Documentation/devicetree/bindings/media/video-interfaces.txt
properties: properties:
port@0: port@0:
...@@ -84,38 +81,15 @@ properties: ...@@ -84,38 +81,15 @@ properties:
additionalProperties: false additionalProperties: false
port@1: port@1:
type: object
description: description:
Output port node, multiple endpoints describing all the R-Car VIN Output port node, multiple endpoints describing all the R-Car VIN
modules connected the CSI-2 receiver. modules connected the CSI-2 receiver.
properties: required:
'#address-cells': - port@0
const: 1 - port@1
'#size-cells':
const: 0
reg:
const: 1
patternProperties:
"^endpoint@[0-9a-f]$":
type: object
properties: unevaluatedProperties: false
reg:
maxItems: 1
remote-endpoint: true
required:
- reg
- remote-endpoint
additionalProperties: false
additionalProperties: false
required: required:
- compatible - compatible
......
...@@ -70,6 +70,7 @@ properties: ...@@ -70,6 +70,7 @@ properties:
#The per-board settings for Gen2 and RZ/G1 platforms: #The per-board settings for Gen2 and RZ/G1 platforms:
port: port:
type: object type: object
$ref: /schemas/graph.yaml#/properties/port
description: description:
A node containing a parallel input with a single endpoint definitions as A node containing a parallel input with a single endpoint definitions as
documented in documented in
...@@ -124,9 +125,7 @@ properties: ...@@ -124,9 +125,7 @@ properties:
ports: ports:
type: object type: object
description: $ref: /schemas/graph.yaml#/properties/ports
A node containing input nodes with endpoint definitions as documented in
Documentation/devicetree/bindings/media/video-interfaces.txt
properties: properties:
port@0: port@0:
...@@ -272,6 +271,8 @@ properties: ...@@ -272,6 +271,8 @@ properties:
additionalProperties: false additionalProperties: false
unevaluatedProperties: false
required: required:
- compatible - compatible
- reg - reg
......
...@@ -37,12 +37,9 @@ properties: ...@@ -37,12 +37,9 @@ properties:
maxItems: 1 maxItems: 1
port: port:
type: object $ref: /schemas/graph.yaml#/properties/port
description: description:
DCMI supports a single port node with parallel bus. It should contain DCMI supports a single port node with parallel bus.
one 'port' child node with child 'endpoint' node. Please refer to the
bindings defined in
Documentation/devicetree/bindings/media/video-interfaces.txt.
properties: properties:
endpoint: endpoint:
......
...@@ -70,23 +70,18 @@ properties: ...@@ -70,23 +70,18 @@ properties:
# See ./video-interfaces.txt for details # See ./video-interfaces.txt for details
ports: ports:
type: object type: object
additionalProperties: false $ref: /schemas/graph.yaml#/properties/ports
unevaluatedProperties: false
properties: properties:
"#address-cells":
const: 1
"#size-cells":
const: 0
port@0: port@0:
type: object type: object
description: CSI2 Port #0
additionalProperties: false additionalProperties: false
properties: properties:
reg: reg:
const: 0 const: 0
description: CSI2 Port #0
patternProperties: patternProperties:
endpoint: endpoint:
...@@ -108,12 +103,12 @@ properties: ...@@ -108,12 +103,12 @@ properties:
port@1: port@1:
type: object type: object
description: CSI2 Port #1
additionalProperties: false additionalProperties: false
properties: properties:
reg: reg:
const: 1 const: 1
description: CSI2 Port #1
patternProperties: patternProperties:
endpoint: endpoint:
...@@ -134,8 +129,6 @@ properties: ...@@ -134,8 +129,6 @@ properties:
- reg - reg
required: required:
- "#address-cells"
- "#size-cells"
- port@0 - port@0
required: required:
......
...@@ -98,6 +98,7 @@ properties: ...@@ -98,6 +98,7 @@ properties:
ports: ports:
type: object type: object
$ref: /schemas/graph.yaml#/properties/ports
properties: properties:
port@0: port@0:
...@@ -141,29 +142,11 @@ properties: ...@@ -141,29 +142,11 @@ properties:
additionalProperties: false additionalProperties: false
port@1: port@1:
type: object
description: | description: |
Output / source port node, endpoint describing modules Output / source port node, endpoint describing modules
connected the CSI-2 receiver. connected the CSI-2 receiver.
properties: unevaluatedProperties: false
reg:
const: 1
endpoint:
type: object
properties:
remote-endpoint: true
required:
- remote-endpoint
additionalProperties: false
additionalProperties: false
required: required:
- compatible - compatible
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment