fsl-sec4.txt 14 KB

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