[PATCH v4 0/5] dmaengine: sun6i-dma: Add support for Allwinner A733 DMA controller
From: Yuanshen Cao <hidden>
Date: 2026-08-26 01:30:23
Also in:
dmaengine, linux-devicetree, linux-sunxi, lkml
Hi everyone, This patch series introduces support for the Allwinner A733 DMA controller in the `sun6i-dma` driver. The A733 DMA controller differs from previous generations in several key ways: - Support for higher addresses (up to 32G). - A different interrupt register layout and mapping. - A different number of channels per interrupt register. To support these differences without introducing complex conditional logic throughout the driver, this series refactors the `sun6i_dma_config` structure by adding hardware-specific parameters such as interrupt register offsets, address masks, and channel counts per register. This allows the driver to support the A733 and future hardware revisions. This approach also achieves the same functionality as the DMA drivers in Radxa BSP Package[1]. The series is organized as follows: 1. Refactor the configuration structure for interrupt and register operations. 2. Add support for variable address widths using masks. 3. Add support for variable channels per interrupt register. 4. Update the device tree bindings documentation. 5. Implement the A733-specific configuration and register mappings. Tested on Radxa Cubie A7Z. [1] https://github.com/radxa/allwinner-bsp/blob/cubie-aiot-v1.4.8/drivers/dma/sunxi-dma.c Thanks! Signed-off-by: Yuanshen Cao <redacted> --- Changes in v4: - Refactor configuration structure to use irq stride and offsets instead of function pointers. - Use GENMASK and field_prep in set_addr for different high addresses. - Link to v3: https://patch.msgid.link/20260622-sun60i-a733-dma-v3-0-f697ef296cbc@gmail.com Changes in v3: - Reword patches for clarity. - Link to v2: https://patch.msgid.link/20260621-sun60i-a733-dma-v2-0-340f205891cc@gmail.com Changes in v2: - Implement SUN6I_DMA_IRQ_A31_COMMON_OPS macro to avoid duplicate. - Move set_addr into helper function and revert back sun6i_dma_set_addr. - Rename chan_num to irq_req to avoid misleading name as suggested by sashiko. - Reorder and reword the dtbinding patch for more clarity. - Link to v1: https://patch.msgid.link/20260619-sun60i-a733-dma-v1-0-da4b649fc72a@gmail.com To: Vinod Koul <vkoul@kernel.org> To: Frank Li <Frank.Li@kernel.org> To: Chen-Yu Tsai <wens@kernel.org> To: Jernej Skrabec <jernej.skrabec@gmail.com> To: Samuel Holland <samuel@sholland.org> To: Rob Herring <robh@kernel.org> To: Krzysztof Kozlowski <krzk+dt@kernel.org> To: Conor Dooley <conor+dt@kernel.org> To: Maxime Ripard <mripard@kernel.org> Cc: dmaengine@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org --- Yuanshen Cao (5): dmaengine: sun6i-dma: Refactor to support A733 interrupt and register handling dmaengine: sun6i-dma: Support variable address widths using masks dmaengine: sun6i-dma: Add num_channels_per_reg for flexible interrupt mapping dt-bindings: dmaengine: sun50i-a64-dma: Add allwinner,sun60i-a733-dma compatible string dmaengine: sun6i-dma: Add support for Allwinner A733 DMA controller .../bindings/dma/allwinner,sun50i-a64-dma.yaml | 2 + drivers/dma/sun6i-dma.c | 153 ++++++++++++++++----- 2 files changed, 122 insertions(+), 33 deletions(-) --- base-commit: 8d3ae59288f1e7d58d76558a6ee96d533bc5019f change-id: 20260619-sun60i-a733-dma-c2455149165d Best regards, -- Yuanshen Cao [off-list ref]