blob: 0f8dc27be16034c794b0d4aba34de99299ba666a [file] [log] [blame]
Will Deacon98c33c52013-06-24 18:31:24 +01001* ARM System MMU Architecture Implementation
2
3ARM SoCs may contain an implementation of the ARM System Memory
4Management Unit Architecture, which can be used to provide 1 or 2 stages
5of address translation to bus masters external to the CPU.
6
7The SMMU may also raise interrupts in response to various fault
8conditions.
9
10** System MMU required properties:
11
12- compatible : Should be one of:
13
14 "arm,smmu-v1"
15 "arm,smmu-v2"
16 "arm,mmu-400"
Robin Murphyd3aba042014-08-28 17:52:00 +010017 "arm,mmu-401"
Will Deacon98c33c52013-06-24 18:31:24 +010018 "arm,mmu-500"
Tirumalesh Chalamarla1bd37a62016-03-04 13:56:09 -080019 "cavium,smmu-v2"
Patrick Dalyf0d4e212016-06-20 15:50:14 -070020 "qcom,smmu-v2"
Patrick Daly1f8a2882016-09-12 17:32:05 -070021 "qcom,qsmmu-v500"
Will Deacon98c33c52013-06-24 18:31:24 +010022
23 depending on the particular implementation and/or the
24 version of the architecture implemented.
25
26- reg : Base address and size of the SMMU.
27
Patrick Dalya0fddb62017-03-27 19:26:59 -070028- reg-names : For the "qcom,qsmmu-v500" device "tcu-base" is expected.
29
Will Deacon98c33c52013-06-24 18:31:24 +010030- #global-interrupts : The number of global interrupts exposed by the
31 device.
32
33- interrupts : Interrupt list, with the first #global-irqs entries
34 corresponding to the global interrupts and any
35 following entries corresponding to context interrupts,
36 specified in order of their indexing by the SMMU.
37
38 For SMMUv2 implementations, there must be exactly one
39 interrupt per context bank. In the case of a single,
40 combined interrupt, it must be listed multiple times.
41
Robin Murphyb79802e2016-09-12 17:13:56 +010042- #iommu-cells : See Documentation/devicetree/bindings/iommu/iommu.txt
43 for details. With a value of 1, each "iommus" entry
44 represents a distinct stream ID emitted by that device
45 into the relevant SMMU.
46
47 SMMUs with stream matching support and complex masters
48 may use a value of 2, where the second cell represents
49 an SMR mask to combine with the ID in the first cell.
50 Care must be taken to ensure the set of matched IDs
51 does not result in conflicts.
Will Deacon98c33c52013-06-24 18:31:24 +010052
53** System MMU optional properties:
54
Robin Murphybae2c2d2015-07-29 19:46:05 +010055- dma-coherent : Present if page table walks made by the SMMU are
56 cache coherent with the CPU.
57
58 NOTE: this only applies to the SMMU itself, not
59 masters connected upstream of the SMMU.
60
Andreas Herrmann0c9d70d2014-01-30 20:17:52 +000061- calxeda,smmu-secure-config-access : Enable proper handling of buggy
62 implementations that always use secure access to
63 SMMU configuration registers. In this case non-secure
64 aliases of secure registers have to be used during
65 SMMU configuration.
66
Mitchel Humpherys5494a5e2014-08-14 17:44:49 -070067- attach-impl-defs : global registers to program at device attach
68 time. This should be a list of 2-tuples of the format:
69 <offset reg_value>.
70
Mitchel Humpherys07ba44b2015-01-30 14:58:52 -080071- qcom,fatal-asf : Enable BUG_ON for address size faults. Some hardware
72 requires special fixups to recover from address size
73 faults. Rather than applying the fixups just BUG since
74 address size faults are due to a fundamental programming
75 error from which we don't care about recovering anyways.
76
Patrick Daly59b6d202017-06-12 13:12:15 -070077- qcom,skip-init : Disable resetting configuration for all context banks
78 during device reset. This is useful for targets where
79 some context banks are dedicated to other execution
80 environments outside of Linux and those other EEs are
81 programming their own stream match tables, SCTLR, etc.
82 Without setting this option we will trample on their
83 configuration.
84
Patrick Dalyc190d932016-08-30 17:23:28 -070085- qcom,dynamic : Allow dynamic domains to be attached. This is only
86 useful if the upstream hardware is capable of switching
87 between multiple domains within a single context bank.
88
Patrick Daly4423d3e2017-05-04 18:17:51 -070089- qcom,use-3-lvl-tables:
90 Some hardware configurations may not be optimized for using
91 a four level page table configuration. Set to use a three
92 level page table instead.
93
Patrick Dalye7069342017-07-11 12:35:55 -070094- qcom,no-asid-retention:
95 Some hardware may lose internal state for asid after
96 retention. No cache invalidation operations involving asid
97 may be used.
98
Prakash Guptafad87ca2017-05-16 12:13:02 +053099- qcom,deferred-regulator-disable-delay : The time delay for deferred regulator
100 disable in ms. In case of unmap call, regulator is
101 enabled/disabled. This may introduce additional delay. For
102 clients who do not detach, it's not possible to keep regulator
103 vote while smmu is attached. Type is <u32>.
104
Patrick Daly3a8a88a2016-07-22 12:24:05 -0700105- clocks : List of clocks to be used during SMMU register access. See
106 Documentation/devicetree/bindings/clock/clock-bindings.txt
107 for information about the format. For each clock specified
108 here, there must be a corresponding entry in clock-names
109 (see below).
110
111- clock-names : List of clock names corresponding to the clocks specified in
112 the "clocks" property (above). See
113 Documentation/devicetree/bindings/clock/clock-bindings.txt
114 for more info.
115
Patrick Daly5b3d8c62016-11-01 15:34:11 -0700116- (%s)-supply : Phandle of the regulator that should be powered on during
117 SMMU register access. (%s) is a string from the
118 qcom,regulator-names property.
119
120- qcom,regulator-names :
121 List of strings to use with the (%s)-supply property.
Mitchel Humpherysf7666ae2014-07-23 17:35:07 -0700122
Patrick Dalycf7b0de2016-10-06 17:04:49 -0700123- qcom,msm-bus,name
124- qcom,msm-bus,num-cases
125- qcom,msm-bus,num-paths
126- qcom,msm-bus,vectors-KBps
127 : Refer to devicetree/bindings/arm/msm/msm_bus.txt
Patrick Daly2764f952016-09-06 19:22:44 -0700128
Robin Murphyb79802e2016-09-12 17:13:56 +0100129** Deprecated properties:
Will Deacon98c33c52013-06-24 18:31:24 +0100130
Robin Murphyb79802e2016-09-12 17:13:56 +0100131- mmu-masters (deprecated in favour of the generic "iommus" binding) :
132 A list of phandles to device nodes representing bus
133 masters for which the SMMU can provide a translation
134 and their corresponding Stream IDs. Each device node
135 linked from this list must have a "#stream-id-cells"
136 property, indicating the number of Stream ID
137 arguments associated with its phandle.
138
139** Examples:
140
141 /* SMMU with stream matching or stream indexing */
142 smmu1: iommu {
Will Deacon98c33c52013-06-24 18:31:24 +0100143 compatible = "arm,smmu-v1";
144 reg = <0xba5e0000 0x10000>;
145 #global-interrupts = <2>;
146 interrupts = <0 32 4>,
147 <0 33 4>,
148 <0 34 4>, /* This is the first context interrupt */
149 <0 35 4>,
150 <0 36 4>,
151 <0 37 4>;
Robin Murphyb79802e2016-09-12 17:13:56 +0100152 #iommu-cells = <1>;
153 };
Will Deacon98c33c52013-06-24 18:31:24 +0100154
Robin Murphyb79802e2016-09-12 17:13:56 +0100155 /* device with two stream IDs, 0 and 7 */
156 master1 {
157 iommus = <&smmu1 0>,
158 <&smmu1 7>;
159 };
Mitchel Humpherys5494a5e2014-08-14 17:44:49 -0700160
Robin Murphyb79802e2016-09-12 17:13:56 +0100161
162 /* SMMU with stream matching */
163 smmu2: iommu {
164 ...
165 #iommu-cells = <2>;
166 };
167
168 /* device with stream IDs 0 and 7 */
169 master2 {
170 iommus = <&smmu2 0 0>,
171 <&smmu2 7 0>;
172 };
173
174 /* device with stream IDs 1, 17, 33 and 49 */
175 master3 {
176 iommus = <&smmu2 1 0x30>;
Will Deacon98c33c52013-06-24 18:31:24 +0100177 };
Patrick Daly1f8a2882016-09-12 17:32:05 -0700178
179
180* Qualcomm MMU-500 TBU Device
181
182The qcom,qsmmu-v500 device implements a number of register regions containing
183debug functionality. Each register region maps to a separate tbu from the
184arm mmu-500 implementation.
185
186** TBU required properties:
187
188- compatible : Should be one of:
189 "qcom,qsmmuv500-tbu"
190
191- reg : Base address and size.
192
193- reg-names : "base" and "status-reg" are expected
194 "base" is the main TBU register region.
195 "status-reg" indicates whether hw can process a new request.
196
Patrick Daly63b0e2c2016-11-01 16:58:57 -0700197-qcom,stream-id-range:
198 Pair of values describing the smallest supported stream-id
199 and the size of the entire set.
Patrick Daly1f8a2882016-09-12 17:32:05 -0700200
201Example:
202smmu {
203 compatible = "qcom,qsmmu-v500";
204 tbu@0x1000 {
205 compatible = "qcom,qsmmuv500-tbu";
206 regs = <0x1000 0x1000>,
207 <0x2000 0x8>;
208 reg-names = "base",
209 "status-reg";
Patrick Daly63b0e2c2016-11-01 16:58:57 -0700210 qcom,stream-id-range = <0x800 0x400>;
Patrick Daly1f8a2882016-09-12 17:32:05 -0700211 };
212};