linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: display: renesas,du: Provide bindings for r8a779a0
@ 2021-09-01 23:36 Kieran Bingham
  2021-09-06  8:13 ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Kieran Bingham @ 2021-09-01 23:36 UTC (permalink / raw)
  To: linux-renesas-soc, Laurent Pinchart
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Rob Herring,
	open list:DRM DRIVERS FOR RENESAS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Extend the Renesas DU display bindings to support the r8a779a0 V3U.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
---
v2:
 - Collected Laurent's tag
 - Remove clock-names requirement
 - Specify only a single clock

 .../bindings/display/renesas,du.yaml          | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/renesas,du.yaml b/Documentation/devicetree/bindings/display/renesas,du.yaml
index e3ca5389c17d..a6f7ef30fbb4 100644
--- a/Documentation/devicetree/bindings/display/renesas,du.yaml
+++ b/Documentation/devicetree/bindings/display/renesas,du.yaml
@@ -39,6 +39,7 @@ properties:
       - renesas,du-r8a77980 # for R-Car V3H compatible DU
       - renesas,du-r8a77990 # for R-Car E3 compatible DU
       - renesas,du-r8a77995 # for R-Car D3 compatible DU
+      - renesas,du-r8a779a0 # for R-Car V3U compatible DU
 
   reg:
     maxItems: 1
@@ -773,6 +774,55 @@ allOf:
         - reset-names
         - renesas,vsps
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - renesas,du-r8a779a0
+    then:
+      properties:
+        clocks:
+          items:
+            - description: Functional clock
+
+        clock-names:
+          maxItems: 1
+          items:
+            - const: du
+
+        interrupts:
+          maxItems: 2
+
+        resets:
+          maxItems: 1
+
+        reset-names:
+          items:
+            - const: du.0
+
+        ports:
+          properties:
+            port@0:
+              description: DSI 0
+            port@1:
+              description: DSI 1
+            port@2: false
+            port@3: false
+
+          required:
+            - port@0
+            - port@1
+
+        renesas,vsps:
+          minItems: 2
+
+      required:
+        - interrupts
+        - resets
+        - reset-names
+        - renesas,vsps
+
 additionalProperties: false
 
 examples:
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: display: renesas,du: Provide bindings for r8a779a0
  2021-09-01 23:36 [PATCH v2] dt-bindings: display: renesas,du: Provide bindings for r8a779a0 Kieran Bingham
@ 2021-09-06  8:13 ` Geert Uytterhoeven
  2021-09-07 18:45   ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2021-09-06  8:13 UTC (permalink / raw)
  To: Kieran Bingham
  Cc: Linux-Renesas, Laurent Pinchart, Kieran Bingham, David Airlie,
	Daniel Vetter, Rob Herring, open list:DRM DRIVERS FOR RENESAS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Hi Kieran,

On Thu, Sep 2, 2021 at 1:39 AM Kieran Bingham
<kieran.bingham@ideasonboard.com> wrote:
> From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
>
> Extend the Renesas DU display bindings to support the r8a779a0 V3U.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> v2:
>  - Collected Laurent's tag
>  - Remove clock-names requirement
>  - Specify only a single clock

Thanks for the update!

> --- a/Documentation/devicetree/bindings/display/renesas,du.yaml
> +++ b/Documentation/devicetree/bindings/display/renesas,du.yaml
> @@ -39,6 +39,7 @@ properties:
>        - renesas,du-r8a77980 # for R-Car V3H compatible DU
>        - renesas,du-r8a77990 # for R-Car E3 compatible DU
>        - renesas,du-r8a77995 # for R-Car D3 compatible DU
> +      - renesas,du-r8a779a0 # for R-Car V3U compatible DU
>
>    reg:
>      maxItems: 1
> @@ -773,6 +774,55 @@ allOf:
>          - reset-names
>          - renesas,vsps
>
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - renesas,du-r8a779a0
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: Functional clock
> +
> +        clock-names:
> +          maxItems: 1
> +          items:
> +            - const: du
> +
> +        interrupts:
> +          maxItems: 2
> +
> +        resets:
> +          maxItems: 1
> +
> +        reset-names:
> +          items:
> +            - const: du.0

This is now inconsistent with clock-names, which doesn't use a suffix.

> +
> +        ports:
> +          properties:
> +            port@0:
> +              description: DSI 0
> +            port@1:
> +              description: DSI 1
> +            port@2: false
> +            port@3: false
> +
> +          required:
> +            - port@0
> +            - port@1
> +
> +        renesas,vsps:
> +          minItems: 2
> +
> +      required:
> +        - interrupts
> +        - resets
> +        - reset-names

Same here, as clock-names is not required anymore.

> +        - renesas,vsps
> +
>  additionalProperties: false
>
>  examples:

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: display: renesas,du: Provide bindings for r8a779a0
  2021-09-06  8:13 ` Geert Uytterhoeven
@ 2021-09-07 18:45   ` Rob Herring
  2021-09-07 19:17     ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2021-09-07 18:45 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, Linux-Renesas, Laurent Pinchart, Kieran Bingham,
	David Airlie, Daniel Vetter, open list:DRM DRIVERS FOR RENESAS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

On Mon, Sep 06, 2021 at 10:13:07AM +0200, Geert Uytterhoeven wrote:
> Hi Kieran,
> 
> On Thu, Sep 2, 2021 at 1:39 AM Kieran Bingham
> <kieran.bingham@ideasonboard.com> wrote:
> > From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> >
> > Extend the Renesas DU display bindings to support the r8a779a0 V3U.
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> > ---
> > v2:
> >  - Collected Laurent's tag
> >  - Remove clock-names requirement
> >  - Specify only a single clock
> 
> Thanks for the update!
> 
> > --- a/Documentation/devicetree/bindings/display/renesas,du.yaml
> > +++ b/Documentation/devicetree/bindings/display/renesas,du.yaml
> > @@ -39,6 +39,7 @@ properties:
> >        - renesas,du-r8a77980 # for R-Car V3H compatible DU
> >        - renesas,du-r8a77990 # for R-Car E3 compatible DU
> >        - renesas,du-r8a77995 # for R-Car D3 compatible DU
> > +      - renesas,du-r8a779a0 # for R-Car V3U compatible DU
> >
> >    reg:
> >      maxItems: 1
> > @@ -773,6 +774,55 @@ allOf:
> >          - reset-names
> >          - renesas,vsps
> >
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - renesas,du-r8a779a0
> > +    then:
> > +      properties:
> > +        clocks:
> > +          items:
> > +            - description: Functional clock
> > +
> > +        clock-names:
> > +          maxItems: 1
> > +          items:
> > +            - const: du
> > +
> > +        interrupts:
> > +          maxItems: 2
> > +
> > +        resets:
> > +          maxItems: 1
> > +
> > +        reset-names:
> > +          items:
> > +            - const: du.0
> 
> This is now inconsistent with clock-names, which doesn't use a suffix.

But it is consistent with all the other cases of 'reset-names'. The 
problem is 'clock-names' is not consistent and should be 'du.0'.

Ideally, the if/them schemas should not be defining the names. That 
should be at the top level and the if/them schema just limits the number 
of entries. That's not always possible, but I think is for clocks and 
resets in this case.

> 
> > +
> > +        ports:
> > +          properties:
> > +            port@0:
> > +              description: DSI 0
> > +            port@1:
> > +              description: DSI 1
> > +            port@2: false
> > +            port@3: false
> > +
> > +          required:
> > +            - port@0
> > +            - port@1
> > +
> > +        renesas,vsps:
> > +          minItems: 2
> > +
> > +      required:
> > +        - interrupts
> > +        - resets
> > +        - reset-names
> 
> Same here, as clock-names is not required anymore.
> 
> > +        - renesas,vsps
> > +
> >  additionalProperties: false
> >
> >  examples:
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: display: renesas,du: Provide bindings for r8a779a0
  2021-09-07 18:45   ` Rob Herring
@ 2021-09-07 19:17     ` Geert Uytterhoeven
  2021-09-22 21:45       ` Laurent Pinchart
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2021-09-07 19:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: Kieran Bingham, Linux-Renesas, Laurent Pinchart, Kieran Bingham,
	David Airlie, Daniel Vetter, open list:DRM DRIVERS FOR RENESAS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Hi Rob,

On Tue, Sep 7, 2021 at 8:45 PM Rob Herring <robh@kernel.org> wrote:
> On Mon, Sep 06, 2021 at 10:13:07AM +0200, Geert Uytterhoeven wrote:
> > On Thu, Sep 2, 2021 at 1:39 AM Kieran Bingham
> > <kieran.bingham@ideasonboard.com> wrote:
> > > From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> > >
> > > Extend the Renesas DU display bindings to support the r8a779a0 V3U.
> > >
> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> > > ---
> > > v2:
> > >  - Collected Laurent's tag
> > >  - Remove clock-names requirement
> > >  - Specify only a single clock
> >
> > Thanks for the update!
> >
> > > --- a/Documentation/devicetree/bindings/display/renesas,du.yaml
> > > +++ b/Documentation/devicetree/bindings/display/renesas,du.yaml
> > > @@ -39,6 +39,7 @@ properties:
> > >        - renesas,du-r8a77980 # for R-Car V3H compatible DU
> > >        - renesas,du-r8a77990 # for R-Car E3 compatible DU
> > >        - renesas,du-r8a77995 # for R-Car D3 compatible DU
> > > +      - renesas,du-r8a779a0 # for R-Car V3U compatible DU
> > >
> > >    reg:
> > >      maxItems: 1
> > > @@ -773,6 +774,55 @@ allOf:
> > >          - reset-names
> > >          - renesas,vsps
> > >
> > > +  - if:
> > > +      properties:
> > > +        compatible:
> > > +          contains:
> > > +            enum:
> > > +              - renesas,du-r8a779a0
> > > +    then:
> > > +      properties:
> > > +        clocks:
> > > +          items:
> > > +            - description: Functional clock
> > > +
> > > +        clock-names:
> > > +          maxItems: 1
> > > +          items:
> > > +            - const: du
> > > +
> > > +        interrupts:
> > > +          maxItems: 2
> > > +
> > > +        resets:
> > > +          maxItems: 1
> > > +
> > > +        reset-names:
> > > +          items:
> > > +            - const: du.0
> >
> > This is now inconsistent with clock-names, which doesn't use a suffix.
>
> But it is consistent with all the other cases of 'reset-names'. The
> problem is 'clock-names' is not consistent and should be 'du.0'.

True.

> Ideally, the if/them schemas should not be defining the names. That
> should be at the top level and the if/them schema just limits the number
> of entries. That's not always possible, but I think is for clocks and
> resets in this case.

It's a bit tricky.
For clocks, there's usually one clock per channel, but not always.
Plus clocks for external inputs, if present.
For resets, there's one reset for a group of channels, with the number
of channels in a group depending on the SoC family.
And then there's the special casing for SoCs where there's a gap in
the channel numbering...

Still wondering if it would be better to have one device node per
channel, and companion links...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: display: renesas,du: Provide bindings for r8a779a0
  2021-09-07 19:17     ` Geert Uytterhoeven
@ 2021-09-22 21:45       ` Laurent Pinchart
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2021-09-22 21:45 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rob Herring, Kieran Bingham, Linux-Renesas, Kieran Bingham,
	David Airlie, Daniel Vetter, open list:DRM DRIVERS FOR RENESAS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Hello everybody,

On Tue, Sep 07, 2021 at 09:17:31PM +0200, Geert Uytterhoeven wrote:
> On Tue, Sep 7, 2021 at 8:45 PM Rob Herring wrote:
> > On Mon, Sep 06, 2021 at 10:13:07AM +0200, Geert Uytterhoeven wrote:
> > > On Thu, Sep 2, 2021 at 1:39 AM Kieran Bingham wrote:
> > > > From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> > > >
> > > > Extend the Renesas DU display bindings to support the r8a779a0 V3U.
> > > >
> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > > Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> > > > ---
> > > > v2:
> > > >  - Collected Laurent's tag
> > > >  - Remove clock-names requirement
> > > >  - Specify only a single clock
> > >
> > > Thanks for the update!
> > >
> > > > --- a/Documentation/devicetree/bindings/display/renesas,du.yaml
> > > > +++ b/Documentation/devicetree/bindings/display/renesas,du.yaml
> > > > @@ -39,6 +39,7 @@ properties:
> > > >        - renesas,du-r8a77980 # for R-Car V3H compatible DU
> > > >        - renesas,du-r8a77990 # for R-Car E3 compatible DU
> > > >        - renesas,du-r8a77995 # for R-Car D3 compatible DU
> > > > +      - renesas,du-r8a779a0 # for R-Car V3U compatible DU
> > > >
> > > >    reg:
> > > >      maxItems: 1
> > > > @@ -773,6 +774,55 @@ allOf:
> > > >          - reset-names
> > > >          - renesas,vsps
> > > >
> > > > +  - if:
> > > > +      properties:
> > > > +        compatible:
> > > > +          contains:
> > > > +            enum:
> > > > +              - renesas,du-r8a779a0
> > > > +    then:
> > > > +      properties:
> > > > +        clocks:
> > > > +          items:
> > > > +            - description: Functional clock
> > > > +
> > > > +        clock-names:
> > > > +          maxItems: 1
> > > > +          items:
> > > > +            - const: du
> > > > +
> > > > +        interrupts:
> > > > +          maxItems: 2
> > > > +
> > > > +        resets:
> > > > +          maxItems: 1
> > > > +
> > > > +        reset-names:
> > > > +          items:
> > > > +            - const: du.0
> > >
> > > This is now inconsistent with clock-names, which doesn't use a suffix.
> >
> > But it is consistent with all the other cases of 'reset-names'. The
> > problem is 'clock-names' is not consistent and should be 'du.0'.
> 
> True.

Looks fine to me. The only other SoC that has a similar shared clock
architecture is H1 (R8A7779), and we use du.0 there.

> > Ideally, the if/them schemas should not be defining the names. That
> > should be at the top level and the if/them schema just limits the number
> > of entries. That's not always possible, but I think is for clocks and
> > resets in this case.
> 
> It's a bit tricky.
> For clocks, there's usually one clock per channel, but not always.
> Plus clocks for external inputs, if present.

Yes, it's mostly the external clocks that mess things up here. Each DU
channel typically has one internal clock and one optional external
clock, but not always.

> For resets, there's one reset for a group of channels, with the number
> of channels in a group depending on the SoC family.
> And then there's the special casing for SoCs where there's a gap in
> the channel numbering...

For resets, H1 and M3-N are indeed special cases. H1 has no reset-names,
while M3-N has du.0 and du.3 due to a gap in hardware channel numbering.
All other SoCs have du.0 and optionally du.2.

> Still wondering if it would be better to have one device node per
> channel, and companion links...

The hardware design would make that too messy. There are too many
cross-channel dependencies.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-22 21:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 23:36 [PATCH v2] dt-bindings: display: renesas,du: Provide bindings for r8a779a0 Kieran Bingham
2021-09-06  8:13 ` Geert Uytterhoeven
2021-09-07 18:45   ` Rob Herring
2021-09-07 19:17     ` Geert Uytterhoeven
2021-09-22 21:45       ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).