]> Pileus Git - ~andy/linux/blob - Documentation/devicetree/bindings/crypto/fsl-sec4.txt
crypto: caam - Updated SEC-4.0 device tree binding for ERA information.
[~andy/linux] / Documentation / devicetree / bindings / crypto / fsl-sec4.txt
1 =====================================================================
2 SEC 4 Device Tree Binding
3 Copyright (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
12    -Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node
13    -Full Example
14
15 NOTE: the SEC 4 is also known as Freescale's Cryptographic Accelerator
16 Accelerator and Assurance Module (CAAM).
17
18 =====================================================================
19 Overview
20
21 DESCRIPTION
22
23 SEC 4 h/w can process requests from 2 types of sources.
24 1. DPAA Queue Interface (HW interface between Queue Manager & SEC 4).
25 2. Job Rings (HW interface between cores & SEC 4 registers).
26
27 High Speed Data Path Configuration:
28
29 HW interface between QM & SEC 4 and also BM & SEC 4, on DPAA-enabled parts
30 such as the P4080.  The number of simultaneous dequeues the QI can make is
31 equal to the number of Descriptor Controller (DECO) engines in a particular
32 SEC version.  E.g., the SEC 4.0 in the P4080 has 5 DECOs and can thus
33 dequeue from 5 subportals simultaneously.
34
35 Job Ring Data Path Configuration:
36
37 Each JR is located on a separate 4k page, they may (or may not) be made visible
38 in the memory partition devoted to a particular core.  The P4080 has 4 JRs, so
39 up to 4 JRs can be configured; and all 4 JRs process requests in parallel.
40
41 =====================================================================
42 SEC 4 Node
43
44 Description
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
52 PROPERTIES
53
54    - compatible
55       Usage: required
56       Value type: <string>
57       Definition: Must include "fsl,sec-v4.0". Also includes SEC
58            ERA versions (optional) with which the device is compatible.
59
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
77           address and length of the SEC4 configuration registers.
78           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
108 EXAMPLE
109         crypto@300000 {
110                 compatible = "fsl,sec-v4.0", "fsl,sec-era-v2.0";
111                 #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 =====================================================================
120 Job Ring (JR) Node
121
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>
132       Definition: Must include "fsl,sec-v4.0-job-ring"
133
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
166 EXAMPLE
167         jr@1000 {
168                 compatible = "fsl,sec-v4.0-job-ring";
169                 reg = <0x1000 0x1000>;
170                 fsl,liodn = <0x081>;
171                 interrupt-parent = <&mpic>;
172                 interrupts = <88 2>;
173         };
174
175
176 =====================================================================
177 Run Time Integrity Check (RTIC) Node
178
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>
190       Definition: Must include "fsl,sec-v4.0-rtic".
191
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
221 EXAMPLE
222         rtic@6000 {
223                 compatible = "fsl,sec-v4.0-rtic";
224                 #address-cells = <1>;
225                 #size-cells = <1>;
226                 reg = <0x6000 0x100>;
227                 ranges = <0x0 0x6100 0xe00>;
228         };
229
230 =====================================================================
231 Run Time Integrity Check (RTIC) Memory Node
232   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>
241       Definition: Must include "fsl,sec-v4.0-rtic-memory".
242
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
271 EXAMPLE
272         rtic-a@0 {
273                 compatible = "fsl,sec-v4.0-rtic-memory";
274                 reg = <0x00 0x20 0x100 0x80>;
275                 fsl,liodn   = <0x03c>;
276                 fsl,rtic-region  = <0x12345678 0x12345678 0x12345678>;
277         };
278
279 =====================================================================
280 Secure Non-Volatile Storage (SNVS) Node
281
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>
290       Definition: Must include "fsl,sec-v4.0-mon".
291
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
299    - #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
320    - 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
336 EXAMPLE
337         sec_mon@314000 {
338                 compatible = "fsl,sec-v4.0-mon";
339                 reg = <0x314000 0x1000>;
340                 ranges = <0 0x314000 0x1000>;
341                 interrupt-parent = <&mpic>;
342                 interrupts = <93 2>;
343         };
344
345 =====================================================================
346 Secure 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
361 EXAMPLE
362         sec_mon_rtc_lp@314000 {
363                 compatible = "fsl,sec-v4.0-mon-rtc-lp";
364                 reg = <0x34 0x58>;
365         };
366
367 =====================================================================
368 FULL EXAMPLE
369
370         crypto: crypto@300000 {
371                 compatible = "fsl,sec-v4.0";
372                 #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 {
380                         compatible = "fsl,sec-v4.0-job-ring";
381                         reg = <0x1000 0x1000>;
382                         interrupt-parent = <&mpic>;
383                         interrupts = <88 2>;
384                 };
385
386                 sec_jr1: jr@2000 {
387                         compatible = "fsl,sec-v4.0-job-ring";
388                         reg = <0x2000 0x1000>;
389                         interrupt-parent = <&mpic>;
390                         interrupts = <89 2>;
391                 };
392
393                 sec_jr2: jr@3000 {
394                         compatible = "fsl,sec-v4.0-job-ring";
395                         reg = <0x3000 0x1000>;
396                         interrupt-parent = <&mpic>;
397                         interrupts = <90 2>;
398                 };
399
400                 sec_jr3: jr@4000 {
401                         compatible = "fsl,sec-v4.0-job-ring";
402                         reg = <0x4000 0x1000>;
403                         interrupt-parent = <&mpic>;
404                         interrupts = <91 2>;
405                 };
406
407                 rtic@6000 {
408                         compatible = "fsl,sec-v4.0-rtic";
409                         #address-cells = <1>;
410                         #size-cells = <1>;
411                         reg = <0x6000 0x100>;
412                         ranges = <0x0 0x6100 0xe00>;
413
414                         rtic_a: rtic-a@0 {
415                                 compatible = "fsl,sec-v4.0-rtic-memory";
416                                 reg = <0x00 0x20 0x100 0x80>;
417                         };
418
419                         rtic_b: rtic-b@20 {
420                                 compatible = "fsl,sec-v4.0-rtic-memory";
421                                 reg = <0x20 0x20 0x200 0x80>;
422                         };
423
424                         rtic_c: rtic-c@40 {
425                                 compatible = "fsl,sec-v4.0-rtic-memory";
426                                 reg = <0x40 0x20 0x300 0x80>;
427                         };
428
429                         rtic_d: rtic-d@60 {
430                                 compatible = "fsl,sec-v4.0-rtic-memory";
431                                 reg = <0x60 0x20 0x500 0x80>;
432                         };
433                 };
434         };
435
436         sec_mon: sec_mon@314000 {
437                 compatible = "fsl,sec-v4.0-mon";
438                 reg = <0x314000 0x1000>;
439                 ranges = <0 0x314000 0x1000>;
440                 interrupt-parent = <&mpic>;
441                 interrupts = <93 2>;
442
443                 sec_mon_rtc_lp@34 {
444                         compatible = "fsl,sec-v4.0-mon-rtc-lp";
445                         reg = <0x34 0x58>;
446                 };
447         };
448
449 =====================================================================