Add iommu supports
Subsystems (5)
v2 cover Add iommu supports
Add iommu property bindings to cadence hp-nfc and synopsis dw-axi-dmac.
Add smmu node in Agilex5 dts with the iommu bindings added.
---
Changes in v2:
- Add more description in the commit message body to clarify device required for this changes.
---
Khairul Anuar Romli (3):
dt-bindings: mtd: cdns,hp-nfc: Add iommu property
dt-bindings: dma: snps,dw-axi-dmac: Add iommu property
arm64: dts: socfpga: agilex5: Add SMMU nodes
.../bindings/dma/snps,dw-axi-dmac.yaml | 3 +++ .../devicetree/bindings/mtd/cdns,hp-nfc.yaml | 3 +++ arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 16 ++++++++++++++++ 3 files changed, 22 insertions(+)
Signature · 1 line
2.35.3
PATCH v2 1/3 dt-bindings: mtd: cdns,hp-nfc: Add iommu property
Agilex5 uses the cdns,hp-nfc binding for the nand-controller node.
To support IOMMU functionality, an iommus property needs to be added to the cdns,hp-nfc.yaml binding file. This ensures the device tree binding correctly describes the IOMMU association for the NAND controller.
---
Changes in v2:
- Updated the commit message to clarify the need for the changes and the hardware used of this changes.
--- Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/mtd/cdns,hp-nfc.yaml +3 -0
@@ -40,6 +40,9 @@ properties: dmas: maxItems: 1 + iommus: + maxItems: 1 + cdns,board-delay-ps: description: | Estimated Board delay. The value includes the total round trip
Signature · 1 line
2.35.3
PATCH v2 2/3 dt-bindings: dma: snps,dw-axi-dmac: Add iommu property
In reply to Khairul Anuar RomliAgilex5 uses the snps,axi-dma-1.01a that is enumerated in snps,dw-axi-dmac for the dma-controller node. To support IOMMU functionality, an iommus property needs to be added to the snps,dw-axi-dmac.yaml binding file. This ensures the device tree binding correctly describes the IOMMU association for the DMA controller.
---
Changes in v2:
- Updated the commit message to clarify the need for the changes and the hardware used o
f this changes.
--- Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml +3 -0
@@ -42,6 +42,9 @@ properties: minItems: 1 maxItems: 8 + iommus: + maxItems: 1 + clocks: items: - description: Bus Clock
Signature · 1 line
2.35.3
PATCH v2 3/3 arm64: dts: socfpga: agilex5: Add SMMU nodes
In reply to Khairul Anuar RomliAdd SMMU nodes for Agilex5. This SMMU nodes is compatible with arm,smmu-v3.
Add IOMMU property to the supported nodes.
- nand-controller
- dma-controller 0 and dma-controller 1
- usb
--- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +16 -0
@@ -272,6 +272,7 @@ nand: nand-controller@10b80000 { interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkmgr AGILEX5_NAND_NF_CLK>; cdns,board-delay-ps = <4830>; + iommus = <&smmu 4>; status = "disabled"; };
@@ -298,6 +299,7 @@ dmac0: dma-controller@10db0000 { snps,block-size = <32767 32767 32767 32767>; snps,priority = <0 1 2 3>; snps,axi-max-burst-len = <8>; + iommus = <&smmu 8>; }; dmac1: dma-controller@10dc0000 {
@@ -315,6 +317,7 @@ dmac1: dma-controller@10dc0000 { snps,block-size = <32767 32767 32767 32767>; snps,priority = <0 1 2 3>; snps,axi-max-burst-len = <8>; + iommus = <&smmu 9>; }; rst: rstmgr@10d11000 {
@@ -323,6 +326,18 @@ rst: rstmgr@10d11000 { #reset-cells = <1>; }; + smmu: iommu@16000000 { + compatible = "arm,smmu-v3"; + reg = <0x16000000 0x30000>; + interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 129 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 132 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "eventq", "gerror", "priq"; + dma-coherent; + #iommu-cells = <1>; + status = "disabled"; + }; + spi0: spi@10da4000 { compatible = "snps,dw-apb-ssi"; reg = <0x10da4000 0x1000>;
@@ -423,6 +438,7 @@ usb0: usb@10b00000 { phy-names = "usb2-phy"; resets = <&rst USB0_RESET>, <&rst USB0_OCP_RESET>; reset-names = "dwc2", "dwc2-ecc"; + iommus = <&smmu 6>; clocks = <&clkmgr AGILEX5_USB2OTG_HCLK>; clock-names = "otg"; status = "disabled";
Signature · 1 line
2.35.3
Re: [PATCH v2 1/3] dt-bindings: mtd: cdns,hp-nfc: Add iommu property
In reply to Khairul Anuar RomliQuoted 1 line · Khairul Anuar Romli
Agilex5 uses the cdns,hp-nfc binding for the nand-controller node.
That's redundant.
Quoted 1 line
To support IOMMU functionality, an iommus property needs to be added to the cdns,hp-nfc.yaml binding file.
As well... so just say there is IOMMU used by this <here goes device name>.
Quoted 1 line
This ensures the device tree binding correctly describes the IOMMU association for the NAND controller.
Redundant. Don't explain us how DT works. We all know. Explain what we do not know - your hardware. I already ASKED FOR THAT.
Also, completely broken wrapping. Please read submitting patches before you post next version.
Best regards,
Krzysztof