blob: a014dacda7fbddc96b3a0224c4a8f906fe7a8ab8 [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
Patrick Daly95895ba2017-08-11 14:56:38 -070099- qcom,actlr:
100 An array of <sid mask actlr-setting>.
101 Any sid X for which X&~mask==sid will be programmed with the
102 given actlr-setting.
103
Prakash Guptafad87ca2017-05-16 12:13:02 +0530104- qcom,deferred-regulator-disable-delay : The time delay for deferred regulator
105 disable in ms. In case of unmap call, regulator is
106 enabled/disabled. This may introduce additional delay. For
107 clients who do not detach, it's not possible to keep regulator
108 vote while smmu is attached. Type is <u32>.
109
Patrick Daly3a8a88a2016-07-22 12:24:05 -0700110- clocks : List of clocks to be used during SMMU register access. See
111 Documentation/devicetree/bindings/clock/clock-bindings.txt
112 for information about the format. For each clock specified
113 here, there must be a corresponding entry in clock-names
114 (see below).
115
116- clock-names : List of clock names corresponding to the clocks specified in
117 the "clocks" property (above). See
118 Documentation/devicetree/bindings/clock/clock-bindings.txt
119 for more info.
120
Patrick Daly5b3d8c62016-11-01 15:34:11 -0700121- (%s)-supply : Phandle of the regulator that should be powered on during
122 SMMU register access. (%s) is a string from the
123 qcom,regulator-names property.
124
125- qcom,regulator-names :
126 List of strings to use with the (%s)-supply property.
Mitchel Humpherysf7666ae2014-07-23 17:35:07 -0700127
Patrick Dalycf7b0de2016-10-06 17:04:49 -0700128- qcom,msm-bus,name
129- qcom,msm-bus,num-cases
130- qcom,msm-bus,num-paths
131- qcom,msm-bus,vectors-KBps
132 : Refer to devicetree/bindings/arm/msm/msm_bus.txt
Patrick Daly2764f952016-09-06 19:22:44 -0700133
Robin Murphyb79802e2016-09-12 17:13:56 +0100134** Deprecated properties:
Will Deacon98c33c52013-06-24 18:31:24 +0100135
Robin Murphyb79802e2016-09-12 17:13:56 +0100136- mmu-masters (deprecated in favour of the generic "iommus" binding) :
137 A list of phandles to device nodes representing bus
138 masters for which the SMMU can provide a translation
139 and their corresponding Stream IDs. Each device node
140 linked from this list must have a "#stream-id-cells"
141 property, indicating the number of Stream ID
142 arguments associated with its phandle.
143
144** Examples:
145
146 /* SMMU with stream matching or stream indexing */
147 smmu1: iommu {
Will Deacon98c33c52013-06-24 18:31:24 +0100148 compatible = "arm,smmu-v1";
149 reg = <0xba5e0000 0x10000>;
150 #global-interrupts = <2>;
151 interrupts = <0 32 4>,
152 <0 33 4>,
153 <0 34 4>, /* This is the first context interrupt */
154 <0 35 4>,
155 <0 36 4>,
156 <0 37 4>;
Robin Murphyb79802e2016-09-12 17:13:56 +0100157 #iommu-cells = <1>;
158 };
Will Deacon98c33c52013-06-24 18:31:24 +0100159
Robin Murphyb79802e2016-09-12 17:13:56 +0100160 /* device with two stream IDs, 0 and 7 */
161 master1 {
162 iommus = <&smmu1 0>,
163 <&smmu1 7>;
164 };
Mitchel Humpherys5494a5e2014-08-14 17:44:49 -0700165
Robin Murphyb79802e2016-09-12 17:13:56 +0100166
167 /* SMMU with stream matching */
168 smmu2: iommu {
169 ...
170 #iommu-cells = <2>;
171 };
172
173 /* device with stream IDs 0 and 7 */
174 master2 {
175 iommus = <&smmu2 0 0>,
176 <&smmu2 7 0>;
177 };
178
179 /* device with stream IDs 1, 17, 33 and 49 */
180 master3 {
181 iommus = <&smmu2 1 0x30>;
Will Deacon98c33c52013-06-24 18:31:24 +0100182 };
Patrick Daly1f8a2882016-09-12 17:32:05 -0700183
184
185* Qualcomm MMU-500 TBU Device
186
187The qcom,qsmmu-v500 device implements a number of register regions containing
188debug functionality. Each register region maps to a separate tbu from the
189arm mmu-500 implementation.
190
191** TBU required properties:
192
193- compatible : Should be one of:
194 "qcom,qsmmuv500-tbu"
195
196- reg : Base address and size.
197
198- reg-names : "base" and "status-reg" are expected
199 "base" is the main TBU register region.
200 "status-reg" indicates whether hw can process a new request.
201
Patrick Daly63b0e2c2016-11-01 16:58:57 -0700202-qcom,stream-id-range:
203 Pair of values describing the smallest supported stream-id
204 and the size of the entire set.
Patrick Daly1f8a2882016-09-12 17:32:05 -0700205
206Example:
207smmu {
208 compatible = "qcom,qsmmu-v500";
209 tbu@0x1000 {
210 compatible = "qcom,qsmmuv500-tbu";
211 regs = <0x1000 0x1000>,
212 <0x2000 0x8>;
213 reg-names = "base",
214 "status-reg";
Patrick Daly63b0e2c2016-11-01 16:58:57 -0700215 qcom,stream-id-range = <0x800 0x400>;
Patrick Daly1f8a2882016-09-12 17:32:05 -0700216 };
217};