fsl-sec4.txt 14 KB

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