[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250701-working_dma_0701_v2-v2-0-ab6ee9171d26@riscstar.com>
Date: Tue, 01 Jul 2025 13:36:54 +0800
From: Guodong Xu <guodong@...cstar.com>
To: Vinod Koul <vkoul@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Yixun Lan <dlan@...too.org>,
Duje Mihanović <duje.mihanovic@...le.hr>,
Philipp Zabel <p.zabel@...gutronix.de>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alex@...ti.fr>
Cc: Alex Elder <elder@...cstar.com>, Vivian Wang <wangruikang@...as.ac.cn>,
dmaengine@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
spacemit@...ts.linux.dev, Guodong Xu <guodong@...cstar.com>
Subject: [PATCH v2 0/8] dmaengine: mmp_pdma: Add SpacemiT K1 SoC support
with 64-bit addressing
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 v2, the major update is, per Vinod's feedback, splitting mmp_pdma driver
changes into two parts:
- First patch adds _ops abstraction layer and implements 32-bit support
- Second patch adds K1-specific 64-bit support
The patchset has been tested on BananaPi F3 board.
Patch 1, 2, 3, 4 and 5 belong to dmaengine, and has no extra dependencies.
Patch 6, 7 and 8 change SpacemiT K1 device tree and RISC-V defconfig. They
have the following dependencies:
1. 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
2. riscv: dts: spacemit: Add DMA translation buses for K1
It is currently under review.
Link: https://lore.kernel.org/all/20250623-k1-dma-buses-rfc-wip-v1-0-c0144082061f@iscas.ac.cn/
To verify the PDMA functionality on SpacemiT K1, it is required to apply
the following patchsets in order:
1. [PATCH v3] clk: spacemit: mark K1 pll1_d8 as critical
Link: https://lore.kernel.org/all/20250612224856.1105924-1-elder@riscstar.com/
2. [PATCH v11 0/6] reset: spacemit: add K1 reset support
Link: https://lore.kernel.org/all/20250613011139.1201702-1-elder@riscstar.com/
All of these patches are available here:
https://github.com/docularxu/linux/tree/working_dma_0701_v2
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@...cstar.com>
---
Guodong Xu (8):
dt-bindings: dma: marvell,mmp-dma: Add SpacemiT K1 PDMA support
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/marvell,mmp-dma.yaml | 49 ++++
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, 320 insertions(+), 32 deletions(-)
---
base-commit: 7204503c922cfdb4fcfce4a4ab61f4558a01a73b
change-id: 20250701-working_dma_0701_v2-7d2cf506aad7
prerequisite-change-id: 20250611-01-riscv-defconfig-7f90f73d283d:v1
prerequisite-patch-id: 53bda77e089023a09152a7d5403e1a738355c5d3
prerequisite-message-id: <20250612224856.1105924-1-elder@...cstar.com>
prerequisite-patch-id: 0c2a226feb2b3e7a2f090a4f10325ff9f709f6e2
prerequisite-change-id: 20250522-22-k1-sdhci-95c759a876b5:v1
prerequisite-patch-id: 53fc23b06e26ab0ebb2c52ee09f4b2cffab889e2
prerequisite-message-id: <20250623-k1-dma-buses-rfc-wip-v1-0-c0144082061f@...as.ac.cn>
prerequisite-patch-id: 7f04dcf6f82a9a9fa3a8a78ae4992571f85eb6ca
prerequisite-patch-id: 291c9bcd2ce688e08a8ab57c6d274a57cac6b33c
prerequisite-patch-id: 957d7285e8d2a7698beb0c25cb0f6ea733246af0
prerequisite-patch-id: 2c73c63bef3640e63243ddcf3c07b108d45f6816
prerequisite-patch-id: 0faba75db33c96a588e722c4f2b3862c4cbdaeae
prerequisite-patch-id: 5db8688ef86188ec091145fae9e14b2211cd2b8c
prerequisite-patch-id: e0fe84381637dc888d996a79ea717ff0e3441bd1
prerequisite-patch-id: 2fc0ef1c2fcda92ad83400da5aadaf194fe78627
Best regards,
--
Guodong Xu <guodong@...cstar.com>
Powered by blists - more mailing lists