dt-bindings: media: Use OF graph schema
Subsystems (19)
Rob Herring
maintainerPATCH 1/1 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.
---
This can go via the media tree. Ideally anything else subsequently added will be fixed up too.
.../media/allwinner,sun4i-a10-csi.yaml | 1 + .../media/allwinner,sun6i-a31-csi.yaml | 1 + .../bindings/media/i2c/adv7180.yaml | 31 ++------ .../bindings/media/i2c/adv7604.yaml | 32 ++------ .../bindings/media/i2c/aptina,mt9v111.yaml | 2 +- .../bindings/media/i2c/imi,rdacm2x-gmsl.yaml | 25 +----- .../devicetree/bindings/media/i2c/imx219.yaml | 4 + .../bindings/media/i2c/maxim,max9286.yaml | 76 ++++--------------- .../devicetree/bindings/media/i2c/ov5647.yaml | 5 +- .../devicetree/bindings/media/i2c/ov8856.yaml | 5 +- .../bindings/media/i2c/ovti,ov772x.yaml | 1 + .../bindings/media/i2c/sony,imx214.yaml | 1 + .../bindings/media/i2c/sony,imx274.yaml | 3 +- .../bindings/media/marvell,mmp2-ccic.yaml | 1 + .../bindings/media/renesas,ceu.yaml | 1 + .../bindings/media/renesas,csi2.yaml | 36 ++------- .../bindings/media/renesas,vin.yaml | 7 +- .../bindings/media/st,stm32-dcmi.yaml | 7 +- .../devicetree/bindings/media/ti,cal.yaml | 15 +--- .../bindings/media/xilinx/xlnx,csi2rxss.yaml | 21 +---- 20 files changed, 61 insertions(+), 214 deletions(-)
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml +1 -0
@@ -70,6 +70,7 @@ properties: # See ./video-interfaces.txt for details port: type: object + $ref: /schemas/graph.yaml#/properties/port additionalProperties: false properties:
Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml +1 -0
@@ -43,6 +43,7 @@ properties: # See ./video-interfaces.txt for details port: type: object + $ref: /schemas/graph.yaml#/properties/port properties: endpoint:
Documentation/devicetree/bindings/media/i2c/adv7180.yaml +7 -24
@@ -36,17 +36,9 @@ properties: maxItems: 1 port: - type: object - description: - A node containing a single endpoint as doucmented in - 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 + $ref: /schemas/graph.yaml#/properties/port + + ports: true additionalProperties: false
@@ -80,24 +72,19 @@ allOf: then: properties: ports: + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 port@3: - type: object description: Output port patternProperties: "^port@[0-2]$": - type: object description: Input port required: - port@3 - additionalProperties: false + unevaluatedProperties: false required: - ports
@@ -110,24 +97,20 @@ allOf: then: properties: ports: + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 port@6: type: object description: Output port patternProperties: "^port@[0-5]$": - type: object description: Input port required: - port@6 - additionalProperties: false + unevaluatedProperties: false required: - ports
Documentation/devicetree/bindings/media/i2c/adv7604.yaml +6 -26
@@ -64,16 +64,12 @@ properties: description: Select which input is selected after reset. - 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 + ports: true required: - compatible - reg + - ports additionalProperties: false
@@ -86,25 +82,17 @@ allOf: then: properties: ports: + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 port@0: - type: object description: Input port port@1: - type: object description: Output port required: - port@1 - additionalProperties: false - - required: - - ports + unevaluatedProperties: false - if: properties:
@@ -114,27 +102,19 @@ allOf: then: properties: ports: + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 port@2: - type: object description: Output port patternProperties: "^port@[0-1]$": - type: object description: Input port required: - port@2 - additionalProperties: false - - required: - - ports + unevaluatedProperties: false examples: - |
Documentation/devicetree/bindings/media/i2c/aptina,mt9v111.yaml +1 -1
@@ -41,7 +41,7 @@ properties: maxItems: 1 port: - type: object + $ref: /schemas/graph.yaml#/properties/port description: | Output video port. See ../video-interfaces.txt.
Documentation/devicetree/bindings/media/i2c/imi,rdacm2x-gmsl.yaml +2 -23
@@ -86,33 +86,12 @@ properties: maxItems: 3 port: - type: object - additionalProperties: false - description: -| + $ref: /schemas/graph.yaml#/properties/port + description: Connection to the remote GMSL endpoint are modelled using the OF graph bindings in accordance with the video interface bindings defined in 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: - compatible
Documentation/devicetree/bindings/media/i2c/imx219.yaml +4 -0
@@ -47,6 +47,8 @@ properties: # See ../video-interfaces.txt for more details port: type: object + $ref: /schemas/graph.yaml#/properties/port + properties: endpoint: type: object
@@ -74,6 +76,8 @@ properties: required: - link-frequencies + additionalProperties: false + required: - compatible - reg
Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +15 -61
102 lines not on this page · raw message
Documentation/devicetree/bindings/media/i2c/ov5647.yaml +1 -4
@@ -32,10 +32,7 @@ properties: port: type: object - description: |- - 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. + $ref: /schemas/graph.yaml#/properties/port properties: endpoint:
Documentation/devicetree/bindings/media/i2c/ov8856.yaml +1 -4
@@ -58,11 +58,8 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port 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: endpoint:
Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml +1 -0
@@ -38,6 +38,7 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port description: | Video output port. See ../video-interfaces.txt.
Documentation/devicetree/bindings/media/i2c/sony,imx214.yaml +1 -0
@@ -55,6 +55,7 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port description: | Video output port. See ../video-interfaces.txt.
Documentation/devicetree/bindings/media/i2c/sony,imx274.yaml +1 -2
@@ -44,8 +44,7 @@ properties: maxItems: 1 port: - type: object - description: Output video port. See ../video-interfaces.txt. + $ref: /schemas/graph.yaml#/properties/port required: - compatible
Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml +1 -0
@@ -25,6 +25,7 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port additionalProperties: false properties:
Documentation/devicetree/bindings/media/renesas,ceu.yaml +1 -0
@@ -35,6 +35,7 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port additionalProperties: false properties:
Documentation/devicetree/bindings/media/renesas,csi2.yaml +5 -31
@@ -47,10 +47,7 @@ properties: 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 + $ref: /schemas/graph.yaml#/properties/ports properties: port@0:
@@ -84,38 +81,15 @@ properties: additionalProperties: false port@1: - type: object description: Output port node, multiple endpoints describing all the R-Car VIN modules connected the CSI-2 receiver. - properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 - - reg: - const: 1 - - patternProperties: - "^endpoint@[0-9a-f]$": - type: object + required: + - port@0 + - port@1 - properties: - reg: - maxItems: 1 - - remote-endpoint: true - - required: - - reg - - remote-endpoint - - additionalProperties: false - - additionalProperties: false + unevaluatedProperties: false required: - compatible
Documentation/devicetree/bindings/media/renesas,vin.yaml +4 -3
@@ -70,6 +70,7 @@ properties: #The per-board settings for Gen2 and RZ/G1 platforms: port: type: object + $ref: /schemas/graph.yaml#/properties/port description: A node containing a parallel input with a single endpoint definitions as documented in
@@ -124,9 +125,7 @@ properties: ports: type: object - description: - A node containing input nodes with endpoint definitions as documented in - Documentation/devicetree/bindings/media/video-interfaces.txt + $ref: /schemas/graph.yaml#/properties/ports properties: port@0:
@@ -272,6 +271,8 @@ properties: additionalProperties: false + unevaluatedProperties: false + required: - compatible - reg
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +2 -5
@@ -37,12 +37,9 @@ properties: maxItems: 1 port: - type: object + $ref: /schemas/graph.yaml#/properties/port description: - DCMI supports a single port node with parallel bus. It should contain - one 'port' child node with child 'endpoint' node. Please refer to the - bindings defined in - Documentation/devicetree/bindings/media/video-interfaces.txt. + DCMI supports a single port node with parallel bus. required: - compatible
Documentation/devicetree/bindings/media/ti,cal.yaml +4 -11
@@ -70,23 +70,18 @@ properties: # See ./video-interfaces.txt for details ports: type: object - additionalProperties: false + $ref: /schemas/graph.yaml#/properties/ports + unevaluatedProperties: false properties: - "#address-cells": - const: 1 - - "#size-cells": - const: 0 - port@0: type: object + description: CSI2 Port #0 additionalProperties: false properties: reg: const: 0 - description: CSI2 Port #0 patternProperties: endpoint:
@@ -108,12 +103,12 @@ properties: port@1: type: object + description: CSI2 Port #1 additionalProperties: false properties: reg: const: 1 - description: CSI2 Port #1 patternProperties: endpoint:
@@ -134,8 +129,6 @@ properties: - reg required: - - "#address-cells" - - "#size-cells" - port@0 required:
Documentation/devicetree/bindings/media/xilinx/xlnx,csi2rxss.yaml +2 -19
@@ -98,6 +98,7 @@ properties: ports: type: object + $ref: /schemas/graph.yaml#/properties/ports properties: port@0:
@@ -141,29 +142,11 @@ properties: additionalProperties: false port@1: - type: object description: | Output / source port node, endpoint describing modules connected the CSI-2 receiver. - properties: - - reg: - const: 1 - - endpoint: - type: object - - properties: - - remote-endpoint: true - - required: - - remote-endpoint - - additionalProperties: false - - additionalProperties: false + unevaluatedProperties: false required: - compatible
Signature · 1 line
2.25.1
Laurent Pinchart
maintainerHi Rob,
Thank you for the patch.
Quoted 41 lines · Rob Herring
Now that we have a graph schema, rework the media related schemas to use it. Mostly this is adding a reference to
graph.yamland dropping duplicate parts from schemas.Cc Maxime Ripard <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Cc Jacopo Mondi <[email protected]>Cc Laurent Pinchart <[email protected]>Signed-off-by Rob Herring <[email protected]>---
This can go via the media tree. Ideally anything else subsequently added will be fixed up too..../media/allwinner,sun4i-a10-csi.yaml | 1 + .../media/allwinner,sun6i-a31-csi.yaml | 1 + .../bindings/media/i2c/adv7180.yaml | 31 ++------ .../bindings/media/i2c/adv7604.yaml | 32 ++------ .../bindings/media/i2c/aptina,mt9v111.yaml | 2 +- .../bindings/media/i2c/imi,rdacm2x-gmsl.yaml | 25 +----- .../devicetree/bindings/media/i2c/imx219.yaml | 4 + .../bindings/media/i2c/maxim,max9286.yaml | 76 ++++--------------- .../devicetree/bindings/media/i2c/ov5647.yaml | 5 +- .../devicetree/bindings/media/i2c/ov8856.yaml | 5 +- .../bindings/media/i2c/ovti,ov772x.yaml | 1 + .../bindings/media/i2c/sony,imx214.yaml | 1 + .../bindings/media/i2c/sony,imx274.yaml | 3 +- .../bindings/media/marvell,mmp2-ccic.yaml | 1 + .../bindings/media/renesas,ceu.yaml | 1 + .../bindings/media/renesas,csi2.yaml | 36 ++------- .../bindings/media/renesas,vin.yaml | 7 +- .../bindings/media/st,stm32-dcmi.yaml | 7 +- .../devicetree/bindings/media/ti,cal.yaml | 15 +--- .../bindings/media/xilinx/xlnx,csi2rxss.yaml | 21 +---- 20 files changed, 61 insertions(+), 214 deletions(-)Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml +0
-0
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml properties: · line 72
Quoted 3 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml +0
-0@@ -70,6 +70,7 @@ properties: # See ./video-interfaces.txt for details port: type: object
Could the type be dropped (here and below, I haven't mentioned it in all locations) as it's specified in /schemas/graph.yaml#/properties/port ?
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml properties: · line 74
Quoted 2 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml +1
-0+ $ref: /schemas/graph.yaml#/properties/port additionalProperties: false
Don't we need to switch to unevaluatedProperties ?
Quoted 232 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml +0
-0properties:Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml +1
-0@@ -43,6 +43,7 @@ properties: # See ./video-interfaces.txt for details port: type: object + $ref: /schemas/graph.yaml#/properties/port properties: endpoint:Documentation/devicetree/bindings/media/i2c/adv7180.yaml +7
-24@@ -36,17 +36,9 @@ properties: maxItems: 1 port: - type: object - description: - A node containing a single endpoint as doucmented in - 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 + $ref: /schemas/graph.yaml#/properties/port + + ports: true additionalProperties: false@@ -80,24 +72,19 @@ allOf: then: properties: ports: + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 port@3: - type: object description: Output port patternProperties: "^port@[0-2]$": - type: object description: Input port required: - port@3 - additionalProperties: false + unevaluatedProperties: false required: - ports@@ -110,24 +97,20 @@ allOf: then: properties: ports: + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 port@6: type: object description: Output port patternProperties: "^port@[0-5]$": - type: object description: Input port required: - port@6 - additionalProperties: false + unevaluatedProperties: false required: - portsDocumentation/devicetree/bindings/media/i2c/adv7604.yaml +6
-26@@ -64,16 +64,12 @@ properties: description: Select which input is selected after reset. - 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 + ports: true required: - compatible - reg + - ports additionalProperties: false@@ -86,25 +82,17 @@ allOf: then: properties: ports: + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 port@0: - type: object description: Input port port@1: - type: object description: Output port required: - port@1 - additionalProperties: false - - required: - - ports + unevaluatedProperties: false - if: properties:@@ -114,27 +102,19 @@ allOf: then: properties: ports: + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - '#size-cells': - const: 0 port@2: - type: object description: Output port patternProperties: "^port@[0-1]$": - type: object description: Input port required: - port@2 - additionalProperties: false - - required: - - ports + unevaluatedProperties: false examples: - |Documentation/devicetree/bindings/media/i2c/aptina,mt9v111.yaml +1
-1@@ -41,7 +41,7 @@ properties: maxItems: 1 port: - type: object + $ref: /schemas/graph.yaml#/properties/port description: | Output video port. See ../video-interfaces.txt.Documentation/devicetree/bindings/media/i2c/imi,rdacm2x-gmsl.yaml +2
-23@@ -86,33 +86,12 @@ properties: maxItems: 3 port: - type: object - additionalProperties: false - description: -| + $ref: /schemas/graph.yaml#/properties/port + description: Connection to the remote GMSL endpoint are modelled using the OF graph bindings in accordance with the video interface bindings defined in 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: - compatibleDocumentation/devicetree/bindings/media/i2c/imx219.yaml +0
-0
Documentation/devicetree/bindings/media/i2c/imx219.yaml properties: · line 54
Quoted 8 lines
Documentation/devicetree/bindings/media/i2c/imx219.yaml +2
-0@@ -47,6 +47,8 @@ properties: # See ../video-interfaces.txt for more details port: type: object + $ref: /schemas/graph.yaml#/properties/port + properties: endpoint: type: object
Can we drop type from the endpoint ?
Documentation/devicetree/bindings/media/i2c/imx219.yaml properties: · line 79
Quoted 5 lines
Documentation/devicetree/bindings/media/i2c/imx219.yaml +1
-0@@ -74,6 +76,8 @@ properties: required: - link-frequencies + additionalProperties: false
I supppose additionalProperties works here as the endpoint property is specified in this schema, but conceptually speaking, wouldn't unevaluatedProperties be a better match ?
Quoted 61 lines
Documentation/devicetree/bindings/media/i2c/imx219.yaml +1
-0+ required: - compatible - regDocumentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +7
-37@@ -53,56 +53,25 @@ properties: ports: type: object - description: | - 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 + $ref: /schemas/graph.yaml#/properties/ports properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 + port@0: + description: GMSL Input 0 - port@[0-3]: - type: object - properties: - reg: - enum: [ 0, 1, 2, 3 ] + port@1: + description: GMSL Input 1 - endpoint: - type: object + port@2: + description: GMSL Input 2 - properties: - remote-endpoint: - description: | - phandle to the remote GMSL source endpoint subnode in the - remote node port. - - required: - - remote-endpoint -
Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml properties: · line 72
Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +2
-5- required: - - reg - - endpoint - - additionalProperties: false + port@3: + description: GMSL Input 3 port@4: type: object
Dropping type here too ?
Quoted 344 lines
Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +6
-19+ description: CSI-2 Output + properties: reg: const: 4@@ -130,6 +99,8 @@ properties: required: - port@4 + unevaluatedProperties: false + i2c-mux: type: object description: |@@ -184,25 +155,8 @@ properties: requirements of the currently connected remote device. port: - type: object - - properties: - endpoint: - type: object - - properties: - remote-endpoint: - description: phandle to the MAX9286 sink endpoint. - - required: - - remote-endpoint - - additionalProperties: false - - required: - - endpoint - - additionalProperties: false + $ref: /schemas/graph.yaml#/properties/port + description: Connection to the MAX9286 sink. required: - compatibleDocumentation/devicetree/bindings/media/i2c/ov5647.yaml +1
-4@@ -32,10 +32,7 @@ properties: port: type: object - description: |- - 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. + $ref: /schemas/graph.yaml#/properties/port properties: endpoint:Documentation/devicetree/bindings/media/i2c/ov8856.yaml +1
-4@@ -58,11 +58,8 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port 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: endpoint:Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml +1
-0@@ -38,6 +38,7 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port description: | Video output port. See ../video-interfaces.txt.Documentation/devicetree/bindings/media/i2c/sony,imx214.yaml +1
-0@@ -55,6 +55,7 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port description: | Video output port. See ../video-interfaces.txt.Documentation/devicetree/bindings/media/i2c/sony,imx274.yaml +1
-2@@ -44,8 +44,7 @@ properties: maxItems: 1 port: - type: object - description: Output video port. See ../video-interfaces.txt. + $ref: /schemas/graph.yaml#/properties/port required: - compatibleDocumentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml +1
-0@@ -25,6 +25,7 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port additionalProperties: false properties:Documentation/devicetree/bindings/media/renesas,ceu.yaml +1
-0@@ -35,6 +35,7 @@ properties: port: type: object + $ref: /schemas/graph.yaml#/properties/port additionalProperties: false properties:Documentation/devicetree/bindings/media/renesas,csi2.yaml +5
-31@@ -47,10 +47,7 @@ properties: 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 + $ref: /schemas/graph.yaml#/properties/ports properties: port@0:@@ -84,38 +81,15 @@ properties: additionalProperties: false port@1: - type: object description: Output port node, multiple endpoints describing all the R-Car VIN modules connected the CSI-2 receiver. - properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 - - reg: - const: 1 - - patternProperties: - "^endpoint@[0-9a-f]$": - type: object + required: + - port@0 + - port@1 - properties: - reg: - maxItems: 1 - - remote-endpoint: true - - required: - - reg - - remote-endpoint - - additionalProperties: false - - additionalProperties: false + unevaluatedProperties: false required: - compatibleDocumentation/devicetree/bindings/media/renesas,vin.yaml +4
-3@@ -70,6 +70,7 @@ properties: #The per-board settings for Gen2 and RZ/G1 platforms: port: type: object + $ref: /schemas/graph.yaml#/properties/port description: A node containing a parallel input with a single endpoint definitions as documented in@@ -124,9 +125,7 @@ properties: ports: type: object - description: - A node containing input nodes with endpoint definitions as documented in - Documentation/devicetree/bindings/media/video-interfaces.txt + $ref: /schemas/graph.yaml#/properties/ports properties: port@0:@@ -272,6 +271,8 @@ properties: additionalProperties: false + unevaluatedProperties: false + required: - compatible - regDocumentation/devicetree/bindings/media/st,stm32-dcmi.yaml +2
-5@@ -37,12 +37,9 @@ properties: maxItems: 1 port: - type: object + $ref: /schemas/graph.yaml#/properties/port description: - DCMI supports a single port node with parallel bus. It should contain - one 'port' child node with child 'endpoint' node. Please refer to the - bindings defined in - Documentation/devicetree/bindings/media/video-interfaces.txt. + DCMI supports a single port node with parallel bus. required: - compatibleDocumentation/devicetree/bindings/media/ti,cal.yaml +4
-11@@ -70,23 +70,18 @@ properties: # See ./video-interfaces.txt for details ports: type: object - additionalProperties: false + $ref: /schemas/graph.yaml#/properties/ports + unevaluatedProperties: false properties: - "#address-cells": - const: 1 - - "#size-cells": - const: 0 - port@0: type: object + description: CSI2 Port #0 additionalProperties: false properties: reg: const: 0 - description: CSI2 Port #0 patternProperties: endpoint:@@ -108,12 +103,12 @@ properties: port@1: type: object + description: CSI2 Port #1 additionalProperties: false properties: reg: const: 1 - description: CSI2 Port #1 patternProperties: endpoint:@@ -134,8 +129,6 @@ properties: - reg required: - - "#address-cells" - - "#size-cells" - port@0 required:Documentation/devicetree/bindings/media/xilinx/xlnx,csi2rxss.yaml +2
-19@@ -98,6 +98,7 @@ properties: ports: type: object + $ref: /schemas/graph.yaml#/properties/ports properties: port@0:@@ -141,29 +142,11 @@ properties: additionalProperties: false port@1: - type: object description: | Output / source port node, endpoint describing modules connected the CSI-2 receiver. - properties: - - reg: - const: 1 - - endpoint: - type: object - - properties: - - remote-endpoint: true - - required: - - remote-endpoint - - additionalProperties: false - - additionalProperties: false + unevaluatedProperties: false required: - compatible
Signature · 3 lines
Regards, Laurent Pinchart
Rob Herring
maintainerQuoted 42 lines · Laurent Pinchart
Hi Rob,
Thank you for the patch.
Quoted 36 lines · Rob Herring
Now that we have a graph schema, rework the media related schemas to use it. Mostly this is adding a reference to
graph.yamland dropping duplicate parts from schemas.Cc Maxime Ripard <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Cc Jacopo Mondi <[email protected]>Cc Laurent Pinchart <[email protected]>Signed-off-by Rob Herring <[email protected]>---
This can go via the media tree. Ideally anything else subsequently added will be fixed up too..../media/allwinner,sun4i-a10-csi.yaml | 1 + .../media/allwinner,sun6i-a31-csi.yaml | 1 + .../bindings/media/i2c/adv7180.yaml | 31 ++------ .../bindings/media/i2c/adv7604.yaml | 32 ++------ .../bindings/media/i2c/aptina,mt9v111.yaml | 2 +- .../bindings/media/i2c/imi,rdacm2x-gmsl.yaml | 25 +----- .../devicetree/bindings/media/i2c/imx219.yaml | 4 + .../bindings/media/i2c/maxim,max9286.yaml | 76 ++++--------------- .../devicetree/bindings/media/i2c/ov5647.yaml | 5 +- .../devicetree/bindings/media/i2c/ov8856.yaml | 5 +- .../bindings/media/i2c/ovti,ov772x.yaml | 1 + .../bindings/media/i2c/sony,imx214.yaml | 1 + .../bindings/media/i2c/sony,imx274.yaml | 3 +- .../bindings/media/marvell,mmp2-ccic.yaml | 1 + .../bindings/media/renesas,ceu.yaml | 1 + .../bindings/media/renesas,csi2.yaml | 36 ++------- .../bindings/media/renesas,vin.yaml | 7 +- .../bindings/media/st,stm32-dcmi.yaml | 7 +- .../devicetree/bindings/media/ti,cal.yaml | 15 +--- .../bindings/media/xilinx/xlnx,csi2rxss.yaml | 21 +---- 20 files changed, 61 insertions(+), 214 deletions(-)
Quoted 11 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml properties: · line 72
Quoted 8 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml +0
-0@@ -70,6 +70,7 @@ properties: # See ./video-interfaces.txt for details port: type: objectCould the type be dropped (here and below, I haven't mentioned it in all locations) as it's specified in /schemas/graph.yaml#/properties/port ?
See my reply on the display patch for this.
Quoted 4 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml properties: · line 74
Quoted 2 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml +1
-0+ $ref: /schemas/graph.yaml#/properties/port additionalProperties: falseDon't we need to switch to unevaluatedProperties ?
We could, but additionalProperties works here because 'endpoint' is the only one.
Quoted 9 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml properties: · line 79
Quoted 5 lines
Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml +1
-0@@ -74,6 +76,8 @@ properties: required: - link-frequencies + additionalProperties: falseI supppose additionalProperties works here as the endpoint property is specified in this schema, but conceptually speaking, wouldn't unevaluatedProperties be a better match ?
Yes, except unevaluatedProperties is currently a nop, so I went the stricter route.
Rob