[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <166b08f5eede0a1124df938ecd7a031b67d829c3.1760486497.git.khairul.anuar.romli@altera.com>
Date: Wed, 15 Oct 2025 08:13:39 +0800
From: Khairul Anuar Romli <khairul.anuar.romli@...era.com>
To: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>,
Vinod Koul <vkoul@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
dmaengine@...r.kernel.org (open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM),
devicetree@...r.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS),
linux-kernel@...r.kernel.org (open list),
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Niravkumar L Rabara <niravkumar.l.rabara@...el.com>,
linux-mtd@...ts.infradead.org (open list:CADENCE NAND DRIVER),
Dinh Nguyen <dinguyen@...nel.org>,
Khairul Anuar Romli <khairul.anuar.romli@...era.com>,
Adrian Ng Ho Yin <adrianhoyin.ng@...era.com>
Subject: [PATCH 3/3] arm64: dts: socfpga: agilex5: Add SMMU nodes
Agilex5 includes an ARM SMMU v3 (System Memory Management Unit) to provide
address translation and memory protection for DMA-capable devices such as
PCIe, USB, and other peripherals.
This commit adds the SMMU node to the Agilex5 device tree with compatible
string "arm,smmu-v3", along with its register space and interrupts.
The SMMU is required to:
- Enable DMA address translation for devices that cannot directly access
the full physical memory space.
- Provide isolation and memory protection by restricting device access
to specific regions of memory, improving system security.
- Support virtualization use cases by enabling safe and isolated device
passthrough to guest VMs.
- Align with ARM platform architecture requirements for IOMMU support.
By describing the SMMU in the device tree, the Linux IOMMU framework
can probe and initialize it during boot. Devices in the system can then
bind to the SMMU via the `iommus` property, enabling memory translation
and protection features as expected.
The following devices are updated to reference the SMMU:
- NAND controller
- DMA controller
- SPI controller
This change is a necessary step toward full enablement high-speed
peripherals on Agilex5.
Signed-off-by: Adrian Ng Ho Yin <adrianhoyin.ng@...era.com>
Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@...era.com>
---
Changes in v3:
- Rewrite commit messages with detailed hardware descriptions.
Changes in v2:
- Follow revision of the patch series from v1->v2.
---
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
index 04e99cd7e74b..a22cf6a211e2 100644
--- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
+++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
@@ -272,6 +272,7 @@ nand: nand-controller@...80000 {
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@...b0000 {
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@...c0000 {
@@ -315,6 +317,7 @@ dmac1: dma-controller@...c0000 {
snps,block-size = <32767 32767 32767 32767>;
snps,priority = <0 1 2 3>;
snps,axi-max-burst-len = <8>;
+ iommus = <&smmu 9>;
};
rst: rstmgr@...11000 {
@@ -323,6 +326,18 @@ rst: rstmgr@...11000 {
#reset-cells = <1>;
};
+ smmu: iommu@...00000 {
+ 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@...a4000 {
compatible = "snps,dw-apb-ssi";
reg = <0x10da4000 0x1000>;
@@ -423,6 +438,7 @@ usb0: usb@...00000 {
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";
--
2.35.3
Powered by blists - more mailing lists