* [PATCH v3] dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU
@ 2026-05-21 6:41 Drew Fustini
2026-05-21 7:01 ` sashiko-bot
2026-05-21 20:05 ` Conor Dooley
0 siblings, 2 replies; 3+ messages in thread
From: Drew Fustini @ 2026-05-21 6:41 UTC (permalink / raw)
To: Tomasz Jeznach, Joerg Roedel, Will Deacon, Robin Murphy,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti
Cc: iommu, linux-riscv, devicetree, linux-kernel, Drew Fustini,
Joel Stanley, Joerg Roedel, Nicholas Piggin
From: Nicholas Piggin <npiggin@gmail.com>
Extend the binding to cover details specific to the Tenstorrent RISC-V
IOMMU. In particular, a second register range is added which contains
M-privileged registers, e.g., PMAs and PMPs.
The RISC-V spec S-privileged registers remain in the first register
range and are compatible with "riscv,iommu" so the Linux driver does not
notice any difference, but the binding will be used by OpenSBI and
potentially other M-mode software.
Reviewed-by: Joel Stanley <joel@jms.id.au>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[fustini: fix dt_binding_check errors]
Signed-off-by: Drew Fustini <fustini@kernel.org>
---
v3 changes:
- Move tenstorrent,riscv-iommu to the enum with qemu,riscv-iommu
- Move descriptions out of the allOf:
- Add minItems: 2 for tenstorrent,riscv-iommu in allOf:
- Fix reg syntax in Example 5
- Link to v2:
https://lore.kernel.org/lkml/20260520061855.1623468-4-fustini@kernel.org/
v2 changes:
- Fix dt_binding_check errors
- Add the Acked-by: from Joerg
- Drop RFC prefix
- Link to v1:
https://lore.kernel.org/lkml/20260310003850.3837030-1-npiggin@gmail.com/
.../bindings/iommu/riscv,iommu.yaml | 54 ++++++++++++++++---
1 file changed, 46 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
index d4838c3b3741..0ce9f7abd120 100644
--- a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
@@ -32,22 +32,34 @@ properties:
# should be specified along with 'reg' property providing MMIO location.
compatible:
oneOf:
- - items:
+ - description: Platform (non-PCIe) IOMMU implementations
+ items:
- enum:
- qemu,riscv-iommu
+ - tenstorrent,riscv-iommu
- const: riscv,iommu
- - items:
+ - description: PCIe IOMMU implementations
+ items:
- enum:
- pci1efd,edf1
- const: riscv,pci-iommu
reg:
- maxItems: 1
- description:
- For non-PCI devices this represents base address and size of for the
- IOMMU memory mapped registers interface.
- For PCI IOMMU hardware implementation this should represent an address
- of the IOMMU, as defined in the PCI Bus Binding reference.
+ minItems: 1
+ items:
+ - description:
+ For non-PCI devices, base address and size of the IOMMU memory
+ mapped registers interface. For PCI IOMMU hardware
+ implementation, an address of the IOMMU, as defined in the PCI
+ Bus Binding reference.
+ - description:
+ Region containing platform specific MMRs for machine-mode
+ configuration, such as PMA and PMP registers.
+
+ reg-names:
+ items:
+ - const: base
+ - const: machine
'#iommu-cells':
const: 1
@@ -75,6 +87,22 @@ required:
additionalProperties: false
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - tenstorrent,riscv-iommu
+ then:
+ properties:
+ reg:
+ minItems: 2
+ else:
+ properties:
+ reg:
+ maxItems: 1
+
examples:
- |+
/* Example 1 (IOMMU device with wired interrupts) */
@@ -145,3 +173,13 @@ examples:
};
};
};
+
+ - |+
+ /* Example 5 (Tenstorrent IOMMU device with MSIs) */
+ iommu5: iommu@d2020000 {
+ compatible = "tenstorrent,riscv-iommu", "riscv,iommu";
+ reg = <0xd2020000 0x10000>, <0xaa000000 0x10000>;
+ reg-names = "base", "machine";
+ msi-parent = <&imsics_smode>;
+ #iommu-cells = <1>;
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v3] dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU
2026-05-21 6:41 [PATCH v3] dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU Drew Fustini
@ 2026-05-21 7:01 ` sashiko-bot
2026-05-21 20:05 ` Conor Dooley
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-05-21 7:01 UTC (permalink / raw)
To: Drew Fustini; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `reg-names` property is missing `minItems: 1`, implicitly requiring exactly 2 items and breaking single-region nodes that attempt to use `reg-names`.
--
commit 4e6445ae92ce6111a15e470ab7f01dc3081a9f0b
Author: Nicholas Piggin <npiggin@gmail.com>
dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU
This commit extends the riscv,iommu binding to support the Tenstorrent
RISC-V IOMMU. It adds a second register range for M-privileged registers
like PMAs and PMPs.
> diff --git a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
> index d4838c3b3741f..0ce9f7abd120b 100644
> --- a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
> +++ b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
[ ... ]
> @@ -32,22 +32,34 @@ properties:
[ ... ]
> + reg-names:
> + items:
> + - const: base
> + - const: machine
[Severity: Medium]
Will this implicitly require exactly two items for reg-names?
In dt-schema, defining an array property with a list of items sets both
the minimum and maximum to the length of the list unless overridden.
If standard single-region IOMMUs attempt to provide a single reg-names
entry, will they fail schema validation because the schema expects exactly
two items?
Should minItems: 1 be added to the reg-names property?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260521064445.1740782-2-fustini@kernel.org?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU
2026-05-21 6:41 [PATCH v3] dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU Drew Fustini
2026-05-21 7:01 ` sashiko-bot
@ 2026-05-21 20:05 ` Conor Dooley
1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2026-05-21 20:05 UTC (permalink / raw)
To: Drew Fustini
Cc: Tomasz Jeznach, Joerg Roedel, Will Deacon, Robin Murphy,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, iommu, linux-riscv,
devicetree, linux-kernel, Joel Stanley, Joerg Roedel,
Nicholas Piggin
[-- Attachment #1: Type: text/plain, Size: 900 bytes --]
On Wed, May 20, 2026 at 11:41:18PM -0700, Drew Fustini wrote:
> From: Nicholas Piggin <npiggin@gmail.com>
>
> Extend the binding to cover details specific to the Tenstorrent RISC-V
> IOMMU. In particular, a second register range is added which contains
> M-privileged registers, e.g., PMAs and PMPs.
>
> The RISC-V spec S-privileged registers remain in the first register
> range and are compatible with "riscv,iommu" so the Linux driver does not
> notice any difference, but the binding will be used by OpenSBI and
> potentially other M-mode software.
>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
> Acked-by: Joerg Roedel <joerg.roedel@amd.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> [fustini: fix dt_binding_check errors]
> Signed-off-by: Drew Fustini <fustini@kernel.org>
Discussed on IRC I think, sashiko complaint to be fixed.
pw-bot: changes-requested
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-21 20:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21 6:41 [PATCH v3] dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU Drew Fustini
2026-05-21 7:01 ` sashiko-bot
2026-05-21 20:05 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox