[PATCH v5 4/8] dt-bindings: iommu: Add spacemit/t100 features
From: Lv Zheng
Date: Sat Feb 28 2026 - 09:50:01 EST
Adds device tree bindings for SpacemiT T100 specific features by
introducing spacemit,t100 compatible. T100 contains distributed IOATCs,
each of which exposes pmiv interrupt.
Signed-off-by: Lv Zheng <lv.zheng@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Jingyu Li <joey.li@xxxxxxxxxxxx>
---
.../bindings/iommu/riscv,iommu.yaml | 58 ++++++++++++++++++-
1 file changed, 56 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
index d4838c3b3741..6b775ebf7f42 100644
--- a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
@@ -30,8 +30,19 @@ properties:
# Since PCI provides built-in identification methods, compatible is not
# actually required. For non-PCIe hardware implementations 'riscv,iommu'
# should be specified along with 'reg' property providing MMIO location.
+ # SpacemiT T100 (distributed IOMMU with split IOATCs placed in adjacent
+ # to the DMA masters) can be seen in SpacemiT SoCs. It is integerated in
+ # V100 (server SoC) with coherent page table walk supported and in K3
+ # (client SoC) without coherent page table walk supported.
compatible:
oneOf:
+ - description: SpacemiT distributed IOMMUs
+ items:
+ - enum:
+ - spacemit,k3-t100
+ - spacemit,v100-t100
+ - const: spacemit,t100
+ - const: riscv,iommu
- items:
- enum:
- qemu,riscv-iommu
@@ -57,11 +68,21 @@ properties:
interrupts:
minItems: 1
- maxItems: 4
+ maxItems: 68
description:
Wired interrupt vectors available for RISC-V IOMMU to notify the
RISC-V HARTS. The cause to interrupt vector is software defined
- using IVEC IOMMU register.
+ using ICVEC IOMMU register. For WSI only mode, the number of the
+ interrupt vectors should be 1 while for MSI possible mode, the
+ maximum of the interrupt vectors should be 4 with the cause indexed
+ as "CIV=0, FIV=1, PIV=2, PMIV=3".
+ SpacemiT distributed IOMMU includes additional interrupts for
+ IOATCs. Each IOATC exposes PMIV wired vector as standalone
+ interrupt and the maximum number of IOATCs can be up to 64. Thus for
+ WSI only mode, the maximum number of the interrupt vectors should be
+ 65 while for MSI possible mode, the maximum number of the interrupt
+ vectors should be 68 with the cause indexed as "IOATS CIV=0,
+ IOATS FIV=1, IOATS PIV=2, IOATS PMIV=3, IOATC0..n PMIV=4..4+n".
msi-parent: true
@@ -75,6 +96,18 @@ required:
additionalProperties: false
+allOf:
+ - if:
+ properties:
+ compatible:
+ not:
+ contains:
+ const: spacemit,t100
+ then:
+ properties:
+ interrupts:
+ maxItems: 4
+
examples:
- |+
/* Example 1 (IOMMU device with wired interrupts) */
@@ -145,3 +178,24 @@ examples:
};
};
};
+
+ - |+
+ /* Example 5 (SpacemiT distributed IOMMU) */
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ iommu4: iommu@1bccd000 {
+ compatible = "spacemit,k3-t100", "spacemit,t100", "riscv,iommu";
+ reg = <0x1bccd000 0x1000>;
+ interrupts = <58 IRQ_TYPE_LEVEL_HIGH>,
+ <62 IRQ_TYPE_LEVEL_HIGH>, <63 IRQ_TYPE_LEVEL_HIGH>,
+ <62 IRQ_TYPE_LEVEL_HIGH>, <63 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&saplic>;
+ #iommu-cells = <0x01>;
+ };
+
+ /* Device with four IOMMU device IDs */
+ master2 {
+ #iommu-cells = <1>;
+ iommus = <&iommu4 0xc0010>, <&iommu4 0xc0011>,
+ <&iommu4 0xc0012>, <&iommu4 0xc0013>;
+ };
--
2.43.0