dbgio.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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 _DBGIO_H_
  13. #define _DBGIO_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_DBGIO_SET_OFFSET (256)
  17. #define REG_DBGIO_CLR_OFFSET (512)
  18. #define REG_DBGIO_BASE (0x18c01000)
  19. typedef volatile struct
  20. {
  21. uint32_t dbgio_en; // 0x00000000
  22. uint32_t funnel_sta; // 0x00000004
  23. uint32_t dbgio_int_en; // 0x00000008
  24. uint32_t dbgio_int_sta; // 0x0000000c
  25. uint32_t dbgio_ctrl; // 0x00000010
  26. uint32_t fsm_cut_off_len; // 0x00000014
  27. uint32_t fsm_data_wait_len; // 0x00000018
  28. uint32_t dll_cfg; // 0x0000001c
  29. uint32_t dll_dly; // 0x00000020
  30. uint32_t dll_dly_offset; // 0x00000024
  31. uint32_t dll_sts0; // 0x00000028
  32. uint32_t dll_sts1; // 0x0000002c
  33. uint32_t dll_backup; // 0x00000030
  34. uint32_t use_port; // 0x00000034
  35. uint32_t use_source_sync; // 0x00000038
  36. uint32_t use_ready; // 0x0000003c
  37. uint32_t use_logic_analizer; // 0x00000040
  38. uint32_t la_sample_rate; // 0x00000044
  39. uint32_t version; // 0x00000048
  40. uint32_t __76[45]; // 0x0000004c
  41. uint32_t dbgio_en_set; // 0x00000100
  42. uint32_t funnel_sta_set; // 0x00000104
  43. uint32_t dbgio_int_en_set; // 0x00000108
  44. uint32_t __268[1]; // 0x0000010c
  45. uint32_t dbgio_ctrl_set; // 0x00000110
  46. uint32_t __276[59]; // 0x00000114
  47. uint32_t dbgio_en_clr; // 0x00000200
  48. uint32_t funnel_sta_clr; // 0x00000204
  49. uint32_t dbgio_int_en_clr; // 0x00000208
  50. uint32_t __524[1]; // 0x0000020c
  51. uint32_t dbgio_ctrl_clr; // 0x00000210
  52. } HWP_DBGIO_T;
  53. #define hwp_dbgio ((HWP_DBGIO_T *)REG_ACCESS_ADDRESS(REG_DBGIO_BASE))
  54. // dbgio_en
  55. typedef union {
  56. uint32_t v;
  57. struct
  58. {
  59. uint32_t func_en : 1; // [0]
  60. uint32_t __3_1 : 3; // [3:1]
  61. uint32_t funnel_en : 1; // [4]
  62. uint32_t __7_5 : 3; // [7:5]
  63. uint32_t ch_en : 8; // [15:8]
  64. uint32_t __31_16 : 16; // [31:16]
  65. } b;
  66. } REG_DBGIO_DBGIO_EN_T;
  67. // funnel_sta
  68. typedef union {
  69. uint32_t v;
  70. struct
  71. {
  72. uint32_t funnel_afifo_full : 1; // [0], read only
  73. uint32_t __3_1 : 3; // [3:1]
  74. uint32_t funnel_overflow_clear : 1; // [4]
  75. uint32_t funnel_afifo_empty : 1; // [5], read only
  76. uint32_t __31_6 : 26; // [31:6]
  77. } b;
  78. } REG_DBGIO_FUNNEL_STA_T;
  79. // dbgio_int_en
  80. typedef union {
  81. uint32_t v;
  82. struct
  83. {
  84. uint32_t funnel_ovf_int_en : 1; // [0]
  85. uint32_t __31_1 : 31; // [31:1]
  86. } b;
  87. } REG_DBGIO_DBGIO_INT_EN_T;
  88. // dbgio_int_sta
  89. typedef union {
  90. uint32_t v;
  91. struct
  92. {
  93. uint32_t funnel_overflow : 1; // [0], read only
  94. uint32_t __31_1 : 31; // [31:1]
  95. } b;
  96. } REG_DBGIO_DBGIO_INT_STA_T;
  97. // dbgio_ctrl
  98. typedef union {
  99. uint32_t v;
  100. struct
  101. {
  102. uint32_t ddr_mode_en : 1; // [0]
  103. uint32_t __3_1 : 3; // [3:1]
  104. uint32_t clk_src_sel : 1; // [4]
  105. uint32_t __7_5 : 3; // [7:5]
  106. uint32_t sw_rst : 1; // [8]
  107. uint32_t __31_9 : 23; // [31:9]
  108. } b;
  109. } REG_DBGIO_DBGIO_CTRL_T;
  110. // fsm_cut_off_len
  111. typedef union {
  112. uint32_t v;
  113. struct
  114. {
  115. uint32_t fsm_cut_off_len : 16; // [15:0]
  116. uint32_t __31_16 : 16; // [31:16]
  117. } b;
  118. } REG_DBGIO_FSM_CUT_OFF_LEN_T;
  119. // fsm_data_wait_len
  120. typedef union {
  121. uint32_t v;
  122. struct
  123. {
  124. uint32_t fsm_data_wait_len : 16; // [15:0]
  125. uint32_t __31_16 : 16; // [31:16]
  126. } b;
  127. } REG_DBGIO_FSM_DATA_WAIT_LEN_T;
  128. // dll_cfg
  129. typedef union {
  130. uint32_t v;
  131. struct
  132. {
  133. uint32_t clk_phase_sel : 1; // [0]
  134. uint32_t dll_phase_interval : 2; // [2:1]
  135. uint32_t __3_3 : 1; // [3]
  136. uint32_t dll_cpst_threshold : 4; // [7:4]
  137. uint32_t dll_init : 7; // [14:8]
  138. uint32_t __15_15 : 1; // [15]
  139. uint32_t dll_half_mode : 1; // [16]
  140. uint32_t dll_cpst_start : 1; // [17]
  141. uint32_t dll_cpst_en : 1; // [18]
  142. uint32_t dll_auto_clr_en : 1; // [19]
  143. uint32_t dll_clr : 1; // [20]
  144. uint32_t dll_en : 1; // [21]
  145. uint32_t dll_clk_sel : 1; // [22]
  146. uint32_t __23_23 : 1; // [23]
  147. uint32_t dll_datwr_cpst_en : 1; // [24]
  148. uint32_t __27_25 : 3; // [27:25]
  149. uint32_t dll_wait_cnt : 4; // [31:28]
  150. } b;
  151. } REG_DBGIO_DLL_CFG_T;
  152. // dll_dly
  153. typedef union {
  154. uint32_t v;
  155. struct
  156. {
  157. uint32_t dll_clkdatwr_dly_val : 8; // [7:0]
  158. uint32_t __31_8 : 24; // [31:8]
  159. } b;
  160. } REG_DBGIO_DLL_DLY_T;
  161. // dll_dly_offset
  162. typedef union {
  163. uint32_t v;
  164. struct
  165. {
  166. uint32_t dll_clkdatwr_dly_offset : 5; // [4:0]
  167. uint32_t dll_clkdatwr_dly_inv : 1; // [5]
  168. uint32_t __31_6 : 26; // [31:6]
  169. } b;
  170. } REG_DBGIO_DLL_DLY_OFFSET_T;
  171. // dll_sts0
  172. typedef union {
  173. uint32_t v;
  174. struct
  175. {
  176. uint32_t dll_cnt : 7; // [6:0], read only
  177. uint32_t __7_7 : 1; // [7]
  178. uint32_t dll_st : 3; // [10:8], read only
  179. uint32_t __15_11 : 5; // [15:11]
  180. uint32_t dll_cpst_st : 1; // [16], read only
  181. uint32_t dll_error : 1; // [17], read only
  182. uint32_t dll_locked : 1; // [18], read only
  183. uint32_t dll_phase2 : 1; // [19], read only
  184. uint32_t dll_phase1 : 1; // [20], read only
  185. uint32_t __31_21 : 11; // [31:21]
  186. } b;
  187. } REG_DBGIO_DLL_STS0_T;
  188. // dll_sts1
  189. typedef union {
  190. uint32_t v;
  191. struct
  192. {
  193. uint32_t clkdatwr_dly_cnt : 8; // [7:0], read only
  194. uint32_t __31_8 : 24; // [31:8]
  195. } b;
  196. } REG_DBGIO_DLL_STS1_T;
  197. // dll_backup
  198. typedef union {
  199. uint32_t v;
  200. struct
  201. {
  202. uint32_t rf_dll_backup : 1; // [0]
  203. uint32_t rf_dll_backup_value : 1; // [1]
  204. uint32_t rf_dll_slice_en_force : 1; // [2]
  205. uint32_t rf_dll_slice_en_value : 1; // [3]
  206. uint32_t oe_ext_optional : 1; // [4]
  207. uint32_t __31_5 : 27; // [31:5]
  208. } b;
  209. } REG_DBGIO_DLL_BACKUP_T;
  210. // use_port
  211. typedef union {
  212. uint32_t v;
  213. struct
  214. {
  215. uint32_t use_port : 8; // [7:0], read only
  216. uint32_t __31_8 : 24; // [31:8]
  217. } b;
  218. } REG_DBGIO_USE_PORT_T;
  219. // use_source_sync
  220. typedef union {
  221. uint32_t v;
  222. struct
  223. {
  224. uint32_t use_source_sync : 8; // [7:0], read only
  225. uint32_t __31_8 : 24; // [31:8]
  226. } b;
  227. } REG_DBGIO_USE_SOURCE_SYNC_T;
  228. // use_ready
  229. typedef union {
  230. uint32_t v;
  231. struct
  232. {
  233. uint32_t use_ready : 8; // [7:0], read only
  234. uint32_t __31_8 : 24; // [31:8]
  235. } b;
  236. } REG_DBGIO_USE_READY_T;
  237. // use_logic_analizer
  238. typedef union {
  239. uint32_t v;
  240. struct
  241. {
  242. uint32_t use_logic_analizer : 8; // [7:0], read only
  243. uint32_t __31_8 : 24; // [31:8]
  244. } b;
  245. } REG_DBGIO_USE_LOGIC_ANALIZER_T;
  246. // la_sample_rate
  247. typedef union {
  248. uint32_t v;
  249. struct
  250. {
  251. uint32_t la_sample_rate : 4; // [3:0]
  252. uint32_t __31_4 : 28; // [31:4]
  253. } b;
  254. } REG_DBGIO_LA_SAMPLE_RATE_T;
  255. // version
  256. typedef union {
  257. uint32_t v;
  258. struct
  259. {
  260. uint32_t version : 16; // [15:0], read only
  261. uint32_t __31_16 : 16; // [31:16]
  262. } b;
  263. } REG_DBGIO_VERSION_T;
  264. // dbgio_en
  265. #define DBGIO_FUNC_EN (1 << 0)
  266. #define DBGIO_FUNNEL_EN (1 << 4)
  267. #define DBGIO_CH_EN(n) (((n)&0xff) << 8)
  268. // funnel_sta
  269. #define DBGIO_FUNNEL_AFIFO_FULL (1 << 0)
  270. #define DBGIO_FUNNEL_OVERFLOW_CLEAR (1 << 4)
  271. #define DBGIO_FUNNEL_AFIFO_EMPTY (1 << 5)
  272. // dbgio_int_en
  273. #define DBGIO_FUNNEL_OVF_INT_EN (1 << 0)
  274. // dbgio_int_sta
  275. #define DBGIO_FUNNEL_OVERFLOW (1 << 0)
  276. // dbgio_ctrl
  277. #define DBGIO_DDR_MODE_EN (1 << 0)
  278. #define DBGIO_CLK_SRC_SEL (1 << 4)
  279. #define DBGIO_SW_RST (1 << 8)
  280. // fsm_cut_off_len
  281. #define DBGIO_FSM_CUT_OFF_LEN(n) (((n)&0xffff) << 0)
  282. // fsm_data_wait_len
  283. #define DBGIO_FSM_DATA_WAIT_LEN(n) (((n)&0xffff) << 0)
  284. // dll_cfg
  285. #define DBGIO_CLK_PHASE_SEL (1 << 0)
  286. #define DBGIO_DLL_PHASE_INTERVAL(n) (((n)&0x3) << 1)
  287. #define DBGIO_DLL_CPST_THRESHOLD(n) (((n)&0xf) << 4)
  288. #define DBGIO_DLL_INIT(n) (((n)&0x7f) << 8)
  289. #define DBGIO_DLL_HALF_MODE (1 << 16)
  290. #define DBGIO_DLL_CPST_START (1 << 17)
  291. #define DBGIO_DLL_CPST_EN (1 << 18)
  292. #define DBGIO_DLL_AUTO_CLR_EN (1 << 19)
  293. #define DBGIO_DLL_CLR (1 << 20)
  294. #define DBGIO_DLL_EN (1 << 21)
  295. #define DBGIO_DLL_CLK_SEL (1 << 22)
  296. #define DBGIO_DLL_DATWR_CPST_EN (1 << 24)
  297. #define DBGIO_DLL_WAIT_CNT(n) (((n)&0xf) << 28)
  298. // dll_dly
  299. #define DBGIO_DLL_CLKDATWR_DLY_VAL(n) (((n)&0xff) << 0)
  300. // dll_dly_offset
  301. #define DBGIO_DLL_CLKDATWR_DLY_OFFSET(n) (((n)&0x1f) << 0)
  302. #define DBGIO_DLL_CLKDATWR_DLY_INV (1 << 5)
  303. // dll_sts0
  304. #define DBGIO_DLL_CNT(n) (((n)&0x7f) << 0)
  305. #define DBGIO_DLL_ST(n) (((n)&0x7) << 8)
  306. #define DBGIO_DLL_CPST_ST (1 << 16)
  307. #define DBGIO_DLL_ERROR (1 << 17)
  308. #define DBGIO_DLL_LOCKED (1 << 18)
  309. #define DBGIO_DLL_PHASE2 (1 << 19)
  310. #define DBGIO_DLL_PHASE1 (1 << 20)
  311. // dll_sts1
  312. #define DBGIO_CLKDATWR_DLY_CNT(n) (((n)&0xff) << 0)
  313. // dll_backup
  314. #define DBGIO_RF_DLL_BACKUP (1 << 0)
  315. #define DBGIO_RF_DLL_BACKUP_VALUE (1 << 1)
  316. #define DBGIO_RF_DLL_SLICE_EN_FORCE (1 << 2)
  317. #define DBGIO_RF_DLL_SLICE_EN_VALUE (1 << 3)
  318. #define DBGIO_OE_EXT_OPTIONAL (1 << 4)
  319. // use_port
  320. #define DBGIO_USE_PORT(n) (((n)&0xff) << 0)
  321. // use_source_sync
  322. #define DBGIO_USE_SOURCE_SYNC(n) (((n)&0xff) << 0)
  323. // use_ready
  324. #define DBGIO_USE_READY(n) (((n)&0xff) << 0)
  325. // use_logic_analizer
  326. #define DBGIO_USE_LOGIC_ANALIZER(n) (((n)&0xff) << 0)
  327. // la_sample_rate
  328. #define DBGIO_LA_SAMPLE_RATE(n) (((n)&0xf) << 0)
  329. // version
  330. #define DBGIO_VERSION(n) (((n)&0xffff) << 0)
  331. #endif // _DBGIO_H_