devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] dmaengine: mmp_pdma: Add SpacemiT K1 SoC support with 64-bit addressing
@ 2025-07-14  9:39 Guodong Xu
  2025-07-14  9:39 ` [PATCH v3 1/8] dt-bindings: dma: Add SpacemiT K1 PDMA controller Guodong Xu
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Guodong Xu @ 2025-07-14  9:39 UTC (permalink / raw)
  To: Vinod Koul, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Yixun Lan, Duje Mihanović, Philipp Zabel, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti
  Cc: Alex Elder, Vivian Wang, dmaengine, devicetree, linux-kernel,
	linux-riscv, spacemit, Guodong Xu

This patchset adds support for SpacemiT K1 PDMA controller to the existing
mmp_pdma driver. The K1 PDMA controller is compatible with Marvell MMP PDMA
but extends it with 64-bit addressing capabilities through LPAE (Long
Physical Address Extension) bit and higher 32-bit address registers (DDADRH,
DSADRH and DTADRH).

In v3, the major change is creating a separate yaml binding schema for
SpacemiT K1 PDMA, per Krzysztof's suggestion. By doing this, the binding
schema got simplified a lot. Deprecated property (ie. #dma-channels) and
unused values for backward compatibility (#dma-cells const 2) can be
removed.

Other changes involve placing pdma0 node in k1.dtsi and in board specific
dts files with proper ordering.

The patchset has been tested on BananaPi F3 board.

This patchset is based on SpacemiT linux (for-next) [1] with Patch 8
depending on:
- riscv: defconfig: run savedefconfig to reorder it
    It has been merged into riscv/linux.git (for-next)
    Link: https://git.kernel.org/riscv/c/d958097bdf88

[1] https://github.com/spacemit-com/linux.git (for-next)

All of these patches are available here:
https://github.com/docularxu/linux/tree/working_dma_0714_v3

Changes in v3:
- Created separated yaml binding for Spacemit K1 PDMA controller
- Updated pdma0 node properties according to the new yaml binding
- Put pdma0 node in k1.dtsi according to its device address
- Put pdma0 node in board dts files according to alphabetic order

Link to v2:
https://lore.kernel.org/r/20250701-working_dma_0701_v2-v2-0-ab6ee9171d26@riscstar.com

Changes in v2:
- Tag the series as "damengine".
- Used more specific compatible string "spacemit,k1-pdma"
- Enhanced DT bindings with conditional constraints:
   - clocks/resets properties only required for SpacemiT K1
   - #dma-cells set to 2 for marvell,pdma-1.0 and spacemit,k1-pdma
   - #dma-cells set to 1 for other variants
- Split mmp_pdma driver changes per maintainer feedback:
   - First patch (4/8) adds ops abstraction layer and 32-bit support
   - Second patch (5/8) adds K1-specific 64-bit support
- Merged Kconfig changes into the dmaengine: mmp_pdma driver patch (5/8)
- Enabled pdma0 on both BPI-F3 and Milk-V Jupiter

Link to v1:
https://lore.kernel.org/all/20250611125723.181711-1-guodong@riscstar.com/

Signed-off-by: Guodong Xu <guodong@riscstar.com>
---
Guodong Xu (8):
      dt-bindings: dma: Add SpacemiT K1 PDMA controller
      dmaengine: mmp_pdma: Add optional clock support
      dmaengine: mmp_pdma: Add optional reset controller support
      dmaengine: mmp_pdma: Add operations structure for controller abstraction
      dmaengine: mmp_pdma: Add SpacemiT K1 PDMA support with 64-bit addressing
      riscv: dts: spacemit: Add PDMA0 node for K1 SoC
      riscv: dts: spacemit: Enable PDMA0 on Banana Pi F3 and Milkv Jupiter
      riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC

 .../devicetree/bindings/dma/spacemit,k1-pdma.yaml  |  68 +++++
 arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts    |   4 +
 arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts  |   4 +
 arch/riscv/boot/dts/spacemit/k1.dtsi               |  11 +
 arch/riscv/configs/defconfig                       |   1 +
 drivers/dma/Kconfig                                |   2 +-
 drivers/dma/mmp_pdma.c                             | 281 ++++++++++++++++++---
 7 files changed, 339 insertions(+), 32 deletions(-)
---
base-commit: 6be7a5a768aafcb07d177bd2ae36ab84e4e0acde
change-id: 20250701-working_dma_0701_v2-7d2cf506aad7
prerequisite-change-id: 20250611-01-riscv-defconfig-7f90f73d283d:v1
prerequisite-patch-id: 53bda77e089023a09152a7d5403e1a738355c5d3

Best regards,
-- 
Guodong Xu <guodong@riscstar.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-08-15  0:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-14  9:39 [PATCH v3 0/8] dmaengine: mmp_pdma: Add SpacemiT K1 SoC support with 64-bit addressing Guodong Xu
2025-07-14  9:39 ` [PATCH v3 1/8] dt-bindings: dma: Add SpacemiT K1 PDMA controller Guodong Xu
2025-07-15  3:45   ` Rob Herring (Arm)
2025-08-15  0:27     ` Guodong Xu
2025-07-14  9:39 ` [PATCH v3 2/8] dmaengine: mmp_pdma: Add optional clock support Guodong Xu
2025-07-24 12:31   ` Yixun Lan
2025-08-15  0:16     ` Guodong Xu
2025-07-14  9:39 ` [PATCH v3 3/8] dmaengine: mmp_pdma: Add optional reset controller support Guodong Xu
2025-07-14  9:39 ` [PATCH v3 4/8] dmaengine: mmp_pdma: Add operations structure for controller abstraction Guodong Xu
2025-08-12  9:23   ` Guodong Xu
2025-07-14  9:39 ` [PATCH v3 5/8] dmaengine: mmp_pdma: Add SpacemiT K1 PDMA support with 64-bit addressing Guodong Xu
2025-07-14  9:39 ` [PATCH v3 6/8] riscv: dts: spacemit: Add PDMA0 node for K1 SoC Guodong Xu
2025-07-24 12:19   ` Yixun Lan
2025-08-15  0:26     ` Guodong Xu
2025-07-14  9:39 ` [PATCH v3 7/8] riscv: dts: spacemit: Enable PDMA0 on Banana Pi F3 and Milkv Jupiter Guodong Xu
2025-07-14  9:39 ` [PATCH v3 8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC Guodong Xu
2025-08-13  8:26 ` [PATCH v3 0/8] dmaengine: mmp_pdma: Add SpacemiT K1 SoC support with 64-bit addressing Troy Mitchell
2025-08-15  0:28   ` Guodong Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).