[PW_SID:970951] dma: mmp_pdma: Add SpacemiT K1 SoC support with 64-bit addressing#516
[PW_SID:970951] dma: mmp_pdma: Add SpacemiT K1 SoC support with 64-bit addressing#516linux-riscv-bot wants to merge 9 commits into
Conversation
Add "spacemit,pdma-1.0" compatible string to support SpacemiT PDMA controller in the Marvell MMP DMA device tree bindings. This enables: - Support for SpacemiT PDMA controller configuration - New optional properties for platform-specific integration: * clocks: Clock controller for the DMA * resets: Reset controller for the DMA Also, add explicit #dma-cells property definition to avoid "make dtbs_check W=3" warnings about unevaluated properties. The #dma-cells property is defined as 2 cells to maintain compatibility with existing ARM device trees. The first cell specifies the DMA request line number, while the second cell is currently unused by the driver but required for backward compatibility with PXA device tree files. Signed-off-by: Guodong Xu <guodong@riscstar.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add support for retrieving and enabling an optional clock using devm_clk_get_optional_enabled() during mmp_pdma_probe(). Signed-off-by: Guodong Xu <guodong@riscstar.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add support for hardware reset control in the MMP PDMA driver using the devm_reset_control_get_optional_exclusive_deasserted() API. The reset controller is retrieved without a specific reset name, allowing platforms to define a single default reset line for the PDMA controller. Signed-off-by: Guodong Xu <guodong@riscstar.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Extend the MMP PDMA driver to support SpacemiT PDMA controllers with 64-bit physical addressing capabilities, as used in the K1 SoC. This change introduces a flexible architecture that maintains compatibility with existing 32-bit Marvell platforms while adding 64-bit support. Key changes: - Add struct mmp_pdma_config to abstract platform-specific behaviors - Implement 64-bit address support through: * New high address registers (DDADRH, DSADRH, DTADRH) * DCSR_LPAEEN bit for Long Physical Address Extension mode * Helper functions for 32/64-bit address handling - Add "spacemit,pdma-1.0" compatible string with associated config - Extend descriptor structure to support 64-bit addresses - Refactor address handling code to be platform-agnostic - Add proper DMA mask configuration for both 32-bit and 64-bit modes The implementation uses a configuration-based approach to keeps all platform-specific code isolated in config structures. It maintains clean separation between 32-bit and 64-bit code paths, provides consistent API for both addressing modes and preserves backward compatibility. Signed-off-by: Guodong Xu <guodong@riscstar.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Reorganize the K1 SoC device tree to better reflect the hardware topology
by introducing a dedicated dma_bus node that groups devices sharing
the same address translation scheme. This change aligns with the actual
hardware organization where devices are physically connected to different
bus segments with different address translation characteristics.
The changes include:
- New dma_bus node with:
* DMA address translation ranges:
- First range: 0x0_00000000 -> 0x0_00000000 (size: 2GB)
- Second range: 0x1_00000000 -> 0x1_80000000 (size: 12GB)
* All UART devices moved under this bus to reflect their shared address
translation domain
- New PDMA controller node under dma_bus with:
* Base address and interrupt configuration
* Clock and reset controls
* 16 DMA channels
* Required DMA cell properties
The PDMA node is marked as disabled by default, allowing board-specific
device trees to enable it as needed.
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Enable the Peripheral DMA controller (PDMA0) on the SpacemiT K1-based Banana Pi F3 board by setting its status to "okay". This board-specific configuration activates the PDMA controller defined in the SoC's base device tree. Signed-off-by: Guodong Xu <guodong@riscstar.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Extend the MMP_PDMA driver to support the SpacemiT architecture by adding ARCH_SPACEMIT as a dependency in Kconfig. This allows the driver to be built for SpacemiT-based platforms alongside existing ARCH_MMP and ARCH_PXA architectures. Signed-off-by: Guodong Xu <guodong@riscstar.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Enable CONFIG_MMP_PDMA in the riscv defconfig for SpacemiT K1 SoC boards like the BananaPI-F3 (BPI-F3) and the Sipeed LicheePi 3A. According to make savedefconfig, the position of CONFIG_DWMAC_THEAD=m should be in another place. It was updated in this patch. CONFIG_DWMAC_THEAD was initially introduced into riscv defconfig in commit 0207244 ("riscv: defconfig: enable pinctrl and dwmac support for TH1520") Signed-off-by: Guodong Xu <guodong@riscstar.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 1: "[1/8] dt-bindings: dma: marvell,mmp-dma: Add SpacemiT PDMA compatibility" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 2: "[2/8] dma: mmp_pdma: Add optional clock support" |
|
Patch 6: "[6/8] riscv: dts: spacemit: Enable PDMA0 controller on Banana Pi F3" |
|
Patch 6: "[6/8] riscv: dts: spacemit: Enable PDMA0 controller on Banana Pi F3" |
|
Patch 6: "[6/8] riscv: dts: spacemit: Enable PDMA0 controller on Banana Pi F3" |
|
Patch 6: "[6/8] riscv: dts: spacemit: Enable PDMA0 controller on Banana Pi F3" |
|
Patch 6: "[6/8] riscv: dts: spacemit: Enable PDMA0 controller on Banana Pi F3" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 7: "[7/8] dma: Kconfig: MMP_PDMA: Add support for ARCH_SPACEMIT" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
|
Patch 8: "[8/8] riscv: defconfig: Enable MMP_PDMA support for SpacemiT K1 SoC" |
0b44c19 to
8023d1f
Compare
PR for series 970951 applied to workflow__riscv__fixes
Name: dma: mmp_pdma: Add SpacemiT K1 SoC support with 64-bit addressing
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=970951
Version: 1