Message ID | 20250129165122.2980-3-thierry.bultel.yh@bp.renesas.com |
---|---|
State | New |
Headers | show |
Series | None | expand |
On 29/01/2025 17:37, Thierry Bultel wrote: > Document RZ/T2H (a.k.a r9a09g077) in SCI binding. A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. See also: https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 And make it anyway shorter. > > Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com> > --- > .../bindings/serial/renesas,rzsci.yaml | 100 ++++++++++++++++++ > 1 file changed, 100 insertions(+) > create mode 100644 Documentation/devicetree/bindings/serial/renesas,rzsci.yaml > > diff --git a/Documentation/devicetree/bindings/serial/renesas,rzsci.yaml b/Documentation/devicetree/bindings/serial/renesas,rzsci.yaml > new file mode 100644 > index 000000000000..70e83bbcc79d > --- /dev/null > +++ b/Documentation/devicetree/bindings/serial/renesas,rzsci.yaml > @@ -0,0 +1,100 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/serial/renesas,rzsci.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas Serial Communication Interface You are duplicating existing renesas,sci without any explanation. No, don't. This is pointless. Best regards, Krzysztof
On Wed, 29 Jan 2025 16:37:38 +0000, Thierry Bultel wrote: > Document RZ/T2H (a.k.a r9a09g077) in SCI binding. > > Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com> > --- > .../bindings/serial/renesas,rzsci.yaml | 100 ++++++++++++++++++ > 1 file changed, 100 insertions(+) > create mode 100644 Documentation/devicetree/bindings/serial/renesas,rzsci.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: Documentation/devicetree/bindings/serial/renesas,rzsci.example.dts:24:18: fatal error: dt-bindings/clock/r9a09g077-cpg.h: No such file or directory 24 | #include <dt-bindings/clock/r9a09g077-cpg.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/serial/renesas,rzsci.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1506: dt_binding_check] Error 2 make: *** [Makefile:251: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/patch/2040352 This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
Hi Geert, > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: 10 February 2025 13:15 > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci bindings for the Renesas RZ/T2H (a.k.a > r9a09g077) SoC > > Hi Thierry, > > On Wed, 29 Jan 2025 at 17:52, Thierry Bultel <thierry.bultel.yh@bp.renesas.com> wrote: > > Document RZ/T2H (a.k.a r9a09g077) in SCI binding. > > > > Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com> > > Thanks for your patch! > > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/serial/renesas,rzsci.yaml > > @@ -0,0 +1,100 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/serial/renesas,rzsci.yaml# > > "rzsci" is IMHO a bad name, as SCI on RZ/T2 differs from the similar-named "SCI" (sometimes called > "RSCI" or "SCIg") on RZ/A1H, RZ/A2M, RZ/G2L, RZ/V2L, and RZ/G3S (and most old SuperH SoCs). > > BTW, I believe the variant on RZ/T2 is also used on RZ/N2, RZ/V2H, and RZ/G3E? > > However, binding-wise, they all seem to be very similar. > So perhaps you can just add this to the existing > Documentation/devicetree/bindings/serial/renesas,sci.yaml? It is present in RZ/G3E as well. RSCI supports sci, scif, i2c and spi that is the reason renesas,rzsci.yaml introduced. You mean add this in renesas,sci.yaml and then expand?? Cheers, Biju
Hi Geert, > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: 10 February 2025 14:15 > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci bindings for the Renesas RZ/T2H (a.k.a > r9a09g077) SoC > > Hi Biju, > > On Mon, 10 Feb 2025 at 14:19, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > -----Original Message----- > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > Sent: 10 February 2025 13:15 > > > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci > > > bindings for the Renesas RZ/T2H (a.k.a > > > r9a09g077) SoC > > > > > > On Wed, 29 Jan 2025 at 17:52, Thierry Bultel <thierry.bultel.yh@bp.renesas.com> wrote: > > > > Document RZ/T2H (a.k.a r9a09g077) in SCI binding. > > > > > > > > Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com> > > > > > > Thanks for your patch! > > > > > > > --- /dev/null > > > > +++ b/Documentation/devicetree/bindings/serial/renesas,rzsci.yaml > > > > @@ -0,0 +1,100 @@ > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML > > > > +1.2 > > > > +--- > > > > +$id: http://devicetree.org/schemas/serial/renesas,rzsci.yaml# > > > > > > "rzsci" is IMHO a bad name, as SCI on RZ/T2 differs from the > > > similar-named "SCI" (sometimes called "RSCI" or "SCIg") on RZ/A1H, RZ/A2M, RZ/G2L, RZ/V2L, and > RZ/G3S (and most old SuperH SoCs). > > > > > > BTW, I believe the variant on RZ/T2 is also used on RZ/N2, RZ/V2H, and RZ/G3E? > > > > > > However, binding-wise, they all seem to be very similar. > > > So perhaps you can just add this to the existing > > > Documentation/devicetree/bindings/serial/renesas,sci.yaml? > > > > It is present in RZ/G3E as well. > > RSCI supports sci, scif, i2c and spi that is the reason renesas,rzsci.yaml introduced. > > If you plan to add support for I2C and SPI, you will need different bindings under > Documentation/devicetree/bindings/{i2c,spi}/. OK, I thought since it is a single IP, we need to use a single compatible and instantiate appropriate device based on the device property rather than separate SCI, i2c and spi compatible. Yes, I agree having different device compatible for same IP make life easier, no need to add specific vendor property. Cheers, Biju
Hi Geert, > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: 10 February 2025 14:35 > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci bindings for the Renesas RZ/T2H (a.k.a > r9a09g077) SoC > > Hi Biju, > > On Mon, 10 Feb 2025 at 15:26, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > -----Original Message----- > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > Sent: 10 February 2025 14:15 > > > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci > > > bindings for the Renesas RZ/T2H (a.k.a > > > r9a09g077) SoC > > > > > > On Mon, 10 Feb 2025 at 14:19, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > > > -----Original Message----- > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > > > Sent: 10 February 2025 13:15 > > > > > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci > > > > > bindings for the Renesas RZ/T2H (a.k.a > > > > > r9a09g077) SoC > > > > > > > > > > On Wed, 29 Jan 2025 at 17:52, Thierry Bultel <thierry.bultel.yh@bp.renesas.com> wrote: > > > > > > Document RZ/T2H (a.k.a r9a09g077) in SCI binding. > > > > > > > > > > > > Signed-off-by: Thierry Bultel > > > > > > <thierry.bultel.yh@bp.renesas.com> > > > > > > > > > > Thanks for your patch! > > > > > > > > > > > --- /dev/null > > > > > > +++ b/Documentation/devicetree/bindings/serial/renesas,rzsci.y > > > > > > +++ aml > > > > > > @@ -0,0 +1,100 @@ > > > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > > > +%YAML > > > > > > +1.2 > > > > > > +--- > > > > > > +$id: http://devicetree.org/schemas/serial/renesas,rzsci.yaml# > > > > > > > > > > "rzsci" is IMHO a bad name, as SCI on RZ/T2 differs from the > > > > > similar-named "SCI" (sometimes called "RSCI" or "SCIg") on > > > > > RZ/A1H, RZ/A2M, RZ/G2L, RZ/V2L, and > > > RZ/G3S (and most old SuperH SoCs). > > > > > > > > > > BTW, I believe the variant on RZ/T2 is also used on RZ/N2, RZ/V2H, and RZ/G3E? > > > > > > > > > > However, binding-wise, they all seem to be very similar. > > > > > So perhaps you can just add this to the existing > > > > > Documentation/devicetree/bindings/serial/renesas,sci.yaml? > > > > > > > > It is present in RZ/G3E as well. > > > > RSCI supports sci, scif, i2c and spi that is the reason renesas,rzsci.yaml introduced. > > > > > > If you plan to add support for I2C and SPI, you will need different > > > bindings under Documentation/devicetree/bindings/{i2c,spi}/. > > > > OK, I thought since it is a single IP, we need to use a single > > compatible and instantiate appropriate device based on the device property rather than separate SCI, > i2c and spi compatible. > > > > Yes, I agree having different device compatible for same IP make life > > easier, no need to add specific vendor property. > > I said "different bindings", not "different compatible values"! > > Cfr. "renesas,tpu" having bindings in both Documentation/devicetree/bindings/timer/renesas,tpu.yaml > and Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml. Thanks for clarification. This is simple solution. Cheers, Biju
Hi Geert, > -----Original Message----- > From: Biju Das <biju.das.jz@bp.renesas.com> > Sent: 10 February 2025 14:42 > To: Geert Uytterhoeven <geert@linux-m68k.org> > Subject: RE: [PATCH 02/14] dt-bindings: serial: Document sci bindings for the Renesas RZ/T2H (a.k.a > r9a09g077) SoC > > Hi Geert, > > > -----Original Message----- > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > Sent: 10 February 2025 14:35 > > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci bindings > > for the Renesas RZ/T2H (a.k.a > > r9a09g077) SoC > > > > Hi Biju, > > > > On Mon, 10 Feb 2025 at 15:26, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > > -----Original Message----- > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > > Sent: 10 February 2025 14:15 > > > > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci > > > > bindings for the Renesas RZ/T2H (a.k.a > > > > r9a09g077) SoC > > > > > > > > On Mon, 10 Feb 2025 at 14:19, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > > > > > -----Original Message----- > > > > > > From: Geert Uytterhoeven <geert@linux-m68k.org> > > > > > > Sent: 10 February 2025 13:15 > > > > > > Subject: Re: [PATCH 02/14] dt-bindings: serial: Document sci > > > > > > bindings for the Renesas RZ/T2H (a.k.a > > > > > > r9a09g077) SoC > > > > > > > > > > > > On Wed, 29 Jan 2025 at 17:52, Thierry Bultel <thierry.bultel.yh@bp.renesas.com> wrote: > > > > > > > Document RZ/T2H (a.k.a r9a09g077) in SCI binding. > > > > > > > > > > > > > > Signed-off-by: Thierry Bultel > > > > > > > <thierry.bultel.yh@bp.renesas.com> > > > > > > > > > > > > Thanks for your patch! > > > > > > > > > > > > > --- /dev/null > > > > > > > +++ b/Documentation/devicetree/bindings/serial/renesas,rzsci > > > > > > > +++ .y > > > > > > > +++ aml > > > > > > > @@ -0,0 +1,100 @@ > > > > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > > > > +%YAML > > > > > > > +1.2 > > > > > > > +--- > > > > > > > +$id: > > > > > > > +http://devicetree.org/schemas/serial/renesas,rzsci.yaml# > > > > > > > > > > > > "rzsci" is IMHO a bad name, as SCI on RZ/T2 differs from the > > > > > > similar-named "SCI" (sometimes called "RSCI" or "SCIg") on > > > > > > RZ/A1H, RZ/A2M, RZ/G2L, RZ/V2L, and > > > > RZ/G3S (and most old SuperH SoCs). > > > > > > > > > > > > BTW, I believe the variant on RZ/T2 is also used on RZ/N2, RZ/V2H, and RZ/G3E? > > > > > > > > > > > > However, binding-wise, they all seem to be very similar. > > > > > > So perhaps you can just add this to the existing > > > > > > Documentation/devicetree/bindings/serial/renesas,sci.yaml? > > > > > > > > > > It is present in RZ/G3E as well. > > > > > RSCI supports sci, scif, i2c and spi that is the reason renesas,rzsci.yaml introduced. > > > > > > > > If you plan to add support for I2C and SPI, you will need > > > > different bindings under Documentation/devicetree/bindings/{i2c,spi}/. > > > > > > OK, I thought since it is a single IP, we need to use a single > > > compatible and instantiate appropriate device based on the device > > > property rather than separate SCI, > > i2c and spi compatible. > > > > > > Yes, I agree having different device compatible for same IP make > > > life easier, no need to add specific vendor property. > > > > I said "different bindings", not "different compatible values"! > > > > Cfr. "renesas,tpu" having bindings in both > > Documentation/devicetree/bindings/timer/renesas,tpu.yaml > > and Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml. > > Thanks for clarification. This is simple solution. But, here we need to decide, which channels to be used in SCI, I2C and SPI in SoC dtsi or Maybe define all the channels as sci as default and override it in board dts for I2c and spi based on customer use case?? Cheers, Biju
diff --git a/Documentation/devicetree/bindings/serial/renesas,rzsci.yaml b/Documentation/devicetree/bindings/serial/renesas,rzsci.yaml new file mode 100644 index 000000000000..70e83bbcc79d --- /dev/null +++ b/Documentation/devicetree/bindings/serial/renesas,rzsci.yaml @@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/renesas,rzsci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas Serial Communication Interface + +maintainers: + - Thierry Bultel <thierry.bultel.yh@bp.renesas.com> + - Geert Uytterhoeven <geert+renesas@glider.be> + +allOf: + - $ref: serial.yaml# + +description: | + The SCI is configurable to asynchronous and synchronous serial + interfaces: + - Asynchronous interfaces (UART and Asynchronous Communications Interface + Adapter (ACIA)) + - 8-bit clock synchronous interface + - Simple I2C (master-only) + - Simple SPI + - Smart card interface + - Manchester mode + - Asynchronous interfaces (UART, RS485 and Asynchronous Communications + Interface Adapter (ACIA)) + The smart card interface complies with the ISO/IEC 7816-3 standard for + electronic signals and transmission protocol. Each SCI has FIFO buffers to + enable continuous and full-duplex communication, and the data transfer speed + can be configured independently using a baud rate generator. + +properties: + compatible: + const: renesas,r9a09g077-sci # RZ/T2H + + reg: + maxItems: 1 + + interrupts: + items: + - description: Error interrupt + - description: Receive buffer full interrupt + - description: Transmit buffer empty interrupt + - description: Transmit end interrupt + + interrupt-names: + items: + - const: eri + - const: rxi + - const: txi + - const: tei + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + maxItems: 2 + items: + enum: + - fck # UART functional clock + - sck # optional external clock input + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clocks + - clock-names + - power-domains + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/r9a09g077-cpg.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + aliases { + serial0 = &sci0; + }; + + sci0: serial@80005000 { + compatible = "renesas,r9a09g077-sci"; + reg = <0x80005000 0x400>; + interrupts = <GIC_SPI 590 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 591 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 592 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 593 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "eri", "rxi", "txi", "tei"; + clocks = <&cpg CPG_MOD R9A09G077_SCI0_CLK>; + clock-names = "fck"; + power-domains = <&cpg>; + };
Document RZ/T2H (a.k.a r9a09g077) in SCI binding. Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com> --- .../bindings/serial/renesas,rzsci.yaml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 Documentation/devicetree/bindings/serial/renesas,rzsci.yaml