1 * virtio IOMMU PCI device
3 When virtio-iommu uses the PCI transport, its programming interface is
4 discovered dynamically by the PCI probing infrastructure. However the
5 device tree statically describes the relation between IOMMU and DMA
6 masters. Therefore, the PCI root complex that hosts the virtio-iommu
7 contains a child node representing the IOMMU device explicitly.
11 - compatible: Should be "virtio,pci-iommu"
12 - reg: PCI address of the IOMMU. As defined in the PCI Bus
13 Binding reference [1], the reg property is a five-cell
14 address encoded as (phys.hi phys.mid phys.lo size.hi
15 size.lo). phys.hi should contain the device's BDF as
16 0b00000000 bbbbbbbb dddddfff 00000000. The other cells
18 - #iommu-cells: Each platform DMA master managed by the IOMMU is assigned
19 an endpoint ID, described by the "iommus" property [2].
20 For virtio-iommu, #iommu-cells must be 1.
24 - DMA from the IOMMU device isn't managed by another IOMMU. Therefore the
25 virtio-iommu node doesn't have an "iommus" property, and is omitted from
26 the iommu-map property of the root complex.
31 compatible = "pci-host-ecam-generic";
34 /* The IOMMU programming interface uses slot 00:01.0 */
36 compatible = "virtio,pci-iommu";
37 reg = <0x00000800 0 0 0 0>;
42 * The IOMMU manages all functions in this PCI domain except
43 * itself. Omit BDF 00:01.0.
45 iommu-map = <0x0 &iommu0 0x0 0x8>
46 <0x9 &iommu0 0x9 0xfff7>;
50 compatible = "pci-host-ecam-generic";
53 * The IOMMU also manages all functions from this domain,
54 * with endpoint IDs 0x10000 - 0x1ffff
56 iommu-map = <0x0 &iommu0 0x10000 0x10000>;
61 /* The IOMMU manages this platform device with endpoint ID 0x20000 */
62 iommus = <&iommu0 0x20000>;
65 [1] Documentation/devicetree/bindings/pci/pci.txt
66 [2] Documentation/devicetree/bindings/iommu/iommu.txt