Document devicetree bindings for Andes ATCDMAC300 DMA engine
Signed-off-by: CL Wang <cl634@andestech.com>
---
.../bindings/dma/andestech,atcdmac300.yaml | 51 +++++++++++++++++++
MAINTAINERS | 6 +++
2 files changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
diff --git a/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml b/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
new file mode 100644
index 000000000000..769694616517
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/andestech,atcdmac300.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Andes ATCDMAC300 DMA Controller
+
+maintainers:
+ - CL Wang <cl634@andestech.com>
+
+allOf:
+ - $ref: dma-controller.yaml#
+
+properties:
+ compatible:
+ const: andestech,atcdmac300
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ "#dma-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - "#dma-cells"
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ dma-controller@f0c00000 {
+ compatible = "andestech,atcdmac300";
+ reg = <0x0 0xf0c00000 0x0 0x1000>;
+ interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ };
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index fe168477caa4..dd3272cdadd6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1778,6 +1778,12 @@ S: Supported
F: drivers/clk/analogbits/*
F: include/linux/clk/analogbits*
+ANDES DMA DRIVER
+M: CL Wang <cl634@andestech.com>
+S: Supported
+F: Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
+F: drivers/dma/atcdmac300*
+
ANDROID DRIVERS
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M: Arve Hjønnevåg <arve@android.com>
--
2.34.1
On Thu, Oct 02, 2025 at 09:16:58PM +0800, CL Wang wrote:
> Document devicetree bindings for Andes ATCDMAC300 DMA engine
>
> Signed-off-by: CL Wang <cl634@andestech.com>
> ---
> .../bindings/dma/andestech,atcdmac300.yaml | 51 +++++++++++++++++++
> MAINTAINERS | 6 +++
> 2 files changed, 57 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
>
> diff --git a/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml b/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
> new file mode 100644
> index 000000000000..769694616517
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/andestech,atcdmac300.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Andes ATCDMAC300 DMA Controller
> +
> +maintainers:
> + - CL Wang <cl634@andestech.com>
> +
> +allOf:
> + - $ref: dma-controller.yaml#
> +
> +properties:
> + compatible:
> + const: andestech,atcdmac300
"atcdmac300" sounds like the name of an IP block. What platforms are
actually using this? They should have platform-specific compatibles, for
example, "andestech,qilai-dma" if that's the platform where this is
supported.
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + "#dma-cells":
> + const: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - "#dma-cells"
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + dma-controller@f0c00000 {
> + compatible = "andestech,atcdmac300";
> + reg = <0x0 0xf0c00000 0x0 0x1000>;
> + interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
> + #dma-cells = <1>;
> + };
> + };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index fe168477caa4..dd3272cdadd6 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1778,6 +1778,12 @@ S: Supported
> F: drivers/clk/analogbits/*
> F: include/linux/clk/analogbits*
>
> +ANDES DMA DRIVER
> +M: CL Wang <cl634@andestech.com>
> +S: Supported
> +F: Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
> +F: drivers/dma/atcdmac300*
> +
> ANDROID DRIVERS
> M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> M: Arve Hjønnevåg <arve@android.com>
> --
> 2.34.1
>
Hi Conor,
Thanks for your review.
Yes, the DMA driver supports the Qilai platform. I have updated the DTS binding as shown below.
Could you please take a look and let me know if anything still needs to be adjusted?
properties:
compatible:
- const: andestech,atcdmac300
+ oneOf:
+ - items:
+ - enum:
+ - andestech,qilai-dma
+ - const: andestech,atcdmac300
+ - const: andestech,atcdmac300
...
dma-controller@f0c00000 {
- compatible = "andestech,atcdmac300";
+ compatible = "andestech,qilai-dma", "andestech,atcdmac300";
Thank you again for your feedback.
Best regards,
CL
On Thu, Oct 02, 2025 at 07:40:35PM +0100, Conor Dooley wrote:
> [EXTERNAL MAIL]
> Date: Thu, 2 Oct 2025 19:40:35 +0100
> From: Conor Dooley <conor@kernel.org>
> To: CL Wang <cl634@andestech.com>
> Cc: vkoul@kernel.org, dmaengine@vger.kernel.org, robh@kernel.org,
> krzk+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org,
> linux-kernel@vger.kernel.org, tim609@andestech.com
> Subject: Re: [PATCH V1 1/2] dt-bindings: dmaengine: Add support for
> ATCDMAC300 DMA engine
>
> On Thu, Oct 02, 2025 at 09:16:58PM +0800, CL Wang wrote:
> > Document devicetree bindings for Andes ATCDMAC300 DMA engine
> >
> > Signed-off-by: CL Wang <cl634@andestech.com>
> > ---
> > .../bindings/dma/andestech,atcdmac300.yaml | 51 +++++++++++++++++++
> > MAINTAINERS | 6 +++
> > 2 files changed, 57 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml b/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
> > new file mode 100644
> > index 000000000000..769694616517
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
> > @@ -0,0 +1,51 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/dma/andestech,atcdmac300.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Andes ATCDMAC300 DMA Controller
> > +
> > +maintainers:
> > + - CL Wang <cl634@andestech.com>
> > +
> > +allOf:
> > + - $ref: dma-controller.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: andestech,atcdmac300
>
> "atcdmac300" sounds like the name of an IP block. What platforms are
> actually using this? They should have platform-specific compatibles, for
> example, "andestech,qilai-dma" if that's the platform where this is
> supported.
>
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + "#dma-cells":
> > + const: 1
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - "#dma-cells"
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > + soc {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > +
> > + dma-controller@f0c00000 {
> > + compatible = "andestech,atcdmac300";
> > + reg = <0x0 0xf0c00000 0x0 0x1000>;
> > + interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
> > + #dma-cells = <1>;
> > + };
> > + };
> > +...
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index fe168477caa4..dd3272cdadd6 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -1778,6 +1778,12 @@ S: Supported
> > F: drivers/clk/analogbits/*
> > F: include/linux/clk/analogbits*
> >
> > +ANDES DMA DRIVER
> > +M: CL Wang <cl634@andestech.com>
> > +S: Supported
> > +F: Documentation/devicetree/bindings/dma/andestech,atcdmac300.yaml
> > +F: drivers/dma/atcdmac300*
> > +
> > ANDROID DRIVERS
> > M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > M: Arve Hjønnevåg <arve@android.com>
> > --
> > 2.34.1
> >
On 07/10/2025 21:33, CL Wang wrote:
> Hi Conor,
>
> Thanks for your review.
>
> Yes, the DMA driver supports the Qilai platform. I have updated the DTS binding as shown below.
> Could you please take a look and let me know if anything still needs to be adjusted?
>
> properties:
> compatible:
> - const: andestech,atcdmac300
> + oneOf:
> + - items:
> + - enum:
> + - andestech,qilai-dma
> + - const: andestech,atcdmac300
> + - const: andestech,atcdmac300
> ...
> dma-controller@f0c00000 {
> - compatible = "andestech,atcdmac300";
> + compatible = "andestech,qilai-dma", "andestech,atcdmac300";
What is "atcdmac300" then? Usually the recommendation is to go only with
soc-based compatibles, not IP blocks. See also:
https://elixir.bootlin.com/linux/v6.17.1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42
Best regards,
Krzysztof
Hi Krzysztof,
Thank you for pointing this out.
"ATCDMAC300" is the IP block name of the DMA controller used in Andes SoC.
According to your suggestion, I have updated the binding to use SoC-specific
compatibles with "andestech,atcdmac300" as a fallback, as shown below:
- const: andestech,atcdmac300
+ items:
+ - enum:
+ - andestech,qilai-dma
+ - const: andestech,atcdmac300
...
dma-controller@f0c00000 {
- compatible = "andestech,atcdmac300";
+ compatible = "andestech,qilai-dma", "andestech,atcdmac300";
Does this look aligned with the recommended DeviceTree binding convention?
Thanks again for your detailed feedback.
Best regards,
CL
On Tue, Oct 07, 2025 at 11:27:12PM +0900, Krzysztof Kozlowski wrote:
> [EXTERNAL MAIL]
>
> On 07/10/2025 21:33, CL Wang wrote:
> > Hi Conor,
> >
> > Thanks for your review.
> >
> > Yes, the DMA driver supports the Qilai platform. I have updated the DTS binding as shown below.
> > Could you please take a look and let me know if anything still needs to be adjusted?
> >
> > properties:
> > compatible:
> > - const: andestech,atcdmac300
> > + oneOf:
> > + - items:
> > + - enum:
> > + - andestech,qilai-dma
> > + - const: andestech,atcdmac300
> > + - const: andestech,atcdmac300
> > ...
> > dma-controller@f0c00000 {
> > - compatible = "andestech,atcdmac300";
> > + compatible = "andestech,qilai-dma", "andestech,atcdmac300";
>
> What is "atcdmac300" then? Usually the recommendation is to go only with
> soc-based compatibles, not IP blocks. See also:
>
> https://elixir.bootlin.com/linux/v6.17.1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42
>
> Best regards,
> Krzysztof
On 08/10/2025 12:13, CL Wang wrote:
> Hi Krzysztof,
>
> Thank you for pointing this out.
>
> "ATCDMAC300" is the IP block name of the DMA controller used in Andes SoC.
> According to your suggestion, I have updated the binding to use SoC-specific
> compatibles with "andestech,atcdmac300" as a fallback, as shown below:
>
> - const: andestech,atcdmac300
> + items:
> + - enum:
> + - andestech,qilai-dma
> + - const: andestech,atcdmac300
> ...
> dma-controller@f0c00000 {
> - compatible = "andestech,atcdmac300";
> + compatible = "andestech,qilai-dma", "andestech,atcdmac300";
That's exactly the same code as you pasted before. Please do not repeat
the same as argument to my comment.
Best regards,
Krzysztof
© 2016 - 2026 Red Hat, Inc.