Re: [PATCH 1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility

Conor Dooley
2025-06-11T16:27:17Z

[-- Attachment #1: Type: text/plain, Size: 2548 bytes --]

On Wed, Jun 11, 2025 at 08:57:16PM +0800, Guodong Xu wrote:
> Add "spacemit,pdma-1.0" compatible string to support SpacemiT PDMA
> controller in the Marvell MMP DMA device tree bindings. This enables:
>
> - Support for SpacemiT PDMA controller configuration
> - New optional properties for platform-specific integration:
> * clocks: Clock controller for the DMA
> * resets: Reset controller for the DMA
>
> Also, add explicit #dma-cells property definition to avoid
> "make dtbs_check W=3" warnings about unevaluated properties.
>
> The #dma-cells property is defined as 2 cells to maintain compatibility
> with existing ARM device trees. The first cell specifies the DMA request
> line number, while the second cell is currently unused by the driver but
> required for backward compatibility with PXA device tree files.
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> ---
> .../bindings/dma/marvell,mmp-dma.yaml | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/dma/marvell,mmp-dma.yaml b/Documentation/devicetree/bindings/dma/marvell,mmp-dma.yaml
> index d447d5207be0..e117a81414bd 100644
> --- a/Documentation/devicetree/bindings/dma/marvell,mmp-dma.yaml
> +++ b/Documentation/devicetree/bindings/dma/marvell,mmp-dma.yaml
> @@ -18,6 +18,7 @@ properties:
> - marvell,pdma-1.0
> - marvell,adma-1.0
> - marvell,pxa910-squ
> + - spacemit,pdma-1.0

You need a soc-specific compatible here.

>
> reg:
> maxItems: 1
> @@ -32,6 +33,21 @@ properties:
> A phandle to the SRAM pool
> $ref: /schemas/types.yaml#/definitions/phandle
>
> + clocks:
> + description: Clock for the controller
> + maxItems: 1
> +
> + resets:
> + description: Reset controller for the DMA controller
> + maxItems: 1
> +
> + '#dma-cells':
> + const: 2
> + description:
> + The first cell contains the DMA request number for the peripheral
> + device. The second cell is currently unused but must be present for
> + backward compatibility.

These properties are only valid for your new device, right?
If so, please restrict them to only the spacemit platform.

> +
> '#dma-channels':
> deprecated: true
>
> @@ -52,6 +68,7 @@ allOf:
> contains:
> enum:
> - marvell,pdma-1.0
> + - spacemit,pdma-1.0
> then:
> properties:
> asram: false
> --
> 2.43.0
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]