blob: fc9ce6f1688cdb18db58a652f24fa4013de76bff [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>
Vakul Garga2c09112012-12-06 17:16:30 +080057 Definition: Must include "fsl,sec-v4.0". Also includes SEC
58 ERA versions (optional) with which the device is compatible.
Kim Phillips8e8ec592011-03-13 16:54:26 +080059
60 - #address-cells
61 Usage: required
62 Value type: <u32>
63 Definition: A standard property. Defines the number of cells
64 for representing physical addresses in child nodes.
65
66 - #size-cells
67 Usage: required
68 Value type: <u32>
69 Definition: A standard property. Defines the number of cells
70 for representing the size of physical addresses in
71 child nodes.
72
73 - reg
74 Usage: required
75 Value type: <prop-encoded-array>
76 Definition: A standard property. Specifies the physical
Kim Phillips54e198d2011-03-23 21:15:44 +080077 address and length of the SEC4 configuration registers.
Kim Phillips8e8ec592011-03-13 16:54:26 +080078 registers
79
80 - ranges
81 Usage: required
82 Value type: <prop-encoded-array>
83 Definition: A standard property. Specifies the physical address
84 range of the SEC 4.0 register space (-SNVS not included). A
85 triplet that includes the child address, parent address, &
86 length.
87
88 - interrupts
89 Usage: required
90 Value type: <prop_encoded-array>
91 Definition: Specifies the interrupts generated by this
92 device. The value of the interrupts property
93 consists of one interrupt specifier. The format
94 of the specifier is defined by the binding document
95 describing the node's interrupt parent.
96
97 - interrupt-parent
98 Usage: (required if interrupt property is defined)
99 Value type: <phandle>
100 Definition: A single <phandle> value that points
101 to the interrupt parent to which the child domain
102 is being mapped.
103
104 Note: All other standard properties (see the ePAPR) are allowed
105 but are optional.
106
107
108EXAMPLE
109 crypto@300000 {
Vakul Garga2c09112012-12-06 17:16:30 +0800110 compatible = "fsl,sec-v4.0", "fsl,sec-era-v2.0";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800111 #address-cells = <1>;
112 #size-cells = <1>;
113 reg = <0x300000 0x10000>;
114 ranges = <0 0x300000 0x10000>;
115 interrupt-parent = <&mpic>;
116 interrupts = <92 2>;
117 };
118
119=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +0800120Job Ring (JR) Node
Kim Phillips8e8ec592011-03-13 16:54:26 +0800121
122 Child of the crypto node defines data processing interface to SEC 4
123 across the peripheral bus for purposes of processing
124 cryptographic descriptors. The specified address
125 range can be made visible to one (or more) cores.
126 The interrupt defined for this node is controlled within
127 the address range of this node.
128
129 - compatible
130 Usage: required
131 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +0800132 Definition: Must include "fsl,sec-v4.0-job-ring"
Kim Phillips8e8ec592011-03-13 16:54:26 +0800133
134 - reg
135 Usage: required
136 Value type: <prop-encoded-array>
137 Definition: Specifies a two JR parameters: an offset from
138 the parent physical address and the length the JR registers.
139
140 - fsl,liodn
141 Usage: optional-but-recommended
142 Value type: <prop-encoded-array>
143 Definition:
144 Specifies the LIODN to be used in conjunction with
145 the ppid-to-liodn table that specifies the PPID to LIODN mapping.
146 Needed if the PAMU is used. Value is a 12 bit value
147 where value is a LIODN ID for this JR. This property is
148 normally set by boot firmware.
149
150 - interrupts
151 Usage: required
152 Value type: <prop_encoded-array>
153 Definition: Specifies the interrupts generated by this
154 device. The value of the interrupts property
155 consists of one interrupt specifier. The format
156 of the specifier is defined by the binding document
157 describing the node's interrupt parent.
158
159 - interrupt-parent
160 Usage: (required if interrupt property is defined)
161 Value type: <phandle>
162 Definition: A single <phandle> value that points
163 to the interrupt parent to which the child domain
164 is being mapped.
165
166EXAMPLE
167 jr@1000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800168 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800169 reg = <0x1000 0x1000>;
170 fsl,liodn = <0x081>;
171 interrupt-parent = <&mpic>;
172 interrupts = <88 2>;
173 };
174
175
176=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +0800177Run Time Integrity Check (RTIC) Node
Kim Phillips8e8ec592011-03-13 16:54:26 +0800178
179 Child node of the crypto node. Defines a register space that
180 contains up to 5 sets of addresses and their lengths (sizes) that
181 will be checked at run time. After an initial hash result is
182 calculated, these addresses are checked by HW to monitor any
183 change. If any memory is modified, a Security Violation is
184 triggered (see SNVS definition).
185
186
187 - compatible
188 Usage: required
189 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +0800190 Definition: Must include "fsl,sec-v4.0-rtic".
Kim Phillips8e8ec592011-03-13 16:54:26 +0800191
192 - #address-cells
193 Usage: required
194 Value type: <u32>
195 Definition: A standard property. Defines the number of cells
196 for representing physical addresses in child nodes. Must
197 have a value of 1.
198
199 - #size-cells
200 Usage: required
201 Value type: <u32>
202 Definition: A standard property. Defines the number of cells
203 for representing the size of physical addresses in
204 child nodes. Must have a value of 1.
205
206 - reg
207 Usage: required
208 Value type: <prop-encoded-array>
209 Definition: A standard property. Specifies a two parameters:
210 an offset from the parent physical address and the length
211 the SEC4 registers.
212
213 - ranges
214 Usage: required
215 Value type: <prop-encoded-array>
216 Definition: A standard property. Specifies the physical address
217 range of the SEC 4 register space (-SNVS not included). A
218 triplet that includes the child address, parent address, &
219 length.
220
221EXAMPLE
222 rtic@6000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800223 compatible = "fsl,sec-v4.0-rtic";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800224 #address-cells = <1>;
225 #size-cells = <1>;
226 reg = <0x6000 0x100>;
227 ranges = <0x0 0x6100 0xe00>;
228 };
229
230=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +0800231Run Time Integrity Check (RTIC) Memory Node
Kim Phillips8e8ec592011-03-13 16:54:26 +0800232 A child node that defines individual RTIC memory regions that are used to
233 perform run-time integrity check of memory areas that should not modified.
234 The node defines a register that contains the memory address &
235 length (combined) and a second register that contains the hash result
236 in big endian format.
237
238 - compatible
239 Usage: required
240 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +0800241 Definition: Must include "fsl,sec-v4.0-rtic-memory".
Kim Phillips8e8ec592011-03-13 16:54:26 +0800242
243 - reg
244 Usage: required
245 Value type: <prop-encoded-array>
246 Definition: A standard property. Specifies two parameters:
247 an offset from the parent physical address and the length:
248
249 1. The location of the RTIC memory address & length registers.
250 2. The location RTIC hash result.
251
252 - fsl,rtic-region
253 Usage: optional-but-recommended
254 Value type: <prop-encoded-array>
255 Definition:
256 Specifies the HW address (36 bit address) for this region
257 followed by the length of the HW partition to be checked;
258 the address is represented as a 64 bit quantity followed
259 by a 32 bit length.
260
261 - fsl,liodn
262 Usage: optional-but-recommended
263 Value type: <prop-encoded-array>
264 Definition:
265 Specifies the LIODN to be used in conjunction with
266 the ppid-to-liodn table that specifies the PPID to LIODN
267 mapping. Needed if the PAMU is used. Value is a 12 bit value
268 where value is a LIODN ID for this RTIC memory region. This
269 property is normally set by boot firmware.
270
271EXAMPLE
272 rtic-a@0 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800273 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800274 reg = <0x00 0x20 0x100 0x80>;
275 fsl,liodn = <0x03c>;
276 fsl,rtic-region = <0x12345678 0x12345678 0x12345678>;
277 };
278
279=====================================================================
Kim Phillips7dfc2172011-03-23 21:23:36 +0800280Secure Non-Volatile Storage (SNVS) Node
Kim Phillips8e8ec592011-03-13 16:54:26 +0800281
282 Node defines address range and the associated
283 interrupt for the SNVS function. This function
284 monitors security state information & reports
285 security violations.
286
287 - compatible
288 Usage: required
289 Value type: <string>
Kim Phillips7dfc2172011-03-23 21:23:36 +0800290 Definition: Must include "fsl,sec-v4.0-mon".
Kim Phillips8e8ec592011-03-13 16:54:26 +0800291
292 - reg
293 Usage: required
294 Value type: <prop-encoded-array>
295 Definition: A standard property. Specifies the physical
296 address and length of the SEC4 configuration
297 registers.
298
Shawn Guo179a5022012-10-04 17:13:49 -0700299 - #address-cells
300 Usage: required
301 Value type: <u32>
302 Definition: A standard property. Defines the number of cells
303 for representing physical addresses in child nodes. Must
304 have a value of 1.
305
306 - #size-cells
307 Usage: required
308 Value type: <u32>
309 Definition: A standard property. Defines the number of cells
310 for representing the size of physical addresses in
311 child nodes. Must have a value of 1.
312
313 - ranges
314 Usage: required
315 Value type: <prop-encoded-array>
316 Definition: A standard property. Specifies the physical address
317 range of the SNVS register space. A triplet that includes
318 the child address, parent address, & length.
319
Kim Phillips8e8ec592011-03-13 16:54:26 +0800320 - interrupts
321 Usage: required
322 Value type: <prop_encoded-array>
323 Definition: Specifies the interrupts generated by this
324 device. The value of the interrupts property
325 consists of one interrupt specifier. The format
326 of the specifier is defined by the binding document
327 describing the node's interrupt parent.
328
329 - interrupt-parent
330 Usage: (required if interrupt property is defined)
331 Value type: <phandle>
332 Definition: A single <phandle> value that points
333 to the interrupt parent to which the child domain
334 is being mapped.
335
336EXAMPLE
337 sec_mon@314000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800338 compatible = "fsl,sec-v4.0-mon";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800339 reg = <0x314000 0x1000>;
Shawn Guo179a5022012-10-04 17:13:49 -0700340 ranges = <0 0x314000 0x1000>;
Kim Phillips8e8ec592011-03-13 16:54:26 +0800341 interrupt-parent = <&mpic>;
342 interrupts = <93 2>;
343 };
344
345=====================================================================
Shawn Guo179a5022012-10-04 17:13:49 -0700346Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node
347
348 A SNVS child node that defines SNVS LP RTC.
349
350 - compatible
351 Usage: required
352 Value type: <string>
353 Definition: Must include "fsl,sec-v4.0-mon-rtc-lp".
354
355 - reg
356 Usage: required
357 Value type: <prop-encoded-array>
358 Definition: A standard property. Specifies the physical
359 address and length of the SNVS LP configuration registers.
360
361EXAMPLE
362 sec_mon_rtc_lp@314000 {
363 compatible = "fsl,sec-v4.0-mon-rtc-lp";
364 reg = <0x34 0x58>;
365 };
366
367=====================================================================
Kim Phillips8e8ec592011-03-13 16:54:26 +0800368FULL EXAMPLE
369
370 crypto: crypto@300000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800371 compatible = "fsl,sec-v4.0";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800372 #address-cells = <1>;
373 #size-cells = <1>;
374 reg = <0x300000 0x10000>;
375 ranges = <0 0x300000 0x10000>;
376 interrupt-parent = <&mpic>;
377 interrupts = <92 2>;
378
379 sec_jr0: jr@1000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800380 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800381 reg = <0x1000 0x1000>;
382 interrupt-parent = <&mpic>;
383 interrupts = <88 2>;
384 };
385
386 sec_jr1: jr@2000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800387 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800388 reg = <0x2000 0x1000>;
389 interrupt-parent = <&mpic>;
390 interrupts = <89 2>;
391 };
392
393 sec_jr2: jr@3000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800394 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800395 reg = <0x3000 0x1000>;
396 interrupt-parent = <&mpic>;
397 interrupts = <90 2>;
398 };
399
400 sec_jr3: jr@4000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800401 compatible = "fsl,sec-v4.0-job-ring";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800402 reg = <0x4000 0x1000>;
403 interrupt-parent = <&mpic>;
404 interrupts = <91 2>;
405 };
406
407 rtic@6000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800408 compatible = "fsl,sec-v4.0-rtic";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800409 #address-cells = <1>;
410 #size-cells = <1>;
411 reg = <0x6000 0x100>;
412 ranges = <0x0 0x6100 0xe00>;
413
414 rtic_a: rtic-a@0 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800415 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800416 reg = <0x00 0x20 0x100 0x80>;
417 };
418
419 rtic_b: rtic-b@20 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800420 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800421 reg = <0x20 0x20 0x200 0x80>;
422 };
423
424 rtic_c: rtic-c@40 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800425 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800426 reg = <0x40 0x20 0x300 0x80>;
427 };
428
429 rtic_d: rtic-d@60 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800430 compatible = "fsl,sec-v4.0-rtic-memory";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800431 reg = <0x60 0x20 0x500 0x80>;
432 };
433 };
434 };
435
436 sec_mon: sec_mon@314000 {
Kim Phillips7dfc2172011-03-23 21:23:36 +0800437 compatible = "fsl,sec-v4.0-mon";
Kim Phillips8e8ec592011-03-13 16:54:26 +0800438 reg = <0x314000 0x1000>;
Shawn Guo179a5022012-10-04 17:13:49 -0700439 ranges = <0 0x314000 0x1000>;
Kim Phillips8e8ec592011-03-13 16:54:26 +0800440 interrupt-parent = <&mpic>;
441 interrupts = <93 2>;
Shawn Guo179a5022012-10-04 17:13:49 -0700442
443 sec_mon_rtc_lp@34 {
444 compatible = "fsl,sec-v4.0-mon-rtc-lp";
445 reg = <0x34 0x58>;
446 };
Kim Phillips8e8ec592011-03-13 16:54:26 +0800447 };
448
449=====================================================================