Add dma-coherent property
Subsystems (5)
v3 cover Add dma-coherent property
This patch series adds dma-coherent property for the Agilex5 platform by:
- Updating the device tree bindings for:
- Cadence HP NAND controller (cdns,hp-nfc)
- Synopsys DesignWare AXI DMA controller (snps,dw-axi-dmac) to accept the dma-coherent property.
- Adding the dma-coherent property to the Agilex5 device tree and wiring up the property to the supported peripherals:
- NAND controller
- DMA controller
This dma-coherent addition aligns the Agilex5 platform with ARM’s architectural requirements for coherent interconnects.
---
Notes:
This patch series is applied and validated on socfpga dts maintainer's branch
https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git/log/?h=socfpga_dts_for_v6.19
This changes is validated on:
- intel/socfpga_agilex5_socdk.dtb
- snps,dw-axi-dmac.yaml
- snps,dw-axi-dmac.yaml intel/socfpga_agilex5_socdk.dtb
- cdns,hp-nfc.yaml
- cdns,hp-nfc.yaml intel/socfpga_agilex5_socdk.dtb
---
Khairul Anuar Romli (3):
dt-bindings: mtd: cdns,hp-nfc: Add dma-coherent property
dt-bindings: dma: snps,dw-axi-dmac: add dma-coherent property
arm64: dts: socfpga: agilex5: Add dma-coherent property
Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 2 ++ Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml | 2 ++ arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 3 +++ 3 files changed, 7 insertions(+)
Signature · 1 line
2.43.7
PATCH v3 1/3 dt-bindings: mtd: cdns,hp-nfc: Add dma-coherent property
The Cadence HP NAND Flash Controller on Agilex5 device performs DMA transactions through a coherent interconnect. dma-coherent property presents in device tree will allow the kernel’s DMA subsystem controller’s to performs DMA transaction in dma coherent mode.
--- Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml +2 -0
@@ -40,6 +40,8 @@ properties: dmas: maxItems: 1 + dma-coherent: true + iommus: maxItems: 1
Signature · 1 line
2.43.7
PATCH v3 2/3 dt-bindings: dma: snps,dw-axi-dmac: add dma-coherent property
In reply to Khairul Anuar RomliThe Synopsys DesignWare AXI DMA Controller on Agilex5, the controller operates on a cache-coherent AXI interface, where DMA transactions are automatically kept coherent with the CPU caches.
dma-coherent property will enable operating system to performs DMA transactions in dma coherent mode.
--- Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml +2 -0
@@ -64,6 +64,8 @@ properties: dma-noncoherent: true + dma-coherent: true + resets: minItems: 1 maxItems: 2
Signature · 1 line
2.43.7
PATCH v3 3/3 arm64: dts: socfpga: agilex5: Add dma-coherent property
In reply to Khairul Anuar RomliAdd the dma-coherent property to these device nodes to inform the kernel and DMA subsystem that the devices support hardware-managed cache coherence.
Changes:
- Add dma-coherent to cdns,hp-nfc
- Add dma-coherent to both snps,axi-dma-1.01a instances (dmac0, dmac1)
This aligns the Agilex5 device tree with the coherent DMA-capable devices accordingly.
--- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +3 -0
@@ -324,6 +324,7 @@ nand: nand-controller@10b80000 { clock-names = "nf_clk"; cdns,board-delay-ps = <4830>; iommus = <&smmu 4>; + dma-coherent; status = "disabled"; };
@@ -351,6 +352,7 @@ dmac0: dma-controller@10db0000 { snps,priority = <0 1 2 3>; snps,axi-max-burst-len = <8>; iommus = <&smmu 8>; + dma-coherent; }; dmac1: dma-controller@10dc0000 {
@@ -369,6 +371,7 @@ dmac1: dma-controller@10dc0000 { snps,priority = <0 1 2 3>; snps,axi-max-burst-len = <8>; iommus = <&smmu 9>; + dma-coherent; }; rst: rstmgr@10d11000 {
Signature · 1 line
2.43.7
Re: [PATCH 1/3] dt-bindings: mtd: cdns,hp-nfc: Add dma-coherent property
In reply to Khairul Anuar RomliQuoted 4 lines · Khairul Anuar Romli
The Cadence HP NAND Flash Controller on Agilex5 device performs DMA transactions through a coherent interconnect. dma-coherent property presents in device tree will allow the kernel’s DMA subsystem controller’s to performs DMA transaction in dma coherent mode.
Last sentence is redundant. You say basically "dma-coherent means dma coherent". Write informative commit msgs, so something which is not obvious, e.g. why this is dma coherent NOW but wasn't before?
Best regards,
Krzysztof