fsl-sec4.txt 14 KB

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