Re: [PATCH 12/13] arm64: dts: renesas: r9a09g077: wire up DMA support for SPI
From: Geert Uytterhoeven
Date: Tue Dec 23 2025 - 11:04:22 EST
Hi Cosmin,
On Tue, 23 Dec 2025 at 15:42, Cosmin-Gabriel Tanislav
<cosmin-gabriel.tanislav.xa@xxxxxxxxxxx> wrote:
> > From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> > On Mon, 1 Dec 2025 at 14:44, Cosmin Tanislav
> > <cosmin-gabriel.tanislav.xa@xxxxxxxxxxx> wrote:
> > > RZ/T2H (R9A09G077) has three DMA controllers that can be used by
> > > peripherals like SPI to offload data transfers from the CPU.
> > >
> > > Wire up the DMA channels for the SPI peripherals.
> > >
> > > Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@xxxxxxxxxxx>
> >
> > Thanks for your patch!
> >
> > > --- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
> > > +++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
> > > @@ -200,6 +200,8 @@ rspi0: spi@80007000 {
> > > clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKM>,
> > > <&cpg CPG_MOD 104>;
> > > clock-names = "pclk", "pclkspi";
> > > + dmas = <&dmac0 0x267a>, <&dmac0 0x267b>;
> > > + dma-names = "rx", "tx";
> >
> > RZ/T2H does not seem to have restrictions about which DMA controllers
> > can be used by which SPI instance. Hence shouldn't these point to
> > all three DMA controllers?
>
> It does seem like there's no restriction about which DMA controller to
> use.
>
> > dmas = <&dmac0 0x267a>, <&dmac0 0x267b>,
> > <&dmac1 0x267a>, <&dmac1 0x267b>,
> > <&dmac2 0x267a>, <&dmac2 0x267b>;
> > dma-names = "rx", "tx", "rx", "tx", "rx", "tx";
> >
>
> I was not aware that the DMA core supports this. I will add the other DMA
> controllers to the list.
>
> > Note that this requires updating the DT bindings, as they currently
> > restrict dma to two entries.
>
> dma-names:
> items:
> enum:
> - rx
> - tx
>
> This should work fine, right?
Yes, dma-names is OK. But currently dmas has "maxItems: 2".
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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