fsl-sec4.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. =====================================================================
  2. SEC 4 Device Tree Binding
  3. Copyright (C) 2008-2011 Freescale Semiconductor Inc.
  4. CONTENTS
  5. -Overview
  6. -SEC 4 Node
  7. -Job Ring Node
  8. -Run Time Integrity Check (RTIC) Node
  9. -Run Time Integrity Check (RTIC) Memory Node
  10. -Secure Non-Volatile Storage (SNVS) Node
  11. -Full Example
  12. NOTE: the SEC 4 is also known as Freescale's Cryptographic Accelerator
  13. Accelerator and Assurance Module (CAAM).
  14. =====================================================================
  15. Overview
  16. DESCRIPTION
  17. SEC 4 h/w can process requests from 2 types of sources.
  18. 1. DPAA Queue Interface (HW interface between Queue Manager & SEC 4).
  19. 2. Job Rings (HW interface between cores & SEC 4 registers).
  20. High Speed Data Path Configuration:
  21. HW interface between QM & SEC 4 and also BM & SEC 4, on DPAA-enabled parts
  22. such as the P4080. The number of simultaneous dequeues the QI can make is
  23. equal to the number of Descriptor Controller (DECO) engines in a particular
  24. SEC version. E.g., the SEC 4.0 in the P4080 has 5 DECOs and can thus
  25. dequeue from 5 subportals simultaneously.
  26. Job Ring Data Path Configuration:
  27. Each JR is located on a separate 4k page, they may (or may not) be made visible
  28. in the memory partition devoted to a particular core. The P4080 has 4 JRs, so
  29. up to 4 JRs can be configured; and all 4 JRs process requests in parallel.
  30. =====================================================================
  31. SEC 4 Node
  32. Description
  33. Node defines the base address of the SEC 4 block.
  34. This block specifies the address range of all global
  35. configuration registers for the SEC 4 block. It
  36. also receives interrupts from the Run Time Integrity Check
  37. (RTIC) function within the SEC 4 block.
  38. PROPERTIES
  39. - compatible
  40. Usage: required
  41. Value type: <string>
  42. Definition: Must include "fsl,sec-v4.0"
  43. - #address-cells
  44. Usage: required
  45. Value type: <u32>
  46. Definition: A standard property. Defines the number of cells
  47. for representing physical addresses in child nodes.
  48. - #size-cells
  49. Usage: required
  50. Value type: <u32>
  51. Definition: A standard property. Defines the number of cells
  52. for representing the size of physical addresses in
  53. child nodes.
  54. - reg
  55. Usage: required
  56. Value type: <prop-encoded-array>
  57. Definition: A standard property. Specifies the physical
  58. address and length of the SEC4 configuration registers.
  59. registers
  60. - ranges
  61. Usage: required
  62. Value type: <prop-encoded-array>
  63. Definition: A standard property. Specifies the physical address
  64. range of the SEC 4.0 register space (-SNVS not included). A
  65. triplet that includes the child address, parent address, &
  66. length.
  67. - interrupts
  68. Usage: required
  69. Value type: <prop_encoded-array>
  70. Definition: Specifies the interrupts generated by this
  71. device. The value of the interrupts property
  72. consists of one interrupt specifier. The format
  73. of the specifier is defined by the binding document
  74. describing the node's interrupt parent.
  75. - interrupt-parent
  76. Usage: (required if interrupt property is defined)
  77. Value type: <phandle>
  78. Definition: A single <phandle> value that points
  79. to the interrupt parent to which the child domain
  80. is being mapped.
  81. Note: All other standard properties (see the ePAPR) are allowed
  82. but are optional.
  83. EXAMPLE
  84. crypto@300000 {
  85. compatible = "fsl,sec-v4.0";
  86. #address-cells = <1>;
  87. #size-cells = <1>;
  88. reg = <0x300000 0x10000>;
  89. ranges = <0 0x300000 0x10000>;
  90. interrupt-parent = <&mpic>;
  91. interrupts = <92 2>;
  92. };
  93. =====================================================================
  94. Job Ring (JR) Node
  95. Child of the crypto node defines data processing interface to SEC 4
  96. across the peripheral bus for purposes of processing
  97. cryptographic descriptors. The specified address
  98. range can be made visible to one (or more) cores.
  99. The interrupt defined for this node is controlled within
  100. the address range of this node.
  101. - compatible
  102. Usage: required
  103. Value type: <string>
  104. Definition: Must include "fsl,sec-v4.0-job-ring"
  105. - reg
  106. Usage: required
  107. Value type: <prop-encoded-array>
  108. Definition: Specifies a two JR parameters: an offset from
  109. the parent physical address and the length the JR registers.
  110. - fsl,liodn
  111. Usage: optional-but-recommended
  112. Value type: <prop-encoded-array>
  113. Definition:
  114. Specifies the LIODN to be used in conjunction with
  115. the ppid-to-liodn table that specifies the PPID to LIODN mapping.
  116. Needed if the PAMU is used. Value is a 12 bit value
  117. where value is a LIODN ID for this JR. This property is
  118. normally set by boot firmware.
  119. - interrupts
  120. Usage: required
  121. Value type: <prop_encoded-array>
  122. Definition: Specifies the interrupts generated by this
  123. device. The value of the interrupts property
  124. consists of one interrupt specifier. The format
  125. of the specifier is defined by the binding document
  126. describing the node's interrupt parent.
  127. - interrupt-parent
  128. Usage: (required if interrupt property is defined)
  129. Value type: <phandle>
  130. Definition: A single <phandle> value that points
  131. to the interrupt parent to which the child domain
  132. is being mapped.
  133. EXAMPLE
  134. jr@1000 {
  135. compatible = "fsl,sec-v4.0-job-ring";
  136. reg = <0x1000 0x1000>;
  137. fsl,liodn = <0x081>;
  138. interrupt-parent = <&mpic>;
  139. interrupts = <88 2>;
  140. };
  141. =====================================================================
  142. Run Time Integrity Check (RTIC) Node
  143. Child node of the crypto node. Defines a register space that
  144. contains up to 5 sets of addresses and their lengths (sizes) that
  145. will be checked at run time. After an initial hash result is
  146. calculated, these addresses are checked by HW to monitor any
  147. change. If any memory is modified, a Security Violation is
  148. triggered (see SNVS definition).
  149. - compatible
  150. Usage: required
  151. Value type: <string>
  152. Definition: Must include "fsl,sec-v4.0-rtic".
  153. - #address-cells
  154. Usage: required
  155. Value type: <u32>
  156. Definition: A standard property. Defines the number of cells
  157. for representing physical addresses in child nodes. Must
  158. have a value of 1.
  159. - #size-cells
  160. Usage: required
  161. Value type: <u32>
  162. Definition: A standard property. Defines the number of cells
  163. for representing the size of physical addresses in
  164. child nodes. Must have a value of 1.
  165. - reg
  166. Usage: required
  167. Value type: <prop-encoded-array>
  168. Definition: A standard property. Specifies a two parameters:
  169. an offset from the parent physical address and the length
  170. the SEC4 registers.
  171. - ranges
  172. Usage: required
  173. Value type: <prop-encoded-array>
  174. Definition: A standard property. Specifies the physical address
  175. range of the SEC 4 register space (-SNVS not included). A
  176. triplet that includes the child address, parent address, &
  177. length.
  178. EXAMPLE
  179. rtic@6000 {
  180. compatible = "fsl,sec-v4.0-rtic";
  181. #address-cells = <1>;
  182. #size-cells = <1>;
  183. reg = <0x6000 0x100>;
  184. ranges = <0x0 0x6100 0xe00>;
  185. };
  186. =====================================================================
  187. Run Time Integrity Check (RTIC) Memory Node
  188. A child node that defines individual RTIC memory regions that are used to
  189. perform run-time integrity check of memory areas that should not modified.
  190. The node defines a register that contains the memory address &
  191. length (combined) and a second register that contains the hash result
  192. in big endian format.
  193. - compatible
  194. Usage: required
  195. Value type: <string>
  196. Definition: Must include "fsl,sec-v4.0-rtic-memory".
  197. - reg
  198. Usage: required
  199. Value type: <prop-encoded-array>
  200. Definition: A standard property. Specifies two parameters:
  201. an offset from the parent physical address and the length:
  202. 1. The location of the RTIC memory address & length registers.
  203. 2. The location RTIC hash result.
  204. - fsl,rtic-region
  205. Usage: optional-but-recommended
  206. Value type: <prop-encoded-array>
  207. Definition:
  208. Specifies the HW address (36 bit address) for this region
  209. followed by the length of the HW partition to be checked;
  210. the address is represented as a 64 bit quantity followed
  211. by a 32 bit length.
  212. - fsl,liodn
  213. Usage: optional-but-recommended
  214. Value type: <prop-encoded-array>
  215. Definition:
  216. Specifies the LIODN to be used in conjunction with
  217. the ppid-to-liodn table that specifies the PPID to LIODN
  218. mapping. Needed if the PAMU is used. Value is a 12 bit value
  219. where value is a LIODN ID for this RTIC memory region. This
  220. property is normally set by boot firmware.
  221. EXAMPLE
  222. rtic-a@0 {
  223. compatible = "fsl,sec-v4.0-rtic-memory";
  224. reg = <0x00 0x20 0x100 0x80>;
  225. fsl,liodn = <0x03c>;
  226. fsl,rtic-region = <0x12345678 0x12345678 0x12345678>;
  227. };
  228. =====================================================================
  229. Secure Non-Volatile Storage (SNVS) Node
  230. Node defines address range and the associated
  231. interrupt for the SNVS function. This function
  232. monitors security state information & reports
  233. security violations.
  234. - compatible
  235. Usage: required
  236. Value type: <string>
  237. Definition: Must include "fsl,sec-v4.0-mon".
  238. - reg
  239. Usage: required
  240. Value type: <prop-encoded-array>
  241. Definition: A standard property. Specifies the physical
  242. address and length of the SEC4 configuration
  243. registers.
  244. - interrupts
  245. Usage: required
  246. Value type: <prop_encoded-array>
  247. Definition: Specifies the interrupts generated by this
  248. device. The value of the interrupts property
  249. consists of one interrupt specifier. The format
  250. of the specifier is defined by the binding document
  251. describing the node's interrupt parent.
  252. - interrupt-parent
  253. Usage: (required if interrupt property is defined)
  254. Value type: <phandle>
  255. Definition: A single <phandle> value that points
  256. to the interrupt parent to which the child domain
  257. is being mapped.
  258. EXAMPLE
  259. sec_mon@314000 {
  260. compatible = "fsl,sec-v4.0-mon";
  261. reg = <0x314000 0x1000>;
  262. interrupt-parent = <&mpic>;
  263. interrupts = <93 2>;
  264. };
  265. =====================================================================
  266. FULL EXAMPLE
  267. crypto: crypto@300000 {
  268. compatible = "fsl,sec-v4.0";
  269. #address-cells = <1>;
  270. #size-cells = <1>;
  271. reg = <0x300000 0x10000>;
  272. ranges = <0 0x300000 0x10000>;
  273. interrupt-parent = <&mpic>;
  274. interrupts = <92 2>;
  275. sec_jr0: jr@1000 {
  276. compatible = "fsl,sec-v4.0-job-ring";
  277. reg = <0x1000 0x1000>;
  278. interrupt-parent = <&mpic>;
  279. interrupts = <88 2>;
  280. };
  281. sec_jr1: jr@2000 {
  282. compatible = "fsl,sec-v4.0-job-ring";
  283. reg = <0x2000 0x1000>;
  284. interrupt-parent = <&mpic>;
  285. interrupts = <89 2>;
  286. };
  287. sec_jr2: jr@3000 {
  288. compatible = "fsl,sec-v4.0-job-ring";
  289. reg = <0x3000 0x1000>;
  290. interrupt-parent = <&mpic>;
  291. interrupts = <90 2>;
  292. };
  293. sec_jr3: jr@4000 {
  294. compatible = "fsl,sec-v4.0-job-ring";
  295. reg = <0x4000 0x1000>;
  296. interrupt-parent = <&mpic>;
  297. interrupts = <91 2>;
  298. };
  299. rtic@6000 {
  300. compatible = "fsl,sec-v4.0-rtic";
  301. #address-cells = <1>;
  302. #size-cells = <1>;
  303. reg = <0x6000 0x100>;
  304. ranges = <0x0 0x6100 0xe00>;
  305. rtic_a: rtic-a@0 {
  306. compatible = "fsl,sec-v4.0-rtic-memory";
  307. reg = <0x00 0x20 0x100 0x80>;
  308. };
  309. rtic_b: rtic-b@20 {
  310. compatible = "fsl,sec-v4.0-rtic-memory";
  311. reg = <0x20 0x20 0x200 0x80>;
  312. };
  313. rtic_c: rtic-c@40 {
  314. compatible = "fsl,sec-v4.0-rtic-memory";
  315. reg = <0x40 0x20 0x300 0x80>;
  316. };
  317. rtic_d: rtic-d@60 {
  318. compatible = "fsl,sec-v4.0-rtic-memory";
  319. reg = <0x60 0x20 0x500 0x80>;
  320. };
  321. };
  322. };
  323. sec_mon: sec_mon@314000 {
  324. compatible = "fsl,sec-v4.0-mon";
  325. reg = <0x314000 0x1000>;
  326. interrupt-parent = <&mpic>;
  327. interrupts = <93 2>;
  328. };
  329. =====================================================================