* [PATCH 0/2] dt-bindings: Add SpacemiT K1 PDMA request-number header and use it in DT
@ 2026-06-07 17:41 Guodong Xu
2026-06-07 17:41 ` [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers Guodong Xu
2026-06-07 17:41 ` [PATCH 2/2] riscv: dts: spacemit: Use symbolic PDMA request numbers on K1 Guodong Xu
0 siblings, 2 replies; 7+ messages in thread
From: Guodong Xu @ 2026-06-07 17:41 UTC (permalink / raw)
To: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti
Cc: linux-kernel, dmaengine, devicetree, linux-riscv, spacemit, Guodong Xu
Currently, K1 device trees specify PDMA peripheral requests as raw numbers.
Add a dt-bindings header naming those request lines, point the binding's
dma-cells description at it, and convert the current user (the K1 SPI3
node) to the new K1_PDMA_* macros.
Patch 1 adds include/dt-bindings/dma/spacemit,k1-pdma.h with the
K1_PDMA_* request-number macros and update the spacemit,k1-pdma binding's
dma-cells description.
Patch 2 updates the current pdma user in k1.dtsi to use these request
number macros.
Signed-off-by: Guodong Xu <docular.xu@gmail.com>
---
Guodong Xu (2):
dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers
riscv: dts: spacemit: Use symbolic PDMA request numbers on K1
.../devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +-
arch/riscv/boot/dts/spacemit/k1.dtsi | 3 +-
include/dt-bindings/dma/spacemit,k1-pdma.h | 56 ++++++++++++++++++++++
3 files changed, 61 insertions(+), 2 deletions(-)
---
base-commit: 793cc54475b49b5b558902b5c13e4bfe66530a50
change-id: 20260607-b4-k1-pdma-req-macros-8d276d0126df
Best regards,
--
Guodong Xu <docular.xu@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers
2026-06-07 17:41 [PATCH 0/2] dt-bindings: Add SpacemiT K1 PDMA request-number header and use it in DT Guodong Xu
@ 2026-06-07 17:41 ` Guodong Xu
2026-06-08 17:33 ` Conor Dooley
2026-06-07 17:41 ` [PATCH 2/2] riscv: dts: spacemit: Use symbolic PDMA request numbers on K1 Guodong Xu
1 sibling, 1 reply; 7+ messages in thread
From: Guodong Xu @ 2026-06-07 17:41 UTC (permalink / raw)
To: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti
Cc: linux-kernel, dmaengine, devicetree, linux-riscv, spacemit, Guodong Xu
Add a dt-bindings header that gives symbolic names to the SpacemiT K1
PDMA request lines of the non-secure peripherals. Device trees can use
these K1_PDMA_* macros instead of magic numbers.
Point the spacemit,k1-pdma binding's #dma-cells description at the new
header.
Signed-off-by: Guodong Xu <docular.xu@gmail.com>
---
.../devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +-
include/dt-bindings/dma/spacemit,k1-pdma.h | 56 ++++++++++++++++++++++
2 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
index ec06235baf5ca..0d4ac9849e27b 100644
--- a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
+++ b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
@@ -35,7 +35,9 @@ properties:
'#dma-cells':
const: 1
description:
- The DMA request number for the peripheral device.
+ The single cell is the DMA request number for the peripheral device.
+ See <dt-bindings/dma/spacemit,k1-pdma.h> for the list of valid request
+ numbers.
required:
- compatible
diff --git a/include/dt-bindings/dma/spacemit,k1-pdma.h b/include/dt-bindings/dma/spacemit,k1-pdma.h
new file mode 100644
index 0000000000000..491976516550a
--- /dev/null
+++ b/include/dt-bindings/dma/spacemit,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) 2026 Guodong Xu <docular.xu@gmail.com>
+ */
+
+#ifndef _DT_BINDINGS_DMA_SPACEMIT_K1_PDMA_H_
+#define _DT_BINDINGS_DMA_SPACEMIT_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_SPACEMIT_K1_PDMA_H_ */
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] riscv: dts: spacemit: Use symbolic PDMA request numbers on K1
2026-06-07 17:41 [PATCH 0/2] dt-bindings: Add SpacemiT K1 PDMA request-number header and use it in DT Guodong Xu
2026-06-07 17:41 ` [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers Guodong Xu
@ 2026-06-07 17:41 ` Guodong Xu
1 sibling, 0 replies; 7+ messages in thread
From: Guodong Xu @ 2026-06-07 17:41 UTC (permalink / raw)
To: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti
Cc: linux-kernel, dmaengine, devicetree, linux-riscv, spacemit, Guodong Xu
The K1 SPI3 node's "dmas" property hard-codes its PDMA request numbers.
Include <dt-bindings/dma/spacemit,k1-pdma.h> and use the K1_PDMA_SPI3_RX/TX
macros instead, for better code readability and easy for future
maintenance.
No functional change.
Signed-off-by: Guodong Xu <docular.xu@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
index 08a0f28d011fe..c413a64d5560c 100644
--- a/arch/riscv/boot/dts/spacemit/k1.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
@@ -4,6 +4,7 @@
*/
#include <dt-bindings/clock/spacemit,k1-syscon.h>
+#include <dt-bindings/dma/spacemit,k1-pdma.h>
#include <dt-bindings/phy/phy.h>
/dts-v1/;
@@ -1094,7 +1095,7 @@ spi3: spi@d401c000 {
clock-names = "core", "bus";
resets = <&syscon_apbc RESET_SSP3>;
interrupts = <55>;
- dmas = <&pdma 20>, <&pdma 19>;
+ dmas = <&pdma K1_PDMA_SPI3_RX>, <&pdma K1_PDMA_SPI3_TX>;
dma-names = "rx", "tx";
status = "disabled";
};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers
2026-06-07 17:41 ` [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers Guodong Xu
@ 2026-06-08 17:33 ` Conor Dooley
2026-06-09 18:55 ` Guodong Xu
0 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2026-06-08 17:33 UTC (permalink / raw)
To: Guodong Xu
Cc: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, linux-kernel, dmaengine, devicetree,
linux-riscv, spacemit
[-- Attachment #1: Type: text/plain, Size: 3681 bytes --]
On Sun, Jun 07, 2026 at 01:41:30PM -0400, Guodong Xu wrote:
> Add a dt-bindings header that gives symbolic names to the SpacemiT K1
> PDMA request lines of the non-secure peripherals. Device trees can use
> these K1_PDMA_* macros instead of magic numbers.
>
> Point the spacemit,k1-pdma binding's #dma-cells description at the new
> header.
>
> Signed-off-by: Guodong Xu <docular.xu@gmail.com>
> ---
> .../devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +-
> include/dt-bindings/dma/spacemit,k1-pdma.h | 56 ++++++++++++++++++++++
> 2 files changed, 59 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> index ec06235baf5ca..0d4ac9849e27b 100644
> --- a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> +++ b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> @@ -35,7 +35,9 @@ properties:
> '#dma-cells':
> const: 1
> description:
> - The DMA request number for the peripheral device.
> + The single cell is the DMA request number for the peripheral device.
> + See <dt-bindings/dma/spacemit,k1-pdma.h> for the list of valid request
> + numbers.
>
> required:
> - compatible
> diff --git a/include/dt-bindings/dma/spacemit,k1-pdma.h b/include/dt-bindings/dma/spacemit,k1-pdma.h
Why does this need to be in a binding when there is no use of this in
the driver? May as well be a header, particularly if these are numbers
with a set meaning that are lifted from the TRM, rather than made up
numbers to make a driver work. The former seems likely, given you're
indexing from 3 not 0.
> new file mode 100644
> index 0000000000000..491976516550a
> --- /dev/null
> +++ b/include/dt-bindings/dma/spacemit,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) 2026 Guodong Xu <docular.xu@gmail.com>
> + */
> +
> +#ifndef _DT_BINDINGS_DMA_SPACEMIT_K1_PDMA_H_
> +#define _DT_BINDINGS_DMA_SPACEMIT_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_SPACEMIT_K1_PDMA_H_ */
>
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers
2026-06-08 17:33 ` Conor Dooley
@ 2026-06-09 18:55 ` Guodong Xu
2026-06-09 19:54 ` Conor Dooley
0 siblings, 1 reply; 7+ messages in thread
From: Guodong Xu @ 2026-06-09 18:55 UTC (permalink / raw)
To: Conor Dooley
Cc: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, linux-kernel, dmaengine, devicetree,
linux-riscv, spacemit
Hi, Conor
On 2026-06-08 18:33, Conor Dooley wrote:
>On Sun, Jun 07, 2026 at 01:41:30PM -0400, Guodong Xu wrote:
>> Add a dt-bindings header that gives symbolic names to the SpacemiT K1
>> PDMA request lines of the non-secure peripherals. Device trees can use
>> these K1_PDMA_* macros instead of magic numbers.
>>
>> Point the spacemit,k1-pdma binding's #dma-cells description at the new
>> header.
>>
>> Signed-off-by: Guodong Xu <docular.xu@gmail.com>
>> ---
>> .../devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +-
>> include/dt-bindings/dma/spacemit,k1-pdma.h | 56 ++++++++++++++++++++++
>> 2 files changed, 59 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
>> index ec06235baf5ca..0d4ac9849e27b 100644
>> --- a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
>> +++ b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
>> @@ -35,7 +35,9 @@ properties:
>> '#dma-cells':
>> const: 1
>> description:
>> - The DMA request number for the peripheral device.
>> + The single cell is the DMA request number for the peripheral device.
>> + See <dt-bindings/dma/spacemit,k1-pdma.h> for the list of valid request
>> + numbers.
>>
>> required:
>> - compatible
>> diff --git a/include/dt-bindings/dma/spacemit,k1-pdma.h b/include/dt-bindings/dma/spacemit,k1-pdma.h
>
>Why does this need to be in a binding when there is no use of this in
>the driver? May as well be a header, particularly if these are numbers
Thanks for the review. You are correct that these are not referenced in the
driver. My change to k1-pdma.yaml should be dropped.
>with a set meaning that are lifted from the TRM, rather than made up
>numbers to make a driver work. The former seems likely, given you're
>indexing from 3 not 0.
Yes, it is defined in the K1 manual [1], see 9.4.3 DMA Connectivity &
Assignments
Link: https://www.spacemit.com/community/document/info?lang=en&nodepath=hardware/key_stone/k1/k1_docs/k1_usermanual/9.Top_System.md [1]
I will fix that in v2.
BR,
Guodong
>
>> new file mode 100644
>> index 0000000000000..491976516550a
>> --- /dev/null
>> +++ b/include/dt-bindings/dma/spacemit,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) 2026 Guodong Xu <docular.xu@gmail.com>
>> + */
>> +
>> +#ifndef _DT_BINDINGS_DMA_SPACEMIT_K1_PDMA_H_
>> +#define _DT_BINDINGS_DMA_SPACEMIT_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_SPACEMIT_K1_PDMA_H_ */
>>
>> --
>> 2.43.0
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers
2026-06-09 18:55 ` Guodong Xu
@ 2026-06-09 19:54 ` Conor Dooley
2026-06-09 21:06 ` Guodong Xu
0 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2026-06-09 19:54 UTC (permalink / raw)
To: Guodong Xu
Cc: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, linux-kernel, dmaengine, devicetree,
linux-riscv, spacemit
[-- Attachment #1: Type: text/plain, Size: 2534 bytes --]
On Tue, Jun 09, 2026 at 02:55:59PM -0400, Guodong Xu wrote:
> Hi, Conor
>
> On 2026-06-08 18:33, Conor Dooley wrote:
> > On Sun, Jun 07, 2026 at 01:41:30PM -0400, Guodong Xu wrote:
> > > Add a dt-bindings header that gives symbolic names to the SpacemiT K1
> > > PDMA request lines of the non-secure peripherals. Device trees can use
> > > these K1_PDMA_* macros instead of magic numbers.
> > >
> > > Point the spacemit,k1-pdma binding's #dma-cells description at the new
> > > header.
> > >
> > > Signed-off-by: Guodong Xu <docular.xu@gmail.com>
> > > ---
> > > .../devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +-
> > > include/dt-bindings/dma/spacemit,k1-pdma.h | 56 ++++++++++++++++++++++
> > > 2 files changed, 59 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> > > index ec06235baf5ca..0d4ac9849e27b 100644
> > > --- a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> > > +++ b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
> > > @@ -35,7 +35,9 @@ properties:
> > > '#dma-cells':
> > > const: 1
> > > description:
> > > - The DMA request number for the peripheral device.
> > > + The single cell is the DMA request number for the peripheral device.
> > > + See <dt-bindings/dma/spacemit,k1-pdma.h> for the list of valid request
> > > + numbers.
> > >
> > > required:
> > > - compatible
> > > diff --git a/include/dt-bindings/dma/spacemit,k1-pdma.h b/include/dt-bindings/dma/spacemit,k1-pdma.h
> >
> > Why does this need to be in a binding when there is no use of this in
> > the driver? May as well be a header, particularly if these are numbers
>
> Thanks for the review. You are correct that these are not referenced in the
> driver. My change to k1-pdma.yaml should be dropped.
>
> > with a set meaning that are lifted from the TRM, rather than made up
> > numbers to make a driver work. The former seems likely, given you're
> > indexing from 3 not 0.
>
> Yes, it is defined in the K1 manual [1], see 9.4.3 DMA Connectivity &
> Assignments
>
> Link: https://www.spacemit.com/community/document/info?lang=en&nodepath=hardware/key_stone/k1/k1_docs/k1_usermanual/9.Top_System.md [1]
>
> I will fix that in v2.
Just in case I wasn't clear (and I think I wasn't), when I said "may as
well be a header" I meant a header in arch/riscv/boot/dts/spacemit.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers
2026-06-09 19:54 ` Conor Dooley
@ 2026-06-09 21:06 ` Guodong Xu
0 siblings, 0 replies; 7+ messages in thread
From: Guodong Xu @ 2026-06-09 21:06 UTC (permalink / raw)
To: Conor Dooley
Cc: Vinod Koul, Frank Li, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, linux-kernel, dmaengine, devicetree,
linux-riscv, spacemit
On 2026-06-09 20:54, Conor Dooley wrote:
>On Tue, Jun 09, 2026 at 02:55:59PM -0400, Guodong Xu wrote:
>> Hi, Conor
>>
>> On 2026-06-08 18:33, Conor Dooley wrote:
>> > On Sun, Jun 07, 2026 at 01:41:30PM -0400, Guodong Xu wrote:
>> > > Add a dt-bindings header that gives symbolic names to the SpacemiT K1
>> > > PDMA request lines of the non-secure peripherals. Device trees can use
>> > > these K1_PDMA_* macros instead of magic numbers.
>> > >
>> > > Point the spacemit,k1-pdma binding's #dma-cells description at the new
>> > > header.
>> > >
>> > > Signed-off-by: Guodong Xu <docular.xu@gmail.com>
>> > > ---
>> > > .../devicetree/bindings/dma/spacemit,k1-pdma.yaml | 4 +-
>> > > include/dt-bindings/dma/spacemit,k1-pdma.h | 56 ++++++++++++++++++++++
>> > > 2 files changed, 59 insertions(+), 1 deletion(-)
>> > >
>> > > diff --git a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
>> > > index ec06235baf5ca..0d4ac9849e27b 100644
>> > > --- a/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
>> > > +++ b/Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml
>> > > @@ -35,7 +35,9 @@ properties:
>> > > '#dma-cells':
>> > > const: 1
>> > > description:
>> > > - The DMA request number for the peripheral device.
>> > > + The single cell is the DMA request number for the peripheral device.
>> > > + See <dt-bindings/dma/spacemit,k1-pdma.h> for the list of valid request
>> > > + numbers.
>> > >
>> > > required:
>> > > - compatible
>> > > diff --git a/include/dt-bindings/dma/spacemit,k1-pdma.h b/include/dt-bindings/dma/spacemit,k1-pdma.h
>> >
>> > Why does this need to be in a binding when there is no use of this in
>> > the driver? May as well be a header, particularly if these are numbers
>>
>> Thanks for the review. You are correct that these are not referenced in the
>> driver. My change to k1-pdma.yaml should be dropped.
>>
>> > with a set meaning that are lifted from the TRM, rather than made up
>> > numbers to make a driver work. The former seems likely, given you're
>> > indexing from 3 not 0.
>>
>> Yes, it is defined in the K1 manual [1], see 9.4.3 DMA Connectivity &
>> Assignments
>>
>> Link: https://www.spacemit.com/community/document/info?lang=en&nodepath=hardware/key_stone/k1/k1_docs/k1_usermanual/9.Top_System.md [1]
>>
>> I will fix that in v2.
>
>Just in case I wasn't clear (and I think I wasn't), when I said "may as
>well be a header" I meant a header in arch/riscv/boot/dts/spacemit.
Oh, got it. Makes sense. I will move it to
arch/riscv/boot/dts/spacemit/k1-pdma.h
Note that I already sent v2 before reading this, please disregard v2.
I will send v3.
BR,
Guodong
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-06-09 21:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-07 17:41 [PATCH 0/2] dt-bindings: Add SpacemiT K1 PDMA request-number header and use it in DT Guodong Xu
2026-06-07 17:41 ` [PATCH 1/2] dt-bindings: dmaengine: Add SpacemiT K1 PDMA request numbers Guodong Xu
2026-06-08 17:33 ` Conor Dooley
2026-06-09 18:55 ` Guodong Xu
2026-06-09 19:54 ` Conor Dooley
2026-06-09 21:06 ` Guodong Xu
2026-06-07 17:41 ` [PATCH 2/2] riscv: dts: spacemit: Use symbolic PDMA request numbers on K1 Guodong Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®