diff mbox series

[2/5] media: dt-bindings: renesas,rzg2l-cru: Document Renesas RZ/G2UL CRU block

Message ID 20240123121720.294753-3-biju.das.jz@bp.renesas.com
State New
Headers show
Series Add RZ/G2UL CRU and CSI support | expand

Commit Message

Biju Das Jan. 23, 2024, 12:17 p.m. UTC
Document the CRU IP found in Renesas RZ/G2UL SoC.

The CRU block on the RZ/G2UL SoC is identical to one found on the
RZ/G2L SoC, but it does not support parallel input.

No driver changes are required as generic compatible string
"renesas,rzg2l-cru" will be used as a fallback on RZ/G2UL SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 .../bindings/media/renesas,rzg2l-cru.yaml     | 43 +++++++++++++++++--
 1 file changed, 39 insertions(+), 4 deletions(-)

Comments

Conor Dooley Jan. 24, 2024, 5:48 p.m. UTC | #1
On Tue, Jan 23, 2024 at 12:17:17PM +0000, Biju Das wrote:
> Document the CRU IP found in Renesas RZ/G2UL SoC.
> 
> The CRU block on the RZ/G2UL SoC is identical to one found on the
> RZ/G2L SoC, but it does not support parallel input.
> 
> No driver changes are required as generic compatible string
> "renesas,rzg2l-cru" will be used as a fallback on RZ/G2UL SoC.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  .../bindings/media/renesas,rzg2l-cru.yaml     | 43 +++++++++++++++++--
>  1 file changed, 39 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml b/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
> index 1e72b8808d24..7015a01fc1bc 100644
> --- a/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
> +++ b/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
> @@ -19,6 +19,7 @@ properties:
>    compatible:
>      items:
>        - enum:
> +          - renesas,r9a07g043-cru       # RZ/G2UL
>            - renesas,r9a07g044-cru       # RZ/G2{L,LC}
>            - renesas,r9a07g054-cru       # RZ/V2L
>        - const: renesas,rzg2l-cru
> @@ -87,10 +88,6 @@ properties:
>            Input port node, describing the Image Processing module connected to the
>            CSI-2 receiver.
>  
> -    required:
> -      - port@0
> -      - port@1
> -
>  required:
>    - compatible
>    - reg
> @@ -102,6 +99,44 @@ required:
>    - reset-names
>    - power-domains
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - renesas,r9a07g044-cru
> +              - renesas,r9a07g054-cru
> +    then:
> +      properties:
> +        ports:
> +          properties:
> +            port@0:
> +              description: Parallel input
> +            port@1:
> +              description: CSI
> +
> +          required:
> +            - port@0
> +            - port@1
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - renesas,r9a07g043-cru
> +    then:
> +      properties:
> +        ports:
> +          properties:
> +            port@0: false
> +            port@1:
> +              description: CSI-2

The description in the existing binding says that port @ 1 is CSI-2
already - but this patch seems to imply that it is only CSI-2 for the 43
model. I don't know the media stuff all that well, but is the port
actually CSI-2 on all 3 devices?

If so, I would drop the description stuff from here and just use the
if/else stuff to restrict the ports, rather than try to re-describe
them.

Cheers,
Conor.

> +
> +          required:
> +            - port@1
> +
>  additionalProperties: false
>  
>  examples:
> -- 
> 2.25.1
> 
>
Biju Das Jan. 25, 2024, 2:34 p.m. UTC | #2
Hi Conor Dooley,

Thanks for the feedback.

> -----Original Message-----
> From: Conor Dooley <conor@kernel.org>
> Sent: Wednesday, January 24, 2024 5:48 PM
> Subject: Re: [PATCH 2/5] media: dt-bindings: renesas,rzg2l-cru: Document
> Renesas RZ/G2UL CRU block
> 
> On Tue, Jan 23, 2024 at 12:17:17PM +0000, Biju Das wrote:
> > Document the CRU IP found in Renesas RZ/G2UL SoC.
> >
> > The CRU block on the RZ/G2UL SoC is identical to one found on the
> > RZ/G2L SoC, but it does not support parallel input.
> >
> > No driver changes are required as generic compatible string
> > "renesas,rzg2l-cru" will be used as a fallback on RZ/G2UL SoC.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> >  .../bindings/media/renesas,rzg2l-cru.yaml     | 43 +++++++++++++++++--
> >  1 file changed, 39 insertions(+), 4 deletions(-)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
> > b/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
> > index 1e72b8808d24..7015a01fc1bc 100644
> > --- a/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
> > +++ b/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
> > @@ -19,6 +19,7 @@ properties:
> >    compatible:
> >      items:
> >        - enum:
> > +          - renesas,r9a07g043-cru       # RZ/G2UL
> >            - renesas,r9a07g044-cru       # RZ/G2{L,LC}
> >            - renesas,r9a07g054-cru       # RZ/V2L
> >        - const: renesas,rzg2l-cru
> > @@ -87,10 +88,6 @@ properties:
> >            Input port node, describing the Image Processing module
> connected to the
> >            CSI-2 receiver.
> >
> > -    required:
> > -      - port@0
> > -      - port@1
> > -
> >  required:
> >    - compatible
> >    - reg
> > @@ -102,6 +99,44 @@ required:
> >    - reset-names
> >    - power-domains
> >
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - renesas,r9a07g044-cru
> > +              - renesas,r9a07g054-cru
> > +    then:
> > +      properties:
> > +        ports:
> > +          properties:
> > +            port@0:
> > +              description: Parallel input
> > +            port@1:
> > +              description: CSI
> > +
> > +          required:
> > +            - port@0
> > +            - port@1
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - renesas,r9a07g043-cru
> > +    then:
> > +      properties:
> > +        ports:
> > +          properties:
> > +            port@0: false
> > +            port@1:
> > +              description: CSI-2
> 
> The description in the existing binding says that port @ 1 is CSI-2
> already - but this patch seems to imply that it is only CSI-2 for the 43
> model. I don't know the media stuff all that well, but is the port
> actually CSI-2 on all 3 devices?

RZ/G2{L,LC} abd RZ/V2L has 2 ports one is parallel and other one is CSI
Where as RZ/G2UL has only 1 port (CSI).

As you said, it correct CSI-2 present on all 3 devices.

> 
> If so, I would drop the description stuff from here and just use the
> if/else stuff to restrict the ports, rather than try to re-describe them.

Agreed. Will fix this in next version along with fixing commit description
for removing driver changes.

Cheers,
Biju
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml b/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
index 1e72b8808d24..7015a01fc1bc 100644
--- a/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
+++ b/Documentation/devicetree/bindings/media/renesas,rzg2l-cru.yaml
@@ -19,6 +19,7 @@  properties:
   compatible:
     items:
       - enum:
+          - renesas,r9a07g043-cru       # RZ/G2UL
           - renesas,r9a07g044-cru       # RZ/G2{L,LC}
           - renesas,r9a07g054-cru       # RZ/V2L
       - const: renesas,rzg2l-cru
@@ -87,10 +88,6 @@  properties:
           Input port node, describing the Image Processing module connected to the
           CSI-2 receiver.
 
-    required:
-      - port@0
-      - port@1
-
 required:
   - compatible
   - reg
@@ -102,6 +99,44 @@  required:
   - reset-names
   - power-domains
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - renesas,r9a07g044-cru
+              - renesas,r9a07g054-cru
+    then:
+      properties:
+        ports:
+          properties:
+            port@0:
+              description: Parallel input
+            port@1:
+              description: CSI
+
+          required:
+            - port@0
+            - port@1
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - renesas,r9a07g043-cru
+    then:
+      properties:
+        ports:
+          properties:
+            port@0: false
+            port@1:
+              description: CSI-2
+
+          required:
+            - port@1
+
 additionalProperties: false
 
 examples: