xref: /freebsd/sys/contrib/device-tree/Bindings/crypto/fsl-sec4.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot=====================================================================
2*c66ec88fSEmmanuel VadotSEC 4 Device Tree Binding
3*c66ec88fSEmmanuel VadotCopyright (C) 2008-2011 Freescale Semiconductor Inc.
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel Vadot CONTENTS
6*c66ec88fSEmmanuel Vadot   -Overview
7*c66ec88fSEmmanuel Vadot   -SEC 4 Node
8*c66ec88fSEmmanuel Vadot   -Job Ring Node
9*c66ec88fSEmmanuel Vadot   -Run Time Integrity Check (RTIC) Node
10*c66ec88fSEmmanuel Vadot   -Run Time Integrity Check (RTIC) Memory Node
11*c66ec88fSEmmanuel Vadot   -Secure Non-Volatile Storage (SNVS) Node
12*c66ec88fSEmmanuel Vadot   -Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node
13*c66ec88fSEmmanuel Vadot   -Full Example
14*c66ec88fSEmmanuel Vadot
15*c66ec88fSEmmanuel VadotNOTE: the SEC 4 is also known as Freescale's Cryptographic Accelerator
16*c66ec88fSEmmanuel VadotAccelerator and Assurance Module (CAAM).
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel Vadot=====================================================================
19*c66ec88fSEmmanuel VadotOverview
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel VadotDESCRIPTION
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel VadotSEC 4 h/w can process requests from 2 types of sources.
24*c66ec88fSEmmanuel Vadot1. DPAA Queue Interface (HW interface between Queue Manager & SEC 4).
25*c66ec88fSEmmanuel Vadot2. Job Rings (HW interface between cores & SEC 4 registers).
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel VadotHigh Speed Data Path Configuration:
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel VadotHW interface between QM & SEC 4 and also BM & SEC 4, on DPAA-enabled parts
30*c66ec88fSEmmanuel Vadotsuch as the P4080.  The number of simultaneous dequeues the QI can make is
31*c66ec88fSEmmanuel Vadotequal to the number of Descriptor Controller (DECO) engines in a particular
32*c66ec88fSEmmanuel VadotSEC version.  E.g., the SEC 4.0 in the P4080 has 5 DECOs and can thus
33*c66ec88fSEmmanuel Vadotdequeue from 5 subportals simultaneously.
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotJob Ring Data Path Configuration:
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel VadotEach JR is located on a separate 4k page, they may (or may not) be made visible
38*c66ec88fSEmmanuel Vadotin the memory partition devoted to a particular core.  The P4080 has 4 JRs, so
39*c66ec88fSEmmanuel Vadotup to 4 JRs can be configured; and all 4 JRs process requests in parallel.
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel Vadot=====================================================================
42*c66ec88fSEmmanuel VadotSEC 4 Node
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel VadotDescription
45*c66ec88fSEmmanuel Vadot
46*c66ec88fSEmmanuel Vadot    Node defines the base address of the SEC 4 block.
47*c66ec88fSEmmanuel Vadot    This block specifies the address range of all global
48*c66ec88fSEmmanuel Vadot    configuration registers for the SEC 4 block.  It
49*c66ec88fSEmmanuel Vadot    also receives interrupts from the Run Time Integrity Check
50*c66ec88fSEmmanuel Vadot    (RTIC) function within the SEC 4 block.
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel VadotPROPERTIES
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadot   - compatible
55*c66ec88fSEmmanuel Vadot      Usage: required
56*c66ec88fSEmmanuel Vadot      Value type: <string>
57*c66ec88fSEmmanuel Vadot      Definition: Must include "fsl,sec-v4.0"
58*c66ec88fSEmmanuel Vadot
59*c66ec88fSEmmanuel Vadot   - fsl,sec-era
60*c66ec88fSEmmanuel Vadot      Usage: optional
61*c66ec88fSEmmanuel Vadot      Value type: <u32>
62*c66ec88fSEmmanuel Vadot      Definition: A standard property. Define the 'ERA' of the SEC
63*c66ec88fSEmmanuel Vadot          device.
64*c66ec88fSEmmanuel Vadot
65*c66ec88fSEmmanuel Vadot   - #address-cells
66*c66ec88fSEmmanuel Vadot       Usage: required
67*c66ec88fSEmmanuel Vadot       Value type: <u32>
68*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Defines the number of cells
69*c66ec88fSEmmanuel Vadot           for representing physical addresses in child nodes.
70*c66ec88fSEmmanuel Vadot
71*c66ec88fSEmmanuel Vadot   - #size-cells
72*c66ec88fSEmmanuel Vadot       Usage: required
73*c66ec88fSEmmanuel Vadot       Value type: <u32>
74*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Defines the number of cells
75*c66ec88fSEmmanuel Vadot           for representing the size of physical addresses in
76*c66ec88fSEmmanuel Vadot           child nodes.
77*c66ec88fSEmmanuel Vadot
78*c66ec88fSEmmanuel Vadot   - reg
79*c66ec88fSEmmanuel Vadot      Usage: required
80*c66ec88fSEmmanuel Vadot      Value type: <prop-encoded-array>
81*c66ec88fSEmmanuel Vadot      Definition: A standard property.  Specifies the physical
82*c66ec88fSEmmanuel Vadot          address and length of the SEC4 configuration registers.
83*c66ec88fSEmmanuel Vadot          registers
84*c66ec88fSEmmanuel Vadot
85*c66ec88fSEmmanuel Vadot   - ranges
86*c66ec88fSEmmanuel Vadot       Usage: required
87*c66ec88fSEmmanuel Vadot       Value type: <prop-encoded-array>
88*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Specifies the physical address
89*c66ec88fSEmmanuel Vadot           range of the SEC 4.0 register space (-SNVS not included).  A
90*c66ec88fSEmmanuel Vadot           triplet that includes the child address, parent address, &
91*c66ec88fSEmmanuel Vadot           length.
92*c66ec88fSEmmanuel Vadot
93*c66ec88fSEmmanuel Vadot   - interrupts
94*c66ec88fSEmmanuel Vadot      Usage: required
95*c66ec88fSEmmanuel Vadot      Value type: <prop_encoded-array>
96*c66ec88fSEmmanuel Vadot      Definition:  Specifies the interrupts generated by this
97*c66ec88fSEmmanuel Vadot           device.  The value of the interrupts property
98*c66ec88fSEmmanuel Vadot           consists of one interrupt specifier. The format
99*c66ec88fSEmmanuel Vadot           of the specifier is defined by the binding document
100*c66ec88fSEmmanuel Vadot           describing the node's interrupt parent.
101*c66ec88fSEmmanuel Vadot
102*c66ec88fSEmmanuel Vadot   - clocks
103*c66ec88fSEmmanuel Vadot      Usage: required if SEC 4.0 requires explicit enablement of clocks
104*c66ec88fSEmmanuel Vadot      Value type: <prop_encoded-array>
105*c66ec88fSEmmanuel Vadot      Definition:  A list of phandle and clock specifier pairs describing
106*c66ec88fSEmmanuel Vadot          the clocks required for enabling and disabling SEC 4.0.
107*c66ec88fSEmmanuel Vadot
108*c66ec88fSEmmanuel Vadot   - clock-names
109*c66ec88fSEmmanuel Vadot      Usage: required if SEC 4.0 requires explicit enablement of clocks
110*c66ec88fSEmmanuel Vadot      Value type: <string>
111*c66ec88fSEmmanuel Vadot      Definition: A list of clock name strings in the same order as the
112*c66ec88fSEmmanuel Vadot          clocks property.
113*c66ec88fSEmmanuel Vadot
114*c66ec88fSEmmanuel Vadot   Note: All other standard properties (see the Devicetree Specification)
115*c66ec88fSEmmanuel Vadot   are allowed but are optional.
116*c66ec88fSEmmanuel Vadot
117*c66ec88fSEmmanuel Vadot
118*c66ec88fSEmmanuel VadotEXAMPLE
119*c66ec88fSEmmanuel Vadot
120*c66ec88fSEmmanuel VadotiMX6QDL/SX requires four clocks
121*c66ec88fSEmmanuel Vadot
122*c66ec88fSEmmanuel Vadot	crypto@300000 {
123*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0";
124*c66ec88fSEmmanuel Vadot		fsl,sec-era = <2>;
125*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
126*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
127*c66ec88fSEmmanuel Vadot		reg = <0x300000 0x10000>;
128*c66ec88fSEmmanuel Vadot		ranges = <0 0x300000 0x10000>;
129*c66ec88fSEmmanuel Vadot		interrupt-parent = <&mpic>;
130*c66ec88fSEmmanuel Vadot		interrupts = <92 2>;
131*c66ec88fSEmmanuel Vadot		clocks = <&clks IMX6QDL_CLK_CAAM_MEM>,
132*c66ec88fSEmmanuel Vadot			 <&clks IMX6QDL_CLK_CAAM_ACLK>,
133*c66ec88fSEmmanuel Vadot			 <&clks IMX6QDL_CLK_CAAM_IPG>,
134*c66ec88fSEmmanuel Vadot			 <&clks IMX6QDL_CLK_EIM_SLOW>;
135*c66ec88fSEmmanuel Vadot		clock-names = "mem", "aclk", "ipg", "emi_slow";
136*c66ec88fSEmmanuel Vadot	};
137*c66ec88fSEmmanuel Vadot
138*c66ec88fSEmmanuel Vadot
139*c66ec88fSEmmanuel VadotiMX6UL does only require three clocks
140*c66ec88fSEmmanuel Vadot
141*c66ec88fSEmmanuel Vadot	crypto: crypto@2140000 {
142*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0";
143*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
144*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
145*c66ec88fSEmmanuel Vadot		reg = <0x2140000 0x3c000>;
146*c66ec88fSEmmanuel Vadot		ranges = <0 0x2140000 0x3c000>;
147*c66ec88fSEmmanuel Vadot		interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
148*c66ec88fSEmmanuel Vadot
149*c66ec88fSEmmanuel Vadot		clocks = <&clks IMX6UL_CLK_CAAM_MEM>,
150*c66ec88fSEmmanuel Vadot			 <&clks IMX6UL_CLK_CAAM_ACLK>,
151*c66ec88fSEmmanuel Vadot			 <&clks IMX6UL_CLK_CAAM_IPG>;
152*c66ec88fSEmmanuel Vadot		clock-names = "mem", "aclk", "ipg";
153*c66ec88fSEmmanuel Vadot	};
154*c66ec88fSEmmanuel Vadot
155*c66ec88fSEmmanuel Vadot=====================================================================
156*c66ec88fSEmmanuel VadotJob Ring (JR) Node
157*c66ec88fSEmmanuel Vadot
158*c66ec88fSEmmanuel Vadot    Child of the crypto node defines data processing interface to SEC 4
159*c66ec88fSEmmanuel Vadot    across the peripheral bus for purposes of processing
160*c66ec88fSEmmanuel Vadot    cryptographic descriptors. The specified address
161*c66ec88fSEmmanuel Vadot    range can be made visible to one (or more) cores.
162*c66ec88fSEmmanuel Vadot    The interrupt defined for this node is controlled within
163*c66ec88fSEmmanuel Vadot    the address range of this node.
164*c66ec88fSEmmanuel Vadot
165*c66ec88fSEmmanuel Vadot  - compatible
166*c66ec88fSEmmanuel Vadot      Usage: required
167*c66ec88fSEmmanuel Vadot      Value type: <string>
168*c66ec88fSEmmanuel Vadot      Definition: Must include "fsl,sec-v4.0-job-ring"
169*c66ec88fSEmmanuel Vadot
170*c66ec88fSEmmanuel Vadot  - reg
171*c66ec88fSEmmanuel Vadot      Usage: required
172*c66ec88fSEmmanuel Vadot      Value type: <prop-encoded-array>
173*c66ec88fSEmmanuel Vadot      Definition: Specifies a two JR parameters:  an offset from
174*c66ec88fSEmmanuel Vadot          the parent physical address and the length the JR registers.
175*c66ec88fSEmmanuel Vadot
176*c66ec88fSEmmanuel Vadot   - fsl,liodn
177*c66ec88fSEmmanuel Vadot       Usage: optional-but-recommended
178*c66ec88fSEmmanuel Vadot       Value type: <prop-encoded-array>
179*c66ec88fSEmmanuel Vadot       Definition:
180*c66ec88fSEmmanuel Vadot           Specifies the LIODN to be used in conjunction with
181*c66ec88fSEmmanuel Vadot           the ppid-to-liodn table that specifies the PPID to LIODN mapping.
182*c66ec88fSEmmanuel Vadot           Needed if the PAMU is used.  Value is a 12 bit value
183*c66ec88fSEmmanuel Vadot           where value is a LIODN ID for this JR. This property is
184*c66ec88fSEmmanuel Vadot           normally set by boot firmware.
185*c66ec88fSEmmanuel Vadot
186*c66ec88fSEmmanuel Vadot   - interrupts
187*c66ec88fSEmmanuel Vadot      Usage: required
188*c66ec88fSEmmanuel Vadot      Value type: <prop_encoded-array>
189*c66ec88fSEmmanuel Vadot      Definition:  Specifies the interrupts generated by this
190*c66ec88fSEmmanuel Vadot           device.  The value of the interrupts property
191*c66ec88fSEmmanuel Vadot           consists of one interrupt specifier. The format
192*c66ec88fSEmmanuel Vadot           of the specifier is defined by the binding document
193*c66ec88fSEmmanuel Vadot           describing the node's interrupt parent.
194*c66ec88fSEmmanuel Vadot
195*c66ec88fSEmmanuel VadotEXAMPLE
196*c66ec88fSEmmanuel Vadot	jr@1000 {
197*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0-job-ring";
198*c66ec88fSEmmanuel Vadot		reg = <0x1000 0x1000>;
199*c66ec88fSEmmanuel Vadot		fsl,liodn = <0x081>;
200*c66ec88fSEmmanuel Vadot		interrupt-parent = <&mpic>;
201*c66ec88fSEmmanuel Vadot		interrupts = <88 2>;
202*c66ec88fSEmmanuel Vadot	};
203*c66ec88fSEmmanuel Vadot
204*c66ec88fSEmmanuel Vadot
205*c66ec88fSEmmanuel Vadot=====================================================================
206*c66ec88fSEmmanuel VadotRun Time Integrity Check (RTIC) Node
207*c66ec88fSEmmanuel Vadot
208*c66ec88fSEmmanuel Vadot  Child node of the crypto node.  Defines a register space that
209*c66ec88fSEmmanuel Vadot  contains up to 5 sets of addresses and their lengths (sizes) that
210*c66ec88fSEmmanuel Vadot  will be checked at run time.  After an initial hash result is
211*c66ec88fSEmmanuel Vadot  calculated, these addresses are checked by HW to monitor any
212*c66ec88fSEmmanuel Vadot  change.  If any memory is modified, a Security Violation is
213*c66ec88fSEmmanuel Vadot  triggered (see SNVS definition).
214*c66ec88fSEmmanuel Vadot
215*c66ec88fSEmmanuel Vadot
216*c66ec88fSEmmanuel Vadot  - compatible
217*c66ec88fSEmmanuel Vadot      Usage: required
218*c66ec88fSEmmanuel Vadot      Value type: <string>
219*c66ec88fSEmmanuel Vadot      Definition: Must include "fsl,sec-v4.0-rtic".
220*c66ec88fSEmmanuel Vadot
221*c66ec88fSEmmanuel Vadot   - #address-cells
222*c66ec88fSEmmanuel Vadot       Usage: required
223*c66ec88fSEmmanuel Vadot       Value type: <u32>
224*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Defines the number of cells
225*c66ec88fSEmmanuel Vadot           for representing physical addresses in child nodes.  Must
226*c66ec88fSEmmanuel Vadot           have a value of 1.
227*c66ec88fSEmmanuel Vadot
228*c66ec88fSEmmanuel Vadot   - #size-cells
229*c66ec88fSEmmanuel Vadot       Usage: required
230*c66ec88fSEmmanuel Vadot       Value type: <u32>
231*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Defines the number of cells
232*c66ec88fSEmmanuel Vadot           for representing the size of physical addresses in
233*c66ec88fSEmmanuel Vadot           child nodes.  Must have a value of 1.
234*c66ec88fSEmmanuel Vadot
235*c66ec88fSEmmanuel Vadot  - reg
236*c66ec88fSEmmanuel Vadot      Usage: required
237*c66ec88fSEmmanuel Vadot      Value type: <prop-encoded-array>
238*c66ec88fSEmmanuel Vadot      Definition: A standard property.  Specifies a two parameters:
239*c66ec88fSEmmanuel Vadot          an offset from the parent physical address and the length
240*c66ec88fSEmmanuel Vadot          the SEC4 registers.
241*c66ec88fSEmmanuel Vadot
242*c66ec88fSEmmanuel Vadot   - ranges
243*c66ec88fSEmmanuel Vadot       Usage: required
244*c66ec88fSEmmanuel Vadot       Value type: <prop-encoded-array>
245*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Specifies the physical address
246*c66ec88fSEmmanuel Vadot           range of the SEC 4 register space (-SNVS not included).  A
247*c66ec88fSEmmanuel Vadot           triplet that includes the child address, parent address, &
248*c66ec88fSEmmanuel Vadot           length.
249*c66ec88fSEmmanuel Vadot
250*c66ec88fSEmmanuel VadotEXAMPLE
251*c66ec88fSEmmanuel Vadot	rtic@6000 {
252*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0-rtic";
253*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
254*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
255*c66ec88fSEmmanuel Vadot		reg = <0x6000 0x100>;
256*c66ec88fSEmmanuel Vadot		ranges = <0x0 0x6100 0xe00>;
257*c66ec88fSEmmanuel Vadot	};
258*c66ec88fSEmmanuel Vadot
259*c66ec88fSEmmanuel Vadot=====================================================================
260*c66ec88fSEmmanuel VadotRun Time Integrity Check (RTIC) Memory Node
261*c66ec88fSEmmanuel Vadot  A child node that defines individual RTIC memory regions that are used to
262*c66ec88fSEmmanuel Vadot  perform run-time integrity check of memory areas that should not modified.
263*c66ec88fSEmmanuel Vadot  The node defines a register that contains the memory address &
264*c66ec88fSEmmanuel Vadot  length (combined) and a second register that contains the hash result
265*c66ec88fSEmmanuel Vadot  in big endian format.
266*c66ec88fSEmmanuel Vadot
267*c66ec88fSEmmanuel Vadot  - compatible
268*c66ec88fSEmmanuel Vadot      Usage: required
269*c66ec88fSEmmanuel Vadot      Value type: <string>
270*c66ec88fSEmmanuel Vadot      Definition: Must include "fsl,sec-v4.0-rtic-memory".
271*c66ec88fSEmmanuel Vadot
272*c66ec88fSEmmanuel Vadot  - reg
273*c66ec88fSEmmanuel Vadot      Usage: required
274*c66ec88fSEmmanuel Vadot      Value type: <prop-encoded-array>
275*c66ec88fSEmmanuel Vadot      Definition: A standard property.  Specifies two parameters:
276*c66ec88fSEmmanuel Vadot          an offset from the parent physical address and the length:
277*c66ec88fSEmmanuel Vadot
278*c66ec88fSEmmanuel Vadot          1. The location of the RTIC memory address & length registers.
279*c66ec88fSEmmanuel Vadot          2. The location RTIC hash result.
280*c66ec88fSEmmanuel Vadot
281*c66ec88fSEmmanuel Vadot  - fsl,rtic-region
282*c66ec88fSEmmanuel Vadot       Usage: optional-but-recommended
283*c66ec88fSEmmanuel Vadot       Value type: <prop-encoded-array>
284*c66ec88fSEmmanuel Vadot       Definition:
285*c66ec88fSEmmanuel Vadot           Specifies the HW address (36 bit address) for this region
286*c66ec88fSEmmanuel Vadot           followed by the length of the HW partition to be checked;
287*c66ec88fSEmmanuel Vadot           the address is represented as a 64 bit quantity followed
288*c66ec88fSEmmanuel Vadot           by a 32 bit length.
289*c66ec88fSEmmanuel Vadot
290*c66ec88fSEmmanuel Vadot   - fsl,liodn
291*c66ec88fSEmmanuel Vadot       Usage: optional-but-recommended
292*c66ec88fSEmmanuel Vadot       Value type: <prop-encoded-array>
293*c66ec88fSEmmanuel Vadot       Definition:
294*c66ec88fSEmmanuel Vadot           Specifies the LIODN to be used in conjunction with
295*c66ec88fSEmmanuel Vadot           the ppid-to-liodn table that specifies the PPID to LIODN
296*c66ec88fSEmmanuel Vadot           mapping.  Needed if the PAMU is used.  Value is a 12 bit value
297*c66ec88fSEmmanuel Vadot           where value is a LIODN ID for this RTIC memory region. This
298*c66ec88fSEmmanuel Vadot           property is normally set by boot firmware.
299*c66ec88fSEmmanuel Vadot
300*c66ec88fSEmmanuel VadotEXAMPLE
301*c66ec88fSEmmanuel Vadot	rtic-a@0 {
302*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0-rtic-memory";
303*c66ec88fSEmmanuel Vadot		reg = <0x00 0x20 0x100 0x80>;
304*c66ec88fSEmmanuel Vadot		fsl,liodn   = <0x03c>;
305*c66ec88fSEmmanuel Vadot		fsl,rtic-region  = <0x12345678 0x12345678 0x12345678>;
306*c66ec88fSEmmanuel Vadot	};
307*c66ec88fSEmmanuel Vadot
308*c66ec88fSEmmanuel Vadot=====================================================================
309*c66ec88fSEmmanuel VadotSecure Non-Volatile Storage (SNVS) Node
310*c66ec88fSEmmanuel Vadot
311*c66ec88fSEmmanuel Vadot    Node defines address range and the associated
312*c66ec88fSEmmanuel Vadot    interrupt for the SNVS function.  This function
313*c66ec88fSEmmanuel Vadot    monitors security state information & reports
314*c66ec88fSEmmanuel Vadot    security violations. This also included rtc,
315*c66ec88fSEmmanuel Vadot    system power off and ON/OFF key.
316*c66ec88fSEmmanuel Vadot
317*c66ec88fSEmmanuel Vadot  - compatible
318*c66ec88fSEmmanuel Vadot      Usage: required
319*c66ec88fSEmmanuel Vadot      Value type: <string>
320*c66ec88fSEmmanuel Vadot      Definition: Must include "fsl,sec-v4.0-mon" and "syscon".
321*c66ec88fSEmmanuel Vadot
322*c66ec88fSEmmanuel Vadot  - reg
323*c66ec88fSEmmanuel Vadot      Usage: required
324*c66ec88fSEmmanuel Vadot      Value type: <prop-encoded-array>
325*c66ec88fSEmmanuel Vadot      Definition: A standard property.  Specifies the physical
326*c66ec88fSEmmanuel Vadot          address and length of the SEC4 configuration
327*c66ec88fSEmmanuel Vadot          registers.
328*c66ec88fSEmmanuel Vadot
329*c66ec88fSEmmanuel Vadot   - #address-cells
330*c66ec88fSEmmanuel Vadot       Usage: required
331*c66ec88fSEmmanuel Vadot       Value type: <u32>
332*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Defines the number of cells
333*c66ec88fSEmmanuel Vadot           for representing physical addresses in child nodes.  Must
334*c66ec88fSEmmanuel Vadot           have a value of 1.
335*c66ec88fSEmmanuel Vadot
336*c66ec88fSEmmanuel Vadot   - #size-cells
337*c66ec88fSEmmanuel Vadot       Usage: required
338*c66ec88fSEmmanuel Vadot       Value type: <u32>
339*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Defines the number of cells
340*c66ec88fSEmmanuel Vadot           for representing the size of physical addresses in
341*c66ec88fSEmmanuel Vadot           child nodes.  Must have a value of 1.
342*c66ec88fSEmmanuel Vadot
343*c66ec88fSEmmanuel Vadot   - ranges
344*c66ec88fSEmmanuel Vadot       Usage: required
345*c66ec88fSEmmanuel Vadot       Value type: <prop-encoded-array>
346*c66ec88fSEmmanuel Vadot       Definition: A standard property.  Specifies the physical address
347*c66ec88fSEmmanuel Vadot           range of the SNVS register space.  A triplet that includes
348*c66ec88fSEmmanuel Vadot           the child address, parent address, & length.
349*c66ec88fSEmmanuel Vadot
350*c66ec88fSEmmanuel Vadot   - interrupts
351*c66ec88fSEmmanuel Vadot      Usage: optional
352*c66ec88fSEmmanuel Vadot      Value type: <prop_encoded-array>
353*c66ec88fSEmmanuel Vadot      Definition:  Specifies the interrupts generated by this
354*c66ec88fSEmmanuel Vadot           device.  The value of the interrupts property
355*c66ec88fSEmmanuel Vadot           consists of one interrupt specifier. The format
356*c66ec88fSEmmanuel Vadot           of the specifier is defined by the binding document
357*c66ec88fSEmmanuel Vadot           describing the node's interrupt parent.
358*c66ec88fSEmmanuel Vadot
359*c66ec88fSEmmanuel VadotEXAMPLE
360*c66ec88fSEmmanuel Vadot	sec_mon@314000 {
361*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0-mon", "syscon";
362*c66ec88fSEmmanuel Vadot		reg = <0x314000 0x1000>;
363*c66ec88fSEmmanuel Vadot		ranges = <0 0x314000 0x1000>;
364*c66ec88fSEmmanuel Vadot		interrupt-parent = <&mpic>;
365*c66ec88fSEmmanuel Vadot		interrupts = <93 2>;
366*c66ec88fSEmmanuel Vadot	};
367*c66ec88fSEmmanuel Vadot
368*c66ec88fSEmmanuel Vadot=====================================================================
369*c66ec88fSEmmanuel VadotSecure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node
370*c66ec88fSEmmanuel Vadot
371*c66ec88fSEmmanuel Vadot  A SNVS child node that defines SNVS LP RTC.
372*c66ec88fSEmmanuel Vadot
373*c66ec88fSEmmanuel Vadot  - compatible
374*c66ec88fSEmmanuel Vadot      Usage: required
375*c66ec88fSEmmanuel Vadot      Value type: <string>
376*c66ec88fSEmmanuel Vadot      Definition: Must include "fsl,sec-v4.0-mon-rtc-lp".
377*c66ec88fSEmmanuel Vadot
378*c66ec88fSEmmanuel Vadot  - interrupts
379*c66ec88fSEmmanuel Vadot      Usage: required
380*c66ec88fSEmmanuel Vadot      Value type: <prop_encoded-array>
381*c66ec88fSEmmanuel Vadot      Definition: Specifies the interrupts generated by this
382*c66ec88fSEmmanuel Vadot	   device.  The value of the interrupts property
383*c66ec88fSEmmanuel Vadot	   consists of one interrupt specifier. The format
384*c66ec88fSEmmanuel Vadot	   of the specifier is defined by the binding document
385*c66ec88fSEmmanuel Vadot	   describing the node's interrupt parent.
386*c66ec88fSEmmanuel Vadot
387*c66ec88fSEmmanuel Vadot - regmap
388*c66ec88fSEmmanuel Vadot	Usage: required
389*c66ec88fSEmmanuel Vadot	Value type: <phandle>
390*c66ec88fSEmmanuel Vadot	Definition: this is phandle to the register map node.
391*c66ec88fSEmmanuel Vadot
392*c66ec88fSEmmanuel Vadot - offset
393*c66ec88fSEmmanuel Vadot	Usage: option
394*c66ec88fSEmmanuel Vadot	value type: <u32>
395*c66ec88fSEmmanuel Vadot	Definition: LP register offset. default it is 0x34.
396*c66ec88fSEmmanuel Vadot
397*c66ec88fSEmmanuel Vadot   - clocks
398*c66ec88fSEmmanuel Vadot      Usage: optional, required if SNVS LP RTC requires explicit
399*c66ec88fSEmmanuel Vadot          enablement of clocks
400*c66ec88fSEmmanuel Vadot      Value type: <prop_encoded-array>
401*c66ec88fSEmmanuel Vadot      Definition:  a clock specifier describing the clock required for
402*c66ec88fSEmmanuel Vadot          enabling and disabling SNVS LP RTC.
403*c66ec88fSEmmanuel Vadot
404*c66ec88fSEmmanuel Vadot   - clock-names
405*c66ec88fSEmmanuel Vadot      Usage: optional, required if SNVS LP RTC requires explicit
406*c66ec88fSEmmanuel Vadot          enablement of clocks
407*c66ec88fSEmmanuel Vadot      Value type: <string>
408*c66ec88fSEmmanuel Vadot      Definition: clock name string should be "snvs-rtc".
409*c66ec88fSEmmanuel Vadot
410*c66ec88fSEmmanuel VadotEXAMPLE
411*c66ec88fSEmmanuel Vadot	sec_mon_rtc_lp@1 {
412*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0-mon-rtc-lp";
413*c66ec88fSEmmanuel Vadot		interrupts = <93 2>;
414*c66ec88fSEmmanuel Vadot		regmap = <&snvs>;
415*c66ec88fSEmmanuel Vadot		offset = <0x34>;
416*c66ec88fSEmmanuel Vadot		clocks = <&clks IMX7D_SNVS_CLK>;
417*c66ec88fSEmmanuel Vadot		clock-names = "snvs-rtc";
418*c66ec88fSEmmanuel Vadot	};
419*c66ec88fSEmmanuel Vadot
420*c66ec88fSEmmanuel Vadot=====================================================================
421*c66ec88fSEmmanuel VadotSystem ON/OFF key driver
422*c66ec88fSEmmanuel Vadot
423*c66ec88fSEmmanuel Vadot  The snvs-pwrkey is designed to enable POWER key function which controlled
424*c66ec88fSEmmanuel Vadot  by SNVS ONOFF, the driver can report the status of POWER key and wakeup
425*c66ec88fSEmmanuel Vadot  system if pressed after system suspend.
426*c66ec88fSEmmanuel Vadot
427*c66ec88fSEmmanuel Vadot  - compatible:
428*c66ec88fSEmmanuel Vadot      Usage: required
429*c66ec88fSEmmanuel Vadot      Value type: <string>
430*c66ec88fSEmmanuel Vadot      Definition: Mush include "fsl,sec-v4.0-pwrkey".
431*c66ec88fSEmmanuel Vadot
432*c66ec88fSEmmanuel Vadot  - interrupts:
433*c66ec88fSEmmanuel Vadot      Usage: required
434*c66ec88fSEmmanuel Vadot      Value type: <prop_encoded-array>
435*c66ec88fSEmmanuel Vadot      Definition: The SNVS ON/OFF interrupt number to the CPU(s).
436*c66ec88fSEmmanuel Vadot
437*c66ec88fSEmmanuel Vadot  - linux,keycode:
438*c66ec88fSEmmanuel Vadot      Usage: option
439*c66ec88fSEmmanuel Vadot      Value type: <int>
440*c66ec88fSEmmanuel Vadot      Definition: Keycode to emit, KEY_POWER by default.
441*c66ec88fSEmmanuel Vadot
442*c66ec88fSEmmanuel Vadot  - wakeup-source:
443*c66ec88fSEmmanuel Vadot      Usage: option
444*c66ec88fSEmmanuel Vadot      Value type: <boo>
445*c66ec88fSEmmanuel Vadot      Definition: Button can wake-up the system.
446*c66ec88fSEmmanuel Vadot
447*c66ec88fSEmmanuel Vadot - regmap:
448*c66ec88fSEmmanuel Vadot      Usage: required:
449*c66ec88fSEmmanuel Vadot      Value type: <phandle>
450*c66ec88fSEmmanuel Vadot      Definition: this is phandle to the register map node.
451*c66ec88fSEmmanuel Vadot
452*c66ec88fSEmmanuel VadotEXAMPLE:
453*c66ec88fSEmmanuel Vadot	snvs-pwrkey@020cc000 {
454*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0-pwrkey";
455*c66ec88fSEmmanuel Vadot		regmap = <&snvs>;
456*c66ec88fSEmmanuel Vadot		interrupts = <0 4 0x4>
457*c66ec88fSEmmanuel Vadot	        linux,keycode = <116>; /* KEY_POWER */
458*c66ec88fSEmmanuel Vadot		wakeup-source;
459*c66ec88fSEmmanuel Vadot	};
460*c66ec88fSEmmanuel Vadot
461*c66ec88fSEmmanuel Vadot=====================================================================
462*c66ec88fSEmmanuel VadotFULL EXAMPLE
463*c66ec88fSEmmanuel Vadot
464*c66ec88fSEmmanuel Vadot	crypto: crypto@300000 {
465*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0";
466*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
467*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
468*c66ec88fSEmmanuel Vadot		reg = <0x300000 0x10000>;
469*c66ec88fSEmmanuel Vadot		ranges = <0 0x300000 0x10000>;
470*c66ec88fSEmmanuel Vadot		interrupt-parent = <&mpic>;
471*c66ec88fSEmmanuel Vadot		interrupts = <92 2>;
472*c66ec88fSEmmanuel Vadot
473*c66ec88fSEmmanuel Vadot		sec_jr0: jr@1000 {
474*c66ec88fSEmmanuel Vadot			compatible = "fsl,sec-v4.0-job-ring";
475*c66ec88fSEmmanuel Vadot			reg = <0x1000 0x1000>;
476*c66ec88fSEmmanuel Vadot			interrupt-parent = <&mpic>;
477*c66ec88fSEmmanuel Vadot			interrupts = <88 2>;
478*c66ec88fSEmmanuel Vadot		};
479*c66ec88fSEmmanuel Vadot
480*c66ec88fSEmmanuel Vadot		sec_jr1: jr@2000 {
481*c66ec88fSEmmanuel Vadot			compatible = "fsl,sec-v4.0-job-ring";
482*c66ec88fSEmmanuel Vadot			reg = <0x2000 0x1000>;
483*c66ec88fSEmmanuel Vadot			interrupt-parent = <&mpic>;
484*c66ec88fSEmmanuel Vadot			interrupts = <89 2>;
485*c66ec88fSEmmanuel Vadot		};
486*c66ec88fSEmmanuel Vadot
487*c66ec88fSEmmanuel Vadot		sec_jr2: jr@3000 {
488*c66ec88fSEmmanuel Vadot			compatible = "fsl,sec-v4.0-job-ring";
489*c66ec88fSEmmanuel Vadot			reg = <0x3000 0x1000>;
490*c66ec88fSEmmanuel Vadot			interrupt-parent = <&mpic>;
491*c66ec88fSEmmanuel Vadot			interrupts = <90 2>;
492*c66ec88fSEmmanuel Vadot		};
493*c66ec88fSEmmanuel Vadot
494*c66ec88fSEmmanuel Vadot		sec_jr3: jr@4000 {
495*c66ec88fSEmmanuel Vadot			compatible = "fsl,sec-v4.0-job-ring";
496*c66ec88fSEmmanuel Vadot			reg = <0x4000 0x1000>;
497*c66ec88fSEmmanuel Vadot			interrupt-parent = <&mpic>;
498*c66ec88fSEmmanuel Vadot			interrupts = <91 2>;
499*c66ec88fSEmmanuel Vadot		};
500*c66ec88fSEmmanuel Vadot
501*c66ec88fSEmmanuel Vadot		rtic@6000 {
502*c66ec88fSEmmanuel Vadot			compatible = "fsl,sec-v4.0-rtic";
503*c66ec88fSEmmanuel Vadot			#address-cells = <1>;
504*c66ec88fSEmmanuel Vadot			#size-cells = <1>;
505*c66ec88fSEmmanuel Vadot			reg = <0x6000 0x100>;
506*c66ec88fSEmmanuel Vadot			ranges = <0x0 0x6100 0xe00>;
507*c66ec88fSEmmanuel Vadot
508*c66ec88fSEmmanuel Vadot			rtic_a: rtic-a@0 {
509*c66ec88fSEmmanuel Vadot				compatible = "fsl,sec-v4.0-rtic-memory";
510*c66ec88fSEmmanuel Vadot				reg = <0x00 0x20 0x100 0x80>;
511*c66ec88fSEmmanuel Vadot			};
512*c66ec88fSEmmanuel Vadot
513*c66ec88fSEmmanuel Vadot			rtic_b: rtic-b@20 {
514*c66ec88fSEmmanuel Vadot				compatible = "fsl,sec-v4.0-rtic-memory";
515*c66ec88fSEmmanuel Vadot				reg = <0x20 0x20 0x200 0x80>;
516*c66ec88fSEmmanuel Vadot			};
517*c66ec88fSEmmanuel Vadot
518*c66ec88fSEmmanuel Vadot			rtic_c: rtic-c@40 {
519*c66ec88fSEmmanuel Vadot				compatible = "fsl,sec-v4.0-rtic-memory";
520*c66ec88fSEmmanuel Vadot				reg = <0x40 0x20 0x300 0x80>;
521*c66ec88fSEmmanuel Vadot			};
522*c66ec88fSEmmanuel Vadot
523*c66ec88fSEmmanuel Vadot			rtic_d: rtic-d@60 {
524*c66ec88fSEmmanuel Vadot				compatible = "fsl,sec-v4.0-rtic-memory";
525*c66ec88fSEmmanuel Vadot				reg = <0x60 0x20 0x500 0x80>;
526*c66ec88fSEmmanuel Vadot			};
527*c66ec88fSEmmanuel Vadot		};
528*c66ec88fSEmmanuel Vadot	};
529*c66ec88fSEmmanuel Vadot
530*c66ec88fSEmmanuel Vadot	sec_mon: sec_mon@314000 {
531*c66ec88fSEmmanuel Vadot		compatible = "fsl,sec-v4.0-mon";
532*c66ec88fSEmmanuel Vadot		reg = <0x314000 0x1000>;
533*c66ec88fSEmmanuel Vadot		ranges = <0 0x314000 0x1000>;
534*c66ec88fSEmmanuel Vadot
535*c66ec88fSEmmanuel Vadot		sec_mon_rtc_lp@34 {
536*c66ec88fSEmmanuel Vadot			compatible = "fsl,sec-v4.0-mon-rtc-lp";
537*c66ec88fSEmmanuel Vadot			regmap = <&sec_mon>;
538*c66ec88fSEmmanuel Vadot			offset = <0x34>;
539*c66ec88fSEmmanuel Vadot			interrupts = <93 2>;
540*c66ec88fSEmmanuel Vadot			clocks = <&clks IMX7D_SNVS_CLK>;
541*c66ec88fSEmmanuel Vadot			clock-names = "snvs-rtc";
542*c66ec88fSEmmanuel Vadot		};
543*c66ec88fSEmmanuel Vadot
544*c66ec88fSEmmanuel Vadot		snvs-pwrkey@020cc000 {
545*c66ec88fSEmmanuel Vadot			compatible = "fsl,sec-v4.0-pwrkey";
546*c66ec88fSEmmanuel Vadot			regmap = <&sec_mon>;
547*c66ec88fSEmmanuel Vadot			interrupts = <0 4 0x4>;
548*c66ec88fSEmmanuel Vadot			linux,keycode = <116>; /* KEY_POWER */
549*c66ec88fSEmmanuel Vadot			wakeup-source;
550*c66ec88fSEmmanuel Vadot		};
551*c66ec88fSEmmanuel Vadot	};
552*c66ec88fSEmmanuel Vadot
553*c66ec88fSEmmanuel Vadot=====================================================================
554