Skip to contentSkip to conversation

dmaengine: atcdmac300: Add Andes ATCDMAC300 DMA driver

PATCH Superseded CL Wang 2 participants 4 messages Oct 29, 2025

Subsystems (2)

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

CL Wang

author
#0 lore raw

v2 cover dmaengine: atcdmac300: Add Andes ATCDMAC300 DMA driver

This patch series adds support for the Andes ATCDMAC300 DMA controller. Please kindly review.

CL Wang (2):
dt-bindings: dmaengine: Add support for ATCDMAC300 DMA engine
dmaengine: atcdmac300: Add driver for Andes ATCDMAC300 DMA controller

 .../bindings/dma/andestech,qilai-dma.yaml     |   51 +
 MAINTAINERS                                   |    6 +
 drivers/dma/Kconfig                           |   12 +
 drivers/dma/Makefile                          |    1 +
 drivers/dma/atcdmac300.c                      | 1556 +++++++++++++++++
 drivers/dma/atcdmac300.h                      |  276 +++
 6 files changed, 1902 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/andestech,qilai-dma.yaml
 create mode 100644 drivers/dma/atcdmac300.c
 create mode 100644 drivers/dma/atcdmac300.h
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH v2 1/2 dt-bindings: dmaengine: Add support for ATCDMAC300 DMA engine

Document devicetree bindings for Andes ATCDMAC300 DMA engine

---
Changes for v2:
- Add platform-specific compatible string "andestech,qilai-dma" and remove "andestech,atcdmac300".

---
 .../bindings/dma/andestech,qilai-dma.yaml     | 51 +++++++++++++++++++
 MAINTAINERS                                   |  6 +++
 2 files changed, 57 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/andestech,qilai-dma.yaml
Documentation/devicetree/bindings/dma/andestech,qilai-dma.yaml new file +51 -0
new file mode 100644
index 000000000000..c7158e4f4639
@@ -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,qilai-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Andes ATCDMAC300 DMA Controller
+
+maintainers:
+  - CL Wang <[email protected]>
+
+allOf:
+  - $ref: dma-controller.yaml#
+
+properties:
+  compatible:
+    const: andestech,qilai-dma
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  "#dma-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#dma-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        dma-controller@f0c00000 {
+            compatible = "andestech,qilai-dma";
+            reg = <0x0 0xf0c00000 0x0 0x1000>;
+            interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
+            #dma-cells = <1>;
+        };
+    };
+...
MAINTAINERS +6 -0
index fe168477caa4..e0b9ef522139 100644
@@ -1778,6 +1778,12 @@ S:	Supported
 F:	drivers/clk/analogbits/*
 F:	include/linux/clk/analogbits*
 
+ANDES DMA DRIVER
+M:	CL Wang <[email protected]>
+S:	Supported
+F:	Documentation/devicetree/bindings/dma/andestech,qilai-dma.yaml
+F:	drivers/dma/atcdmac300*
+
 ANDROID DRIVERS
 M:	Greg Kroah-Hartman <[email protected]>
 M:	Arve Hjønnevåg <[email protected]>
Signature · 1 line
2.34.1
author
#3 lore raw

PATCH v2 2/2 dmaengine: atcdmac300: Add driver for Andes ATCDMAC300 DMA controller

In reply to CL Wang

This patch adds support for the Andes ATCDMAC300 DMA controller.

The ATCDMAC300 is a memory-to-memory and peripheral DMA controller that provides scatter-gather, cyclic, and slave transfer capabilities.

---
Changes for v2:
- Remove unused variable 'total_len' to address -Wunused-but-set-variable warnings.
- Add platform-specific compatible string "andestech,qilai-dma"

---
 drivers/dma/Kconfig      |   12 +
 drivers/dma/Makefile     |    1 +
 drivers/dma/atcdmac300.c | 1556 ++++++++++++++++++++++++++++++++++++++
 drivers/dma/atcdmac300.h |  276 +++++++
 4 files changed, 1845 insertions(+)
 create mode 100644 drivers/dma/atcdmac300.c
 create mode 100644 drivers/dma/atcdmac300.h
drivers/dma/Kconfig +12 -0
index b8a74b1798ba..383d492fd0dd 100644
@@ -100,6 +100,18 @@ config ARM_DMA350
 	help
 	  Enable support for the Arm DMA-350 controller.
 
+config DMA_ATCDMAC300
+	bool "Andes DMA support"
+	depends on ARCH_ANDES
+	depends on OF
+	select DMA_ENGINE
+	select DMATEST
+	help
+	  Enable support for the Andes ATCDMAC300 DMA controller.
+	  Select Y if your platform includes an ATCDMAC300 device that
+	  requires DMA engine support. This driver supports DMA_SLAVE,
+	  DMA_MEMCPY, and DMA_CYCLIC transfer modes.
+
 config AT_HDMAC
 	tristate "Atmel AHB DMA support"
 	depends on ARCH_AT91
drivers/dma/Makefile +1 -0
index a54d7688392b..6847d141ee48 100644
@@ -22,6 +22,7 @@ obj-$(CONFIG_AT_HDMAC) += at_hdmac.o
 obj-$(CONFIG_AT_XDMAC) += at_xdmac.o
 obj-$(CONFIG_AXI_DMAC) += dma-axi-dmac.o
 obj-$(CONFIG_BCM_SBA_RAID) += bcm-sba-raid.o
+obj-$(CONFIG_DMA_ATCDMAC300) += atcdmac300.o
 obj-$(CONFIG_DMA_BCM2835) += bcm2835-dma.o
 obj-$(CONFIG_DMA_JZ4780) += dma-jz4780.o
 obj-$(CONFIG_DMA_SA11X0) += sa11x0-dma.o
drivers/dma/atcdmac300.c new file +1556 -0

1,556 lines not on this page · raw message

drivers/dma/atcdmac300.h new file +276 -0

276 lines not on this page · raw message

Signature · 1 line
2.34.1