xref: /freebsd/sys/contrib/device-tree/Bindings/iommu/arm,smmu-v3.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/iommu/arm,smmu-v3.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: ARM SMMUv3 Architecture Implementation
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Will Deacon <will@kernel.org>
11c66ec88fSEmmanuel Vadot  - Robin Murphy <Robin.Murphy@arm.com>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotdescription: |+
14c66ec88fSEmmanuel Vadot  The SMMUv3 architecture is a significant departure from previous
15c66ec88fSEmmanuel Vadot  revisions, replacing the MMIO register interface with in-memory command
16c66ec88fSEmmanuel Vadot  and event queues and adding support for the ATS and PRI components of
17c66ec88fSEmmanuel Vadot  the PCIe specification.
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel Vadotproperties:
20c66ec88fSEmmanuel Vadot  $nodename:
21c66ec88fSEmmanuel Vadot    pattern: "^iommu@[0-9a-f]*"
22c66ec88fSEmmanuel Vadot  compatible:
23c66ec88fSEmmanuel Vadot    const: arm,smmu-v3
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadot  reg:
26c66ec88fSEmmanuel Vadot    maxItems: 1
27c66ec88fSEmmanuel Vadot
28c66ec88fSEmmanuel Vadot  interrupts:
29c66ec88fSEmmanuel Vadot    minItems: 1
30c66ec88fSEmmanuel Vadot    maxItems: 4
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel Vadot  interrupt-names:
33c66ec88fSEmmanuel Vadot    oneOf:
34c66ec88fSEmmanuel Vadot      - const: combined
35c66ec88fSEmmanuel Vadot        description:
36c66ec88fSEmmanuel Vadot          The combined interrupt is optional, and should only be provided if the
37c66ec88fSEmmanuel Vadot          hardware supports just a single, combined interrupt line.
38c66ec88fSEmmanuel Vadot          If provided, then the combined interrupt will be used in preference to
39c66ec88fSEmmanuel Vadot          any others.
40d5b0e70fSEmmanuel Vadot      - minItems: 1
41c66ec88fSEmmanuel Vadot        items:
42*7ef62cebSEmmanuel Vadot          enum:
43d5b0e70fSEmmanuel Vadot            - eventq      # Event Queue not empty
44d5b0e70fSEmmanuel Vadot            - gerror      # Global Error activated
45d5b0e70fSEmmanuel Vadot            - cmdq-sync   # CMD_SYNC complete
46d5b0e70fSEmmanuel Vadot            - priq        # PRI Queue not empty
47c66ec88fSEmmanuel Vadot
48c66ec88fSEmmanuel Vadot  '#iommu-cells':
49c66ec88fSEmmanuel Vadot    const: 1
50c66ec88fSEmmanuel Vadot
51c66ec88fSEmmanuel Vadot  dma-coherent:
52c66ec88fSEmmanuel Vadot    description: |
53c66ec88fSEmmanuel Vadot      Present if page table walks made by the SMMU are cache coherent with the
54c66ec88fSEmmanuel Vadot      CPU.
55c66ec88fSEmmanuel Vadot
56c66ec88fSEmmanuel Vadot      NOTE: this only applies to the SMMU itself, not masters connected
57c66ec88fSEmmanuel Vadot      upstream of the SMMU.
58c66ec88fSEmmanuel Vadot
59c66ec88fSEmmanuel Vadot  msi-parent: true
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadot  hisilicon,broken-prefetch-cmd:
62c66ec88fSEmmanuel Vadot    type: boolean
63c66ec88fSEmmanuel Vadot    description: Avoid sending CMD_PREFETCH_* commands to the SMMU.
64c66ec88fSEmmanuel Vadot
65c66ec88fSEmmanuel Vadot  cavium,cn9900-broken-page1-regspace:
66c66ec88fSEmmanuel Vadot    type: boolean
67c66ec88fSEmmanuel Vadot    description:
68c66ec88fSEmmanuel Vadot      Replaces all page 1 offsets used for EVTQ_PROD/CONS, PRIQ_PROD/CONS
69c66ec88fSEmmanuel Vadot      register access with page 0 offsets. Set for Cavium ThunderX2 silicon that
70c66ec88fSEmmanuel Vadot      doesn't support SMMU page1 register space.
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadotrequired:
73c66ec88fSEmmanuel Vadot  - compatible
74c66ec88fSEmmanuel Vadot  - reg
75c66ec88fSEmmanuel Vadot  - '#iommu-cells'
76c66ec88fSEmmanuel Vadot
77c66ec88fSEmmanuel VadotadditionalProperties: false
78c66ec88fSEmmanuel Vadot
79c66ec88fSEmmanuel Vadotexamples:
80c66ec88fSEmmanuel Vadot  - |+
81c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
82c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
83c66ec88fSEmmanuel Vadot
84c66ec88fSEmmanuel Vadot    iommu@2b400000 {
85c66ec88fSEmmanuel Vadot            compatible = "arm,smmu-v3";
86c66ec88fSEmmanuel Vadot            reg = <0x2b400000 0x20000>;
87c66ec88fSEmmanuel Vadot            interrupts = <GIC_SPI 74 IRQ_TYPE_EDGE_RISING>,
88c66ec88fSEmmanuel Vadot                         <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>,
89c66ec88fSEmmanuel Vadot                         <GIC_SPI 77 IRQ_TYPE_EDGE_RISING>,
90c66ec88fSEmmanuel Vadot                         <GIC_SPI 79 IRQ_TYPE_EDGE_RISING>;
91c66ec88fSEmmanuel Vadot            interrupt-names = "eventq", "gerror", "priq", "cmdq-sync";
92c66ec88fSEmmanuel Vadot            dma-coherent;
93c66ec88fSEmmanuel Vadot            #iommu-cells = <1>;
94c66ec88fSEmmanuel Vadot            msi-parent = <&its 0xff0000>;
95c66ec88fSEmmanuel Vadot    };
96