Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 55 additions & 7 deletions Documentation/devicetree/bindings/iommu/riscv,iommu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,35 @@ 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
- const: machine

'#iommu-cells':
const: 1
Expand Down Expand Up @@ -75,6 +88,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) */
Expand Down Expand Up @@ -145,3 +183,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>;
};