Re: [PATCH 04/22] dt-bindings: dma: renesas,rz-dmac: Document optional DMA ACK cell
From: Geert Uytterhoeven
Date: Thu Mar 26 2026 - 11:48:28 EST
Hi John,
On Thu, 19 Mar 2026 at 16:55, John Madieu <john.madieu.xa@xxxxxxxxxxxxxx> wrote:
> Some peripherals on RZ/V2H, RZ/V2N, and RZ/G3E SoCs require explicit
> ACK signal routing through the ICU. Document the optional second cell
> in the DMA specifier for specifying the ACK signal number.
>
> The first cell remains unchanged and specifies the encoded MID/RID and
> channel configuration. The optional second cell specifies the DMA ACK
> signal number for peripherals requiring level-based handshaking.
>
> Signed-off-by: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
Thanks for your patch!
Just a quick head-up, as I haven't read the actual secion in the
documentation yet.
> --- a/Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml
> +++ b/Documentation/devicetree/bindings/dma/renesas,rz-dmac.yaml
> @@ -63,17 +63,27 @@ properties:
> - const: register
>
> '#dma-cells':
> - const: 1
> - description:
> + description: |
> The cell specifies the encoded MID/RID or the REQ No values of
> the DMAC port connected to the DMA client and the slave channel
> configuration parameters.
> + Use 1 cell for basic DMA configuration.
> + Use 2 cells when DMA ACK signal routing through ICU is required
> + (RZ/V2H, RZ/V2N, RZ/G3E audio peripherals such as SSIU, SPDIF, SRC, DVC).
> +
> + First cell:
> bits[0:9] - Specifies the MID/RID or the REQ No value
> bit[10] - Specifies DMA request high enable (HIEN)
> bit[11] - Specifies DMA request detection type (LVL)
> bits[12:14] - Specifies DMAACK output mode (AM)
> bit[15] - Specifies Transfer Mode (TM)
>
> + Second cell (optional, when #dma-cells = <2>):
> + bits[6:0] - DMA acknowledge signal number (from ICU ACK table),
> + where 0 is a valid signal number.
> + Required for peripherals using level-based DMA
> + handshaking (SSIU, SPDIF, RSPI, SCU, ADC, PDM).
How do you expect this to work? #dma-cells applies to all DMA consumers
of this provider, and these SoCs already have DMA users relying on
#dma-cells being one.
In addition, you cannot have optional cells: if #dma-cells is two,
then all consumers must supply two cells (of course we could switch
all of them to two cells at once). However, as zero is a valid signal
number, we cannot use that as a dummy when no DMA acknowledge signal
number is needed (we could use e.g. 0xffffffff instead).
Is there any other way to provide this information?
E.g. could we have a table in the driver that contains this info for
the (presumably few) MID/RID values that need it?
> +
> dma-channels:
> const: 16
>
> @@ -212,6 +222,20 @@ allOf:
> - renesas,icu
> - resets
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g057-dmac
> + then:
> + properties:
> + '#dma-cells':
> + enum: [1, 2]
> + else:
> + properties:
> + '#dma-cells':
> + const: 1
> +
> - if:
> properties:
> compatible:
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