icm_sys_struct.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. /**
  2. * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include <stdint.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /** Group: ICM VER DATE REG */
  12. /** Type of ver_date register
  13. * NA
  14. */
  15. typedef union {
  16. struct {
  17. /** reg_ver_date : R/W; bitpos: [31:0]; default: 539165204;
  18. * NA
  19. */
  20. uint32_t reg_ver_date:32;
  21. };
  22. uint32_t val;
  23. } icm_ver_date_reg_t;
  24. /** Group: ICM CLK EN REG */
  25. /** Type of clk_en register
  26. * NA
  27. */
  28. typedef union {
  29. struct {
  30. /** reg_clk_en : R/W; bitpos: [0]; default: 0;
  31. * NA
  32. */
  33. uint32_t reg_clk_en:1;
  34. uint32_t reserved_1:31;
  35. };
  36. uint32_t val;
  37. } icm_clk_en_reg_t;
  38. /** Group: ICM DLOCK STATUS REG */
  39. /** Type of dlock_status register
  40. * NA
  41. */
  42. typedef union {
  43. struct {
  44. /** reg_dlock_mst : RO; bitpos: [3:0]; default: 0;
  45. * Lowest numbered deadlocked master
  46. */
  47. uint32_t reg_dlock_mst:4;
  48. /** reg_dlock_slv : RO; bitpos: [6:4]; default: 0;
  49. * Slave with which dlock_mst is deadlocked
  50. */
  51. uint32_t reg_dlock_slv:3;
  52. /** reg_dlock_id : RO; bitpos: [10:7]; default: 0;
  53. * AXI ID of deadlocked transaction
  54. */
  55. uint32_t reg_dlock_id:4;
  56. /** reg_dlock_wr : RO; bitpos: [11]; default: 0;
  57. * Asserted if deadlocked transaction is a write
  58. */
  59. uint32_t reg_dlock_wr:1;
  60. uint32_t reserved_12:20;
  61. };
  62. uint32_t val;
  63. } icm_dlock_status_reg_t;
  64. /** Group: ICM INT RAW REG */
  65. /** Type of int_raw register
  66. * NA
  67. */
  68. typedef union {
  69. struct {
  70. /** reg_dlock_int_raw : R/WTC/SS; bitpos: [0]; default: 0;
  71. * NA
  72. */
  73. uint32_t reg_dlock_int_raw:1;
  74. /** reg_icm_sys_addrhole_int_raw : R/WTC/SS; bitpos: [1]; default: 0;
  75. * NA
  76. */
  77. uint32_t reg_icm_sys_addrhole_int_raw:1;
  78. /** reg_icm_cpu_addrhole_int_raw : R/WTC/SS; bitpos: [2]; default: 0;
  79. * NA
  80. */
  81. uint32_t reg_icm_cpu_addrhole_int_raw:1;
  82. uint32_t reserved_3:29;
  83. };
  84. uint32_t val;
  85. } icm_int_raw_reg_t;
  86. /** Group: ICM INT ST REG */
  87. /** Type of int_st register
  88. * NA
  89. */
  90. typedef union {
  91. struct {
  92. /** reg_dlock_int_st : RO; bitpos: [0]; default: 0;
  93. * NA
  94. */
  95. uint32_t reg_dlock_int_st:1;
  96. /** reg_icm_sys_addrhole_int_st : RO; bitpos: [1]; default: 0;
  97. * NA
  98. */
  99. uint32_t reg_icm_sys_addrhole_int_st:1;
  100. /** reg_icm_cpu_addrhole_int_st : RO; bitpos: [2]; default: 0;
  101. * NA
  102. */
  103. uint32_t reg_icm_cpu_addrhole_int_st:1;
  104. uint32_t reserved_3:29;
  105. };
  106. uint32_t val;
  107. } icm_int_st_reg_t;
  108. /** Group: ICM INT ENA REG */
  109. /** Type of int_ena register
  110. * NA
  111. */
  112. typedef union {
  113. struct {
  114. /** reg_dlock_int_ena : R/W; bitpos: [0]; default: 1;
  115. * NA
  116. */
  117. uint32_t reg_dlock_int_ena:1;
  118. /** reg_icm_sys_addrhole_int_ena : R/W; bitpos: [1]; default: 1;
  119. * NA
  120. */
  121. uint32_t reg_icm_sys_addrhole_int_ena:1;
  122. /** reg_icm_cpu_addrhole_int_ena : R/W; bitpos: [2]; default: 1;
  123. * NA
  124. */
  125. uint32_t reg_icm_cpu_addrhole_int_ena:1;
  126. uint32_t reserved_3:29;
  127. };
  128. uint32_t val;
  129. } icm_int_ena_reg_t;
  130. /** Group: ICM INT CLR REG */
  131. /** Type of int_clr register
  132. * NA
  133. */
  134. typedef union {
  135. struct {
  136. /** reg_dlock_int_clr : WT; bitpos: [0]; default: 0;
  137. * NA
  138. */
  139. uint32_t reg_dlock_int_clr:1;
  140. /** reg_icm_sys_addrhole_int_clr : WT; bitpos: [1]; default: 0;
  141. * NA
  142. */
  143. uint32_t reg_icm_sys_addrhole_int_clr:1;
  144. /** reg_icm_cpu_addrhole_int_clr : WT; bitpos: [2]; default: 0;
  145. * NA
  146. */
  147. uint32_t reg_icm_cpu_addrhole_int_clr:1;
  148. uint32_t reserved_3:29;
  149. };
  150. uint32_t val;
  151. } icm_int_clr_reg_t;
  152. /** Group: ICM MST ARB PRIORITY REG0 REG */
  153. /** Type of mst_arb_priority_reg0 register
  154. * NA
  155. */
  156. typedef union {
  157. struct {
  158. /** reg_cpu_priority : R/W; bitpos: [3:0]; default: 0;
  159. * CPU arbitration priority for command channels between masters connected to sys_icm
  160. */
  161. uint32_t reg_cpu_priority:4;
  162. /** reg_cache_priority : R/W; bitpos: [7:4]; default: 0;
  163. * CACHE arbitration priority for command channels between masters connected to sys_icm
  164. */
  165. uint32_t reg_cache_priority:4;
  166. /** reg_dma2d_priority : R/W; bitpos: [11:8]; default: 0;
  167. * GFX arbitration priority for command channels between masters connected to sys_icm
  168. */
  169. uint32_t reg_dma2d_priority:4;
  170. /** reg_gdma_mst1_priority : R/W; bitpos: [15:12]; default: 0;
  171. * GDMA mst1 arbitration priority for command channels between masters connected to
  172. * sys_icm
  173. */
  174. uint32_t reg_gdma_mst1_priority:4;
  175. /** reg_gdma_mst2_priority : R/W; bitpos: [19:16]; default: 0;
  176. * GDMA mst2 arbitration priority for command channels between masters connected to
  177. * sys_icm
  178. */
  179. uint32_t reg_gdma_mst2_priority:4;
  180. /** reg_h264_m1_priority : R/W; bitpos: [23:20]; default: 0;
  181. * H264 mst1 arbitration priority for command channels between masters connected to
  182. * sys_icm
  183. */
  184. uint32_t reg_h264_m1_priority:4;
  185. /** reg_h264_m2_priority : R/W; bitpos: [27:24]; default: 0;
  186. * H264 mst2 arbitration priority for command channels between masters connected to
  187. * sys_icm
  188. */
  189. uint32_t reg_h264_m2_priority:4;
  190. /** reg_axi_pdma_priority : R/W; bitpos: [31:28]; default: 0;
  191. * AXI PDMA arbitration priority for command channels between masters connected to
  192. * sys_icm
  193. */
  194. uint32_t reg_axi_pdma_priority:4;
  195. };
  196. uint32_t val;
  197. } icm_mst_arb_priority_reg0_reg_t;
  198. /** Group: ICM SLV ARB PRIORITY REG */
  199. /** Type of slv_arb_priority register
  200. * NA
  201. */
  202. typedef union {
  203. struct {
  204. uint32_t reserved_0:3;
  205. /** reg_l2mem_priority : R/W; bitpos: [5:3]; default: 0;
  206. * L2MEM arbitration priority for response channels between slaves connected to sys_icm
  207. */
  208. uint32_t reg_l2mem_priority:3;
  209. uint32_t reserved_6:6;
  210. /** reg_flash_mspi_priority : R/W; bitpos: [14:12]; default: 0;
  211. * FLASH MSPI arbitration priority for response channels between slaves connected to
  212. * sys_icm
  213. */
  214. uint32_t reg_flash_mspi_priority:3;
  215. /** reg_psram_mspi_priority : R/W; bitpos: [17:15]; default: 0;
  216. * PSRAM MSPI arbitration priority for response channels between slaves connected to
  217. * sys_icm
  218. */
  219. uint32_t reg_psram_mspi_priority:3;
  220. /** reg_lcd_priority : R/W; bitpos: [20:18]; default: 0;
  221. * MIPI_LCD registers arbitration priority for response channels between slaves
  222. * connected to sys_icm
  223. */
  224. uint32_t reg_lcd_priority:3;
  225. /** reg_cam_priority : R/W; bitpos: [23:21]; default: 0;
  226. * MIPI_CAM registers arbitration priority for response channels between slaves
  227. * connected to sys_icm
  228. */
  229. uint32_t reg_cam_priority:3;
  230. uint32_t reserved_24:8;
  231. };
  232. uint32_t val;
  233. } icm_slv_arb_priority_reg_t;
  234. /** Group: ICM MST ARQOS REG0 REG */
  235. /** Type of mst_arqos_reg0 register
  236. * NA
  237. */
  238. typedef union {
  239. struct {
  240. /** reg_cpu_arqos : R/W; bitpos: [3:0]; default: 0;
  241. * NA
  242. */
  243. uint32_t reg_cpu_arqos:4;
  244. /** reg_cache_arqos : R/W; bitpos: [7:4]; default: 0;
  245. * NA
  246. */
  247. uint32_t reg_cache_arqos:4;
  248. /** reg_dma2d_arqos : R/W; bitpos: [11:8]; default: 0;
  249. * NA
  250. */
  251. uint32_t reg_dma2d_arqos:4;
  252. /** reg_gdma_mst1_arqos : R/W; bitpos: [15:12]; default: 0;
  253. * NA
  254. */
  255. uint32_t reg_gdma_mst1_arqos:4;
  256. /** reg_gdma_mst2_arqos : R/W; bitpos: [19:16]; default: 0;
  257. * NA
  258. */
  259. uint32_t reg_gdma_mst2_arqos:4;
  260. /** reg_h264_dma2d_m1_arqos : R/W; bitpos: [23:20]; default: 0;
  261. * NA
  262. */
  263. uint32_t reg_h264_dma2d_m1_arqos:4;
  264. /** reg_h264_dma2d_m2_arqos : R/W; bitpos: [27:24]; default: 0;
  265. * NA
  266. */
  267. uint32_t reg_h264_dma2d_m2_arqos:4;
  268. /** reg_axi_pdma_int_arqos : R/W; bitpos: [31:28]; default: 0;
  269. * NA
  270. */
  271. uint32_t reg_axi_pdma_int_arqos:4;
  272. };
  273. uint32_t val;
  274. } icm_mst_arqos_reg0_reg_t;
  275. /** Group: ICM MST AWQOS REG0 REG */
  276. /** Type of mst_awqos_reg0 register
  277. * NA
  278. */
  279. typedef union {
  280. struct {
  281. /** reg_cpu_awqos : R/W; bitpos: [3:0]; default: 0;
  282. * NA
  283. */
  284. uint32_t reg_cpu_awqos:4;
  285. /** reg_cache_awqos : R/W; bitpos: [7:4]; default: 0;
  286. * NA
  287. */
  288. uint32_t reg_cache_awqos:4;
  289. /** reg_dma2d_awqos : R/W; bitpos: [11:8]; default: 0;
  290. * NA
  291. */
  292. uint32_t reg_dma2d_awqos:4;
  293. /** reg_gdma_mst1_awqos : R/W; bitpos: [15:12]; default: 0;
  294. * NA
  295. */
  296. uint32_t reg_gdma_mst1_awqos:4;
  297. /** reg_gdma_mst2_awqos : R/W; bitpos: [19:16]; default: 0;
  298. * NA
  299. */
  300. uint32_t reg_gdma_mst2_awqos:4;
  301. /** reg_h264_dma2d_m1_awqos : R/W; bitpos: [23:20]; default: 0;
  302. * NA
  303. */
  304. uint32_t reg_h264_dma2d_m1_awqos:4;
  305. /** reg_h264_dma2d_m2_awqos : R/W; bitpos: [27:24]; default: 0;
  306. * NA
  307. */
  308. uint32_t reg_h264_dma2d_m2_awqos:4;
  309. /** reg_pdma_int_awqos : R/W; bitpos: [31:28]; default: 0;
  310. * NA
  311. */
  312. uint32_t reg_pdma_int_awqos:4;
  313. };
  314. uint32_t val;
  315. } icm_mst_awqos_reg0_reg_t;
  316. /** Group: ICM ADDRHOLE ADDR REG */
  317. /** Type of sys_addrhole_addr register
  318. * icm sys addr hole address registers
  319. */
  320. typedef union {
  321. struct {
  322. /** reg_icm_sys_addrhole_addr : RO; bitpos: [31:0]; default: 0;
  323. * NA
  324. */
  325. uint32_t reg_icm_sys_addrhole_addr:32;
  326. };
  327. uint32_t val;
  328. } icm_sys_addrhole_addr_reg_t;
  329. /** Type of cpu_addrhole_addr register
  330. * icm cpu addr hole address registers
  331. */
  332. typedef union {
  333. struct {
  334. /** reg_icm_cpu_addrhole_addr : RO; bitpos: [31:0]; default: 0;
  335. * It is illegall access address if reg_icm_cpu_addrhole_secure is 1. Otherwise, it
  336. * the address without permission to access.
  337. */
  338. uint32_t reg_icm_cpu_addrhole_addr:32;
  339. };
  340. uint32_t val;
  341. } icm_cpu_addrhole_addr_reg_t;
  342. /** Group: ICM ADDRHOLE INFO REG */
  343. /** Type of sys_addrhole_info register
  344. * NA
  345. */
  346. typedef union {
  347. struct {
  348. /** reg_icm_sys_addrhole_id : RO; bitpos: [7:0]; default: 0;
  349. * master id = 4-bit CID + 4-bit UID(refer to related IP) . CID is used to verfiy
  350. * master in icm. CID: 4'h1: cache, 4'h5 gdma mst1, 4'h6: gdma mst2, 4'h8: axi pdma,
  351. * 4'ha: dma2d, 4'hb: h264 mst1, 4'hc: h264 mst2.
  352. */
  353. uint32_t reg_icm_sys_addrhole_id:8;
  354. /** reg_icm_sys_addrhole_wr : RO; bitpos: [8]; default: 0;
  355. * 1: illegal address access, 0: access without permission
  356. */
  357. uint32_t reg_icm_sys_addrhole_wr:1;
  358. /** reg_icm_sys_addrhole_secure : RO; bitpos: [9]; default: 0;
  359. * It is illegall access address if reg_icm_cpu_addrhole_secure is 1, Otherwise, it
  360. * the address without permission to access.
  361. */
  362. uint32_t reg_icm_sys_addrhole_secure:1;
  363. uint32_t reserved_10:22;
  364. };
  365. uint32_t val;
  366. } icm_sys_addrhole_info_reg_t;
  367. /** Type of cpu_addrhole_info register
  368. * NA
  369. */
  370. typedef union {
  371. struct {
  372. /** reg_icm_cpu_addrhole_id : RO; bitpos: [4:0]; default: 0;
  373. * master id: 5'h0: hp core0, 5'h1:hp core1, 5'h2:lp core, 5'h3:usb otg11, 5'h4:
  374. * regdma, 5'h5: gmac, 5'h5 sdmmc, 5'h7: usbotg20, 5'h8: trace0, 5'h9: trace1, 5'ha
  375. * tcm monitor, 5'hb: l2mem monitor. 5'h10~5'h1f: ahb pdma.
  376. */
  377. uint32_t reg_icm_cpu_addrhole_id:5;
  378. uint32_t reserved_5:3;
  379. /** reg_icm_cpu_addrhole_wr : RO; bitpos: [8]; default: 0;
  380. * 1:write trans, 0: read trans.
  381. */
  382. uint32_t reg_icm_cpu_addrhole_wr:1;
  383. /** reg_icm_cpu_addrhole_secure : RO; bitpos: [9]; default: 0;
  384. * 1: illegal address access, 0: access without permission
  385. */
  386. uint32_t reg_icm_cpu_addrhole_secure:1;
  387. uint32_t reserved_10:22;
  388. };
  389. uint32_t val;
  390. } icm_cpu_addrhole_info_reg_t;
  391. /** Group: ICM DLOCK TIMEOUT REG */
  392. /** Type of dlock_timeout register
  393. * NA
  394. */
  395. typedef union {
  396. struct {
  397. /** reg_dlock_timeout : R/W; bitpos: [12:0]; default: 2048;
  398. * if no response until reg_dlock_timeout bus clock cycle, deadlock will happen
  399. */
  400. uint32_t reg_dlock_timeout:13;
  401. uint32_t reserved_13:19;
  402. };
  403. uint32_t val;
  404. } icm_dlock_timeout_reg_t;
  405. /** Group: ICM RDN ECO CS REG */
  406. /** Type of rdn_eco_cs register
  407. * NA
  408. */
  409. typedef union {
  410. struct {
  411. /** reg_rdn_eco_en : R/W; bitpos: [0]; default: 0;
  412. * NA
  413. */
  414. uint32_t reg_rdn_eco_en:1;
  415. /** reg_rdn_eco_result : RO; bitpos: [1]; default: 0;
  416. * NA
  417. */
  418. uint32_t reg_rdn_eco_result:1;
  419. uint32_t reserved_2:30;
  420. };
  421. uint32_t val;
  422. } icm_rdn_eco_cs_reg_t;
  423. /** Group: ICM RDN ECO LOW REG */
  424. /** Type of rdn_eco_low register
  425. * NA
  426. */
  427. typedef union {
  428. struct {
  429. /** rdn_eco_low : R/W; bitpos: [31:0]; default: 0;
  430. * NA
  431. */
  432. uint32_t rdn_eco_low:32;
  433. };
  434. uint32_t val;
  435. } icm_rdn_eco_low_reg_t;
  436. /** Group: ICM RDN ECO HIGH REG */
  437. /** Type of rdn_eco_high register
  438. * NA
  439. */
  440. typedef union {
  441. struct {
  442. /** rdn_eco_high : R/W; bitpos: [31:0]; default: 4294967295;
  443. * NA
  444. */
  445. uint32_t rdn_eco_high:32;
  446. };
  447. uint32_t val;
  448. } icm_rdn_eco_high_reg_t;
  449. typedef struct {
  450. volatile icm_ver_date_reg_t ver_date;
  451. volatile icm_clk_en_reg_t clk_en;
  452. volatile icm_dlock_status_reg_t dlock_status;
  453. volatile icm_int_raw_reg_t int_raw;
  454. volatile icm_int_st_reg_t int_st;
  455. volatile icm_int_ena_reg_t int_ena;
  456. volatile icm_int_clr_reg_t int_clr;
  457. volatile icm_mst_arb_priority_reg0_reg_t mst_arb_priority_reg0;
  458. uint32_t reserved_020;
  459. volatile icm_slv_arb_priority_reg_t slv_arb_priority;
  460. volatile icm_mst_arqos_reg0_reg_t mst_arqos_reg0;
  461. uint32_t reserved_02c;
  462. volatile icm_mst_awqos_reg0_reg_t mst_awqos_reg0;
  463. uint32_t reserved_034;
  464. volatile icm_sys_addrhole_addr_reg_t sys_addrhole_addr;
  465. volatile icm_sys_addrhole_info_reg_t sys_addrhole_info;
  466. volatile icm_cpu_addrhole_addr_reg_t cpu_addrhole_addr;
  467. volatile icm_cpu_addrhole_info_reg_t cpu_addrhole_info;
  468. volatile icm_dlock_timeout_reg_t dlock_timeout;
  469. uint32_t reserved_04c;
  470. volatile icm_rdn_eco_cs_reg_t rdn_eco_cs;
  471. volatile icm_rdn_eco_low_reg_t rdn_eco_low;
  472. volatile icm_rdn_eco_high_reg_t rdn_eco_high;
  473. } icm_dev_t;
  474. #ifndef __cplusplus
  475. _Static_assert(sizeof(icm_dev_t) == 0x5c, "Invalid size of icm_dev_t structure");
  476. #endif
  477. #ifdef __cplusplus
  478. }
  479. #endif