xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/crypto/fsl-sec6.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSEC 6 is as Freescale's Cryptographic Accelerator and Assurance Module (CAAM).
2*4882a593SmuzhiyunCurrently Freescale powerpc chip C29X is embedded with SEC 6.
3*4882a593SmuzhiyunSEC 6 device tree binding include:
4*4882a593Smuzhiyun   -SEC 6 Node
5*4882a593Smuzhiyun   -Job Ring Node
6*4882a593Smuzhiyun   -Full Example
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun=====================================================================
9*4882a593SmuzhiyunSEC 6 Node
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunDescription
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun    Node defines the base address of the SEC 6 block.
14*4882a593Smuzhiyun    This block specifies the address range of all global
15*4882a593Smuzhiyun    configuration registers for the SEC 6 block.
16*4882a593Smuzhiyun    For example, In C293, we could see three SEC 6 node.
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunPROPERTIES
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun   - compatible
21*4882a593Smuzhiyun      Usage: required
22*4882a593Smuzhiyun      Value type: <string>
23*4882a593Smuzhiyun      Definition: Must include "fsl,sec-v6.0".
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun   - fsl,sec-era
26*4882a593Smuzhiyun      Usage: optional
27*4882a593Smuzhiyun      Value type: <u32>
28*4882a593Smuzhiyun      Definition: A standard property. Define the 'ERA' of the SEC
29*4882a593Smuzhiyun          device.
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun   - #address-cells
32*4882a593Smuzhiyun       Usage: required
33*4882a593Smuzhiyun       Value type: <u32>
34*4882a593Smuzhiyun       Definition: A standard property.  Defines the number of cells
35*4882a593Smuzhiyun           for representing physical addresses in child nodes.
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun   - #size-cells
38*4882a593Smuzhiyun       Usage: required
39*4882a593Smuzhiyun       Value type: <u32>
40*4882a593Smuzhiyun       Definition: A standard property.  Defines the number of cells
41*4882a593Smuzhiyun           for representing the size of physical addresses in
42*4882a593Smuzhiyun           child nodes.
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun   - reg
45*4882a593Smuzhiyun      Usage: required
46*4882a593Smuzhiyun      Value type: <prop-encoded-array>
47*4882a593Smuzhiyun      Definition: A standard property.  Specifies the physical
48*4882a593Smuzhiyun          address and length of the SEC 6 configuration registers.
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun   - ranges
51*4882a593Smuzhiyun       Usage: required
52*4882a593Smuzhiyun       Value type: <prop-encoded-array>
53*4882a593Smuzhiyun       Definition: A standard property.  Specifies the physical address
54*4882a593Smuzhiyun           range of the SEC 6.0 register space (-SNVS not included).  A
55*4882a593Smuzhiyun           triplet that includes the child address, parent address, &
56*4882a593Smuzhiyun           length.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun   Note: All other standard properties (see the Devicetree Specification)
59*4882a593Smuzhiyun   are allowed but are optional.
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunEXAMPLE
62*4882a593Smuzhiyun	crypto@a0000 {
63*4882a593Smuzhiyun		compatible = "fsl,sec-v6.0";
64*4882a593Smuzhiyun		fsl,sec-era = <6>;
65*4882a593Smuzhiyun		#address-cells = <1>;
66*4882a593Smuzhiyun		#size-cells = <1>;
67*4882a593Smuzhiyun		reg = <0xa0000 0x20000>;
68*4882a593Smuzhiyun		ranges = <0 0xa0000 0x20000>;
69*4882a593Smuzhiyun	};
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun=====================================================================
72*4882a593SmuzhiyunJob Ring (JR) Node
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun    Child of the crypto node defines data processing interface to SEC 6
75*4882a593Smuzhiyun    across the peripheral bus for purposes of processing
76*4882a593Smuzhiyun    cryptographic descriptors. The specified address
77*4882a593Smuzhiyun    range can be made visible to one (or more) cores.
78*4882a593Smuzhiyun    The interrupt defined for this node is controlled within
79*4882a593Smuzhiyun    the address range of this node.
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun  - compatible
82*4882a593Smuzhiyun      Usage: required
83*4882a593Smuzhiyun      Value type: <string>
84*4882a593Smuzhiyun      Definition: Must include "fsl,sec-v6.0-job-ring".
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun  - reg
87*4882a593Smuzhiyun      Usage: required
88*4882a593Smuzhiyun      Value type: <prop-encoded-array>
89*4882a593Smuzhiyun      Definition: Specifies a two JR parameters:  an offset from
90*4882a593Smuzhiyun           the parent physical address and the length the JR registers.
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun   - interrupts
93*4882a593Smuzhiyun      Usage: required
94*4882a593Smuzhiyun      Value type: <prop_encoded-array>
95*4882a593Smuzhiyun      Definition:  Specifies the interrupts generated by this
96*4882a593Smuzhiyun           device.  The value of the interrupts property
97*4882a593Smuzhiyun           consists of one interrupt specifier. The format
98*4882a593Smuzhiyun           of the specifier is defined by the binding document
99*4882a593Smuzhiyun           describing the node's interrupt parent.
100*4882a593Smuzhiyun
101*4882a593SmuzhiyunEXAMPLE
102*4882a593Smuzhiyun	jr@1000 {
103*4882a593Smuzhiyun		compatible = "fsl,sec-v6.0-job-ring";
104*4882a593Smuzhiyun		reg = <0x1000 0x1000>;
105*4882a593Smuzhiyun		interrupts = <49 2 0 0>;
106*4882a593Smuzhiyun	};
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun===================================================================
109*4882a593SmuzhiyunFull Example
110*4882a593Smuzhiyun
111*4882a593SmuzhiyunSince some chips may contain more than one SEC, the dtsi contains
112*4882a593Smuzhiyunonly the node contents, not the node itself.  A chip using the SEC
113*4882a593Smuzhiyunshould include the dtsi inside each SEC node.  Example:
114*4882a593Smuzhiyun
115*4882a593SmuzhiyunIn qoriq-sec6.0.dtsi:
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun	compatible = "fsl,sec-v6.0";
118*4882a593Smuzhiyun	fsl,sec-era = <6>;
119*4882a593Smuzhiyun	#address-cells = <1>;
120*4882a593Smuzhiyun	#size-cells = <1>;
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun	jr@1000 {
123*4882a593Smuzhiyun		compatible = "fsl,sec-v6.0-job-ring",
124*4882a593Smuzhiyun			     "fsl,sec-v5.2-job-ring",
125*4882a593Smuzhiyun			     "fsl,sec-v5.0-job-ring",
126*4882a593Smuzhiyun			     "fsl,sec-v4.4-job-ring",
127*4882a593Smuzhiyun			     "fsl,sec-v4.0-job-ring";
128*4882a593Smuzhiyun		reg	   = <0x1000 0x1000>;
129*4882a593Smuzhiyun	};
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun	jr@2000 {
132*4882a593Smuzhiyun		compatible = "fsl,sec-v6.0-job-ring",
133*4882a593Smuzhiyun			     "fsl,sec-v5.2-job-ring",
134*4882a593Smuzhiyun			     "fsl,sec-v5.0-job-ring",
135*4882a593Smuzhiyun			     "fsl,sec-v4.4-job-ring",
136*4882a593Smuzhiyun			     "fsl,sec-v4.0-job-ring";
137*4882a593Smuzhiyun		reg	   = <0x2000 0x1000>;
138*4882a593Smuzhiyun	};
139*4882a593Smuzhiyun
140*4882a593SmuzhiyunIn the C293 device tree, we add the include of public property:
141*4882a593Smuzhiyun
142*4882a593Smuzhiyun	crypto@a0000 {
143*4882a593Smuzhiyun		/include/ "qoriq-sec6.0.dtsi"
144*4882a593Smuzhiyun	}
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun	crypto@a0000 {
147*4882a593Smuzhiyun		reg = <0xa0000 0x20000>;
148*4882a593Smuzhiyun		ranges = <0 0xa0000 0x20000>;
149*4882a593Smuzhiyun
150*4882a593Smuzhiyun		jr@1000 {
151*4882a593Smuzhiyun			interrupts = <49 2 0 0>;
152*4882a593Smuzhiyun		};
153*4882a593Smuzhiyun
154*4882a593Smuzhiyun		jr@2000 {
155*4882a593Smuzhiyun			interrupts = <50 2 0 0>;
156*4882a593Smuzhiyun		};
157*4882a593Smuzhiyun	};
158