2021-11-03 17:34:09

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: serial: renesas,sci: Document RZ/G2L SoC

Add SCI binding documentation for Renesas RZ/G2L SoC.

Also update the example node with real world DT node.

Signed-off-by: Lad Prabhakar <[email protected]>
Reviewed-by: Biju Das <[email protected]>
---
.../bindings/serial/renesas,sci.yaml | 43 ++++++++++++++++---
1 file changed, 37 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/serial/renesas,sci.yaml b/Documentation/devicetree/bindings/serial/renesas,sci.yaml
index 22ed2f0b1dc3..6fc573406240 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci.yaml
+++ b/Documentation/devicetree/bindings/serial/renesas,sci.yaml
@@ -14,7 +14,11 @@ allOf:

properties:
compatible:
- const: renesas,sci
+ oneOf:
+ - items:
+ - enum:
+ - renesas,r9a07g044-sci # RZ/G2{L,LC}
+ - const: renesas,sci # generic SCI compatible UART

reg:
maxItems: 1
@@ -54,18 +58,45 @@ required:
- clocks
- clock-names

+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,r9a07g044-sci
+then:
+ properties:
+ resets:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ required:
+ - resets
+ - power-domains
+
unevaluatedProperties: false

examples:
- |
+ #include <dt-bindings/clock/r9a07g044-cpg.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
aliases {
serial0 = &sci0;
};

- sci0: serial@ffff78 {
- compatible = "renesas,sci";
- reg = <0xffff78 8>;
- interrupts = <88 0>, <89 0>, <90 0>, <91 0>;
- clocks = <&fclk>;
+ sci0: serial@1004d000 {
+ compatible = "renesas,r9a07g044-sci", "renesas,sci";
+ reg = <0x1004d000 0x400>;
+ interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "eri", "rxi", "txi", "tei";
+ clocks = <&cpg CPG_MOD R9A07G044_SCI0_CLKP>;
clock-names = "fck";
+ power-domains = <&cpg>;
+ resets = <&cpg R9A07G044_SCI0_RST>;
};
--
2.17.1


2021-11-08 20:32:07

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: serial: renesas,sci: Document RZ/G2L SoC

Hi Prabhakar,

On Wed, Nov 3, 2021 at 6:31 PM Lad Prabhakar
<[email protected]> wrote:
> Add SCI binding documentation for Renesas RZ/G2L SoC.
>
> Also update the example node with real world DT node.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> Reviewed-by: Biju Das <[email protected]>

> --- a/Documentation/devicetree/bindings/serial/renesas,sci.yaml
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci.yaml
> @@ -14,7 +14,11 @@ allOf:
>
> properties:
> compatible:
> - const: renesas,sci
> + oneOf:
> + - items:
> + - enum:
> + - renesas,r9a07g044-sci # RZ/G2{L,LC}
> + - const: renesas,sci # generic SCI compatible UART

You added a oneOf, but forgot to keep the old single compatible
value as used on H8/300?

>
> reg:
> maxItems: 1

With the above fixed:
Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2021-11-08 20:32:35

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: serial: renesas,sci: Document RZ/G2L SoC

On Wed, Nov 3, 2021 at 6:31 PM Lad Prabhakar
<[email protected]> wrote:
> Add SCI binding documentation for Renesas RZ/G2L SoC.
>
> Also update the example node with real world DT node.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> Reviewed-by: Biju Das <[email protected]>

> --- a/Documentation/devicetree/bindings/serial/renesas,sci.yaml
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci.yaml

> @@ -54,18 +58,45 @@ required:
> - clocks
> - clock-names
>
> +if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,r9a07g044-sci
> +then:
> + properties:
> + resets:
> + maxItems: 1
> +
> + power-domains:
> + maxItems: 1
> +
> + required:
> + - resets
> + - power-domains

We really should make interrupt-names required everywhere, after
fixing the H8/300 DTS files.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2021-11-09 06:30:53

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: serial: renesas,sci: Document RZ/G2L SoC

Hi Geert,

Thank you for the review.

On Mon, Nov 8, 2021 at 4:19 PM Geert Uytterhoeven <[email protected]> wrote:
>
> Hi Prabhakar,
>
> On Wed, Nov 3, 2021 at 6:31 PM Lad Prabhakar
> <[email protected]> wrote:
> > Add SCI binding documentation for Renesas RZ/G2L SoC.
> >
> > Also update the example node with real world DT node.
> >
> > Signed-off-by: Lad Prabhakar <[email protected]>
> > Reviewed-by: Biju Das <[email protected]>
>
> > --- a/Documentation/devicetree/bindings/serial/renesas,sci.yaml
> > +++ b/Documentation/devicetree/bindings/serial/renesas,sci.yaml
> > @@ -14,7 +14,11 @@ allOf:
> >
> > properties:
> > compatible:
> > - const: renesas,sci
> > + oneOf:
> > + - items:
> > + - enum:
> > + - renesas,r9a07g044-sci # RZ/G2{L,LC}
> > + - const: renesas,sci # generic SCI compatible UART
>
> You added a oneOf, but forgot to keep the old single compatible
> value as used on H8/300?
>
Ouch I grepped renesas,sci only in arm{64}, will fix that.

Cheers,
Prabhakar
> >
> > reg:
> > maxItems: 1
>
> With the above fixed:
> Reviewed-by: Geert Uytterhoeven <[email protected]>
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> 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

2021-11-09 07:25:25

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: serial: renesas,sci: Document RZ/G2L SoC

Hi Geert,

On Mon, Nov 8, 2021 at 4:21 PM Geert Uytterhoeven <[email protected]> wrote:
>
> On Wed, Nov 3, 2021 at 6:31 PM Lad Prabhakar
> <[email protected]> wrote:
> > Add SCI binding documentation for Renesas RZ/G2L SoC.
> >
> > Also update the example node with real world DT node.
> >
> > Signed-off-by: Lad Prabhakar <[email protected]>
> > Reviewed-by: Biju Das <[email protected]>
>
> > --- a/Documentation/devicetree/bindings/serial/renesas,sci.yaml
> > +++ b/Documentation/devicetree/bindings/serial/renesas,sci.yaml
>
> > @@ -54,18 +58,45 @@ required:
> > - clocks
> > - clock-names
> >
> > +if:
> > + properties:
> > + compatible:
> > + contains:
> > + enum:
> > + - renesas,r9a07g044-sci
> > +then:
> > + properties:
> > + resets:
> > + maxItems: 1
> > +
> > + power-domains:
> > + maxItems: 1
> > +
> > + required:
> > + - resets
> > + - power-domains
>
> We really should make interrupt-names required everywhere, after
> fixing the H8/300 DTS files.
>
Agreed, also in other scif*.yaml files this needs fixing.

Cheers,
Prabhakar

> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> 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