mbox series

[0/2] ARM: dts: renesas: r9a06g032: UART dtbs_check fixes

Message ID cover.1739525488.git.geert+renesas@glider.be (mailing list archive)
Headers show
Series ARM: dts: renesas: r9a06g032: UART dtbs_check fixes | expand

Message

Geert Uytterhoeven Feb. 14, 2025, 9:42 a.m. UTC
Hi all,

This patch series fixes two "make dtbs_check" issues for the RZ/N1
UARTs.  As I do not have access to an RZ/N1 board, this was not tested
on actual hardware.

Thanks for your comments!

Geert Uytterhoeven (2):
  ARM: dts: renesas: r9a06g032: Fix UART dma channel order
  ARM: dts: renesas: r9a06g032: Drop snps,dw-apb-uart compatibility

 arch/arm/boot/dts/renesas/r9a06g032.dtsi | 26 ++++++++++++------------
 1 file changed, 13 insertions(+), 13 deletions(-)

Comments

Biju Das Feb. 14, 2025, 9:44 a.m. UTC | #1
+CC
 Ralph Siemsen <ralph.siemsen@linaro.org> who has RZ/N1 board.

> -----Original Message-----
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> Sent: 14 February 2025 09:42
> To: Magnus Damm <magnus.damm@gmail.com>; Wolfram Sang <wsa+renesas@sang-engineering.com>; Miquel
> Raynal <miquel.raynal@bootlin.com>
> Cc: linux-renesas-soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> devicetree@vger.kernel.org; Geert Uytterhoeven <geert+renesas@glider.be>
> Subject: [PATCH 0/2] ARM: dts: renesas: r9a06g032: UART dtbs_check fixes
> 
> 	Hi all,
> 
> This patch series fixes two "make dtbs_check" issues for the RZ/N1 UARTs.  As I do not have access to
> an RZ/N1 board, this was not tested on actual hardware.

Adding Ralph Siemsen <ralph.siemsen@linaro.org> who has RZ/N1 board.

Cheers,
Biju
> 
> Thanks for your comments!
> 
> Geert Uytterhoeven (2):
>   ARM: dts: renesas: r9a06g032: Fix UART dma channel order
>   ARM: dts: renesas: r9a06g032: Drop snps,dw-apb-uart compatibility
> 
>  arch/arm/boot/dts/renesas/r9a06g032.dtsi | 26 ++++++++++++------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> --
> 2.43.0
> 
> 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
Miquel Raynal Feb. 14, 2025, 10:28 a.m. UTC | #2
Hello Geert,

On 14/02/2025 at 10:42:04 +01, Geert Uytterhoeven <geert+renesas@glider.be> wrote:

> make dtbs_check:
>
>     arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dtb: serial@40060000: compatible: 'oneOf' conditional failed, one must be fixed:
> 	    ['renesas,r9a06g032-uart', 'renesas,rzn1-uart', 'snps,dw-apb-uart'] is too long
>     ...
>
> As per commit 72b0505f0830df95 ("dt: serial: Add Renesas RZ/N1 binding
> documentation"), the RZ/N1 UART is a modified Synopsys DesignWare UART.
> The modifications only relate to DMA, so you could actually use the
> controller with the Synopsys compatible string if you are not using DMA,
> but you should not do so.  Hence the first three UARTs (which don't
> support DMA) were added with a "snps,dw-apb-uart" fallback, to use the
> existing Synopsys DesignWare UART support.
>
> Since support for the RZ/N1-specific compatible value was added to the
> driver a long time ago (commit 2ff5fa7f742ab0c6 ("serial: 8250_dw: Add
> compatible string for Renesas RZ/N1 UART") in v4.19), the extra
> compatible value can be dropped safely.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Alternatively, the bindings[1] could be augmented with an extra section:
>
>     - items:
>         - enum:
>             - renesas,r9a06g032-uart
>             - renesas,r9a06g033-uart
>         - const: renesas,rzn1-uart
>         - const: snps,dw-apb-uart     # RZ/N1 without DMA
>
> and perhaps extra logic to prohibit the dmas property when both
> renesas,rzn1-uart and snps,dw-apb-uart are present.

I must say that I prefer this secondary approach, which feels more
accurate. I won't block the one that your proposed below for sure, but I
feel like it is more relevant to add this third entry in the bindings
rather than removing it from the DT. Either way, fine by me.

>
> Given the complexity of the latter, I went for the simple solution.
>
> [1] Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml

Thanks,
Miquèl