blob: bd7ce120bc135e9eccb9f2cbdb3a38fdc15f9702 [file] [log] [blame]
Kim Phillips8e8ec592011-03-13 16:54:26 +08001=====================================================================
2SEC 4 Device Tree Binding
3Copyright (C) 2008-2011 Freescale Semiconductor Inc.
4
5 CONTENTS
6 -Overview
7 -SEC 4 Node
8 -Job Ring Node
9 -Run Time Integrity Check (RTIC) Node
10 -Run Time Integrity Check (RTIC) Memory Node
11 -Secure Non-Volatile Storage (SNVS) Node
Shawn Guo179a5022012-10-04 17:13:49 -070012 -Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node
Kim Phillips8e8ec592011-03-13 16:54:26 +080013 -Full Example
14
15NOTE: the SEC 4 is also known as Freescale's Cryptographic Accelerator
16Accelerator and Assurance Module (CAAM).
17
18=====================================================================
19Overview
20
21DESCRIPTION
22
23SEC 4 h/w can process requests from 2 types of sources.
241. DPAA Queue Interface (HW interface between Queue Manager & SEC 4).
252. Job Rings (HW interface between cores & SEC 4 registers).
26
27High Speed Data Path Configuration:
28
29HW interface between QM & SEC 4 and also BM & SEC 4, on DPAA-enabled parts
30such as the P4080. The number of simultaneous dequeues the QI can make is
31equal to the number of Descriptor Controller (DECO) engines in a particular
32SEC version. E.g., the SEC 4.0 in the P4080 has 5 DECOs and can thus
33dequeue from 5 subportals simultaneously.
34
35Job Ring Data Path Configuration:
36
37Each JR is located on a separate 4k page, they may (or may not) be made visible
38in the memory partition devoted to a particular core. The P4080 has 4 JRs, so
39up to 4 JRs can be configured; and all 4 JRs process requests in parallel.
40
41=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +080042SEC 4 Node
Kim Phillips8e8ec592011-03-13 16:54:26 +080043
44Description
45
46 Node defines the base address of the SEC 4 block.
47 This block specifies the address range of all global
48 configuration registers for the SEC 4 block. It
49 also receives interrupts from the Run Time Integrity Check
50 (RTIC) function within the SEC 4 block.
51
52PROPERTIES
53
54 - compatible
55 Usage: required
56 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +080057 Definition: Must include "fsl,sec-v4.0"
Kim Phillips8e8ec592011-03-13 16:54:26 +080058
59 - #address-cells
60 Usage: required
61 Value type: <u32>
62 Definition: A standard property. Defines the number of cells
63 for representing physical addresses in child nodes.
64
65 - #size-cells
66 Usage: required
67 Value type: <u32>
68 Definition: A standard property. Defines the number of cells
69 for representing the size of physical addresses in
70 child nodes.
71
72 - reg
73 Usage: required
74 Value type: <prop-encoded-array>
75 Definition: A standard property. Specifies the physical
Kim Phillips54e198d2011-03-23 21:15:44 +080076 address and length of the SEC4 configuration registers.
Kim Phillips8e8ec592011-03-13 16:54:26 +080077 registers
78
79 - ranges
80 Usage: required
81 Value type: <prop-encoded-array>
82 Definition: A standard property. Specifies the physical address
83 range of the SEC 4.0 register space (-SNVS not included). A
84 triplet that includes the child address, parent address, &
85 length.
86
87 - interrupts
88 Usage: required
89 Value type: <prop_encoded-array>
90 Definition: Specifies the interrupts generated by this
91 device. The value of the interrupts property
92 consists of one interrupt specifier. The format
93 of the specifier is defined by the binding document
94 describing the node's interrupt parent.
95
96 - interrupt-parent
97 Usage: (required if interrupt property is defined)
98 Value type: <phandle>
99 Definition: A single <phandle> value that points
100 to the interrupt parent to which the child domain
101 is being mapped.
102
103 Note: All other standard properties (see the ePAPR) are allowed
104 but are optional.
105
106
107EXAMPLE
108 crypto@300000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800109 compatible = "fsl,sec-v4.0";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800110 #address-cells = <1>;
111 #size-cells = <1>;
112 reg = <0x300000 0x10000>;
113 ranges = <0 0x300000 0x10000>;
114 interrupt-parent = <&mpic>;
115 interrupts = <92 2>;
116 };
117
118=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +0800119Job Ring (JR) Node
Kim Phillips8e8ec592011-03-13 16:54:26 +0800120
121 Child of the crypto node defines data processing interface to SEC 4
122 across the peripheral bus for purposes of processing
123 cryptographic descriptors. The specified address
124 range can be made visible to one (or more) cores.
125 The interrupt defined for this node is controlled within
126 the address range of this node.
127
128 - compatible
129 Usage: required
130 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +0800131 Definition: Must include "fsl,sec-v4.0-job-ring"
Kim Phillips8e8ec592011-03-13 16:54:26 +0800132
133 - reg
134 Usage: required
135 Value type: <prop-encoded-array>
136 Definition: Specifies a two JR parameters: an offset from
137 the parent physical address and the length the JR registers.
138
139 - fsl,liodn
140 Usage: optional-but-recommended
141 Value type: <prop-encoded-array>
142 Definition:
143 Specifies the LIODN to be used in conjunction with
144 the ppid-to-liodn table that specifies the PPID to LIODN mapping.
145 Needed if the PAMU is used. Value is a 12 bit value
146 where value is a LIODN ID for this JR. This property is
147 normally set by boot firmware.
148
149 - interrupts
150 Usage: required
151 Value type: <prop_encoded-array>
152 Definition: Specifies the interrupts generated by this
153 device. The value of the interrupts property
154 consists of one interrupt specifier. The format
155 of the specifier is defined by the binding document
156 describing the node's interrupt parent.
157
158 - interrupt-parent
159 Usage: (required if interrupt property is defined)
160 Value type: <phandle>
161 Definition: A single <phandle> value that points
162 to the interrupt parent to which the child domain
163 is being mapped.
164
165EXAMPLE
166 jr@1000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800167 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800168 reg = <0x1000 0x1000>;
169 fsl,liodn = <0x081>;
170 interrupt-parent = <&mpic>;
171 interrupts = <88 2>;
172 };
173
174
175=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +0800176Run Time Integrity Check (RTIC) Node
Kim Phillips8e8ec592011-03-13 16:54:26 +0800177
178 Child node of the crypto node. Defines a register space that
179 contains up to 5 sets of addresses and their lengths (sizes) that
180 will be checked at run time. After an initial hash result is
181 calculated, these addresses are checked by HW to monitor any
182 change. If any memory is modified, a Security Violation is
183 triggered (see SNVS definition).
184
185
186 - compatible
187 Usage: required
188 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +0800189 Definition: Must include "fsl,sec-v4.0-rtic".
Kim Phillips8e8ec592011-03-13 16:54:26 +0800190
191 - #address-cells
192 Usage: required
193 Value type: <u32>
194 Definition: A standard property. Defines the number of cells
195 for representing physical addresses in child nodes. Must
196 have a value of 1.
197
198 - #size-cells
199 Usage: required
200 Value type: <u32>
201 Definition: A standard property. Defines the number of cells
202 for representing the size of physical addresses in
203 child nodes. Must have a value of 1.
204
205 - reg
206 Usage: required
207 Value type: <prop-encoded-array>
208 Definition: A standard property. Specifies a two parameters:
209 an offset from the parent physical address and the length
210 the SEC4 registers.
211
212 - ranges
213 Usage: required
214 Value type: <prop-encoded-array>
215 Definition: A standard property. Specifies the physical address
216 range of the SEC 4 register space (-SNVS not included). A
217 triplet that includes the child address, parent address, &
218 length.
219
220EXAMPLE
221 rtic@6000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800222 compatible = "fsl,sec-v4.0-rtic";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800223 #address-cells = <1>;
224 #size-cells = <1>;
225 reg = <0x6000 0x100>;
226 ranges = <0x0 0x6100 0xe00>;
227 };
228
229=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +0800230Run Time Integrity Check (RTIC) Memory Node
Kim Phillips8e8ec592011-03-13 16:54:26 +0800231 A child node that defines individual RTIC memory regions that are used to
232 perform run-time integrity check of memory areas that should not modified.
233 The node defines a register that contains the memory address &
234 length (combined) and a second register that contains the hash result
235 in big endian format.
236
237 - compatible
238 Usage: required
239 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +0800240 Definition: Must include "fsl,sec-v4.0-rtic-memory".
Kim Phillips8e8ec592011-03-13 16:54:26 +0800241
242 - reg
243 Usage: required
244 Value type: <prop-encoded-array>
245 Definition: A standard property. Specifies two parameters:
246 an offset from the parent physical address and the length:
247
248 1. The location of the RTIC memory address & length registers.
249 2. The location RTIC hash result.
250
251 - fsl,rtic-region
252 Usage: optional-but-recommended
253 Value type: <prop-encoded-array>
254 Definition:
255 Specifies the HW address (36 bit address) for this region
256 followed by the length of the HW partition to be checked;
257 the address is represented as a 64 bit quantity followed
258 by a 32 bit length.
259
260 - fsl,liodn
261 Usage: optional-but-recommended
262 Value type: <prop-encoded-array>
263 Definition:
264 Specifies the LIODN to be used in conjunction with
265 the ppid-to-liodn table that specifies the PPID to LIODN
266 mapping. Needed if the PAMU is used. Value is a 12 bit value
267 where value is a LIODN ID for this RTIC memory region. This
268 property is normally set by boot firmware.
269
270EXAMPLE
271 rtic-a@0 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800272 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800273 reg = <0x00 0x20 0x100 0x80>;
274 fsl,liodn = <0x03c>;
275 fsl,rtic-region = <0x12345678 0x12345678 0x12345678>;
276 };
277
278=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +0800279Secure Non-Volatile Storage (SNVS) Node
Kim Phillips8e8ec592011-03-13 16:54:26 +0800280
281 Node defines address range and the associated
282 interrupt for the SNVS function. This function
283 monitors security state information & reports
284 security violations.
285
286 - compatible
287 Usage: required
288 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +0800289 Definition: Must include "fsl,sec-v4.0-mon".
Kim Phillips8e8ec592011-03-13 16:54:26 +0800290
291 - reg
292 Usage: required
293 Value type: <prop-encoded-array>
294 Definition: A standard property. Specifies the physical
295 address and length of the SEC4 configuration
296 registers.
297
Shawn Guo179a5022012-10-04 17:13:49 -0700298 - #address-cells
299 Usage: required
300 Value type: <u32>
301 Definition: A standard property. Defines the number of cells
302 for representing physical addresses in child nodes. Must
303 have a value of 1.
304
305 - #size-cells
306 Usage: required
307 Value type: <u32>
308 Definition: A standard property. Defines the number of cells
309 for representing the size of physical addresses in
310 child nodes. Must have a value of 1.
311
312 - ranges
313 Usage: required
314 Value type: <prop-encoded-array>
315 Definition: A standard property. Specifies the physical address
316 range of the SNVS register space. A triplet that includes
317 the child address, parent address, & length.
318
Kim Phillips8e8ec592011-03-13 16:54:26 +0800319 - interrupts
320 Usage: required
321 Value type: <prop_encoded-array>
322 Definition: Specifies the interrupts generated by this
323 device. The value of the interrupts property
324 consists of one interrupt specifier. The format
325 of the specifier is defined by the binding document
326 describing the node's interrupt parent.
327
328 - interrupt-parent
329 Usage: (required if interrupt property is defined)
330 Value type: <phandle>
331 Definition: A single <phandle> value that points
332 to the interrupt parent to which the child domain
333 is being mapped.
334
335EXAMPLE
336 sec_mon@314000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800337 compatible = "fsl,sec-v4.0-mon";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800338 reg = <0x314000 0x1000>;
Shawn Guo179a5022012-10-04 17:13:49 -0700339 ranges = <0 0x314000 0x1000>;
Kim Phillips8e8ec592011-03-13 16:54:26 +0800340 interrupt-parent = <&mpic>;
341 interrupts = <93 2>;
342 };
343
344=====================================================================
Shawn Guo179a5022012-10-04 17:13:49 -0700345Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node
346
347 A SNVS child node that defines SNVS LP RTC.
348
349 - compatible
350 Usage: required
351 Value type: <string>
352 Definition: Must include "fsl,sec-v4.0-mon-rtc-lp".
353
354 - reg
355 Usage: required
356 Value type: <prop-encoded-array>
357 Definition: A standard property. Specifies the physical
358 address and length of the SNVS LP configuration registers.
359
360EXAMPLE
361 sec_mon_rtc_lp@314000 {
362 compatible = "fsl,sec-v4.0-mon-rtc-lp";
363 reg = <0x34 0x58>;
364 };
365
366=====================================================================
Kim Phillips8e8ec592011-03-13 16:54:26 +0800367FULL EXAMPLE
368
369 crypto: crypto@300000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800370 compatible = "fsl,sec-v4.0";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800371 #address-cells = <1>;
372 #size-cells = <1>;
373 reg = <0x300000 0x10000>;
374 ranges = <0 0x300000 0x10000>;
375 interrupt-parent = <&mpic>;
376 interrupts = <92 2>;
377
378 sec_jr0: jr@1000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800379 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800380 reg = <0x1000 0x1000>;
381 interrupt-parent = <&mpic>;
382 interrupts = <88 2>;
383 };
384
385 sec_jr1: jr@2000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800386 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800387 reg = <0x2000 0x1000>;
388 interrupt-parent = <&mpic>;
389 interrupts = <89 2>;
390 };
391
392 sec_jr2: jr@3000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800393 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800394 reg = <0x3000 0x1000>;
395 interrupt-parent = <&mpic>;
396 interrupts = <90 2>;
397 };
398
399 sec_jr3: jr@4000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800400 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800401 reg = <0x4000 0x1000>;
402 interrupt-parent = <&mpic>;
403 interrupts = <91 2>;
404 };
405
406 rtic@6000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800407 compatible = "fsl,sec-v4.0-rtic";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800408 #address-cells = <1>;
409 #size-cells = <1>;
410 reg = <0x6000 0x100>;
411 ranges = <0x0 0x6100 0xe00>;
412
413 rtic_a: rtic-a@0 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800414 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800415 reg = <0x00 0x20 0x100 0x80>;
416 };
417
418 rtic_b: rtic-b@20 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800419 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800420 reg = <0x20 0x20 0x200 0x80>;
421 };
422
423 rtic_c: rtic-c@40 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800424 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800425 reg = <0x40 0x20 0x300 0x80>;
426 };
427
428 rtic_d: rtic-d@60 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800429 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800430 reg = <0x60 0x20 0x500 0x80>;
431 };
432 };
433 };
434
435 sec_mon: sec_mon@314000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800436 compatible = "fsl,sec-v4.0-mon";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800437 reg = <0x314000 0x1000>;
Shawn Guo179a5022012-10-04 17:13:49 -0700438 ranges = <0 0x314000 0x1000>;
Kim Phillips8e8ec592011-03-13 16:54:26 +0800439 interrupt-parent = <&mpic>;
440 interrupts = <93 2>;
Shawn Guo179a5022012-10-04 17:13:49 -0700441
442 sec_mon_rtc_lp@34 {
443 compatible = "fsl,sec-v4.0-mon-rtc-lp";
444 reg = <0x34 0x58>;
445 };
Kim Phillips8e8ec592011-03-13 16:54:26 +0800446 };
447
448=====================================================================