The current bindings duplicate the port definitions for each FPD-Link RX
and CSI-2 TX ports. This results in a large amount of repeated schema
blocks and makes it harder to extend the bindings for new devices.
Refactor the bindings by introducing shared deftinitions for FPD-Link
input ports and CSI-2 output ports. No functional change intended.
Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
---
.../bindings/media/i2c/ti,ds90ub960.yaml | 120 +++++++-----------
1 file changed, 44 insertions(+), 76 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
index 0539d52de422..6a78288aebaa 100644
--- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml
@@ -125,102 +125,35 @@ properties:
ports:
$ref: /schemas/graph.yaml#/properties/ports
+ description: |
+ Ports represent FPD-Link inputs to the deserializer and CSI TX outputs from the deserializer.
+ Their number is model-dependent.
properties:
port@0:
- $ref: /schemas/graph.yaml#/$defs/port-base
- unevaluatedProperties: false
+ $ref: '#/$defs/FPDLink-input-port'
description: FPD-Link input 0
- properties:
- endpoint:
- $ref: /schemas/media/video-interfaces.yaml#
- unevaluatedProperties: false
- description:
- Endpoint for FPD-Link port. If the RX mode for this port is RAW,
- hsync-active and vsync-active must be defined.
-
port@1:
- $ref: /schemas/graph.yaml#/$defs/port-base
- unevaluatedProperties: false
+ $ref: '#/$defs/FPDLink-input-port'
description: FPD-Link input 1
- properties:
- endpoint:
- $ref: /schemas/media/video-interfaces.yaml#
- unevaluatedProperties: false
- description:
- Endpoint for FPD-Link port. If the RX mode for this port is RAW,
- hsync-active and vsync-active must be defined.
-
port@2:
- $ref: /schemas/graph.yaml#/$defs/port-base
- unevaluatedProperties: false
+ $ref: '#/$defs/FPDLink-input-port'
description: FPD-Link input 2
- properties:
- endpoint:
- $ref: /schemas/media/video-interfaces.yaml#
- unevaluatedProperties: false
- description:
- Endpoint for FPD-Link port. If the RX mode for this port is RAW,
- hsync-active and vsync-active must be defined.
-
port@3:
- $ref: /schemas/graph.yaml#/$defs/port-base
- unevaluatedProperties: false
+ $ref: '#/$defs/FPDLink-input-port'
description: FPD-Link input 3
- properties:
- endpoint:
- $ref: /schemas/media/video-interfaces.yaml#
- unevaluatedProperties: false
- description:
- Endpoint for FPD-Link port. If the RX mode for this port is RAW,
- hsync-active and vsync-active must be defined.
-
port@4:
- $ref: /schemas/graph.yaml#/$defs/port-base
- unevaluatedProperties: false
+ $ref: '#/$defs/CSI2-output-port'
description: CSI-2 Output 0
- properties:
- endpoint:
- $ref: /schemas/media/video-interfaces.yaml#
- unevaluatedProperties: false
-
- properties:
- data-lanes:
- minItems: 1
- maxItems: 4
- link-frequencies:
- maxItems: 1
-
- required:
- - data-lanes
- - link-frequencies
-
port@5:
- $ref: /schemas/graph.yaml#/$defs/port-base
- unevaluatedProperties: false
+ $ref: '#/$defs/CSI2-output-port'
description: CSI-2 Output 1
- properties:
- endpoint:
- $ref: /schemas/media/video-interfaces.yaml#
- unevaluatedProperties: false
-
- properties:
- data-lanes:
- minItems: 1
- maxItems: 4
- link-frequencies:
- maxItems: 1
-
- required:
- - data-lanes
- - link-frequencies
-
required:
- port@0
- port@1
@@ -236,6 +169,41 @@ required:
- clock-names
- ports
+$defs:
+ FPDLink-input-port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: FPD-Link input
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+ description:
+ Endpoint for FPD-Link port. If the RX mode for this port is RAW,
+ hsync-active and vsync-active must be defined.
+
+ CSI2-output-port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ unevaluatedProperties: false
+ description: CSI-2 Output
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ data-lanes:
+ minItems: 1
+ maxItems: 4
+ link-frequencies:
+ maxItems: 1
+
+ required:
+ - data-lanes
+ - link-frequencies
+
unevaluatedProperties: false
examples:
--
2.34.1
On Tue, Dec 02, 2025 at 03:52:05PM +0530, Yemike Abhilash Chandra wrote: > The current bindings duplicate the port definitions for each FPD-Link RX > and CSI-2 TX ports. This results in a large amount of repeated schema > blocks and makes it harder to extend the bindings for new devices. > > Refactor the bindings by introducing shared deftinitions for FPD-Link > input ports and CSI-2 output ports. No functional change intended. > > Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com> > --- > .../bindings/media/i2c/ti,ds90ub960.yaml | 120 +++++++----------- > 1 file changed, 44 insertions(+), 76 deletions(-) > > diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml > index 0539d52de422..6a78288aebaa 100644 > --- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml > +++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml > @@ -125,102 +125,35 @@ properties: > > ports: > $ref: /schemas/graph.yaml#/properties/ports > + description: | Don't need '|' unless you have formatting to preserve. > + Ports represent FPD-Link inputs to the deserializer and CSI TX outputs from the deserializer. > + Their number is model-dependent. 'The number of ports is...' Wrap lines at 80. > > properties: > port@0: > - $ref: /schemas/graph.yaml#/$defs/port-base > - unevaluatedProperties: false > + $ref: '#/$defs/FPDLink-input-port' > description: FPD-Link input 0 > > - properties: > - endpoint: > - $ref: /schemas/media/video-interfaces.yaml# > - unevaluatedProperties: false > - description: > - Endpoint for FPD-Link port. If the RX mode for this port is RAW, > - hsync-active and vsync-active must be defined. > - > port@1: > - $ref: /schemas/graph.yaml#/$defs/port-base > - unevaluatedProperties: false > + $ref: '#/$defs/FPDLink-input-port' > description: FPD-Link input 1 > > - properties: > - endpoint: > - $ref: /schemas/media/video-interfaces.yaml# > - unevaluatedProperties: false > - description: > - Endpoint for FPD-Link port. If the RX mode for this port is RAW, > - hsync-active and vsync-active must be defined. > - > port@2: > - $ref: /schemas/graph.yaml#/$defs/port-base > - unevaluatedProperties: false > + $ref: '#/$defs/FPDLink-input-port' > description: FPD-Link input 2 > > - properties: > - endpoint: > - $ref: /schemas/media/video-interfaces.yaml# > - unevaluatedProperties: false > - description: > - Endpoint for FPD-Link port. If the RX mode for this port is RAW, > - hsync-active and vsync-active must be defined. > - > port@3: > - $ref: /schemas/graph.yaml#/$defs/port-base > - unevaluatedProperties: false > + $ref: '#/$defs/FPDLink-input-port' > description: FPD-Link input 3 > > - properties: > - endpoint: > - $ref: /schemas/media/video-interfaces.yaml# > - unevaluatedProperties: false > - description: > - Endpoint for FPD-Link port. If the RX mode for this port is RAW, > - hsync-active and vsync-active must be defined. > - > port@4: > - $ref: /schemas/graph.yaml#/$defs/port-base > - unevaluatedProperties: false > + $ref: '#/$defs/CSI2-output-port' > description: CSI-2 Output 0 > > - properties: > - endpoint: > - $ref: /schemas/media/video-interfaces.yaml# > - unevaluatedProperties: false > - > - properties: > - data-lanes: > - minItems: 1 > - maxItems: 4 > - link-frequencies: > - maxItems: 1 > - > - required: > - - data-lanes > - - link-frequencies > - > port@5: > - $ref: /schemas/graph.yaml#/$defs/port-base > - unevaluatedProperties: false > + $ref: '#/$defs/CSI2-output-port' > description: CSI-2 Output 1 > > - properties: > - endpoint: > - $ref: /schemas/media/video-interfaces.yaml# > - unevaluatedProperties: false > - > - properties: > - data-lanes: > - minItems: 1 > - maxItems: 4 > - link-frequencies: > - maxItems: 1 > - > - required: > - - data-lanes > - - link-frequencies > - > required: > - port@0 > - port@1 > @@ -236,6 +169,41 @@ required: > - clock-names > - ports > > +$defs: > + FPDLink-input-port: > + $ref: /schemas/graph.yaml#/$defs/port-base > + unevaluatedProperties: false > + description: FPD-Link input > + > + properties: > + endpoint: > + $ref: /schemas/media/video-interfaces.yaml# > + unevaluatedProperties: false > + description: > + Endpoint for FPD-Link port. If the RX mode for this port is RAW, > + hsync-active and vsync-active must be defined. > + > + CSI2-output-port: > + $ref: /schemas/graph.yaml#/$defs/port-base > + unevaluatedProperties: false > + description: CSI-2 Output > + > + properties: > + endpoint: > + $ref: /schemas/media/video-interfaces.yaml# > + unevaluatedProperties: false > + > + properties: > + data-lanes: > + minItems: 1 > + maxItems: 4 > + link-frequencies: > + maxItems: 1 > + > + required: > + - data-lanes > + - link-frequencies > + > unevaluatedProperties: false > > examples: > -- > 2.34.1 >
Hi Rob, Thanks for the review. On 05/12/25 20:41, Rob Herring wrote: > On Tue, Dec 02, 2025 at 03:52:05PM +0530, Yemike Abhilash Chandra wrote: >> The current bindings duplicate the port definitions for each FPD-Link RX >> and CSI-2 TX ports. This results in a large amount of repeated schema >> blocks and makes it harder to extend the bindings for new devices. >> >> Refactor the bindings by introducing shared deftinitions for FPD-Link >> input ports and CSI-2 output ports. No functional change intended. >> >> Signed-off-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com> >> --- >> .../bindings/media/i2c/ti,ds90ub960.yaml | 120 +++++++----------- >> 1 file changed, 44 insertions(+), 76 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml >> index 0539d52de422..6a78288aebaa 100644 >> --- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml >> +++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub960.yaml >> @@ -125,102 +125,35 @@ properties: >> >> ports: >> $ref: /schemas/graph.yaml#/properties/ports >> + description: | > > Don't need '|' unless you have formatting to preserve. > Understood. I will fix this in v3. >> + Ports represent FPD-Link inputs to the deserializer and CSI TX outputs from the deserializer. >> + Their number is model-dependent. > > 'The number of ports is...' > > Wrap lines at 80. > I will fix this in v3. Thanks and Regards, Yemike Abhilash Chandra >> >> properties: >> port@0: >> - $ref: /schemas/graph.yaml#/$defs/port-base >> - unevaluatedProperties: false >> + $ref: '#/$defs/FPDLink-input-port' >> description: FPD-Link input 0 >> >> - properties: >> - endpoint: >> - $ref: /schemas/media/video-interfaces.yaml# >> - unevaluatedProperties: false >> - description: >> - Endpoint for FPD-Link port. If the RX mode for this port is RAW, >> - hsync-active and vsync-active must be defined. >> - >> port@1: >> - $ref: /schemas/graph.yaml#/$defs/port-base >> - unevaluatedProperties: false >> + $ref: '#/$defs/FPDLink-input-port' >> description: FPD-Link input 1 >> >> - properties: >> - endpoint: >> - $ref: /schemas/media/video-interfaces.yaml# >> - unevaluatedProperties: false >> - description: >> - Endpoint for FPD-Link port. If the RX mode for this port is RAW, >> - hsync-active and vsync-active must be defined. >> - >> port@2: >> - $ref: /schemas/graph.yaml#/$defs/port-base >> - unevaluatedProperties: false >> + $ref: '#/$defs/FPDLink-input-port' >> description: FPD-Link input 2 >> >> - properties: >> - endpoint: >> - $ref: /schemas/media/video-interfaces.yaml# >> - unevaluatedProperties: false >> - description: >> - Endpoint for FPD-Link port. If the RX mode for this port is RAW, >> - hsync-active and vsync-active must be defined. >> - >> port@3: >> - $ref: /schemas/graph.yaml#/$defs/port-base >> - unevaluatedProperties: false >> + $ref: '#/$defs/FPDLink-input-port' >> description: FPD-Link input 3 >> >> - properties: >> - endpoint: >> - $ref: /schemas/media/video-interfaces.yaml# >> - unevaluatedProperties: false >> - description: >> - Endpoint for FPD-Link port. If the RX mode for this port is RAW, >> - hsync-active and vsync-active must be defined. >> - >> port@4: >> - $ref: /schemas/graph.yaml#/$defs/port-base >> - unevaluatedProperties: false >> + $ref: '#/$defs/CSI2-output-port' >> description: CSI-2 Output 0 >> >> - properties: >> - endpoint: >> - $ref: /schemas/media/video-interfaces.yaml# >> - unevaluatedProperties: false >> - >> - properties: >> - data-lanes: >> - minItems: 1 >> - maxItems: 4 >> - link-frequencies: >> - maxItems: 1 >> - >> - required: >> - - data-lanes >> - - link-frequencies >> - >> port@5: >> - $ref: /schemas/graph.yaml#/$defs/port-base >> - unevaluatedProperties: false >> + $ref: '#/$defs/CSI2-output-port' >> description: CSI-2 Output 1 >> >> - properties: >> - endpoint: >> - $ref: /schemas/media/video-interfaces.yaml# >> - unevaluatedProperties: false >> - >> - properties: >> - data-lanes: >> - minItems: 1 >> - maxItems: 4 >> - link-frequencies: >> - maxItems: 1 >> - >> - required: >> - - data-lanes >> - - link-frequencies >> - >> required: >> - port@0 >> - port@1 >> @@ -236,6 +169,41 @@ required: >> - clock-names >> - ports >> >> +$defs: >> + FPDLink-input-port: >> + $ref: /schemas/graph.yaml#/$defs/port-base >> + unevaluatedProperties: false >> + description: FPD-Link input >> + >> + properties: >> + endpoint: >> + $ref: /schemas/media/video-interfaces.yaml# >> + unevaluatedProperties: false >> + description: >> + Endpoint for FPD-Link port. If the RX mode for this port is RAW, >> + hsync-active and vsync-active must be defined. >> + >> + CSI2-output-port: >> + $ref: /schemas/graph.yaml#/$defs/port-base >> + unevaluatedProperties: false >> + description: CSI-2 Output >> + >> + properties: >> + endpoint: >> + $ref: /schemas/media/video-interfaces.yaml# >> + unevaluatedProperties: false >> + >> + properties: >> + data-lanes: >> + minItems: 1 >> + maxItems: 4 >> + link-frequencies: >> + maxItems: 1 >> + >> + required: >> + - data-lanes >> + - link-frequencies >> + >> unevaluatedProperties: false >> >> examples: >> -- >> 2.34.1 >>
© 2016 - 2025 Red Hat, Inc.