ce_pub.h 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _CE_PUB_H_
  13. #define _CE_PUB_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_CE_PUB_BASE (0x04002000)
  17. typedef volatile struct
  18. {
  19. uint32_t ce_debug_dma_status; // 0x00000000
  20. uint32_t ce_debug_aes_status; // 0x00000004
  21. uint32_t ce_debug_tdes_status; // 0x00000008
  22. uint32_t ce_debug_hash_status0; // 0x0000000c
  23. uint32_t ce_debug_hash_status1; // 0x00000010
  24. uint32_t __20[1]; // 0x00000014
  25. uint32_t ce_clk_en; // 0x00000018
  26. uint32_t ce_int_en; // 0x0000001c
  27. uint32_t ce_int_status; // 0x00000020
  28. uint32_t ce_int_clear; // 0x00000024
  29. uint32_t ce_start; // 0x00000028
  30. uint32_t ce_clear; // 0x0000002c
  31. uint32_t ce_aes_mode; // 0x00000030
  32. uint32_t ce_tdes_mode; // 0x00000034
  33. uint32_t ce_hash_mode; // 0x00000038
  34. uint32_t ce_chacha_poly_mode; // 0x0000003c
  35. uint32_t ce_simon_speck_mode; // 0x00000040
  36. uint32_t ce_cfg; // 0x00000044
  37. uint32_t ce_src_frag_length; // 0x00000048
  38. uint32_t ce_dst_frag_length; // 0x0000004c
  39. uint32_t ce_src_addr; // 0x00000050
  40. uint32_t ce_dst_addr; // 0x00000054
  41. uint32_t ce_list_length; // 0x00000058
  42. uint32_t ce_list_ptr; // 0x0000005c
  43. uint32_t ce_aes_tdes_rsa_key_length; // 0x00000060
  44. uint32_t ce_aes_tdes_rsa_key_address; // 0x00000064
  45. uint32_t ce_aes_tag_length; // 0x00000068
  46. uint32_t ce_aes_tag_address; // 0x0000006c
  47. uint32_t ce_iv_sec_cnt0; // 0x00000070
  48. uint32_t ce_iv_sec_cnt1; // 0x00000074
  49. uint32_t ce_iv_sec_cnt2; // 0x00000078
  50. uint32_t ce_iv_sec_cnt3; // 0x0000007c
  51. uint32_t ce_aes_des_key10; // 0x00000080
  52. uint32_t ce_aes_des_key11; // 0x00000084
  53. uint32_t ce_aes_des_key12; // 0x00000088
  54. uint32_t ce_aes_des_key13; // 0x0000008c
  55. uint32_t ce_aes_des_key14; // 0x00000090
  56. uint32_t ce_aes_des_key15; // 0x00000094
  57. uint32_t ce_aes_des_key16; // 0x00000098
  58. uint32_t ce_aes_des_key17; // 0x0000009c
  59. uint32_t ce_aes_des_key20; // 0x000000a0
  60. uint32_t ce_aes_des_key21; // 0x000000a4
  61. uint32_t ce_aes_des_key22; // 0x000000a8
  62. uint32_t ce_aes_des_key23; // 0x000000ac
  63. uint32_t ce_aes_des_key24; // 0x000000b0
  64. uint32_t ce_aes_des_key25; // 0x000000b4
  65. uint32_t ce_aes_des_key26; // 0x000000b8
  66. uint32_t ce_aes_des_key27; // 0x000000bc
  67. uint32_t ce_sm4_mode; // 0x000000c0
  68. uint32_t __196[1]; // 0x000000c4
  69. uint32_t ce_ip_version; // 0x000000c8
  70. uint32_t __204[33]; // 0x000000cc
  71. uint32_t ce_pf_calc; // 0x00000150
  72. uint32_t ce_user_flag; // 0x00000154
  73. uint32_t ce_axi_axcache; // 0x00000158
  74. uint32_t ce_cmd_stop_ctrl; // 0x0000015c
  75. uint32_t ce_axi_protect_sel; // 0x00000160
  76. uint32_t ce_pf_calc_high; // 0x00000164
  77. uint32_t __360[38]; // 0x00000168
  78. uint32_t ce_rng_en; // 0x00000200
  79. uint32_t ce_rng_config; // 0x00000204
  80. uint32_t ce_rng_data; // 0x00000208
  81. uint32_t ce_rng_sample_period; // 0x0000020c
  82. uint32_t ce_rng_post_process_en; // 0x00000210
  83. uint32_t ce_rng_work_status; // 0x00000214
  84. uint32_t ce_rng_timeout_cnt; // 0x00000218
  85. uint32_t ce_rng_int_en; // 0x0000021c
  86. uint32_t ce_rng_sts; // 0x00000220
  87. uint32_t ce_rng_int_clr; // 0x00000224
  88. uint32_t ce_rng_mode; // 0x00000228
  89. uint32_t ce_prng_seed_update; // 0x0000022c
  90. uint32_t ce_prng_seed_config; // 0x00000230
  91. uint32_t ce_rng_bit_rate; // 0x00000234
  92. uint32_t ce_rng_sram_data_threshhold; // 0x00000238
  93. uint32_t ce_rng_sram_data_residue_num; // 0x0000023c
  94. uint32_t ce_rng_exotic_fault_counter_config; // 0x00000240
  95. uint32_t ce_rng_drbg_seed_cnt; // 0x00000244
  96. uint32_t ce_rng_ring_num_cfg_l; // 0x00000248
  97. uint32_t ce_rng_ring_num_cfg_h; // 0x0000024c
  98. uint32_t ce_rng_health_test_config; // 0x00000250
  99. uint32_t ce_rng_drbg_test_pattern_l; // 0x00000254
  100. uint32_t ce_rng_drbg_test_pattern_h; // 0x00000258
  101. uint32_t ce_rng_raw_data_to_cpu; // 0x0000025c
  102. uint32_t ce_rng_drbg_test_result; // 0x00000260
  103. uint32_t __612[39]; // 0x00000264
  104. uint32_t ce_session_key0; // 0x00000300
  105. uint32_t ce_session_key1; // 0x00000304
  106. uint32_t ce_session_key2; // 0x00000308
  107. uint32_t ce_session_key3; // 0x0000030c
  108. uint32_t ce_session_key4; // 0x00000310
  109. uint32_t ce_session_key5; // 0x00000314
  110. uint32_t ce_session_key6; // 0x00000318
  111. uint32_t ce_session_key7; // 0x0000031c
  112. uint32_t ce_iram_key0; // 0x00000320
  113. uint32_t ce_iram_key1; // 0x00000324
  114. uint32_t ce_iram_key2; // 0x00000328
  115. uint32_t ce_iram_key3; // 0x0000032c
  116. uint32_t ce_iram_key4; // 0x00000330
  117. uint32_t ce_iram_key5; // 0x00000334
  118. uint32_t ce_iram_key6; // 0x00000338
  119. uint32_t ce_iram_key7; // 0x0000033c
  120. uint32_t __832[112]; // 0x00000340
  121. uint32_t ce_cmd_fifo_entry; // 0x00000500
  122. uint32_t ce_cmd_fifo_status; // 0x00000504
  123. uint32_t ce_rcv_addr_lo; // 0x00000508
  124. uint32_t ce_dump_addr_lo; // 0x0000050c
  125. uint32_t ce_dump_addr_hi; // 0x00000510
  126. uint32_t ce_finish_cmd_cnt; // 0x00000514
  127. uint32_t __1304[122]; // 0x00000518
  128. uint32_t ce_fde_aes_cmd_fifo_entry; // 0x00000700
  129. uint32_t ce_fde_aes_cmd_fifo_status; // 0x00000704
  130. uint32_t ce_fde_aes_rcv_addr_lo; // 0x00000708
  131. uint32_t ce_fde_aes_dump_addr_lo; // 0x0000070c
  132. uint32_t ce_fde_aes_dump_addr_hi; // 0x00000710
  133. uint32_t ce_fde_aes_finish_cmd_cnt; // 0x00000714
  134. uint32_t ce_fde_aes_start; // 0x00000718
  135. uint32_t ce_fde_aes_clear; // 0x0000071c
  136. uint32_t ce_fde_aes_mode; // 0x00000720
  137. uint32_t ce_fde_aes_cfg; // 0x00000724
  138. uint32_t ce_fde_aes_list_length; // 0x00000728
  139. uint32_t ce_fde_aes_list_ptr; // 0x0000072c
  140. uint32_t ce_fde_aes_src_frag_length; // 0x00000730
  141. uint32_t ce_fde_aes_src_addr; // 0x00000734
  142. uint32_t ce_fde_aes_dst_addr; // 0x00000738
  143. uint32_t ce_fde_aes_key_length; // 0x0000073c
  144. uint32_t ce_fde_aes_key_address; // 0x00000740
  145. uint32_t ce_fde_aes_dst_ddr_sel; // 0x00000744
  146. uint32_t ce_fde_aes_dummy_reg; // 0x00000748
  147. uint32_t __1868[1]; // 0x0000074c
  148. uint32_t ce_fde_iv_sec_cnt0; // 0x00000750
  149. uint32_t ce_fde_iv_sec_cnt1; // 0x00000754
  150. uint32_t ce_fde_iv_sec_cnt2; // 0x00000758
  151. uint32_t ce_fde_iv_sec_cnt3; // 0x0000075c
  152. uint32_t ce_fde_aes_key10; // 0x00000760
  153. uint32_t ce_fde_aes_key11; // 0x00000764
  154. uint32_t ce_fde_aes_key12; // 0x00000768
  155. uint32_t ce_fde_aes_key13; // 0x0000076c
  156. uint32_t ce_fde_aes_key14; // 0x00000770
  157. uint32_t ce_fde_aes_key15; // 0x00000774
  158. uint32_t ce_fde_aes_key16; // 0x00000778
  159. uint32_t ce_fde_aes_key17; // 0x0000077c
  160. uint32_t ce_fde_aes_key20; // 0x00000780
  161. uint32_t ce_fde_aes_key21; // 0x00000784
  162. uint32_t ce_fde_aes_key22; // 0x00000788
  163. uint32_t ce_fde_aes_key23; // 0x0000078c
  164. uint32_t ce_fde_aes_key24; // 0x00000790
  165. uint32_t ce_fde_aes_key25; // 0x00000794
  166. uint32_t ce_fde_aes_key26; // 0x00000798
  167. uint32_t ce_fde_aes_key27; // 0x0000079c
  168. uint32_t __1952[24]; // 0x000007a0
  169. uint32_t ce_fde_session_key0; // 0x00000800
  170. uint32_t ce_fde_session_key1; // 0x00000804
  171. uint32_t ce_fde_session_key2; // 0x00000808
  172. uint32_t ce_fde_session_key3; // 0x0000080c
  173. uint32_t ce_fde_session_key4; // 0x00000810
  174. uint32_t ce_fde_session_key5; // 0x00000814
  175. uint32_t ce_fde_session_key6; // 0x00000818
  176. uint32_t ce_fde_session_key7; // 0x0000081c
  177. uint32_t ce_fde_iram_key0; // 0x00000820
  178. uint32_t ce_fde_iram_key1; // 0x00000824
  179. uint32_t ce_fde_iram_key2; // 0x00000828
  180. uint32_t ce_fde_iram_key3; // 0x0000082c
  181. uint32_t ce_fde_iram_key4; // 0x00000830
  182. uint32_t ce_fde_iram_key5; // 0x00000834
  183. uint32_t ce_fde_iram_key6; // 0x00000838
  184. uint32_t ce_fde_iram_key7; // 0x0000083c
  185. } HWP_CE_PUB_T;
  186. #define hwp_cePub ((HWP_CE_PUB_T *)REG_ACCESS_ADDRESS(REG_CE_PUB_BASE))
  187. // ce_debug_dma_status
  188. typedef union {
  189. uint32_t v;
  190. struct
  191. {
  192. uint32_t rf_ce_dma_main_read_state : 5; // [4:0], read only
  193. uint32_t rf_ce_dma_pka_main_read_state : 3; // [7:5], read only
  194. uint32_t rf_ce_dma_main_write_state : 5; // [12:8], read only
  195. uint32_t rf_ce_dma_err : 1; // [13], read only
  196. uint32_t rf_ce_int_raw_status_vld : 1; // [14], read only
  197. uint32_t rf_ce_cmd_fifo_non_empty : 1; // [15], read only
  198. uint32_t rf_ce_fde_cmd_fifo_non_empty : 1; // [16], read only
  199. uint32_t rf_ce_dma_src_state : 5; // [21:17], read only
  200. uint32_t rf_ce_dma_dst_state : 5; // [26:22], read only
  201. uint32_t __27_27 : 1; // [27]
  202. uint32_t rf_ce_busy : 1; // [28], read only
  203. uint32_t rf_ce_arready : 1; // [29], read only
  204. uint32_t rf_ce_awready : 1; // [30], read only
  205. uint32_t rf_ce_wready : 1; // [31], read only
  206. } b;
  207. } REG_CE_PUB_CE_DEBUG_DMA_STATUS_T;
  208. // ce_debug_aes_status
  209. typedef union {
  210. uint32_t v;
  211. struct
  212. {
  213. uint32_t rf_ce_aes_status : 8; // [7:0], read only
  214. uint32_t __9_8 : 2; // [9:8]
  215. uint32_t rf_ce_wdma_data_status : 2; // [11:10], read only
  216. uint32_t rf_ce_sm4_status : 3; // [14:12], read only
  217. uint32_t rf_ce_rdma_data_status : 3; // [17:15], read only
  218. uint32_t __19_18 : 2; // [19:18]
  219. uint32_t rf_ce_fde_dma_main_read_state : 5; // [24:20], read only
  220. uint32_t rf_ce_fde_wdma_data_status : 2; // [26:25], read only
  221. uint32_t rf_ce_fde_rdma_data_status : 2; // [28:27], read only
  222. uint32_t __31_29 : 3; // [31:29]
  223. } b;
  224. } REG_CE_PUB_CE_DEBUG_AES_STATUS_T;
  225. // ce_debug_tdes_status
  226. typedef union {
  227. uint32_t v;
  228. struct
  229. {
  230. uint32_t rf_ce_fde_aes_status : 8; // [7:0], read only
  231. uint32_t rf_ce_fde_dma_main_write_state : 5; // [12:8], read only
  232. uint32_t rf_ce_pka_dma_main_write_state : 3; // [15:13], read only
  233. uint32_t rf_ce_efuse_access_status : 5; // [20:16], read only
  234. uint32_t rf_ce_dma_wvalid_state : 4; // [24:21], read only
  235. uint32_t rf_ce_tdes_status : 5; // [29:25], read only
  236. uint32_t __31_30 : 2; // [31:30]
  237. } b;
  238. } REG_CE_PUB_CE_DEBUG_TDES_STATUS_T;
  239. // ce_debug_hash_status1
  240. typedef union {
  241. uint32_t v;
  242. struct
  243. {
  244. uint32_t rf_ce_hash_status1 : 10; // [9:0], read only
  245. uint32_t __31_10 : 22; // [31:10]
  246. } b;
  247. } REG_CE_PUB_CE_DEBUG_HASH_STATUS1_T;
  248. // ce_clk_en
  249. typedef union {
  250. uint32_t v;
  251. struct
  252. {
  253. uint32_t rf_ce_dma_ck_en : 1; // [0]
  254. uint32_t rf_ce_aes_ck_en : 1; // [1]
  255. uint32_t rf_ce_fde_aes_ck_en : 1; // [2]
  256. uint32_t rf_ce_hash_ck_en : 1; // [3]
  257. uint32_t rf_ce_des_ck_en : 1; // [4]
  258. uint32_t rf_ce_trng_ck_en : 1; // [5]
  259. uint32_t rf_ce_sm4_ck_en : 1; // [6]
  260. uint32_t rf_ce_chacah_poly_ck_en : 1; // [7]
  261. uint32_t rf_ce_pka_ck_en : 1; // [8]
  262. uint32_t rf_ce_simon_speck_ck_en : 1; // [9]
  263. uint32_t __15_10 : 6; // [15:10]
  264. uint32_t rf_ce_apb_rf_clk_en : 1; // [16]
  265. uint32_t rf_ce_dma_ctrl_clk_en : 1; // [17]
  266. uint32_t rf_ce_dma_axi_clk_en : 1; // [18]
  267. uint32_t __19_19 : 1; // [19]
  268. uint32_t rf_ce_aes_clk_en : 1; // [20]
  269. uint32_t rf_ce_rng_clk_en : 1; // [21]
  270. uint32_t rf_ce_poly_clk_en : 1; // [22]
  271. uint32_t rf_ce_chacha_clk_en : 1; // [23]
  272. uint32_t rf_ce_trng_pub_ck_en : 1; // [24]
  273. uint32_t rf_ce_rng_pub_clk_en : 1; // [25]
  274. uint32_t __27_26 : 2; // [27:26]
  275. uint32_t rf_ce_fde_aes_clk_en : 1; // [28]
  276. uint32_t __31_29 : 3; // [31:29]
  277. } b;
  278. } REG_CE_PUB_CE_CLK_EN_T;
  279. // ce_int_en
  280. typedef union {
  281. uint32_t v;
  282. struct
  283. {
  284. uint32_t __4_0 : 5; // [4:0]
  285. uint32_t rf_ce_en_tdes_key_err_int : 1; // [5]
  286. uint32_t __6_6 : 1; // [6]
  287. uint32_t rf_ce_en_rng_int : 1; // [7]
  288. uint32_t __15_8 : 8; // [15:8]
  289. uint32_t rf_ce_en_cmd_done_int : 1; // [16]
  290. uint32_t rf_ce_en_len_err_int : 1; // [17]
  291. uint32_t __19_18 : 2; // [19:18]
  292. uint32_t rf_ce_fde_en_cmd_done_int : 1; // [20]
  293. uint32_t rf_ce_fde_en_len_err_int : 1; // [21]
  294. uint32_t __31_22 : 10; // [31:22]
  295. } b;
  296. } REG_CE_PUB_CE_INT_EN_T;
  297. // ce_int_status
  298. typedef union {
  299. uint32_t v;
  300. struct
  301. {
  302. uint32_t __4_0 : 5; // [4:0]
  303. uint32_t rf_ce_tdes_key_err_int_status : 1; // [5], read only
  304. uint32_t __6_6 : 1; // [6]
  305. uint32_t rf_ce_rng_int_status : 1; // [7], read only
  306. uint32_t __15_8 : 8; // [15:8]
  307. uint32_t rf_ce_en_cmd_done_status : 1; // [16], read only
  308. uint32_t rf_ce_en_len_err_status : 1; // [17], read only
  309. uint32_t __19_18 : 2; // [19:18]
  310. uint32_t rf_ce_fde_en_cmd_done_status : 1; // [20], read only
  311. uint32_t rf_ce_fde_en_len_err_status : 1; // [21], read only
  312. uint32_t __31_22 : 10; // [31:22]
  313. } b;
  314. } REG_CE_PUB_CE_INT_STATUS_T;
  315. // ce_int_clear
  316. typedef union {
  317. uint32_t v;
  318. struct
  319. {
  320. uint32_t __4_0 : 5; // [4:0]
  321. uint32_t rf_ce_clear_tdes_key_err_int : 1; // [5], write clear
  322. uint32_t __15_6 : 10; // [15:6]
  323. uint32_t rf_ce_clear_cmd_done_int : 1; // [16], write clear
  324. uint32_t rf_ce_clear_len_err_int : 1; // [17], write clear
  325. uint32_t __19_18 : 2; // [19:18]
  326. uint32_t rf_ce_fde_en_cmd_done_status : 1; // [20], read only
  327. uint32_t rf_ce_fde_en_len_err_status : 1; // [21], read only
  328. uint32_t __31_22 : 10; // [31:22]
  329. } b;
  330. } REG_CE_PUB_CE_INT_CLEAR_T;
  331. // ce_start
  332. typedef union {
  333. uint32_t v;
  334. struct
  335. {
  336. uint32_t rf_ce_start : 1; // [0], write clear
  337. uint32_t __31_1 : 31; // [31:1]
  338. } b;
  339. } REG_CE_PUB_CE_START_T;
  340. // ce_clear
  341. typedef union {
  342. uint32_t v;
  343. struct
  344. {
  345. uint32_t rf_ce_clear : 1; // [0], write clear
  346. uint32_t __31_1 : 31; // [31:1]
  347. } b;
  348. } REG_CE_PUB_CE_CLEAR_T;
  349. // ce_aes_mode
  350. typedef union {
  351. uint32_t v;
  352. struct
  353. {
  354. uint32_t rf_ce_aes_en : 1; // [0]
  355. uint32_t __3_1 : 3; // [3:1]
  356. uint32_t rf_ce_aes_enc_dec_sel : 1; // [4]
  357. uint32_t rf_ce_aes_mac_ctr_inc_mode : 2; // [6:5]
  358. uint32_t __7_7 : 1; // [7]
  359. uint32_t rf_ce_aes_work_mode : 4; // [11:8]
  360. uint32_t rf_ce_aes_key_len_sel : 2; // [13:12]
  361. uint32_t rf_ce_aes_xts_iv_rotation : 1; // [14]
  362. uint32_t rf_ce_aes_key_update_n : 1; // [15]
  363. uint32_t __31_16 : 16; // [31:16]
  364. } b;
  365. } REG_CE_PUB_CE_AES_MODE_T;
  366. // ce_tdes_mode
  367. typedef union {
  368. uint32_t v;
  369. struct
  370. {
  371. uint32_t rf_ce_tdes_en : 1; // [0]
  372. uint32_t __3_1 : 3; // [3:1]
  373. uint32_t rf_ce_tdes_enc_dec_sel : 1; // [4]
  374. uint32_t __7_5 : 3; // [7:5]
  375. uint32_t rf_ce_tdes_work_mode : 2; // [9:8]
  376. uint32_t __11_10 : 2; // [11:10]
  377. uint32_t rf_ce_tdes_key_even_sel : 1; // [12]
  378. uint32_t rf_ce_tdes_key_evenodd_check_on : 1; // [13]
  379. uint32_t __31_14 : 18; // [31:14]
  380. } b;
  381. } REG_CE_PUB_CE_TDES_MODE_T;
  382. // ce_hash_mode
  383. typedef union {
  384. uint32_t v;
  385. struct
  386. {
  387. uint32_t rf_ce_hash_en : 1; // [0]
  388. uint32_t __3_1 : 3; // [3:1]
  389. uint32_t rf_ce_hash_mode : 5; // [8:4]
  390. uint32_t __11_9 : 3; // [11:9]
  391. uint32_t rf_hash_hmac_pad_sel : 2; // [13:12]
  392. uint32_t __15_14 : 2; // [15:14]
  393. uint32_t rf_hash_sha3_shake_out_len : 8; // [23:16]
  394. uint32_t __31_24 : 8; // [31:24]
  395. } b;
  396. } REG_CE_PUB_CE_HASH_MODE_T;
  397. // ce_chacha_poly_mode
  398. typedef union {
  399. uint32_t v;
  400. struct
  401. {
  402. uint32_t rf_ce_chacha_poly_en : 1; // [0]
  403. uint32_t __3_1 : 3; // [3:1]
  404. uint32_t rf_ce_chacha_poly_enc_dec_sel : 1; // [4]
  405. uint32_t __7_5 : 3; // [7:5]
  406. uint32_t rf_ce_chacha_poly_mode : 2; // [9:8]
  407. uint32_t __31_10 : 22; // [31:10]
  408. } b;
  409. } REG_CE_PUB_CE_CHACHA_POLY_MODE_T;
  410. // ce_simon_speck_mode
  411. typedef union {
  412. uint32_t v;
  413. struct
  414. {
  415. uint32_t rf_ce_simon_speck_en : 1; // [0]
  416. uint32_t __3_1 : 3; // [3:1]
  417. uint32_t rf_ce_simon_speck_enc_dec_sel : 1; // [4]
  418. uint32_t __7_5 : 3; // [7:5]
  419. uint32_t rf_ce_simon_speck_sel : 1; // [8]
  420. uint32_t rf_ce_simon_speck_work_mode : 3; // [11:9]
  421. uint32_t __12_12 : 1; // [12]
  422. uint32_t rf_ce_simon_speck_key_len_sel : 2; // [14:13]
  423. uint32_t rf_ce_simon_speck_key_update_n : 1; // [15]
  424. uint32_t __31_16 : 16; // [31:16]
  425. } b;
  426. } REG_CE_PUB_CE_SIMON_SPECK_MODE_T;
  427. // ce_cfg
  428. typedef union {
  429. uint32_t v;
  430. struct
  431. {
  432. uint32_t rf_ce_link_mode_flag : 1; // [0]
  433. uint32_t rf_ce_dont_rcv_ddr : 1; // [1]
  434. uint32_t rf_ce_dont_dump_ddr : 1; // [2]
  435. uint32_t rf_ce_cmd_ioc : 1; // [3]
  436. uint32_t rf_ce_std_mode_end_flag : 1; // [4]
  437. uint32_t rf_ce_std_mode_aad_end_flag : 1; // [5]
  438. uint32_t rf_ce_std_mode_aad_flag : 1; // [6]
  439. uint32_t rf_ce_dma_bypass : 1; // [7]
  440. uint32_t rf_ce_key_in_ddr_flag : 1; // [8]
  441. uint32_t __9_9 : 1; // [9]
  442. uint32_t rf_ce_key_in_session_key_flag : 1; // [10]
  443. uint32_t rf_ce_key_in_iram_flag : 1; // [11]
  444. uint32_t rf_ce_do_wait_bdone : 1; // [12]
  445. uint32_t rf_ce_list_aad_end_flag : 1; // [13], read only
  446. uint32_t rf_ce_list_aad_flag : 1; // [14], read only
  447. uint32_t rf_ce_list_end_flag : 1; // [15], read only
  448. uint32_t rf_ce_list_data_end_flag : 1; // [16], read only
  449. uint32_t rf_ce_list_update_iv_sec_cnt : 1; // [17], read only
  450. uint32_t rf_ce_key_hdcp_en : 1; // [18], read only
  451. uint32_t __19_19 : 1; // [19]
  452. uint32_t rf_ce_dst_byte_switch : 1; // [20]
  453. uint32_t rf_ce_src_byte_switch : 1; // [21]
  454. uint32_t rf_ce_dst_word_switch : 1; // [22]
  455. uint32_t rf_ce_src_word_switch : 1; // [23]
  456. uint32_t __31_24 : 8; // [31:24]
  457. } b;
  458. } REG_CE_PUB_CE_CFG_T;
  459. // ce_src_frag_length
  460. typedef union {
  461. uint32_t v;
  462. struct
  463. {
  464. uint32_t rf_ce_src_frag_len : 24; // [23:0]
  465. uint32_t rf_ce_src_addr_hi : 4; // [27:24]
  466. uint32_t __31_28 : 4; // [31:28]
  467. } b;
  468. } REG_CE_PUB_CE_SRC_FRAG_LENGTH_T;
  469. // ce_dst_frag_length
  470. typedef union {
  471. uint32_t v;
  472. struct
  473. {
  474. uint32_t rf_ce_dst_frag_len : 24; // [23:0]
  475. uint32_t rf_ce_dst_addr_hi : 4; // [27:24]
  476. uint32_t __31_28 : 4; // [31:28]
  477. } b;
  478. } REG_CE_PUB_CE_DST_FRAG_LENGTH_T;
  479. // ce_list_length
  480. typedef union {
  481. uint32_t v;
  482. struct
  483. {
  484. uint32_t rf_ce_list_len : 12; // [11:0]
  485. uint32_t __15_12 : 4; // [15:12]
  486. uint32_t rf_ce_list_ptr_hi : 4; // [19:16]
  487. uint32_t __31_20 : 12; // [31:20]
  488. } b;
  489. } REG_CE_PUB_CE_LIST_LENGTH_T;
  490. // ce_aes_tdes_rsa_key_length
  491. typedef union {
  492. uint32_t v;
  493. struct
  494. {
  495. uint32_t rf_ce_aes_tdes_rsa_key_len : 24; // [23:0]
  496. uint32_t rf_ce_aes_tdes_rsa_key_addr_hi : 4; // [27:24]
  497. uint32_t __31_28 : 4; // [31:28]
  498. } b;
  499. } REG_CE_PUB_CE_AES_TDES_RSA_KEY_LENGTH_T;
  500. // ce_aes_tag_length
  501. typedef union {
  502. uint32_t v;
  503. struct
  504. {
  505. uint32_t rf_ce_aes_tag_len : 8; // [7:0]
  506. uint32_t rf_ce_aes_tag_addr_hi : 4; // [11:8]
  507. uint32_t __31_12 : 20; // [31:12]
  508. } b;
  509. } REG_CE_PUB_CE_AES_TAG_LENGTH_T;
  510. // ce_sm4_mode
  511. typedef union {
  512. uint32_t v;
  513. struct
  514. {
  515. uint32_t rf_ce_sm4_en : 1; // [0]
  516. uint32_t __3_1 : 3; // [3:1]
  517. uint32_t rf_ce_sm4_enc_dec_sel : 1; // [4]
  518. uint32_t __7_5 : 3; // [7:5]
  519. uint32_t rf_ce_sm4_work_mode : 3; // [10:8]
  520. uint32_t rf_ce_sm4_xts_inv_rotation : 1; // [11]
  521. uint32_t rf_ce_sm4_key_update_n : 1; // [12]
  522. uint32_t __31_13 : 19; // [31:13]
  523. } b;
  524. } REG_CE_PUB_CE_SM4_MODE_T;
  525. // ce_ip_version
  526. typedef union {
  527. uint32_t v;
  528. struct
  529. {
  530. uint32_t rf_ce_ip_version_lo : 4; // [3:0]
  531. uint32_t rf_ce_ip_version_hi : 28; // [31:4], read only
  532. } b;
  533. } REG_CE_PUB_CE_IP_VERSION_T;
  534. // ce_user_flag
  535. typedef union {
  536. uint32_t v;
  537. struct
  538. {
  539. uint32_t rf_ce_use_flag : 1; // [0]
  540. uint32_t __3_1 : 3; // [3:1]
  541. uint32_t rf_ce_sec_priority_vld : 1; // [4], read only
  542. uint32_t __7_5 : 3; // [7:5]
  543. uint32_t rf_ce_pub_priority_vld : 1; // [8], read only
  544. uint32_t __31_9 : 23; // [31:9]
  545. } b;
  546. } REG_CE_PUB_CE_USER_FLAG_T;
  547. // ce_axi_axcache
  548. typedef union {
  549. uint32_t v;
  550. struct
  551. {
  552. uint32_t rf_ce_axi_arcache : 4; // [3:0]
  553. uint32_t rf_ce_axi_awcache : 4; // [7:4]
  554. uint32_t rf_ce_dst_outstanding_num : 4; // [11:8]
  555. uint32_t rf_ce_src_outstanding_num : 4; // [15:12]
  556. uint32_t __31_16 : 16; // [31:16]
  557. } b;
  558. } REG_CE_PUB_CE_AXI_AXCACHE_T;
  559. // ce_cmd_stop_ctrl
  560. typedef union {
  561. uint32_t v;
  562. struct
  563. {
  564. uint32_t __15_0 : 16; // [15:0]
  565. uint32_t rf_ce_cmd_stop : 1; // [16]
  566. uint32_t rf_ce_cmd_stop_status : 1; // [17], read only
  567. uint32_t rf_ce_cmd_stop_clear : 1; // [18], write clear
  568. uint32_t __19_19 : 1; // [19]
  569. uint32_t rf_ce_fde_cmd_stop : 1; // [20]
  570. uint32_t rf_ce_fde_cmd_stop_status : 1; // [21], read only
  571. uint32_t rf_ce_fde_cmd_stop_clear : 1; // [22], write clear
  572. uint32_t __31_23 : 9; // [31:23]
  573. } b;
  574. } REG_CE_PUB_CE_CMD_STOP_CTRL_T;
  575. // ce_axi_protect_sel
  576. typedef union {
  577. uint32_t v;
  578. struct
  579. {
  580. uint32_t pub_axi_prot_sel_en : 1; // [0]
  581. uint32_t pub_axi_prot_sel_rkey : 1; // [1]
  582. uint32_t pub_axi_prot_sel_rlist : 1; // [2]
  583. uint32_t pub_axi_prot_sel_rtxt : 1; // [3]
  584. uint32_t pub_axi_prot_sel_wtxt : 1; // [4]
  585. uint32_t pub_dummy : 3; // [7:5]
  586. uint32_t fde_axi_prot_sel_en : 1; // [8]
  587. uint32_t fde_axi_prot_sel_rkey : 1; // [9]
  588. uint32_t fde_axi_prot_sel_rlist : 1; // [10]
  589. uint32_t fde_axi_prot_sel_rtxt : 1; // [11]
  590. uint32_t fde_axi_prot_sel_wtxt : 1; // [12]
  591. uint32_t fde_dummy : 3; // [15:13]
  592. uint32_t __31_16 : 16; // [31:16]
  593. } b;
  594. } REG_CE_PUB_CE_AXI_PROTECT_SEL_T;
  595. // ce_rng_en
  596. typedef union {
  597. uint32_t v;
  598. struct
  599. {
  600. uint32_t rf_ce_rng_en : 1; // [0]
  601. uint32_t rf_ce_trng_src_en : 1; // [1], write clear
  602. uint32_t rf_ce_rng_src_from_cpu_enable : 1; // [2]
  603. uint32_t rf_ce_rng_rst_from_cpu : 1; // [3], write clear
  604. uint32_t rf_ce_trng_ptest_mode_en : 1; // [4]
  605. uint32_t __7_5 : 3; // [7:5]
  606. uint32_t rf_rng_src_sel_enable : 8; // [15:8]
  607. uint32_t rf_rng_auto_enable : 1; // [16]
  608. uint32_t rf_ce_rng_mux_ring_enable : 1; // [17]
  609. uint32_t rf_ce_rng_data_mux_enable : 1; // [18]
  610. uint32_t __31_19 : 13; // [31:19]
  611. } b;
  612. } REG_CE_PUB_CE_RNG_EN_T;
  613. // ce_rng_config
  614. typedef union {
  615. uint32_t v;
  616. struct
  617. {
  618. uint32_t rf_ce_rng_ring_sel : 3; // [2:0]
  619. uint32_t rf_ce_rng_trng_sel : 1; // [3]
  620. uint32_t rf_ce_rng_data_len_sel : 1; // [4]
  621. uint32_t rf_ce_rng_source_sel : 2; // [6:5]
  622. uint32_t rf_ce_rng_exotic_fault_rst_sel : 1; // [7]
  623. uint32_t rf_ce_rng_data_valid_threshold : 4; // [11:8]
  624. uint32_t __15_12 : 4; // [15:12]
  625. uint32_t rf_ce_rng_ptest_data_in : 1; // [16]
  626. uint32_t __19_17 : 3; // [19:17]
  627. uint32_t number_of_samples_threshold : 12; // [31:20]
  628. } b;
  629. } REG_CE_PUB_CE_RNG_CONFIG_T;
  630. // ce_rng_sample_period
  631. typedef union {
  632. uint32_t v;
  633. struct
  634. {
  635. uint32_t rf_ce_rng_second_sample_period : 16; // [15:0]
  636. uint32_t rf_ce_rng_first_sample_period : 15; // [30:16]
  637. uint32_t rf_ce_rng_first_sample_en : 1; // [31]
  638. } b;
  639. } REG_CE_PUB_CE_RNG_SAMPLE_PERIOD_T;
  640. // ce_rng_post_process_en
  641. typedef union {
  642. uint32_t v;
  643. struct
  644. {
  645. uint32_t rf_ce_rng_post_first_en : 1; // [0]
  646. uint32_t rf_ce_rng_post_second_en : 1; // [1]
  647. uint32_t rf_ce_rng_post_three_en : 1; // [2]
  648. uint32_t rf_ce_rng_post_four_en : 1; // [3]
  649. uint32_t rf_ce_rng_post_five_en : 1; // [4]
  650. uint32_t rf_ce_rng_post_six_en : 1; // [5]
  651. uint32_t rf_ce_rng_post_seven_en : 1; // [6]
  652. uint32_t rf_ce_rng_post_eight_en : 1; // [7]
  653. uint32_t __31_8 : 24; // [31:8]
  654. } b;
  655. } REG_CE_PUB_CE_RNG_POST_PROCESS_EN_T;
  656. // ce_rng_work_status
  657. typedef union {
  658. uint32_t v;
  659. struct
  660. {
  661. uint32_t rf_ce_rng_auto_mode_ongoing : 1; // [0], read only
  662. uint32_t rf_ce_rng_data_valid : 1; // [1], read only
  663. uint32_t rf_rng_rsa_pka_busy : 1; // [2], read only
  664. uint32_t rf_ce_rng_error_fault : 1; // [3], read only
  665. uint32_t rf_ce_rng_fifo_empty : 1; // [4], read only
  666. uint32_t rf_ce_rng_drbg_test_data_type : 2; // [6:5], read only
  667. uint32_t rf_ce_rng_drbg_test_result_vld : 1; // [7], read only
  668. uint32_t rf_ce_rng_test_result : 1; // [8], read only
  669. uint32_t rf_ce_rng_es_test_done : 1; // [9], read only
  670. uint32_t rf_ce_rng_es_test_fail : 1; // [10], read only
  671. uint32_t rf_ce_rng_drbg_test_done : 1; // [11], read only
  672. uint32_t rf_ce_rng_drbg_test_fail : 1; // [12], read only
  673. uint32_t rf_ce_rng_drbg_pattern_req : 1; // [13], read only
  674. uint32_t rf_ce_rng_drbg_test_process : 2; // [15:14], read only
  675. uint32_t rf_ce_rng_rsa_key_gen_rand_num : 16; // [31:16], read only
  676. } b;
  677. } REG_CE_PUB_CE_RNG_WORK_STATUS_T;
  678. // ce_rng_int_en
  679. typedef union {
  680. uint32_t v;
  681. struct
  682. {
  683. uint32_t rf_ce_rng_process0_int_en : 1; // [0]
  684. uint32_t rf_ce_rng_process1_int_en : 1; // [1]
  685. uint32_t rf_ce_rng_process2_int_en : 1; // [2]
  686. uint32_t rf_ce_rng_timeout_int_en : 1; // [3]
  687. uint32_t rf_ce_rng_sram_short_int_en : 1; // [4]
  688. uint32_t rf_ce_rng_cont_htest_int_en : 1; // [5]
  689. uint32_t __31_6 : 26; // [31:6]
  690. } b;
  691. } REG_CE_PUB_CE_RNG_INT_EN_T;
  692. // ce_rng_sts
  693. typedef union {
  694. uint32_t v;
  695. struct
  696. {
  697. uint32_t rf_ce_rng_process0_int_sts : 1; // [0], read only
  698. uint32_t rf_ce_rng_process1_int_sts : 1; // [1], read only
  699. uint32_t rf_ce_rng_process2_int_sts : 1; // [2], read only
  700. uint32_t rf_ce_rng_timeout_int_sts : 1; // [3], read only
  701. uint32_t rf_ce_rng_sram_short_int_sts : 1; // [4], read only
  702. uint32_t rf_ce_rng_con_htest_int_sts : 1; // [5], read only
  703. uint32_t __31_6 : 26; // [31:6]
  704. } b;
  705. } REG_CE_PUB_CE_RNG_STS_T;
  706. // ce_rng_int_clr
  707. typedef union {
  708. uint32_t v;
  709. struct
  710. {
  711. uint32_t rf_ce_rng_clear_process0_int : 1; // [0], write clear
  712. uint32_t rf_ce_rng_clear_process1_int : 1; // [1], write clear
  713. uint32_t rf_ce_rng_clear_process2_int : 1; // [2], write clear
  714. uint32_t rf_ce_rng_clear_timeout_int : 1; // [3], write clear
  715. uint32_t rf_ce_rng_clear_sram_short_int : 1; // [4], write clear
  716. uint32_t rf_ce_rng_clear_con_htest_int : 1; // [5], write clear
  717. uint32_t __31_6 : 26; // [31:6]
  718. } b;
  719. } REG_CE_PUB_CE_RNG_INT_CLR_T;
  720. // ce_rng_mode
  721. typedef union {
  722. uint32_t v;
  723. struct
  724. {
  725. uint32_t rf_ce_rng_mode : 2; // [1:0]
  726. uint32_t __7_2 : 6; // [7:2]
  727. uint32_t rf_ce_prng_mode : 1; // [8]
  728. uint32_t __31_9 : 23; // [31:9]
  729. } b;
  730. } REG_CE_PUB_CE_RNG_MODE_T;
  731. // ce_prng_seed_update
  732. typedef union {
  733. uint32_t v;
  734. struct
  735. {
  736. uint32_t rf_ce_prng_seed_update : 1; // [0], write clear
  737. uint32_t __31_1 : 31; // [31:1]
  738. } b;
  739. } REG_CE_PUB_CE_PRNG_SEED_UPDATE_T;
  740. // ce_rng_bit_rate
  741. typedef union {
  742. uint32_t v;
  743. struct
  744. {
  745. uint32_t rf_rng_bit_rate : 16; // [15:0], read only
  746. uint32_t rf_rng_gen_bit_cnt : 16; // [31:16], read only
  747. } b;
  748. } REG_CE_PUB_CE_RNG_BIT_RATE_T;
  749. // ce_rng_sram_data_threshhold
  750. typedef union {
  751. uint32_t v;
  752. struct
  753. {
  754. uint32_t rf_ce_rng_sram_valid_threshholdd : 4; // [3:0]
  755. uint32_t __31_4 : 28; // [31:4]
  756. } b;
  757. } REG_CE_PUB_CE_RNG_SRAM_DATA_THRESHHOLD_T;
  758. // ce_rng_sram_data_residue_num
  759. typedef union {
  760. uint32_t v;
  761. struct
  762. {
  763. uint32_t rf_ce_rng_sram_data_residue_num : 4; // [3:0], read only
  764. uint32_t __31_4 : 28; // [31:4]
  765. } b;
  766. } REG_CE_PUB_CE_RNG_SRAM_DATA_RESIDUE_NUM_T;
  767. // ce_rng_exotic_fault_counter_config
  768. typedef union {
  769. uint32_t v;
  770. struct
  771. {
  772. uint32_t rf_ce_exotic_fault_counter_config : 16; // [15:0]
  773. uint32_t __31_16 : 16; // [31:16]
  774. } b;
  775. } REG_CE_PUB_CE_RNG_EXOTIC_FAULT_COUNTER_CONFIG_T;
  776. // ce_rng_drbg_seed_cnt
  777. typedef union {
  778. uint32_t v;
  779. struct
  780. {
  781. uint32_t rf_ce_rng_drbg_seed_cnt : 16; // [15:0]
  782. uint32_t __31_16 : 16; // [31:16]
  783. } b;
  784. } REG_CE_PUB_CE_RNG_DRBG_SEED_CNT_T;
  785. // ce_rng_health_test_config
  786. typedef union {
  787. uint32_t v;
  788. struct
  789. {
  790. uint32_t rf_ce_rng_es_test_en : 1; // [0]
  791. uint32_t rf_ce_rng_drbg_test_en : 1; // [1]
  792. uint32_t rf_ce_rng_long_term_bit_max : 6; // [7:2]
  793. uint32_t rf_ce_rng_ones_freq_max : 11; // [18:8]
  794. uint32_t __31_19 : 13; // [31:19]
  795. } b;
  796. } REG_CE_PUB_CE_RNG_HEALTH_TEST_CONFIG_T;
  797. // ce_dump_addr_hi
  798. typedef union {
  799. uint32_t v;
  800. struct
  801. {
  802. uint32_t rf_ce_rcv_addr_hi : 4; // [3:0]
  803. uint32_t rf_ce_dump_addr_hi : 4; // [7:4]
  804. uint32_t __31_8 : 24; // [31:8]
  805. } b;
  806. } REG_CE_PUB_CE_DUMP_ADDR_HI_T;
  807. // ce_fde_aes_dump_addr_hi
  808. typedef union {
  809. uint32_t v;
  810. struct
  811. {
  812. uint32_t rf_ce_fde_aes_rcv_addr_hi : 4; // [3:0]
  813. uint32_t rf_ce_fde_aes_dump_addr_hi : 4; // [7:4]
  814. uint32_t __31_8 : 24; // [31:8]
  815. } b;
  816. } REG_CE_PUB_CE_FDE_AES_DUMP_ADDR_HI_T;
  817. // ce_fde_aes_start
  818. typedef union {
  819. uint32_t v;
  820. struct
  821. {
  822. uint32_t rf_ce_fde_aes_start : 1; // [0], write clear
  823. uint32_t __31_1 : 31; // [31:1]
  824. } b;
  825. } REG_CE_PUB_CE_FDE_AES_START_T;
  826. // ce_fde_aes_clear
  827. typedef union {
  828. uint32_t v;
  829. struct
  830. {
  831. uint32_t rf_ce_fde_aes_clear : 1; // [0], write clear
  832. uint32_t __31_1 : 31; // [31:1]
  833. } b;
  834. } REG_CE_PUB_CE_FDE_AES_CLEAR_T;
  835. // ce_fde_aes_mode
  836. typedef union {
  837. uint32_t v;
  838. struct
  839. {
  840. uint32_t rf_ce_fde_aes_en : 1; // [0]
  841. uint32_t __3_1 : 3; // [3:1]
  842. uint32_t rf_ce_fde_aes_enc_dec_sel : 1; // [4]
  843. uint32_t __7_5 : 3; // [7:5]
  844. uint32_t rf_ce_fde_aes_work_mode : 4; // [11:8]
  845. uint32_t rf_ce_fde_aes_xts_iv_rotation : 1; // [12]
  846. uint32_t __15_13 : 3; // [15:13]
  847. uint32_t rf_ce_fde_aes_key_len_sel : 2; // [17:16]
  848. uint32_t __19_18 : 2; // [19:18]
  849. uint32_t rf_ce_fde_aes_mac_ctr_inc_mode : 2; // [21:20]
  850. uint32_t __31_22 : 10; // [31:22]
  851. } b;
  852. } REG_CE_PUB_CE_FDE_AES_MODE_T;
  853. // ce_fde_aes_cfg
  854. typedef union {
  855. uint32_t v;
  856. struct
  857. {
  858. uint32_t rf_ce_fde_aes_link_mode_flag : 1; // [0]
  859. uint32_t rf_ce_fde_aes_dont_rcv_ddr : 1; // [1]
  860. uint32_t rf_ce_fde_aes_dont_dump_ddr : 1; // [2]
  861. uint32_t rf_ce_fde_aes_cmd_ioc : 1; // [3]
  862. uint32_t rf_ce_fde_aes_std_mode_end_flag : 1; // [4]
  863. uint32_t __6_5 : 2; // [6:5]
  864. uint32_t rf_ce_fde_aes_bypass : 1; // [7]
  865. uint32_t rf_ce_fde_aes_key_in_ddr_flag : 1; // [8]
  866. uint32_t __9_9 : 1; // [9]
  867. uint32_t rf_ce_fde_key_in_session_key_flag : 1; // [10]
  868. uint32_t rf_ce_fde_key_in_iram_flag : 1; // [11]
  869. uint32_t __14_12 : 3; // [14:12]
  870. uint32_t rf_ce_fde_aes_list_end_flag : 1; // [15], read only
  871. uint32_t rf_ce_fde_aes_list_data_end_flag : 1; // [16], read only
  872. uint32_t rf_ce_fde_list_update_iv_sec_cnt : 1; // [17], read only
  873. uint32_t __19_18 : 2; // [19:18]
  874. uint32_t rf_ce_fde_aes_dst_byte_switch : 1; // [20]
  875. uint32_t rf_ce_fde_aes_src_byte_switch : 1; // [21]
  876. uint32_t rf_ce_fde_aes_dst_word_switch : 1; // [22]
  877. uint32_t rf_ce_fde_aes_src_word_switch : 1; // [23]
  878. uint32_t rf_ce_fde_auto_update_iv_sec_cnt : 1; // [24]
  879. uint32_t __31_25 : 7; // [31:25]
  880. } b;
  881. } REG_CE_PUB_CE_FDE_AES_CFG_T;
  882. // ce_fde_aes_list_length
  883. typedef union {
  884. uint32_t v;
  885. struct
  886. {
  887. uint32_t rf_ce_fde_aes_list_len : 12; // [11:0]
  888. uint32_t __15_12 : 4; // [15:12]
  889. uint32_t rf_ce_fde_aes_list_ptr_hi : 4; // [19:16]
  890. uint32_t __31_20 : 12; // [31:20]
  891. } b;
  892. } REG_CE_PUB_CE_FDE_AES_LIST_LENGTH_T;
  893. // ce_fde_aes_src_frag_length
  894. typedef union {
  895. uint32_t v;
  896. struct
  897. {
  898. uint32_t rf_ce_fde_aes_src_frag_len : 24; // [23:0]
  899. uint32_t rf_ce_fde_aes_src_addr_hi : 4; // [27:24]
  900. uint32_t rf_ce_fde_aes_dst_addr_hi : 4; // [31:28]
  901. } b;
  902. } REG_CE_PUB_CE_FDE_AES_SRC_FRAG_LENGTH_T;
  903. // ce_fde_aes_key_length
  904. typedef union {
  905. uint32_t v;
  906. struct
  907. {
  908. uint32_t rf_ce_fde_aes_key_len : 24; // [23:0]
  909. uint32_t rf_ce_fde_aes_key_addr_hi : 4; // [27:24]
  910. uint32_t __31_28 : 4; // [31:28]
  911. } b;
  912. } REG_CE_PUB_CE_FDE_AES_KEY_LENGTH_T;
  913. // ce_fde_aes_dst_ddr_sel
  914. typedef union {
  915. uint32_t v;
  916. struct
  917. {
  918. uint32_t rf_ce_fde_aes_dst_ddr_sel : 1; // [0]
  919. uint32_t __31_1 : 31; // [31:1]
  920. } b;
  921. } REG_CE_PUB_CE_FDE_AES_DST_DDR_SEL_T;
  922. // ce_fde_aes_dummy_reg
  923. typedef union {
  924. uint32_t v;
  925. struct
  926. {
  927. uint32_t rf_ce_fde_dummy_reg : 8; // [7:0]
  928. uint32_t __31_8 : 24; // [31:8]
  929. } b;
  930. } REG_CE_PUB_CE_FDE_AES_DUMMY_REG_T;
  931. // ce_debug_dma_status
  932. #define CE_PUB_RF_CE_DMA_MAIN_READ_STATE(n) (((n)&0x1f) << 0)
  933. #define CE_PUB_RF_CE_DMA_PKA_MAIN_READ_STATE(n) (((n)&0x7) << 5)
  934. #define CE_PUB_RF_CE_DMA_MAIN_WRITE_STATE(n) (((n)&0x1f) << 8)
  935. #define CE_PUB_RF_CE_DMA_ERR (1 << 13)
  936. #define CE_PUB_RF_CE_INT_RAW_STATUS_VLD (1 << 14)
  937. #define CE_PUB_RF_CE_CMD_FIFO_NON_EMPTY (1 << 15)
  938. #define CE_PUB_RF_CE_FDE_CMD_FIFO_NON_EMPTY (1 << 16)
  939. #define CE_PUB_RF_CE_DMA_SRC_STATE(n) (((n)&0x1f) << 17)
  940. #define CE_PUB_RF_CE_DMA_DST_STATE(n) (((n)&0x1f) << 22)
  941. #define CE_PUB_RF_CE_BUSY (1 << 28)
  942. #define CE_PUB_RF_CE_ARREADY (1 << 29)
  943. #define CE_PUB_RF_CE_AWREADY (1 << 30)
  944. #define CE_PUB_RF_CE_WREADY (1 << 31)
  945. // ce_debug_aes_status
  946. #define CE_PUB_RF_CE_AES_STATUS(n) (((n)&0xff) << 0)
  947. #define CE_PUB_RF_CE_WDMA_DATA_STATUS(n) (((n)&0x3) << 10)
  948. #define CE_PUB_RF_CE_SM4_STATUS(n) (((n)&0x7) << 12)
  949. #define CE_PUB_RF_CE_RDMA_DATA_STATUS(n) (((n)&0x7) << 15)
  950. #define CE_PUB_RF_CE_FDE_DMA_MAIN_READ_STATE(n) (((n)&0x1f) << 20)
  951. #define CE_PUB_RF_CE_FDE_WDMA_DATA_STATUS(n) (((n)&0x3) << 25)
  952. #define CE_PUB_RF_CE_FDE_RDMA_DATA_STATUS(n) (((n)&0x3) << 27)
  953. // ce_debug_tdes_status
  954. #define CE_PUB_RF_CE_FDE_AES_STATUS(n) (((n)&0xff) << 0)
  955. #define CE_PUB_RF_CE_FDE_DMA_MAIN_WRITE_STATE(n) (((n)&0x1f) << 8)
  956. #define CE_PUB_RF_CE_PKA_DMA_MAIN_WRITE_STATE(n) (((n)&0x7) << 13)
  957. #define CE_PUB_RF_CE_EFUSE_ACCESS_STATUS(n) (((n)&0x1f) << 16)
  958. #define CE_PUB_RF_CE_DMA_WVALID_STATE(n) (((n)&0xf) << 21)
  959. #define CE_PUB_RF_CE_TDES_STATUS(n) (((n)&0x1f) << 25)
  960. // ce_debug_hash_status1
  961. #define CE_PUB_RF_CE_HASH_STATUS1(n) (((n)&0x3ff) << 0)
  962. // ce_clk_en
  963. #define CE_PUB_RF_CE_DMA_CK_EN (1 << 0)
  964. #define CE_PUB_RF_CE_AES_CK_EN (1 << 1)
  965. #define CE_PUB_RF_CE_FDE_AES_CK_EN (1 << 2)
  966. #define CE_PUB_RF_CE_HASH_CK_EN (1 << 3)
  967. #define CE_PUB_RF_CE_DES_CK_EN (1 << 4)
  968. #define CE_PUB_RF_CE_TRNG_CK_EN (1 << 5)
  969. #define CE_PUB_RF_CE_SM4_CK_EN (1 << 6)
  970. #define CE_PUB_RF_CE_CHACAH_POLY_CK_EN (1 << 7)
  971. #define CE_PUB_RF_CE_PKA_CK_EN (1 << 8)
  972. #define CE_PUB_RF_CE_SIMON_SPECK_CK_EN (1 << 9)
  973. #define CE_PUB_RF_CE_APB_RF_CLK_EN (1 << 16)
  974. #define CE_PUB_RF_CE_DMA_CTRL_CLK_EN (1 << 17)
  975. #define CE_PUB_RF_CE_DMA_AXI_CLK_EN (1 << 18)
  976. #define CE_PUB_RF_CE_AES_CLK_EN (1 << 20)
  977. #define CE_PUB_RF_CE_RNG_CLK_EN (1 << 21)
  978. #define CE_PUB_RF_CE_POLY_CLK_EN (1 << 22)
  979. #define CE_PUB_RF_CE_CHACHA_CLK_EN (1 << 23)
  980. #define CE_PUB_RF_CE_TRNG_PUB_CK_EN (1 << 24)
  981. #define CE_PUB_RF_CE_RNG_PUB_CLK_EN (1 << 25)
  982. #define CE_PUB_RF_CE_FDE_AES_CLK_EN (1 << 28)
  983. // ce_int_en
  984. #define CE_PUB_RF_CE_EN_TDES_KEY_ERR_INT (1 << 5)
  985. #define CE_PUB_RF_CE_EN_RNG_INT (1 << 7)
  986. #define CE_PUB_RF_CE_EN_CMD_DONE_INT (1 << 16)
  987. #define CE_PUB_RF_CE_EN_LEN_ERR_INT (1 << 17)
  988. #define CE_PUB_RF_CE_FDE_EN_CMD_DONE_INT (1 << 20)
  989. #define CE_PUB_RF_CE_FDE_EN_LEN_ERR_INT (1 << 21)
  990. // ce_int_status
  991. #define CE_PUB_RF_CE_TDES_KEY_ERR_INT_STATUS (1 << 5)
  992. #define CE_PUB_RF_CE_RNG_INT_STATUS (1 << 7)
  993. #define CE_PUB_RF_CE_EN_CMD_DONE_STATUS (1 << 16)
  994. #define CE_PUB_RF_CE_EN_LEN_ERR_STATUS (1 << 17)
  995. #define CE_PUB_RF_CE_FDE_EN_CMD_DONE_STATUS (1 << 20)
  996. #define CE_PUB_RF_CE_FDE_EN_LEN_ERR_STATUS (1 << 21)
  997. // ce_int_clear
  998. #define CE_PUB_RF_CE_CLEAR_TDES_KEY_ERR_INT (1 << 5)
  999. #define CE_PUB_RF_CE_CLEAR_CMD_DONE_INT (1 << 16)
  1000. #define CE_PUB_RF_CE_CLEAR_LEN_ERR_INT (1 << 17)
  1001. #define CE_PUB_RF_CE_FDE_EN_CMD_DONE_STATUS (1 << 20)
  1002. #define CE_PUB_RF_CE_FDE_EN_LEN_ERR_STATUS (1 << 21)
  1003. // ce_start
  1004. #define CE_PUB_RF_CE_START (1 << 0)
  1005. // ce_clear
  1006. #define CE_PUB_RF_CE_CLEAR (1 << 0)
  1007. // ce_aes_mode
  1008. #define CE_PUB_RF_CE_AES_EN (1 << 0)
  1009. #define CE_PUB_RF_CE_AES_ENC_DEC_SEL (1 << 4)
  1010. #define CE_PUB_RF_CE_AES_MAC_CTR_INC_MODE(n) (((n)&0x3) << 5)
  1011. #define CE_PUB_RF_CE_AES_WORK_MODE(n) (((n)&0xf) << 8)
  1012. #define CE_PUB_RF_CE_AES_KEY_LEN_SEL(n) (((n)&0x3) << 12)
  1013. #define CE_PUB_RF_CE_AES_XTS_IV_ROTATION (1 << 14)
  1014. #define CE_PUB_RF_CE_AES_KEY_UPDATE_N (1 << 15)
  1015. // ce_tdes_mode
  1016. #define CE_PUB_RF_CE_TDES_EN (1 << 0)
  1017. #define CE_PUB_RF_CE_TDES_ENC_DEC_SEL (1 << 4)
  1018. #define CE_PUB_RF_CE_TDES_WORK_MODE(n) (((n)&0x3) << 8)
  1019. #define CE_PUB_RF_CE_TDES_KEY_EVEN_SEL (1 << 12)
  1020. #define CE_PUB_RF_CE_TDES_KEY_EVENODD_CHECK_ON (1 << 13)
  1021. // ce_hash_mode
  1022. #define CE_PUB_RF_CE_HASH_EN (1 << 0)
  1023. #define CE_PUB_RF_CE_HASH_MODE(n) (((n)&0x1f) << 4)
  1024. #define CE_PUB_RF_HASH_HMAC_PAD_SEL(n) (((n)&0x3) << 12)
  1025. #define CE_PUB_RF_HASH_SHA3_SHAKE_OUT_LEN(n) (((n)&0xff) << 16)
  1026. // ce_chacha_poly_mode
  1027. #define CE_PUB_RF_CE_CHACHA_POLY_EN (1 << 0)
  1028. #define CE_PUB_RF_CE_CHACHA_POLY_ENC_DEC_SEL (1 << 4)
  1029. #define CE_PUB_RF_CE_CHACHA_POLY_MODE(n) (((n)&0x3) << 8)
  1030. // ce_simon_speck_mode
  1031. #define CE_PUB_RF_CE_SIMON_SPECK_EN (1 << 0)
  1032. #define CE_PUB_RF_CE_SIMON_SPECK_ENC_DEC_SEL (1 << 4)
  1033. #define CE_PUB_RF_CE_SIMON_SPECK_SEL (1 << 8)
  1034. #define CE_PUB_RF_CE_SIMON_SPECK_WORK_MODE(n) (((n)&0x7) << 9)
  1035. #define CE_PUB_RF_CE_SIMON_SPECK_KEY_LEN_SEL(n) (((n)&0x3) << 13)
  1036. #define CE_PUB_RF_CE_SIMON_SPECK_KEY_UPDATE_N (1 << 15)
  1037. // ce_cfg
  1038. #define CE_PUB_RF_CE_LINK_MODE_FLAG (1 << 0)
  1039. #define CE_PUB_RF_CE_DONT_RCV_DDR (1 << 1)
  1040. #define CE_PUB_RF_CE_DONT_DUMP_DDR (1 << 2)
  1041. #define CE_PUB_RF_CE_CMD_IOC (1 << 3)
  1042. #define CE_PUB_RF_CE_STD_MODE_END_FLAG (1 << 4)
  1043. #define CE_PUB_RF_CE_STD_MODE_AAD_END_FLAG (1 << 5)
  1044. #define CE_PUB_RF_CE_STD_MODE_AAD_FLAG (1 << 6)
  1045. #define CE_PUB_RF_CE_DMA_BYPASS (1 << 7)
  1046. #define CE_PUB_RF_CE_KEY_IN_DDR_FLAG (1 << 8)
  1047. #define CE_PUB_RF_CE_KEY_IN_SESSION_KEY_FLAG (1 << 10)
  1048. #define CE_PUB_RF_CE_KEY_IN_IRAM_FLAG (1 << 11)
  1049. #define CE_PUB_RF_CE_DO_WAIT_BDONE (1 << 12)
  1050. #define CE_PUB_RF_CE_LIST_AAD_END_FLAG (1 << 13)
  1051. #define CE_PUB_RF_CE_LIST_AAD_FLAG (1 << 14)
  1052. #define CE_PUB_RF_CE_LIST_END_FLAG (1 << 15)
  1053. #define CE_PUB_RF_CE_LIST_DATA_END_FLAG (1 << 16)
  1054. #define CE_PUB_RF_CE_LIST_UPDATE_IV_SEC_CNT (1 << 17)
  1055. #define CE_PUB_RF_CE_KEY_HDCP_EN (1 << 18)
  1056. #define CE_PUB_RF_CE_DST_BYTE_SWITCH (1 << 20)
  1057. #define CE_PUB_RF_CE_SRC_BYTE_SWITCH (1 << 21)
  1058. #define CE_PUB_RF_CE_DST_WORD_SWITCH (1 << 22)
  1059. #define CE_PUB_RF_CE_SRC_WORD_SWITCH (1 << 23)
  1060. // ce_src_frag_length
  1061. #define CE_PUB_RF_CE_SRC_FRAG_LEN(n) (((n)&0xffffff) << 0)
  1062. #define CE_PUB_RF_CE_SRC_ADDR_HI(n) (((n)&0xf) << 24)
  1063. // ce_dst_frag_length
  1064. #define CE_PUB_RF_CE_DST_FRAG_LEN(n) (((n)&0xffffff) << 0)
  1065. #define CE_PUB_RF_CE_DST_ADDR_HI(n) (((n)&0xf) << 24)
  1066. // ce_list_length
  1067. #define CE_PUB_RF_CE_LIST_LEN(n) (((n)&0xfff) << 0)
  1068. #define CE_PUB_RF_CE_LIST_PTR_HI(n) (((n)&0xf) << 16)
  1069. // ce_aes_tdes_rsa_key_length
  1070. #define CE_PUB_RF_CE_AES_TDES_RSA_KEY_LEN(n) (((n)&0xffffff) << 0)
  1071. #define CE_PUB_RF_CE_AES_TDES_RSA_KEY_ADDR_HI(n) (((n)&0xf) << 24)
  1072. // ce_aes_tag_length
  1073. #define CE_PUB_RF_CE_AES_TAG_LEN(n) (((n)&0xff) << 0)
  1074. #define CE_PUB_RF_CE_AES_TAG_ADDR_HI(n) (((n)&0xf) << 8)
  1075. // ce_sm4_mode
  1076. #define CE_PUB_RF_CE_SM4_EN (1 << 0)
  1077. #define CE_PUB_RF_CE_SM4_ENC_DEC_SEL (1 << 4)
  1078. #define CE_PUB_RF_CE_SM4_WORK_MODE(n) (((n)&0x7) << 8)
  1079. #define CE_PUB_RF_CE_SM4_XTS_INV_ROTATION (1 << 11)
  1080. #define CE_PUB_RF_CE_SM4_KEY_UPDATE_N (1 << 12)
  1081. // ce_ip_version
  1082. #define CE_PUB_RF_CE_IP_VERSION_LO(n) (((n)&0xf) << 0)
  1083. #define CE_PUB_RF_CE_IP_VERSION_HI(n) (((n)&0xfffffff) << 4)
  1084. // ce_user_flag
  1085. #define CE_PUB_RF_CE_USE_FLAG (1 << 0)
  1086. #define CE_PUB_RF_CE_SEC_PRIORITY_VLD (1 << 4)
  1087. #define CE_PUB_RF_CE_PUB_PRIORITY_VLD (1 << 8)
  1088. // ce_axi_axcache
  1089. #define CE_PUB_RF_CE_AXI_ARCACHE(n) (((n)&0xf) << 0)
  1090. #define CE_PUB_RF_CE_AXI_AWCACHE(n) (((n)&0xf) << 4)
  1091. #define CE_PUB_RF_CE_DST_OUTSTANDING_NUM(n) (((n)&0xf) << 8)
  1092. #define CE_PUB_RF_CE_SRC_OUTSTANDING_NUM(n) (((n)&0xf) << 12)
  1093. // ce_cmd_stop_ctrl
  1094. #define CE_PUB_RF_CE_CMD_STOP (1 << 16)
  1095. #define CE_PUB_RF_CE_CMD_STOP_STATUS (1 << 17)
  1096. #define CE_PUB_RF_CE_CMD_STOP_CLEAR (1 << 18)
  1097. #define CE_PUB_RF_CE_FDE_CMD_STOP (1 << 20)
  1098. #define CE_PUB_RF_CE_FDE_CMD_STOP_STATUS (1 << 21)
  1099. #define CE_PUB_RF_CE_FDE_CMD_STOP_CLEAR (1 << 22)
  1100. // ce_axi_protect_sel
  1101. #define CE_PUB_PUB_AXI_PROT_SEL_EN (1 << 0)
  1102. #define CE_PUB_PUB_AXI_PROT_SEL_RKEY (1 << 1)
  1103. #define CE_PUB_PUB_AXI_PROT_SEL_RLIST (1 << 2)
  1104. #define CE_PUB_PUB_AXI_PROT_SEL_RTXT (1 << 3)
  1105. #define CE_PUB_PUB_AXI_PROT_SEL_WTXT (1 << 4)
  1106. #define CE_PUB_PUB_DUMMY(n) (((n)&0x7) << 5)
  1107. #define CE_PUB_FDE_AXI_PROT_SEL_EN (1 << 8)
  1108. #define CE_PUB_FDE_AXI_PROT_SEL_RKEY (1 << 9)
  1109. #define CE_PUB_FDE_AXI_PROT_SEL_RLIST (1 << 10)
  1110. #define CE_PUB_FDE_AXI_PROT_SEL_RTXT (1 << 11)
  1111. #define CE_PUB_FDE_AXI_PROT_SEL_WTXT (1 << 12)
  1112. #define CE_PUB_FDE_DUMMY(n) (((n)&0x7) << 13)
  1113. // ce_rng_en
  1114. #define CE_PUB_RF_CE_RNG_EN (1 << 0)
  1115. #define CE_PUB_RF_CE_TRNG_SRC_EN (1 << 1)
  1116. #define CE_PUB_RF_CE_RNG_SRC_FROM_CPU_ENABLE (1 << 2)
  1117. #define CE_PUB_RF_CE_RNG_RST_FROM_CPU (1 << 3)
  1118. #define CE_PUB_RF_CE_TRNG_PTEST_MODE_EN (1 << 4)
  1119. #define CE_PUB_RF_RNG_SRC_SEL_ENABLE(n) (((n)&0xff) << 8)
  1120. #define CE_PUB_RF_RNG_AUTO_ENABLE (1 << 16)
  1121. #define CE_PUB_RF_CE_RNG_MUX_RING_ENABLE (1 << 17)
  1122. #define CE_PUB_RF_CE_RNG_DATA_MUX_ENABLE (1 << 18)
  1123. // ce_rng_config
  1124. #define CE_PUB_RF_CE_RNG_RING_SEL(n) (((n)&0x7) << 0)
  1125. #define CE_PUB_RF_CE_RNG_TRNG_SEL (1 << 3)
  1126. #define CE_PUB_RF_CE_RNG_DATA_LEN_SEL (1 << 4)
  1127. #define CE_PUB_RF_CE_RNG_SOURCE_SEL(n) (((n)&0x3) << 5)
  1128. #define CE_PUB_RF_CE_RNG_EXOTIC_FAULT_RST_SEL (1 << 7)
  1129. #define CE_PUB_RF_CE_RNG_DATA_VALID_THRESHOLD(n) (((n)&0xf) << 8)
  1130. #define CE_PUB_RF_CE_RNG_PTEST_DATA_IN (1 << 16)
  1131. #define CE_PUB_NUMBER_OF_SAMPLES_THRESHOLD(n) (((n)&0xfff) << 20)
  1132. // ce_rng_sample_period
  1133. #define CE_PUB_RF_CE_RNG_SECOND_SAMPLE_PERIOD(n) (((n)&0xffff) << 0)
  1134. #define CE_PUB_RF_CE_RNG_FIRST_SAMPLE_PERIOD(n) (((n)&0x7fff) << 16)
  1135. #define CE_PUB_RF_CE_RNG_FIRST_SAMPLE_EN (1 << 31)
  1136. // ce_rng_post_process_en
  1137. #define CE_PUB_RF_CE_RNG_POST_FIRST_EN (1 << 0)
  1138. #define CE_PUB_RF_CE_RNG_POST_SECOND_EN (1 << 1)
  1139. #define CE_PUB_RF_CE_RNG_POST_THREE_EN (1 << 2)
  1140. #define CE_PUB_RF_CE_RNG_POST_FOUR_EN (1 << 3)
  1141. #define CE_PUB_RF_CE_RNG_POST_FIVE_EN (1 << 4)
  1142. #define CE_PUB_RF_CE_RNG_POST_SIX_EN (1 << 5)
  1143. #define CE_PUB_RF_CE_RNG_POST_SEVEN_EN (1 << 6)
  1144. #define CE_PUB_RF_CE_RNG_POST_EIGHT_EN (1 << 7)
  1145. // ce_rng_work_status
  1146. #define CE_PUB_RF_CE_RNG_AUTO_MODE_ONGOING (1 << 0)
  1147. #define CE_PUB_RF_CE_RNG_DATA_VALID (1 << 1)
  1148. #define CE_PUB_RF_RNG_RSA_PKA_BUSY (1 << 2)
  1149. #define CE_PUB_RF_CE_RNG_ERROR_FAULT (1 << 3)
  1150. #define CE_PUB_RF_CE_RNG_FIFO_EMPTY (1 << 4)
  1151. #define CE_PUB_RF_CE_RNG_DRBG_TEST_DATA_TYPE(n) (((n)&0x3) << 5)
  1152. #define CE_PUB_RF_CE_RNG_DRBG_TEST_RESULT_VLD (1 << 7)
  1153. #define CE_PUB_RF_CE_RNG_TEST_RESULT (1 << 8)
  1154. #define CE_PUB_RF_CE_RNG_ES_TEST_DONE (1 << 9)
  1155. #define CE_PUB_RF_CE_RNG_ES_TEST_FAIL (1 << 10)
  1156. #define CE_PUB_RF_CE_RNG_DRBG_TEST_DONE (1 << 11)
  1157. #define CE_PUB_RF_CE_RNG_DRBG_TEST_FAIL (1 << 12)
  1158. #define CE_PUB_RF_CE_RNG_DRBG_PATTERN_REQ (1 << 13)
  1159. #define CE_PUB_RF_CE_RNG_DRBG_TEST_PROCESS(n) (((n)&0x3) << 14)
  1160. #define CE_PUB_RF_CE_RNG_RSA_KEY_GEN_RAND_NUM(n) (((n)&0xffff) << 16)
  1161. // ce_rng_int_en
  1162. #define CE_PUB_RF_CE_RNG_PROCESS0_INT_EN (1 << 0)
  1163. #define CE_PUB_RF_CE_RNG_PROCESS1_INT_EN (1 << 1)
  1164. #define CE_PUB_RF_CE_RNG_PROCESS2_INT_EN (1 << 2)
  1165. #define CE_PUB_RF_CE_RNG_TIMEOUT_INT_EN (1 << 3)
  1166. #define CE_PUB_RF_CE_RNG_SRAM_SHORT_INT_EN (1 << 4)
  1167. #define CE_PUB_RF_CE_RNG_CONT_HTEST_INT_EN (1 << 5)
  1168. // ce_rng_sts
  1169. #define CE_PUB_RF_CE_RNG_PROCESS0_INT_STS (1 << 0)
  1170. #define CE_PUB_RF_CE_RNG_PROCESS1_INT_STS (1 << 1)
  1171. #define CE_PUB_RF_CE_RNG_PROCESS2_INT_STS (1 << 2)
  1172. #define CE_PUB_RF_CE_RNG_TIMEOUT_INT_STS (1 << 3)
  1173. #define CE_PUB_RF_CE_RNG_SRAM_SHORT_INT_STS (1 << 4)
  1174. #define CE_PUB_RF_CE_RNG_CON_HTEST_INT_STS (1 << 5)
  1175. // ce_rng_int_clr
  1176. #define CE_PUB_RF_CE_RNG_CLEAR_PROCESS0_INT (1 << 0)
  1177. #define CE_PUB_RF_CE_RNG_CLEAR_PROCESS1_INT (1 << 1)
  1178. #define CE_PUB_RF_CE_RNG_CLEAR_PROCESS2_INT (1 << 2)
  1179. #define CE_PUB_RF_CE_RNG_CLEAR_TIMEOUT_INT (1 << 3)
  1180. #define CE_PUB_RF_CE_RNG_CLEAR_SRAM_SHORT_INT (1 << 4)
  1181. #define CE_PUB_RF_CE_RNG_CLEAR_CON_HTEST_INT (1 << 5)
  1182. // ce_rng_mode
  1183. #define CE_PUB_RF_CE_RNG_MODE(n) (((n)&0x3) << 0)
  1184. #define CE_PUB_RF_CE_PRNG_MODE (1 << 8)
  1185. // ce_prng_seed_update
  1186. #define CE_PUB_RF_CE_PRNG_SEED_UPDATE (1 << 0)
  1187. // ce_rng_bit_rate
  1188. #define CE_PUB_RF_RNG_BIT_RATE(n) (((n)&0xffff) << 0)
  1189. #define CE_PUB_RF_RNG_GEN_BIT_CNT(n) (((n)&0xffff) << 16)
  1190. // ce_rng_sram_data_threshhold
  1191. #define CE_PUB_RF_CE_RNG_SRAM_VALID_THRESHHOLDD(n) (((n)&0xf) << 0)
  1192. // ce_rng_sram_data_residue_num
  1193. #define CE_PUB_RF_CE_RNG_SRAM_DATA_RESIDUE_NUM(n) (((n)&0xf) << 0)
  1194. // ce_rng_exotic_fault_counter_config
  1195. #define CE_PUB_RF_CE_EXOTIC_FAULT_COUNTER_CONFIG(n) (((n)&0xffff) << 0)
  1196. // ce_rng_drbg_seed_cnt
  1197. #define CE_PUB_RF_CE_RNG_DRBG_SEED_CNT(n) (((n)&0xffff) << 0)
  1198. // ce_rng_health_test_config
  1199. #define CE_PUB_RF_CE_RNG_ES_TEST_EN (1 << 0)
  1200. #define CE_PUB_RF_CE_RNG_DRBG_TEST_EN (1 << 1)
  1201. #define CE_PUB_RF_CE_RNG_LONG_TERM_BIT_MAX(n) (((n)&0x3f) << 2)
  1202. #define CE_PUB_RF_CE_RNG_ONES_FREQ_MAX(n) (((n)&0x7ff) << 8)
  1203. // ce_dump_addr_hi
  1204. #define CE_PUB_RF_CE_RCV_ADDR_HI(n) (((n)&0xf) << 0)
  1205. #define CE_PUB_RF_CE_DUMP_ADDR_HI(n) (((n)&0xf) << 4)
  1206. // ce_fde_aes_dump_addr_hi
  1207. #define CE_PUB_RF_CE_FDE_AES_RCV_ADDR_HI(n) (((n)&0xf) << 0)
  1208. #define CE_PUB_RF_CE_FDE_AES_DUMP_ADDR_HI(n) (((n)&0xf) << 4)
  1209. // ce_fde_aes_start
  1210. #define CE_PUB_RF_CE_FDE_AES_START (1 << 0)
  1211. // ce_fde_aes_clear
  1212. #define CE_PUB_RF_CE_FDE_AES_CLEAR (1 << 0)
  1213. // ce_fde_aes_mode
  1214. #define CE_PUB_RF_CE_FDE_AES_EN (1 << 0)
  1215. #define CE_PUB_RF_CE_FDE_AES_ENC_DEC_SEL (1 << 4)
  1216. #define CE_PUB_RF_CE_FDE_AES_WORK_MODE(n) (((n)&0xf) << 8)
  1217. #define CE_PUB_RF_CE_FDE_AES_XTS_IV_ROTATION (1 << 12)
  1218. #define CE_PUB_RF_CE_FDE_AES_KEY_LEN_SEL(n) (((n)&0x3) << 16)
  1219. #define CE_PUB_RF_CE_FDE_AES_MAC_CTR_INC_MODE(n) (((n)&0x3) << 20)
  1220. // ce_fde_aes_cfg
  1221. #define CE_PUB_RF_CE_FDE_AES_LINK_MODE_FLAG (1 << 0)
  1222. #define CE_PUB_RF_CE_FDE_AES_DONT_RCV_DDR (1 << 1)
  1223. #define CE_PUB_RF_CE_FDE_AES_DONT_DUMP_DDR (1 << 2)
  1224. #define CE_PUB_RF_CE_FDE_AES_CMD_IOC (1 << 3)
  1225. #define CE_PUB_RF_CE_FDE_AES_STD_MODE_END_FLAG (1 << 4)
  1226. #define CE_PUB_RF_CE_FDE_AES_BYPASS (1 << 7)
  1227. #define CE_PUB_RF_CE_FDE_AES_KEY_IN_DDR_FLAG (1 << 8)
  1228. #define CE_PUB_RF_CE_FDE_KEY_IN_SESSION_KEY_FLAG (1 << 10)
  1229. #define CE_PUB_RF_CE_FDE_KEY_IN_IRAM_FLAG (1 << 11)
  1230. #define CE_PUB_RF_CE_FDE_AES_LIST_END_FLAG (1 << 15)
  1231. #define CE_PUB_RF_CE_FDE_AES_LIST_DATA_END_FLAG (1 << 16)
  1232. #define CE_PUB_RF_CE_FDE_LIST_UPDATE_IV_SEC_CNT (1 << 17)
  1233. #define CE_PUB_RF_CE_FDE_AES_DST_BYTE_SWITCH (1 << 20)
  1234. #define CE_PUB_RF_CE_FDE_AES_SRC_BYTE_SWITCH (1 << 21)
  1235. #define CE_PUB_RF_CE_FDE_AES_DST_WORD_SWITCH (1 << 22)
  1236. #define CE_PUB_RF_CE_FDE_AES_SRC_WORD_SWITCH (1 << 23)
  1237. #define CE_PUB_RF_CE_FDE_AUTO_UPDATE_IV_SEC_CNT (1 << 24)
  1238. // ce_fde_aes_list_length
  1239. #define CE_PUB_RF_CE_FDE_AES_LIST_LEN(n) (((n)&0xfff) << 0)
  1240. #define CE_PUB_RF_CE_FDE_AES_LIST_PTR_HI(n) (((n)&0xf) << 16)
  1241. // ce_fde_aes_src_frag_length
  1242. #define CE_PUB_RF_CE_FDE_AES_SRC_FRAG_LEN(n) (((n)&0xffffff) << 0)
  1243. #define CE_PUB_RF_CE_FDE_AES_SRC_ADDR_HI(n) (((n)&0xf) << 24)
  1244. #define CE_PUB_RF_CE_FDE_AES_DST_ADDR_HI(n) (((n)&0xf) << 28)
  1245. // ce_fde_aes_key_length
  1246. #define CE_PUB_RF_CE_FDE_AES_KEY_LEN(n) (((n)&0xffffff) << 0)
  1247. #define CE_PUB_RF_CE_FDE_AES_KEY_ADDR_HI(n) (((n)&0xf) << 24)
  1248. // ce_fde_aes_dst_ddr_sel
  1249. #define CE_PUB_RF_CE_FDE_AES_DST_DDR_SEL (1 << 0)
  1250. // ce_fde_aes_dummy_reg
  1251. #define CE_PUB_RF_CE_FDE_DUMMY_REG(n) (((n)&0xff) << 0)
  1252. #endif // _CE_PUB_H_