[PATCH v6 0/4] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC

Troy Mitchell posted 4 patches 1 week ago
.../devicetree/bindings/dma/spacemit,k1-pdma.yaml  |  4 ++-
arch/riscv/boot/dts/spacemit/k3.dtsi               | 11 +++++++
drivers/dma/mmp_pdma.c                             | 37 ++++++++++++++++++++--
3 files changed, 48 insertions(+), 4 deletions(-)
[PATCH v6 0/4] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC
Posted by Troy Mitchell 1 week ago
Hi all,

This patch series introduces Peripheral DMA (PDMA) support for the
SpacemiT K3 SoC, leveraging the existing mmp_pdma driver.

The K3 PDMA IP is largely based on the design found in the previous
SpacemiT K1 SoC, but introduces a few key architectural differences:
1. It features a variable extended DRCMR base address for DMA request
   numbers (>= 64) depending on the hardware implementation.
2. Unlike the K1 SoC, where some DMA masters had memory addressing
   limitations (requiring a dedicated dma-bus), the K3 DMA masters
   have full memory addressing capabilities.

The series is structured as follows:
- Patch 1: Introduce the necessary dt-bindings: K3 compatible string.
- Patch 2-3: Refactor the mmp_pdma driver to support variable extended
  DRCMR bases, and add the specific implementation/ops for the K3 SoC.
- Patch 4: Fixes a critical clock issue where the DDR bus clock
  (top_dclk) could be gated by CCF, which would cause DMA engines to
  hang and lead to system instability.
- Patch 5: Finally, instantiates the PDMA controller node in the
  SpacemiT K3 device tree.

---
Changes in v6:
- patch 2/4: rewrite commit message per Frank Li review (avoid "this patch",
  use imperative mood, update subject to better describe the refactoring)
- patch 3/4: rewrite commit message per Frank Li review (remove "This patch
  adds", use imperative mood)
- Link to v5: https://patch.msgid.link/20260507-k3-pdma-v5-0-6b9743038026@linux.spacemit.com

Changes in v5:
- drop patch 4/5 (has been merged)
- add Conor's tag
- Link to v4: https://lore.kernel.org/all/20260424-k3-pdma-v3-0-efdf2e414a08@linux.spacemit.com/

Changes in v4:
- patch 4/5:
  - add Brian's RB tag
- patch 1/5:
  - update commit message
Link to v3: https://lore.kernel.org/all/20260331-k3-pdma-v3-0-a4e60dd8b4b3@linux.spacemit.com/

Changes in v3:
- Removed the dt-bindings patches related to the DMA number.
- patch 1/5:
  - update commit message
- patch 2-5: nothing
- Link to v2: https://lore.kernel.org/r/20260326-k3-pdma-v2-0-ca94ca7bb595@linux.spacemit.com

Changes in v2:
- patch 1-6 are added in this version
- patch 7/7
  - update commit message
  - using k3 compatible string
  - Link to v1: https://lore.kernel.org/all/20260317-k3-pdma-v1-1-f39d3e97b53a@linux.spacemit.com/

To: Vinod Koul <vkoul@kernel.org>
To: Frank Li <Frank.Li@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Yixun Lan <dlan@kernel.org>
To: Guodong Xu <guodong@riscstar.com>
To: Paul Walmsley <pjw@kernel.org>
To: Palmer Dabbelt <palmer@dabbelt.com>
To: Albert Ou <aou@eecs.berkeley.edu>
To: Alexandre Ghiti <alex@ghiti.fr>
Cc: dmaengine@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Cc: spacemit@lists.linux.dev
Cc: linux-kernel@vger.kernel.org

---
Guodong Xu (3):
      dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string
      dmaengine: mmp_pdma: refactor DRCMR access with helper function
      dmaengine: mmp_pdma: add SpacemiT K3 support

Troy Mitchell (1):
      riscv: dts: spacemit: Add PDMA controller node for K3 SoC

 .../devicetree/bindings/dma/spacemit,k1-pdma.yaml  |  4 ++-
 arch/riscv/boot/dts/spacemit/k3.dtsi               | 11 +++++++
 drivers/dma/mmp_pdma.c                             | 37 ++++++++++++++++++++--
 3 files changed, 48 insertions(+), 4 deletions(-)
---
base-commit: 02f90981a67f3b9ee7d6684e7503a4fed7aade0c
change-id: 20260317-k3-pdma-7c1734431436

Best regards,
--  
Troy Mitchell <troy.mitchell@linux.spacemit.com>
Re: (subset) [PATCH v6 0/4] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC
Posted by Vinod Koul 5 days, 11 hours ago
On Mon, 18 May 2026 11:32:40 +0800, Troy Mitchell wrote:
> This patch series introduces Peripheral DMA (PDMA) support for the
> SpacemiT K3 SoC, leveraging the existing mmp_pdma driver.
> 
> The K3 PDMA IP is largely based on the design found in the previous
> SpacemiT K1 SoC, but introduces a few key architectural differences:
> 1. It features a variable extended DRCMR base address for DMA request
>    numbers (>= 64) depending on the hardware implementation.
> 2. Unlike the K1 SoC, where some DMA masters had memory addressing
>    limitations (requiring a dedicated dma-bus), the K3 DMA masters
>    have full memory addressing capabilities.
> 
> [...]

Applied, thanks!

[1/4] dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string
      commit: 55620b11186c81757b05fb8e2df9ddc7127d6fd2
[2/4] dmaengine: mmp_pdma: refactor DRCMR access with helper function
      commit: f46b47623e70dea8b03794a5420ffba060425e85
[3/4] dmaengine: mmp_pdma: add SpacemiT K3 support
      commit: 6587b8661a0b61c2f4b260bfc9f0e9ef9de0ea2e

Best regards,
-- 
~Vinod