* [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC
@ 2026-03-26 8:17 Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions Troy Mitchell
` (6 more replies)
0 siblings, 7 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-26 8:17 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd
Cc: devicetree, linux-riscv, spacemit, linux-kernel, dmaengine,
linux-clk, Troy Mitchell, liyeshan
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-3: Introduce the necessary dt-bindings, including DMA request
definitions for both K1 and K3, and the new K3 compatible string.
- Patch 4-5: Refactor the mmp_pdma driver to support variable extended
DRCMR bases, and add the specific implementation/ops for the K3 SoC.
- Patch 6: 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 7: Finally, instantiates the PDMA controller node in the
SpacemiT K3 device tree.
---
Guodong Xu (4):
dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions
dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string
dmaengine: mmp_pdma: support variable extended DRCMR base
dmaengine: mmp_pdma: add Spacemit K3 support
Troy Mitchell (2):
clk: spacemit: k3: mark top_dclk as CLK_IS_CRITICAL
riscv: dts: spacemit: Add PDMA controller node for K3 SoC
liyeshan (1):
dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions
.../devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +-
arch/riscv/boot/dts/spacemit/k3.dtsi | 11 +++
drivers/clk/spacemit/ccu-k3.c | 2 +-
drivers/dma/mmp_pdma.c | 37 +++++++++-
include/dt-bindings/dma/k1-pdma.h | 56 +++++++++++++++
include/dt-bindings/dma/k3-pdma.h | 83 ++++++++++++++++++++++
6 files changed, 188 insertions(+), 5 deletions(-)
---
base-commit: 02f90981a67f3b9ee7d6684e7503a4fed7aade0c
change-id: 20260317-k3-pdma-7c1734431436
Best regards,
--
Troy Mitchell <troy.mitchell@linux.spacemit.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions
2026-03-26 8:17 [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC Troy Mitchell
@ 2026-03-26 8:17 ` Troy Mitchell
2026-03-27 7:27 ` Krzysztof Kozlowski
2026-03-27 7:28 ` Krzysztof Kozlowski
2026-03-26 8:17 ` [PATCH v2 2/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string Troy Mitchell
` (5 subsequent siblings)
6 siblings, 2 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-26 8:17 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd
Cc: devicetree, linux-riscv, spacemit, linux-kernel, dmaengine,
linux-clk, Troy Mitchell
From: Guodong Xu <guodong@riscstar.com>
Add the DMA request numbers for non-secure peripherals of the K1 SoC
from SpacemiT.
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
include/dt-bindings/dma/k1-pdma.h | 56 +++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/include/dt-bindings/dma/k1-pdma.h b/include/dt-bindings/dma/k1-pdma.h
new file mode 100644
index 000000000000..061748c177dc
--- /dev/null
+++ b/include/dt-bindings/dma/k1-pdma.h
@@ -0,0 +1,56 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * This header provides DMA request number for non-secure peripherals of
+ * SpacemiT K1 PDMA.
+ *
+ * Copyright (c) 2025 Guodong Xu <guodong@riscstar.com>
+ */
+
+#ifndef __DT_BINDINGS_DMA_K1_PDMA_H__
+#define __DT_BINDINGS_DMA_K1_PDMA_H__
+
+#define K1_PDMA_UART0_TX 3
+#define K1_PDMA_UART0_RX 4
+#define K1_PDMA_UART2_TX 5
+#define K1_PDMA_UART2_RX 6
+#define K1_PDMA_UART3_TX 7
+#define K1_PDMA_UART3_RX 8
+#define K1_PDMA_UART4_TX 9
+#define K1_PDMA_UART4_RX 10
+#define K1_PDMA_I2C0_TX 11
+#define K1_PDMA_I2C0_RX 12
+#define K1_PDMA_I2C1_TX 13
+#define K1_PDMA_I2C1_RX 14
+#define K1_PDMA_I2C2_TX 15
+#define K1_PDMA_I2C2_RX 16
+#define K1_PDMA_I2C4_TX 17
+#define K1_PDMA_I2C4_RX 18
+#define K1_PDMA_SPI3_TX 19
+#define K1_PDMA_SPI3_RX 20
+#define K1_PDMA_I2S0_TX 21
+#define K1_PDMA_I2S0_RX 22
+#define K1_PDMA_I2S1_TX 23
+#define K1_PDMA_I2S1_RX 24
+#define K1_PDMA_UART5_TX 25
+#define K1_PDMA_UART5_RX 26
+#define K1_PDMA_UART6_TX 27
+#define K1_PDMA_UART6_RX 28
+#define K1_PDMA_UART7_TX 29
+#define K1_PDMA_UART7_RX 30
+#define K1_PDMA_UART8_TX 31
+#define K1_PDMA_UART8_RX 32
+#define K1_PDMA_UART9_TX 33
+#define K1_PDMA_UART9_RX 34
+#define K1_PDMA_I2C5_TX 35
+#define K1_PDMA_I2C5_RX 36
+#define K1_PDMA_I2C6_TX 37
+#define K1_PDMA_I2C6_RX 38
+#define K1_PDMA_I2C7_TX 39
+#define K1_PDMA_I2C7_RX 40
+#define K1_PDMA_I2C8_TX 41
+#define K1_PDMA_I2C8_RX 42
+#define K1_PDMA_CAN0_RX 43
+#define K1_PDMA_QSPI_RX 44
+#define K1_PDMA_QSPI_TX 45
+
+#endif /* __DT_BINDINGS_DMA_K1_PDMA_H__ */
--
2.53.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 2/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string
2026-03-26 8:17 [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions Troy Mitchell
@ 2026-03-26 8:17 ` Troy Mitchell
2026-03-26 18:34 ` Conor Dooley
2026-03-26 8:17 ` [PATCH v2 3/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions Troy Mitchell
` (4 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Troy Mitchell @ 2026-03-26 8:17 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd
Cc: devicetree, linux-riscv, spacemit, linux-kernel, dmaengine,
linux-clk, Troy Mitchell
From: Guodong Xu <guodong@riscstar.com>
Add k3 compatible string.
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
index ec06235baf5c..62ce6d81526b 100644
--- a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
+++ b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
@@ -14,7 +14,9 @@ allOf:
properties:
compatible:
- const: spacemit,k1-pdma
+ enum:
+ - spacemit,k1-pdma
+ - spacemit,k3-pdma
reg:
maxItems: 1
--
2.53.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 3/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions
2026-03-26 8:17 [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 2/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string Troy Mitchell
@ 2026-03-26 8:17 ` Troy Mitchell
2026-03-27 7:30 ` Krzysztof Kozlowski
2026-03-26 8:17 ` [PATCH v2 4/7] dmaengine: mmp_pdma: support variable extended DRCMR base Troy Mitchell
` (3 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Troy Mitchell @ 2026-03-26 8:17 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd
Cc: devicetree, linux-riscv, spacemit, linux-kernel, dmaengine,
linux-clk, liyeshan, Troy Mitchell
From: liyeshan <yeshan.li@spacemit.com>
Add device tree binding header for SpacemiT k3 DMA request numbers. This
defines the DMA request mapping for non-secure peripherals including UART,
I2C, SSP/SPI, CAN, and QSPI.
Signed-off-by: liyeshan <yeshan.li@spacemit.com>
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
include/dt-bindings/dma/k3-pdma.h | 83 +++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/include/dt-bindings/dma/k3-pdma.h b/include/dt-bindings/dma/k3-pdma.h
new file mode 100644
index 000000000000..05541a9a9973
--- /dev/null
+++ b/include/dt-bindings/dma/k3-pdma.h
@@ -0,0 +1,83 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * This header provides DMA request number for non-secure peripherals of
+ * SpacemiT K3 PDMA.
+ *
+ * Copyright (c) 2025 SpacemiT
+ * Copyright (c) 2025 Guodong Xu <guodong@riscstar.com>
+ */
+
+#ifndef __DT_BINDINGS_DMA_K3_PDMA_H__
+#define __DT_BINDINGS_DMA_K3_PDMA_H__
+
+/* UART DMA request numbers */
+#define K3_PDMA_UART0_TX 3
+#define K3_PDMA_UART0_RX 4
+#define K3_PDMA_UART2_TX 5
+#define K3_PDMA_UART2_RX 6
+#define K3_PDMA_UART3_TX 7
+#define K3_PDMA_UART3_RX 8
+#define K3_PDMA_UART4_TX 9
+#define K3_PDMA_UART4_RX 10
+#define K3_PDMA_UART5_TX 25
+#define K3_PDMA_UART5_RX 26
+#define K3_PDMA_UART6_TX 27
+#define K3_PDMA_UART6_RX 28
+#define K3_PDMA_UART7_TX 29
+#define K3_PDMA_UART7_RX 30
+#define K3_PDMA_UART8_TX 31
+#define K3_PDMA_UART8_RX 32
+#define K3_PDMA_UART9_TX 33
+#define K3_PDMA_UART9_RX 34
+#define K3_PDMA_UART10_TX 53
+#define K3_PDMA_UART10_RX 54
+
+/* I2C DMA request numbers */
+#define K3_PDMA_I2C0_TX 11
+#define K3_PDMA_I2C0_RX 12
+#define K3_PDMA_I2C1_TX 13
+#define K3_PDMA_I2C1_RX 14
+#define K3_PDMA_I2C2_TX 15
+#define K3_PDMA_I2C2_RX 16
+#define K3_PDMA_I2C4_TX 17
+#define K3_PDMA_I2C4_RX 18
+#define K3_PDMA_I2C5_TX 35
+#define K3_PDMA_I2C5_RX 36
+#define K3_PDMA_I2C6_TX 37
+#define K3_PDMA_I2C6_RX 38
+#define K3_PDMA_I2C8_TX 41
+#define K3_PDMA_I2C8_RX 42
+
+/* SSP/SPI DMA request numbers */
+#define K3_PDMA_SSP3_TX 19
+#define K3_PDMA_SSP3_RX 20
+#define K3_PDMA_SSPA0_TX 21
+#define K3_PDMA_SSPA0_RX 22
+#define K3_PDMA_SSPA1_TX 23
+#define K3_PDMA_SSPA1_RX 24
+#define K3_PDMA_SSPA2_TX 56
+#define K3_PDMA_SSPA2_RX 57
+#define K3_PDMA_SSPA3_TX 58
+#define K3_PDMA_SSPA3_RX 59
+#define K3_PDMA_SSPA4_TX 60
+#define K3_PDMA_SSPA4_RX 61
+#define K3_PDMA_SSPA5_TX 62
+#define K3_PDMA_SSPA5_RX 63
+
+/* CAN DMA request numbers */
+#define K3_PDMA_CAN0_RX 43
+#define K3_PDMA_CAN1_RX 44
+#define K3_PDMA_CAN2_RX 51
+#define K3_PDMA_CAN3_RX 52
+
+/* SSP0/1 DMA request numbers */
+#define K3_PDMA_SSP0_TX 64
+#define K3_PDMA_SSP0_RX 65
+#define K3_PDMA_SSP1_TX 66
+#define K3_PDMA_SSP1_RX 67
+
+/* QSPI DMA request numbers */
+#define K3_PDMA_QSPI_RX 84
+#define K3_PDMA_QSPI_TX 85
+
+#endif /* __DT_BINDINGS_DMA_K3_PDMA_H__ */
--
2.53.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 4/7] dmaengine: mmp_pdma: support variable extended DRCMR base
2026-03-26 8:17 [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC Troy Mitchell
` (2 preceding siblings ...)
2026-03-26 8:17 ` [PATCH v2 3/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions Troy Mitchell
@ 2026-03-26 8:17 ` Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 5/7] dmaengine: mmp_pdma: add Spacemit K3 support Troy Mitchell
` (2 subsequent siblings)
6 siblings, 0 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-26 8:17 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd
Cc: devicetree, linux-riscv, spacemit, linux-kernel, dmaengine,
linux-clk, Troy Mitchell
From: Guodong Xu <guodong@riscstar.com>
DRCMR base address for extended DMA request numbers (which means bigger
or equal to 64) varies in different PMDA hardware implementation.
One such different PDMA implementation is found in SpacemiT's K3. In
this patch is for preparation the adding of K3 PDMA support.
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
drivers/dma/mmp_pdma.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index d12e729ee12c..6112369006ee 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -51,7 +51,9 @@
#define DCSR_CMPST BIT(10) /* The Descriptor Compare Status */
#define DCSR_EORINTR BIT(9) /* The end of Receive */
-#define DRCMR(n) ((((n) < 64) ? 0x0100 : 0x1100) + (((n) & 0x3f) << 2))
+#define DRCMR_BASE 0x0100
+#define DRCMR_EXT_BASE_DEFAULT 0x1100
+#define DRCMR_REQ_LIMIT 64
#define DRCMR_MAPVLD BIT(7) /* Map Valid (read / write) */
#define DRCMR_CHLNUM 0x1f /* mask for Channel Number (read / write) */
@@ -154,6 +156,7 @@ struct mmp_pdma_phy {
* @run_bits: Control bits in DCSR register for channel start/stop
* @dma_width: DMA addressing width in bits (32 or 64). Determines the
* DMA mask capability of the controller hardware.
+ * @drcmr_ext_base: Base DRCMR address for extended requests
*/
struct mmp_pdma_ops {
/* Hardware Register Operations */
@@ -174,6 +177,7 @@ struct mmp_pdma_ops {
/* Controller Configuration */
u32 run_bits;
u32 dma_width;
+ u32 drcmr_ext_base;
};
struct mmp_pdma_device {
@@ -195,6 +199,13 @@ struct mmp_pdma_device {
#define to_mmp_pdma_dev(dmadev) \
container_of(dmadev, struct mmp_pdma_device, device)
+static u32 mmp_pdma_get_drcmr(struct mmp_pdma_device *pdev, u32 drcmr)
+{
+ if (drcmr < DRCMR_REQ_LIMIT)
+ return DRCMR_BASE + (drcmr << 2);
+ return pdev->ops->drcmr_ext_base + ((drcmr - DRCMR_REQ_LIMIT) << 2);
+}
+
/* For 32-bit PDMA */
static void write_next_addr_32(struct mmp_pdma_phy *phy, dma_addr_t addr)
{
@@ -301,7 +312,7 @@ static void enable_chan(struct mmp_pdma_phy *phy)
pdev = to_mmp_pdma_dev(phy->vchan->chan.device);
- reg = DRCMR(phy->vchan->drcmr);
+ reg = mmp_pdma_get_drcmr(pdev, phy->vchan->drcmr);
writel(DRCMR_MAPVLD | phy->idx, phy->base + reg);
dalgn = readl(phy->base + DALGN);
@@ -437,7 +448,7 @@ static void mmp_pdma_free_phy(struct mmp_pdma_chan *pchan)
return;
/* clear the channel mapping in DRCMR */
- reg = DRCMR(pchan->drcmr);
+ reg = mmp_pdma_get_drcmr(pdev, pchan->drcmr);
writel(0, pchan->phy->base + reg);
spin_lock_irqsave(&pdev->phy_lock, flags);
@@ -1179,6 +1190,7 @@ static const struct mmp_pdma_ops marvell_pdma_v1_ops = {
.get_desc_dst_addr = get_desc_dst_addr_32,
.run_bits = (DCSR_RUN),
.dma_width = 32,
+ .drcmr_ext_base = DRCMR_EXT_BASE_DEFAULT,
};
static const struct mmp_pdma_ops spacemit_k1_pdma_ops = {
@@ -1192,6 +1204,7 @@ static const struct mmp_pdma_ops spacemit_k1_pdma_ops = {
.get_desc_dst_addr = get_desc_dst_addr_64,
.run_bits = (DCSR_RUN | DCSR_LPAEEN),
.dma_width = 64,
+ .drcmr_ext_base = DRCMR_EXT_BASE_DEFAULT,
};
static const struct of_device_id mmp_pdma_dt_ids[] = {
--
2.53.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 5/7] dmaengine: mmp_pdma: add Spacemit K3 support
2026-03-26 8:17 [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC Troy Mitchell
` (3 preceding siblings ...)
2026-03-26 8:17 ` [PATCH v2 4/7] dmaengine: mmp_pdma: support variable extended DRCMR base Troy Mitchell
@ 2026-03-26 8:17 ` Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 6/7] clk: spacemit: k3: mark top_dclk as CLK_IS_CRITICAL Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 7/7] riscv: dts: spacemit: Add PDMA controller node for K3 SoC Troy Mitchell
6 siblings, 0 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-26 8:17 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd
Cc: devicetree, linux-riscv, spacemit, linux-kernel, dmaengine,
linux-clk, Troy Mitchell
From: Guodong Xu <guodong@riscstar.com>
SpacemiT K3 reuses most of the PDMA IP design found on K1, with one difference
being the extended DRCMR base address. This patch adds "spacemit,k3-pdma"
compatible string and it defines a new mmp_pdma_ops for k3 pdma.
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
drivers/dma/mmp_pdma.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index 6112369006ee..386e85cd4882 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -52,6 +52,7 @@
#define DCSR_EORINTR BIT(9) /* The end of Receive */
#define DRCMR_BASE 0x0100
+#define DRCMR_EXT_BASE_K3 0x1000
#define DRCMR_EXT_BASE_DEFAULT 0x1100
#define DRCMR_REQ_LIMIT 64
#define DRCMR_MAPVLD BIT(7) /* Map Valid (read / write) */
@@ -1207,6 +1208,20 @@ static const struct mmp_pdma_ops spacemit_k1_pdma_ops = {
.drcmr_ext_base = DRCMR_EXT_BASE_DEFAULT,
};
+static const struct mmp_pdma_ops spacemit_k3_pdma_ops = {
+ .write_next_addr = write_next_addr_64,
+ .read_src_addr = read_src_addr_64,
+ .read_dst_addr = read_dst_addr_64,
+ .set_desc_next_addr = set_desc_next_addr_64,
+ .set_desc_src_addr = set_desc_src_addr_64,
+ .set_desc_dst_addr = set_desc_dst_addr_64,
+ .get_desc_src_addr = get_desc_src_addr_64,
+ .get_desc_dst_addr = get_desc_dst_addr_64,
+ .run_bits = (DCSR_RUN | DCSR_LPAEEN | DCSR_EORIRQEN | DCSR_EORSTOPEN),
+ .dma_width = 64,
+ .drcmr_ext_base = DRCMR_EXT_BASE_K3,
+};
+
static const struct of_device_id mmp_pdma_dt_ids[] = {
{
.compatible = "marvell,pdma-1.0",
@@ -1214,6 +1229,9 @@ static const struct of_device_id mmp_pdma_dt_ids[] = {
}, {
.compatible = "spacemit,k1-pdma",
.data = &spacemit_k1_pdma_ops
+ }, {
+ .compatible = "spacemit,k3-pdma",
+ .data = &spacemit_k3_pdma_ops
}, {
/* sentinel */
}
--
2.53.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 6/7] clk: spacemit: k3: mark top_dclk as CLK_IS_CRITICAL
2026-03-26 8:17 [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC Troy Mitchell
` (4 preceding siblings ...)
2026-03-26 8:17 ` [PATCH v2 5/7] dmaengine: mmp_pdma: add Spacemit K3 support Troy Mitchell
@ 2026-03-26 8:17 ` Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 7/7] riscv: dts: spacemit: Add PDMA controller node for K3 SoC Troy Mitchell
6 siblings, 0 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-26 8:17 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd
Cc: devicetree, linux-riscv, spacemit, linux-kernel, dmaengine,
linux-clk, Troy Mitchell
top_dclk is the DDR bus clock. If it is gated by clk_disable_unused,
all memory-mapped bus transactions cease to function, causing DMA
engines to hang and general system instability.
Mark it CLK_IS_CRITICAL so the CCF never gates it during the
unused clock sweep.
Fixes: e371a77255b8 ("clk: spacemit: k3: add the clock tree")
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
drivers/clk/spacemit/ccu-k3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/spacemit/ccu-k3.c b/drivers/clk/spacemit/ccu-k3.c
index e98afd59f05c..bb8b75bdbdb3 100644
--- a/drivers/clk/spacemit/ccu-k3.c
+++ b/drivers/clk/spacemit/ccu-k3.c
@@ -846,7 +846,7 @@ static const struct clk_parent_data top_parents[] = {
CCU_PARENT_HW(pll6_d3),
};
CCU_MUX_DIV_GATE_FC_DEFINE(top_dclk, top_parents, APMU_TOP_DCLK_CTRL, 5, 3,
- BIT(8), 2, 3, BIT(1), 0);
+ BIT(8), 2, 3, BIT(1), CLK_IS_CRITICAL);
static const struct clk_parent_data ucie_parents[] = {
CCU_PARENT_HW(pll1_d8_307p2),
--
2.53.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 7/7] riscv: dts: spacemit: Add PDMA controller node for K3 SoC
2026-03-26 8:17 [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC Troy Mitchell
` (5 preceding siblings ...)
2026-03-26 8:17 ` [PATCH v2 6/7] clk: spacemit: k3: mark top_dclk as CLK_IS_CRITICAL Troy Mitchell
@ 2026-03-26 8:17 ` Troy Mitchell
6 siblings, 0 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-26 8:17 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd
Cc: devicetree, linux-riscv, spacemit, linux-kernel, dmaengine,
linux-clk, Troy Mitchell
Add the Peripheral DMA (PDMA) controller node for the SpacemiT K3 SoC.
The PDMA controller provides general-purpose DMA capabilities for various
peripheral devices across the system to offload CPU data transfers.
Unlike the previous K1 SoC, where some DMA masters had memory addressing
limitations (e.g. restricted to the 0-4GB space) requiring a dedicated dma-bus
with dma-ranges to restrict memory allocations, the K3 DMA masters have
full memory addressing capabilities. Therefore, the PDMA node is now
instantiated directly under the main soc bus.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
Changes in v2:
- update commit message
- using k3 compatible string
- Link to v1: https://lore.kernel.org/all/20260317-k3-pdma-v1-1-f39d3e97b53a@linux.spacemit.com/
---
arch/riscv/boot/dts/spacemit/k3.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index a3a8ceddabec..cd321975fc18 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -438,6 +438,17 @@ soc: soc {
dma-noncoherent;
ranges;
+ pdma: dma-controller@d4000000 {
+ compatible = "spacemit,k3-pdma";
+ reg = <0x0 0xd4000000 0x0 0x4000>;
+ clocks = <&syscon_apmu CLK_APMU_DMA>;
+ resets = <&syscon_apmu RESET_APMU_DMA>;
+ interrupts = <72 IRQ_TYPE_LEVEL_HIGH>;
+ dma-channels = <16>;
+ #dma-cells = <1>;
+ status = "disabled";
+ };
+
syscon_apbc: system-controller@d4015000 {
compatible = "spacemit,k3-syscon-apbc";
reg = <0x0 0xd4015000 0x0 0x1000>;
--
2.53.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string
2026-03-26 8:17 ` [PATCH v2 2/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string Troy Mitchell
@ 2026-03-26 18:34 ` Conor Dooley
2026-03-27 7:04 ` Troy Mitchell
0 siblings, 1 reply; 17+ messages in thread
From: Conor Dooley @ 2026-03-26 18:34 UTC (permalink / raw)
To: Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]
On Thu, Mar 26, 2026 at 04:17:17PM +0800, Troy Mitchell wrote:
> From: Guodong Xu <guodong@riscstar.com>
>
> Add k3 compatible string.
That's obvious. What you need to explain is why it is not compatible with
the existing k1.
pw-bot: changes-requested
Cheers,
Conor.
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
> ---
> Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> index ec06235baf5c..62ce6d81526b 100644
> --- a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> +++ b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> @@ -14,7 +14,9 @@ allOf:
>
> properties:
> compatible:
> - const: spacemit,k1-pdma
> + enum:
> + - spacemit,k1-pdma
> + - spacemit,k3-pdma
>
> reg:
> maxItems: 1
>
> --
> 2.53.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string
2026-03-26 18:34 ` Conor Dooley
@ 2026-03-27 7:04 ` Troy Mitchell
0 siblings, 0 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-27 7:04 UTC (permalink / raw)
To: Conor Dooley, Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk
Hi Conor,
On Fri Mar 27, 2026 at 2:34 AM CST, Conor Dooley wrote:
> On Thu, Mar 26, 2026 at 04:17:17PM +0800, Troy Mitchell wrote:
>> From: Guodong Xu <guodong@riscstar.com>
>>
>> Add k3 compatible string.
>
> That's obvious. What you need to explain is why it is not compatible with
> the existing k1.
>
Thanks for the review.
The SpacemiT K3 PDMA requires a new compatible string because it is not fully
backward compatible with the K1 implementation due to two main hardware differences:
- Variable extended DRCMR base: The DRCMR (DMA Request/Command Register) base
address for extended DMA request numbers (>= 64) is different in the K3 hardware
implementation.
- Memory addressing capabilities: Unlike the K1 SoC, where some DMA masters had
memory addressing limitations (restricted to the 0-4GB space) and required a
dedicated dma-bus, the K3 DMA masters have full memory addressing capabilities.
I will update the commit message in the v3 series.
-Troy
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions
2026-03-26 8:17 ` [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions Troy Mitchell
@ 2026-03-27 7:27 ` Krzysztof Kozlowski
2026-03-28 9:46 ` Troy Mitchell
2026-03-27 7:28 ` Krzysztof Kozlowski
1 sibling, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-27 7:27 UTC (permalink / raw)
To: Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk
On Thu, Mar 26, 2026 at 04:17:16PM +0800, Troy Mitchell wrote:
> From: Guodong Xu <guodong@riscstar.com>
>
> Add the DMA request numbers for non-secure peripherals of the K1 SoC
> from SpacemiT.
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
> ---
No changelog - neither here, nor in commit msg.
> include/dt-bindings/dma/k1-pdma.h | 56 +++++++++++++++++++++++++++++++++++++++
So previous review applies, no? Was there such?
> 1 file changed, 56 insertions(+)
>
> diff --git a/include/dt-bindings/dma/k1-pdma.h b/include/dt-bindings/dma/k1-pdma.h
> new file mode 100644
> index 000000000000..061748c177dc
> --- /dev/null
> +++ b/include/dt-bindings/dma/k1-pdma.h
> @@ -0,0 +1,56 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * This header provides DMA request number for non-secure peripherals of
> + * SpacemiT K1 PDMA.
> + *
> + * Copyright (c) 2025 Guodong Xu <guodong@riscstar.com>
> + */
> +
> +#ifndef __DT_BINDINGS_DMA_K1_PDMA_H__
> +#define __DT_BINDINGS_DMA_K1_PDMA_H__
> +
> +#define K1_PDMA_UART0_TX 3
abstract IDs start from 0 or 1.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions
2026-03-26 8:17 ` [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions Troy Mitchell
2026-03-27 7:27 ` Krzysztof Kozlowski
@ 2026-03-27 7:28 ` Krzysztof Kozlowski
2026-03-28 9:48 ` Troy Mitchell
1 sibling, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-27 7:28 UTC (permalink / raw)
To: Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk
On Thu, Mar 26, 2026 at 04:17:16PM +0800, Troy Mitchell wrote:
> From: Guodong Xu <guodong@riscstar.com>
>
> Add the DMA request numbers for non-secure peripherals of the K1 SoC
> from SpacemiT.
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
> ---
> include/dt-bindings/dma/k1-pdma.h | 56 +++++++++++++++++++++++++++++++++++++++
Also, this is not a separate commit.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 3/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions
2026-03-26 8:17 ` [PATCH v2 3/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions Troy Mitchell
@ 2026-03-27 7:30 ` Krzysztof Kozlowski
2026-03-28 9:58 ` Troy Mitchell
0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-27 7:30 UTC (permalink / raw)
To: Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk,
liyeshan
On Thu, Mar 26, 2026 at 04:17:18PM +0800, Troy Mitchell wrote:
> From: liyeshan <yeshan.li@spacemit.com>
>
> Add device tree binding header for SpacemiT k3 DMA request numbers. This
Why?
> defines the DMA request mapping for non-secure peripherals including UART,
> I2C, SSP/SPI, CAN, and QSPI.
>
> Signed-off-by: liyeshan <yeshan.li@spacemit.com>
Name looks close to login name?
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
> ---
> include/dt-bindings/dma/k3-pdma.h | 83 +++++++++++++++++++++++++++++++++++++++
I am already confused what is happening in this patchset - so which
device are you adding? K1 or K3?
> 1 file changed, 83 insertions(+)
>
> diff --git a/include/dt-bindings/dma/k3-pdma.h b/include/dt-bindings/dma/k3-pdma.h
> new file mode 100644
> index 000000000000..05541a9a9973
> --- /dev/null
> +++ b/include/dt-bindings/dma/k3-pdma.h
> @@ -0,0 +1,83 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * This header provides DMA request number for non-secure peripherals of
> + * SpacemiT K3 PDMA.
> + *
> + * Copyright (c) 2025 SpacemiT
> + * Copyright (c) 2025 Guodong Xu <guodong@riscstar.com>
> + */
> +
> +#ifndef __DT_BINDINGS_DMA_K3_PDMA_H__
> +#define __DT_BINDINGS_DMA_K3_PDMA_H__
> +
> +/* UART DMA request numbers */
> +#define K3_PDMA_UART0_TX 3
This starts from 0 or 1.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions
2026-03-27 7:27 ` Krzysztof Kozlowski
@ 2026-03-28 9:46 ` Troy Mitchell
0 siblings, 0 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-28 9:46 UTC (permalink / raw)
To: Krzysztof Kozlowski, Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk
On Fri Mar 27, 2026 at 3:27 PM CST, Krzysztof Kozlowski wrote:
> On Thu, Mar 26, 2026 at 04:17:16PM +0800, Troy Mitchell wrote:
>> From: Guodong Xu <guodong@riscstar.com>
>>
>> Add the DMA request numbers for non-secure peripherals of the K1 SoC
>> from SpacemiT.
>>
>> Signed-off-by: Guodong Xu <guodong@riscstar.com>
>> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>> ---
>
> No changelog - neither here, nor in commit msg.
My apologies, patches 1-6 were added in v2.
I missed including this in the version history..
>
>> include/dt-bindings/dma/k1-pdma.h | 56 +++++++++++++++++++++++++++++++++++++++
>
> So previous review applies, no? Was there such?
No, since it's a new addition, there are naturally no previous reviews.
- Troy
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions
2026-03-27 7:28 ` Krzysztof Kozlowski
@ 2026-03-28 9:48 ` Troy Mitchell
0 siblings, 0 replies; 17+ messages in thread
From: Troy Mitchell @ 2026-03-28 9:48 UTC (permalink / raw)
To: Krzysztof Kozlowski, Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk
On Fri Mar 27, 2026 at 3:28 PM CST, Krzysztof Kozlowski wrote:
> On Thu, Mar 26, 2026 at 04:17:16PM +0800, Troy Mitchell wrote:
>> From: Guodong Xu <guodong@riscstar.com>
>>
>> Add the DMA request numbers for non-secure peripherals of the K1 SoC
>> from SpacemiT.
>>
>> Signed-off-by: Guodong Xu <guodong@riscstar.com>
>> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>> ---
>> include/dt-bindings/dma/k1-pdma.h | 56 +++++++++++++++++++++++++++++++++++++++
>
> Also, this is not a separate commit.
Could you please clarify? This patch already contains only a single file
(include/dt-bindings/dma/k3-pdma.h).
- Troy
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 3/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions
2026-03-27 7:30 ` Krzysztof Kozlowski
@ 2026-03-28 9:58 ` Troy Mitchell
2026-03-28 11:35 ` Krzysztof Kozlowski
0 siblings, 1 reply; 17+ messages in thread
From: Troy Mitchell @ 2026-03-28 9:58 UTC (permalink / raw)
To: Krzysztof Kozlowski, Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk,
liyeshan
On Fri Mar 27, 2026 at 3:30 PM CST, Krzysztof Kozlowski wrote:
> On Thu, Mar 26, 2026 at 04:17:18PM +0800, Troy Mitchell wrote:
>> From: liyeshan <yeshan.li@spacemit.com>
>>
>> Add device tree binding header for SpacemiT k3 DMA request numbers. This
>
> Why?
The DMA request mappings are hardware-hardwired and differ between the K1 and K3 SoCs.
Therefore, separate header files are required to define these unique constants for each
platform to ensure correct DMA channel allocation in the device tree.
>
>> defines the DMA request mapping for non-secure peripherals including UART,
>> I2C, SSP/SPI, CAN, and QSPI.
>>
>> Signed-off-by: liyeshan <yeshan.li@spacemit.com>
>
> Name looks close to login name?
I will contact her and confirm.
>
>> Signed-off-by: Guodong Xu <guodong@riscstar.com>
>> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>> ---
>> include/dt-bindings/dma/k3-pdma.h | 83 +++++++++++++++++++++++++++++++++++++++
>
> I am already confused what is happening in this patchset - so which
> device are you adding? K1 or K3?
Aside from this K1-related patch, the rest of the series focuses on adding support for
the K3 SoC. I included the K1 header because I noticed it was missing in the upstream
tree while working on the K3 support.
It seems my attempt to 'clean up' K1 while adding K3 has caused unnecessary confusion.
Would you prefer me to remove the K1 patch from this series and submit it as a separate
patch?
- Troy
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 3/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions
2026-03-28 9:58 ` Troy Mitchell
@ 2026-03-28 11:35 ` Krzysztof Kozlowski
0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-28 11:35 UTC (permalink / raw)
To: Troy Mitchell, Troy Mitchell
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan, Vinod Koul,
Frank Li, Guodong Xu, Michael Turquette, Stephen Boyd, devicetree,
linux-riscv, spacemit, linux-kernel, dmaengine, linux-clk,
liyeshan
On 28/03/2026 10:58, Troy Mitchell wrote:
> On Fri Mar 27, 2026 at 3:30 PM CST, Krzysztof Kozlowski wrote:
>> On Thu, Mar 26, 2026 at 04:17:18PM +0800, Troy Mitchell wrote:
>>> From: liyeshan <yeshan.li@spacemit.com>
>>>
>>> Add device tree binding header for SpacemiT k3 DMA request numbers. This
>>
>> Why?
> The DMA request mappings are hardware-hardwired and differ between the K1 and K3 SoCs.
> Therefore, separate header files are required to define these unique constants for each
> platform to ensure correct DMA channel allocation in the device tree.
Nothing explains why we want this as ABI. Header does not ensure correct
DMA channel allocation.
>>
>>> defines the DMA request mapping for non-secure peripherals including UART,
>>> I2C, SSP/SPI, CAN, and QSPI.
>>>
>>> Signed-off-by: liyeshan <yeshan.li@spacemit.com>
>>
>> Name looks close to login name?
> I will contact her and confirm.
>>
>>> Signed-off-by: Guodong Xu <guodong@riscstar.com>
>>> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>>> ---
>>> include/dt-bindings/dma/k3-pdma.h | 83 +++++++++++++++++++++++++++++++++++++++
>>
>> I am already confused what is happening in this patchset - so which
>> device are you adding? K1 or K3?
> Aside from this K1-related patch, the rest of the series focuses on adding support for
> the K3 SoC. I included the K1 header because I noticed it was missing in the upstream
> tree while working on the K3 support.
So k3 is the new device? Then this is not a separate commit, but belongs
to the bindings patch.
>
> It seems my attempt to 'clean up' K1 while adding K3 has caused unnecessary confusion.
> Would you prefer me to remove the K1 patch from this series and submit it as a separate
> patch?
I expect explaining in commit msg why you are doing things.
So far none of these are bindings, so drop both headers from bindings.
Feel free to provide explanation what part of Linux SW you are binding here.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2026-03-28 11:35 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 8:17 [PATCH v2 0/7] dmaengine: Add Peripheral DMA support for SpacemiT K3 SoC Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 1/7] dt-bindings: dmaengine: Add SpacemiT K1 DMA request definitions Troy Mitchell
2026-03-27 7:27 ` Krzysztof Kozlowski
2026-03-28 9:46 ` Troy Mitchell
2026-03-27 7:28 ` Krzysztof Kozlowski
2026-03-28 9:48 ` Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 2/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA compatible string Troy Mitchell
2026-03-26 18:34 ` Conor Dooley
2026-03-27 7:04 ` Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 3/7] dt-bindings: dmaengine: Add SpacemiT K3 DMA request definitions Troy Mitchell
2026-03-27 7:30 ` Krzysztof Kozlowski
2026-03-28 9:58 ` Troy Mitchell
2026-03-28 11:35 ` Krzysztof Kozlowski
2026-03-26 8:17 ` [PATCH v2 4/7] dmaengine: mmp_pdma: support variable extended DRCMR base Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 5/7] dmaengine: mmp_pdma: add Spacemit K3 support Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 6/7] clk: spacemit: k3: mark top_dclk as CLK_IS_CRITICAL Troy Mitchell
2026-03-26 8:17 ` [PATCH v2 7/7] riscv: dts: spacemit: Add PDMA controller node for K3 SoC Troy Mitchell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox