aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2016-09-12 12:13:56 -0400
committerWill Deacon <will.deacon@arm.com>2016-09-16 04:34:21 -0400
commitd0acbb750a22bc8961c746bc9cad5937a9d9a83d (patch)
treee01f4c48aa14418b7f6b3be19e960cb4ff6305a6
parentadfec2e709d2a48dbd756d65fe4fa8e4aae529a3 (diff)
Docs: dt: document ARM SMMU generic binding usage
Document how the generic "iommus" binding should be used to describe ARM SMMU stream IDs instead of the old "mmu-masters" binding. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--Documentation/devicetree/bindings/iommu/arm,smmu.txt61
1 files changed, 47 insertions, 14 deletions
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
index 19fe6f2c83f6..e862d1485205 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.txt
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt
@@ -35,12 +35,16 @@ conditions.
35 interrupt per context bank. In the case of a single, 35 interrupt per context bank. In the case of a single,
36 combined interrupt, it must be listed multiple times. 36 combined interrupt, it must be listed multiple times.
37 37
38- mmu-masters : A list of phandles to device nodes representing bus 38- #iommu-cells : See Documentation/devicetree/bindings/iommu/iommu.txt
39 masters for which the SMMU can provide a translation 39 for details. With a value of 1, each "iommus" entry
40 and their corresponding StreamIDs (see example below). 40 represents a distinct stream ID emitted by that device
41 Each device node linked from this list must have a 41 into the relevant SMMU.
42 "#stream-id-cells" property, indicating the number of 42
43 StreamIDs associated with it. 43 SMMUs with stream matching support and complex masters
44 may use a value of 2, where the second cell represents
45 an SMR mask to combine with the ID in the first cell.
46 Care must be taken to ensure the set of matched IDs
47 does not result in conflicts.
44 48
45** System MMU optional properties: 49** System MMU optional properties:
46 50
@@ -56,9 +60,20 @@ conditions.
56 aliases of secure registers have to be used during 60 aliases of secure registers have to be used during
57 SMMU configuration. 61 SMMU configuration.
58 62
59Example: 63** Deprecated properties:
64
65- mmu-masters (deprecated in favour of the generic "iommus" binding) :
66 A list of phandles to device nodes representing bus
67 masters for which the SMMU can provide a translation
68 and their corresponding Stream IDs. Each device node
69 linked from this list must have a "#stream-id-cells"
70 property, indicating the number of Stream ID
71 arguments associated with its phandle.
60 72
61 smmu { 73** Examples:
74
75 /* SMMU with stream matching or stream indexing */
76 smmu1: iommu {
62 compatible = "arm,smmu-v1"; 77 compatible = "arm,smmu-v1";
63 reg = <0xba5e0000 0x10000>; 78 reg = <0xba5e0000 0x10000>;
64 #global-interrupts = <2>; 79 #global-interrupts = <2>;
@@ -68,11 +83,29 @@ Example:
68 <0 35 4>, 83 <0 35 4>,
69 <0 36 4>, 84 <0 36 4>,
70 <0 37 4>; 85 <0 37 4>;
86 #iommu-cells = <1>;
87 };
88
89 /* device with two stream IDs, 0 and 7 */
90 master1 {
91 iommus = <&smmu1 0>,
92 <&smmu1 7>;
93 };
94
95
96 /* SMMU with stream matching */
97 smmu2: iommu {
98 ...
99 #iommu-cells = <2>;
100 };
101
102 /* device with stream IDs 0 and 7 */
103 master2 {
104 iommus = <&smmu2 0 0>,
105 <&smmu2 7 0>;
106 };
71 107
72 /* 108 /* device with stream IDs 1, 17, 33 and 49 */
73 * Two DMA controllers, the first with two StreamIDs (0xd01d 109 master3 {
74 * and 0xd01e) and the second with only one (0xd11c). 110 iommus = <&smmu2 1 0x30>;
75 */
76 mmu-masters = <&dma0 0xd01d 0xd01e>,
77 <&dma1 0xd11c>;
78 }; 111 };