On Mon, Dec 08, 2025 at 09:57:43AM +0800, Khairul Anuar Romli wrote:
> Add '#address-cells' and '#size-cells' to resolved the dt-schema build
> build issue when dma-ranges is presence. Without address-cells and
> size-cells presence in DT, kernel panic is observed due to of_base driver
> treats address-cells as two and size-cells as one.
Why are you fixing a problem the previous patch created?
Thinking about this some more, really 'dma-ranges' is supposed to be in
a bus node, not the device node. So you should probably move the dma
controllers down a level adding another simple-bus node with dma-ranges.
Then you only need to add the new compatible.
>
> Defining these cells explicitly ensures the binding correctly documents the
> necessary structure for nodes that describe the DMA-accessible memory
> space.
>
> The supported enumeration for both properties is [1, 2], accommodating both
> 32-bit and 64-bit address/size representations.
>
> Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@altera.com>
> ---
> Changes in v2:
> - Add address-cells and size-cells patch into the series
> ---
> .../devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
> index 1a1800d9b544..2b542ff9a6cd 100644
> --- a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
> +++ b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
> @@ -33,6 +33,16 @@ properties:
> - description: Address range of the DMAC registers
> - description: Address range of the DMAC APB registers
>
> + '#address-cells':
> + description: The number of cells used to represent physical base address
> + in the host address space.
> + enum: [1, 2]
> +
> + '#size-cells':
> + description: The number of cells used to represent the size of an address
> + range in the host address space.
> + enum: [1, 2]
> +
> reg-names:
> items:
> - const: axidma_ctrl_regs
> --
> 2.43.7
>