From: Nicholas Piggin <npiggin@gmail.com>
To: devicetree@vger.kernel.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
Tomasz Jeznach <tjeznach@rivosinc.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Drew Fustini <fustini@kernel.org>
Subject: [RFC PATCH 1/1] dt-bindings: iommu: riscv: Add bindings for Tenstorrent RISC-V IOMMU
Date: Tue, 10 Mar 2026 10:38:49 +1000 [thread overview]
Message-ID: <20260310003850.3837030-1-npiggin@gmail.com> (raw)
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.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
Hi,
This binding will be used in a Tenstorrent SoC platform device-tree that
we plan to get upstream some time, but I wanted to ask for any comments
here before the OpenSBI platform code that uses it is merged.
Thanks,
Nick
---
.../bindings/iommu/riscv,iommu.yaml | 67 +++++++++++++++++--
1 file changed, 60 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
index d4838c3b3741..3c680e53af64 100644
--- a/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
@@ -32,22 +32,40 @@ 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
- const: riscv,iommu
- - items:
+ - description: PCIe IOMMU implementations
+ items:
- enum:
- pci1efd,edf1
- const: riscv,pci-iommu
+ - description: Tenstorrent IOMMUs implementing "riscv,iommu"
+ items:
+ - enum:
+ - tenstorrent,riscv-iommu
+ - const: riscv,iommu
reg:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
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.
+ For non-PCI devices the first item represents base address and size of
+ for the IOMMU memory mapped registers interface.
+ For PCI IOMMU hardware implementation the first item should represent
+ an address of the IOMMU, as defined in the PCI Bus Binding reference.
+
+ reg-names:
+ items:
+ - const: base
+ description:
+ Minimum 4KiB region beginning with RISC-V IOMMU MMRs.
+ - const: machine
+ description:
+ Optional region containing platform specific MMRs for machine-mode
+ configuration, for example PMA and PMP registers.
'#iommu-cells':
const: 1
@@ -75,6 +93,31 @@ required:
additionalProperties: false
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - tenstorrent,riscv-iommu
+ then:
+ properties:
+ reg:
+ items:
+ - description: IOMMU base registers
+ - description: Tenstorrent IOMMU machine mode registers.
+ reg-names:
+ items:
+ - const: base
+ - const: machine
+ description:
+ Region containing platform specific MMRs for machine-mode
+ configuration, such as PMA and PMP registers.
+ else:
+ properties:
+ reg:
+ maxItems: 1
+
examples:
- |+
/* Example 1 (IOMMU device with wired interrupts) */
@@ -145,3 +188,13 @@ examples:
};
};
};
+
+ - |+
+ /* Example 5 (Tenstorrent IOMMU device with MSIs) */
+ iommu5: iommu@d2020000 {
+ compatible = "tenstorrent,riscv-iommu", "riscv,iommu";
+ reg = <0x0 0xd2020000 0x0 0x10000 0x0 0xaa000000 0x0 0x10000>;
+ reg-names = "base", "machine";
+ msi-parent = <&imsics_smode>;
+ #iommu-cells = <1>;
+ };
--
2.51.0
reply other threads:[~2026-03-10 0:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260310003850.3837030-1-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fustini@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=tjeznach@rivosinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox