gnss_sys.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  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 _GNSS_SYS_H_
  13. #define _GNSS_SYS_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_GNSS_SYS_SET_OFFSET (0x1000)
  17. #define REG_GNSS_SYS_CLR_OFFSET (0x2000)
  18. #define REG_GNSS_SYS_BASE (0x1c000000)
  19. typedef volatile struct
  20. {
  21. uint32_t ahb_eb0; // 0x00000000
  22. uint32_t gnss_bb_en; // 0x00000004
  23. uint32_t fun_test_mode; // 0x00000008
  24. uint32_t __12[53]; // 0x0000000c
  25. uint32_t ahb_sys_ctl6; // 0x000000e0
  26. uint32_t __228[135]; // 0x000000e4
  27. uint32_t platform_id; // 0x00000300
  28. uint32_t project_id; // 0x00000304
  29. uint32_t derived_id; // 0x00000308
  30. uint32_t manufacture_id; // 0x0000030c
  31. uint32_t implementation_id; // 0x00000310
  32. uint32_t __788[56]; // 0x00000314
  33. uint32_t cgm_en_ctrl; // 0x000003f4
  34. uint32_t __1016[11]; // 0x000003f8
  35. uint32_t gnss2psram_lpc_cfg; // 0x00000424
  36. uint32_t gnss2psram_lpc_status; // 0x00000428
  37. uint32_t gnss2psram_lpc_force; // 0x0000042c
  38. uint32_t __1072[756]; // 0x00000430
  39. uint32_t ahb_eb0_set; // 0x00001000
  40. uint32_t gnss_bb_en_set; // 0x00001004
  41. uint32_t __4104[251]; // 0x00001008
  42. uint32_t cgm_en_ctrl_set; // 0x000013f4
  43. uint32_t __5112[11]; // 0x000013f8
  44. uint32_t gnss2psram_lpc_cfg_set; // 0x00001424
  45. uint32_t __5160[758]; // 0x00001428
  46. uint32_t ahb_eb0_clr; // 0x00002000
  47. uint32_t gnss_bb_en_clr; // 0x00002004
  48. uint32_t __8200[251]; // 0x00002008
  49. uint32_t cgm_en_ctrl_clr; // 0x000023f4
  50. uint32_t __9208[11]; // 0x000023f8
  51. uint32_t gnss2psram_lpc_cfg_clr; // 0x00002424
  52. uint32_t __9256[758]; // 0x00002428
  53. uint32_t soft_rst; // 0x00003000
  54. uint32_t __12292[1]; // 0x00003004
  55. uint32_t pwr_on_rstn_index; // 0x00003008
  56. uint32_t __12300[1]; // 0x0000300c
  57. uint32_t ram_ema; // 0x00003010
  58. uint32_t __12308[13]; // 0x00003014
  59. uint32_t fpgadebug; // 0x00003048
  60. uint32_t __12364[118]; // 0x0000304c
  61. uint32_t sleep_status; // 0x00003224
  62. uint32_t __12840[32]; // 0x00003228
  63. uint32_t auto_gate_ctrl0; // 0x000032a8
  64. uint32_t auto_gate_ctrl1; // 0x000032ac
  65. uint32_t auto_gate_ctrl2; // 0x000032b0
  66. uint32_t auto_gate_ctrl3; // 0x000032b4
  67. uint32_t auto_gate_status0; // 0x000032b8
  68. uint32_t auto_gate_status1; // 0x000032bc
  69. uint32_t auto_gate_status2; // 0x000032c0
  70. uint32_t auto_gate_status3; // 0x000032c4
  71. uint32_t __13000[7]; // 0x000032c8
  72. uint32_t latch_pulse_num; // 0x000032e4
  73. uint32_t adc_iq_hold_sel; // 0x000032e8
  74. uint32_t async_bridge_dbg_singal_w; // 0x000032ec
  75. uint32_t async_bridge_detector_overflow; // 0x000032f0
  76. uint32_t gps_coexist_in; // 0x000032f4
  77. uint32_t axi_reg_slice_ds_force; // 0x000032f8
  78. uint32_t gnss_axi_qos; // 0x000032fc
  79. uint32_t gnss_ahb_err_resp_en; // 0x00003300
  80. uint32_t __13060[831]; // 0x00003304
  81. uint32_t soft_rst_set; // 0x00004000
  82. uint32_t __16388[184]; // 0x00004004
  83. uint32_t latch_pulse_num_set; // 0x000042e4
  84. uint32_t adc_iq_hold_sel_set; // 0x000042e8
  85. uint32_t __17132[2]; // 0x000042ec
  86. uint32_t gps_coexist_in_set; // 0x000042f4
  87. uint32_t axi_reg_slice_ds_force_set; // 0x000042f8
  88. uint32_t gnss_axi_qos_set; // 0x000042fc
  89. uint32_t gnss_ahb_err_resp_en_set; // 0x00004300
  90. uint32_t __17156[831]; // 0x00004304
  91. uint32_t soft_rst_clr; // 0x00005000
  92. uint32_t __20484[184]; // 0x00005004
  93. uint32_t latch_pulse_num_clr; // 0x000052e4
  94. uint32_t adc_iq_hold_sel_clr; // 0x000052e8
  95. uint32_t __21228[2]; // 0x000052ec
  96. uint32_t gps_coexist_in_clr; // 0x000052f4
  97. uint32_t axi_reg_slice_ds_force_clr; // 0x000052f8
  98. uint32_t gnss_axi_qos_clr; // 0x000052fc
  99. uint32_t gnss_ahb_err_resp_en_clr; // 0x00005300
  100. } HWP_GNSS_SYS_T;
  101. #define hwp_gnssSys ((HWP_GNSS_SYS_T *)REG_ACCESS_ADDRESS(REG_GNSS_SYS_BASE))
  102. // ahb_eb0
  103. typedef union {
  104. uint32_t v;
  105. struct
  106. {
  107. uint32_t clk_reg_eb : 1; // [0]
  108. uint32_t lpc_eb : 1; // [1]
  109. uint32_t rft_hclk_eb : 1; // [2]
  110. uint32_t rft_wclk_eb : 1; // [3]
  111. uint32_t pps_hclk_eb : 1; // [4]
  112. uint32_t pps_wclk_eb : 1; // [5]
  113. uint32_t rfad_spi_hclk_eb : 1; // [6]
  114. uint32_t rfad_spi_wclk_eb : 1; // [7]
  115. uint32_t gnss_mtx_eb : 1; // [8]
  116. uint32_t mtx_dump_eb : 1; // [9]
  117. uint32_t __31_10 : 22; // [31:10]
  118. } b;
  119. } REG_GNSS_SYS_AHB_EB0_T;
  120. // gnss_bb_en
  121. typedef union {
  122. uint32_t v;
  123. struct
  124. {
  125. uint32_t gnss_hclk_en : 1; // [0]
  126. uint32_t gnss_pp_clk_en : 1; // [1]
  127. uint32_t gnss_ae_clk_en : 1; // [2]
  128. uint32_t gnss_te_clk_en : 1; // [3]
  129. uint32_t gnss_ae_fifo_clk_en : 1; // [4]
  130. uint32_t gnss_cof_mem_clk_en : 1; // [5]
  131. uint32_t gnss_te_mem_clk_en : 1; // [6]
  132. uint32_t gnss_te_fifo_clk_en : 1; // [7]
  133. uint32_t gnss_viterbi_clk_en : 1; // [8]
  134. uint32_t gnss_pps_clk_en : 1; // [9]
  135. uint32_t gnss_bb_67m_en : 1; // [10]
  136. uint32_t __31_11 : 21; // [31:11]
  137. } b;
  138. } REG_GNSS_SYS_GNSS_BB_EN_T;
  139. // fun_test_mode
  140. typedef union {
  141. uint32_t v;
  142. struct
  143. {
  144. uint32_t ptest_func_mode : 1; // [0], read only
  145. uint32_t __31_1 : 31; // [31:1]
  146. } b;
  147. } REG_GNSS_SYS_FUN_TEST_MODE_T;
  148. // ahb_sys_ctl6
  149. typedef union {
  150. uint32_t v;
  151. struct
  152. {
  153. uint32_t ptest : 1; // [0], read only
  154. uint32_t __31_1 : 31; // [31:1]
  155. } b;
  156. } REG_GNSS_SYS_AHB_SYS_CTL6_T;
  157. // derived_id
  158. typedef union {
  159. uint32_t v;
  160. struct
  161. {
  162. uint32_t metal_fix_id : 8; // [7:0], read only
  163. uint32_t derived_id : 8; // [15:8], read only
  164. uint32_t __31_16 : 16; // [31:16]
  165. } b;
  166. } REG_GNSS_SYS_DERIVED_ID_T;
  167. // manufacture_id
  168. typedef union {
  169. uint32_t v;
  170. struct
  171. {
  172. uint32_t foundry_id : 8; // [7:0], read only
  173. uint32_t process_id : 8; // [15:8], read only
  174. uint32_t __31_16 : 16; // [31:16]
  175. } b;
  176. } REG_GNSS_SYS_MANUFACTURE_ID_T;
  177. // implementation_id
  178. typedef union {
  179. uint32_t v;
  180. struct
  181. {
  182. uint32_t std_cell : 8; // [7:0], read only
  183. uint32_t mem_compiler : 8; // [15:8], read only
  184. uint32_t __31_16 : 16; // [31:16]
  185. } b;
  186. } REG_GNSS_SYS_IMPLEMENTATION_ID_T;
  187. // cgm_en_ctrl
  188. typedef union {
  189. uint32_t v;
  190. struct
  191. {
  192. uint32_t gnss_ip_en : 1; // [0]
  193. uint32_t gnss_ip_ae_en : 1; // [1]
  194. uint32_t gnss_ip_bb_pp_en : 1; // [2]
  195. uint32_t gnss_ip_adc_en : 1; // [3]
  196. uint32_t gnss_ip_rtc_en : 1; // [4]
  197. uint32_t __31_5 : 27; // [31:5]
  198. } b;
  199. } REG_GNSS_SYS_CGM_EN_CTRL_T;
  200. // gnss2psram_lpc_cfg
  201. typedef union {
  202. uint32_t v;
  203. struct
  204. {
  205. uint32_t gnss2psram_lp_num : 16; // [15:0]
  206. uint32_t gnss2psram_lp_pu_num : 8; // [23:16]
  207. uint32_t gnss2psram_lp_eb : 1; // [24]
  208. uint32_t __31_25 : 7; // [31:25]
  209. } b;
  210. } REG_GNSS_SYS_GNSS2PSRAM_LPC_CFG_T;
  211. // gnss2psram_lpc_status
  212. typedef union {
  213. uint32_t v;
  214. struct
  215. {
  216. uint32_t gnss2psram_lp_status : 1; // [0], read only
  217. uint32_t __31_1 : 31; // [31:1]
  218. } b;
  219. } REG_GNSS_SYS_GNSS2PSRAM_LPC_STATUS_T;
  220. // gnss2psram_lpc_force
  221. typedef union {
  222. uint32_t v;
  223. struct
  224. {
  225. uint32_t gnss2psram_lp_force_ack : 1; // [0], read only
  226. uint32_t gnss2psram_lp_force : 1; // [1]
  227. uint32_t __31_2 : 30; // [31:2]
  228. } b;
  229. } REG_GNSS_SYS_GNSS2PSRAM_LPC_FORCE_T;
  230. // soft_rst
  231. typedef union {
  232. uint32_t v;
  233. struct
  234. {
  235. uint32_t rfad_spi_soft : 1; // [0]
  236. uint32_t lpc_soft_rst : 1; // [1]
  237. uint32_t pps_soft_rst : 1; // [2]
  238. uint32_t rft_soft_rst : 1; // [3]
  239. uint32_t gnss_soft_rst : 1; // [4]
  240. uint32_t dump_soft_rst : 1; // [5]
  241. uint32_t __31_6 : 26; // [31:6]
  242. } b;
  243. } REG_GNSS_SYS_SOFT_RST_T;
  244. // pwr_on_rstn_index
  245. typedef union {
  246. uint32_t v;
  247. struct
  248. {
  249. uint32_t __0_0 : 1; // [0]
  250. uint32_t lna_en : 1; // [1]
  251. uint32_t __31_2 : 30; // [31:2]
  252. } b;
  253. } REG_GNSS_SYS_PWR_ON_RSTN_INDEX_T;
  254. // ram_ema
  255. typedef union {
  256. uint32_t v;
  257. struct
  258. {
  259. uint32_t __9_0 : 10; // [9:0]
  260. uint32_t gnss_ram_rm_ctrl : 4; // [13:10]
  261. uint32_t gnss_ram_rme_ctrl : 1; // [14]
  262. uint32_t __31_15 : 17; // [31:15]
  263. } b;
  264. } REG_GNSS_SYS_RAM_EMA_T;
  265. // sleep_status
  266. typedef union {
  267. uint32_t v;
  268. struct
  269. {
  270. uint32_t chip_deep_sleep : 1; // [0], read only
  271. uint32_t __31_1 : 31; // [31:1]
  272. } b;
  273. } REG_GNSS_SYS_SLEEP_STATUS_T;
  274. // latch_pulse_num
  275. typedef union {
  276. uint32_t v;
  277. struct
  278. {
  279. uint32_t latch_pulse_num : 4; // [3:0]
  280. uint32_t __31_4 : 28; // [31:4]
  281. } b;
  282. } REG_GNSS_SYS_LATCH_PULSE_NUM_T;
  283. // adc_iq_hold_sel
  284. typedef union {
  285. uint32_t v;
  286. struct
  287. {
  288. uint32_t adc_iq_hold_sel : 1; // [0]
  289. uint32_t __31_1 : 31; // [31:1]
  290. } b;
  291. } REG_GNSS_SYS_ADC_IQ_HOLD_SEL_T;
  292. // async_bridge_detector_overflow
  293. typedef union {
  294. uint32_t v;
  295. struct
  296. {
  297. uint32_t axi_detector_overflow : 1; // [0], read only
  298. uint32_t __31_1 : 31; // [31:1]
  299. } b;
  300. } REG_GNSS_SYS_ASYNC_BRIDGE_DETECTOR_OVERFLOW_T;
  301. // gps_coexist_in
  302. typedef union {
  303. uint32_t v;
  304. struct
  305. {
  306. uint32_t gps_coexist_in : 1; // [0]
  307. uint32_t __31_1 : 31; // [31:1]
  308. } b;
  309. } REG_GNSS_SYS_GPS_COEXIST_IN_T;
  310. // axi_reg_slice_ds_force
  311. typedef union {
  312. uint32_t v;
  313. struct
  314. {
  315. uint32_t dowm_sream_disable_force_sel : 1; // [0]
  316. uint32_t dowm_sream_disable_force : 1; // [1]
  317. uint32_t __31_2 : 30; // [31:2]
  318. } b;
  319. } REG_GNSS_SYS_AXI_REG_SLICE_DS_FORCE_T;
  320. // gnss_axi_qos
  321. typedef union {
  322. uint32_t v;
  323. struct
  324. {
  325. uint32_t gnss_arqos : 4; // [3:0]
  326. uint32_t gnss_awqos : 4; // [7:4]
  327. uint32_t __31_8 : 24; // [31:8]
  328. } b;
  329. } REG_GNSS_SYS_GNSS_AXI_QOS_T;
  330. // gnss_ahb_err_resp_en
  331. typedef union {
  332. uint32_t v;
  333. struct
  334. {
  335. uint32_t ahb_err_resp_en : 1; // [0]
  336. uint32_t __31_1 : 31; // [31:1]
  337. } b;
  338. } REG_GNSS_SYS_GNSS_AHB_ERR_RESP_EN_T;
  339. // ahb_eb0
  340. #define GNSS_SYS_CLK_REG_EB (1 << 0)
  341. #define GNSS_SYS_LPC_EB (1 << 1)
  342. #define GNSS_SYS_RFT_HCLK_EB (1 << 2)
  343. #define GNSS_SYS_RFT_WCLK_EB (1 << 3)
  344. #define GNSS_SYS_PPS_HCLK_EB (1 << 4)
  345. #define GNSS_SYS_PPS_WCLK_EB (1 << 5)
  346. #define GNSS_SYS_RFAD_SPI_HCLK_EB (1 << 6)
  347. #define GNSS_SYS_RFAD_SPI_WCLK_EB (1 << 7)
  348. #define GNSS_SYS_GNSS_MTX_EB (1 << 8)
  349. #define GNSS_SYS_MTX_DUMP_EB (1 << 9)
  350. // gnss_bb_en
  351. #define GNSS_SYS_GNSS_HCLK_EN (1 << 0)
  352. #define GNSS_SYS_GNSS_PP_CLK_EN (1 << 1)
  353. #define GNSS_SYS_GNSS_AE_CLK_EN (1 << 2)
  354. #define GNSS_SYS_GNSS_TE_CLK_EN (1 << 3)
  355. #define GNSS_SYS_GNSS_AE_FIFO_CLK_EN (1 << 4)
  356. #define GNSS_SYS_GNSS_COF_MEM_CLK_EN (1 << 5)
  357. #define GNSS_SYS_GNSS_TE_MEM_CLK_EN (1 << 6)
  358. #define GNSS_SYS_GNSS_TE_FIFO_CLK_EN (1 << 7)
  359. #define GNSS_SYS_GNSS_VITERBI_CLK_EN (1 << 8)
  360. #define GNSS_SYS_GNSS_PPS_CLK_EN (1 << 9)
  361. #define GNSS_SYS_GNSS_BB_67M_EN (1 << 10)
  362. // fun_test_mode
  363. #define GNSS_SYS_PTEST_FUNC_MODE (1 << 0)
  364. // ahb_sys_ctl6
  365. #define GNSS_SYS_PTEST (1 << 0)
  366. // derived_id
  367. #define GNSS_SYS_METAL_FIX_ID(n) (((n)&0xff) << 0)
  368. #define GNSS_SYS_DERIVED_ID(n) (((n)&0xff) << 8)
  369. // manufacture_id
  370. #define GNSS_SYS_FOUNDRY_ID(n) (((n)&0xff) << 0)
  371. #define GNSS_SYS_PROCESS_ID(n) (((n)&0xff) << 8)
  372. // implementation_id
  373. #define GNSS_SYS_STD_CELL(n) (((n)&0xff) << 0)
  374. #define GNSS_SYS_MEM_COMPILER(n) (((n)&0xff) << 8)
  375. // cgm_en_ctrl
  376. #define GNSS_SYS_GNSS_IP_EN (1 << 0)
  377. #define GNSS_SYS_GNSS_IP_AE_EN (1 << 1)
  378. #define GNSS_SYS_GNSS_IP_BB_PP_EN (1 << 2)
  379. #define GNSS_SYS_GNSS_IP_ADC_EN (1 << 3)
  380. #define GNSS_SYS_GNSS_IP_RTC_EN (1 << 4)
  381. // gnss2psram_lpc_cfg
  382. #define GNSS_SYS_GNSS2PSRAM_LP_NUM(n) (((n)&0xffff) << 0)
  383. #define GNSS_SYS_GNSS2PSRAM_LP_PU_NUM(n) (((n)&0xff) << 16)
  384. #define GNSS_SYS_GNSS2PSRAM_LP_EB (1 << 24)
  385. // gnss2psram_lpc_status
  386. #define GNSS_SYS_GNSS2PSRAM_LP_STATUS (1 << 0)
  387. // gnss2psram_lpc_force
  388. #define GNSS_SYS_GNSS2PSRAM_LP_FORCE_ACK (1 << 0)
  389. #define GNSS_SYS_GNSS2PSRAM_LP_FORCE (1 << 1)
  390. // soft_rst
  391. #define GNSS_SYS_RFAD_SPI_SOFT (1 << 0)
  392. #define GNSS_SYS_LPC_SOFT_RST (1 << 1)
  393. #define GNSS_SYS_PPS_SOFT_RST (1 << 2)
  394. #define GNSS_SYS_RFT_SOFT_RST (1 << 3)
  395. #define GNSS_SYS_GNSS_SOFT_RST (1 << 4)
  396. #define GNSS_SYS_DUMP_SOFT_RST (1 << 5)
  397. // pwr_on_rstn_index
  398. #define GNSS_SYS_LNA_EN (1 << 1)
  399. // ram_ema
  400. #define GNSS_SYS_GNSS_RAM_RM_CTRL(n) (((n)&0xf) << 10)
  401. #define GNSS_SYS_GNSS_RAM_RME_CTRL (1 << 14)
  402. // sleep_status
  403. #define GNSS_SYS_CHIP_DEEP_SLEEP (1 << 0)
  404. // latch_pulse_num
  405. #define GNSS_SYS_LATCH_PULSE_NUM(n) (((n)&0xf) << 0)
  406. // adc_iq_hold_sel
  407. #define GNSS_SYS_ADC_IQ_HOLD_SEL (1 << 0)
  408. // async_bridge_detector_overflow
  409. #define GNSS_SYS_AXI_DETECTOR_OVERFLOW (1 << 0)
  410. // gps_coexist_in
  411. #define GNSS_SYS_GPS_COEXIST_IN (1 << 0)
  412. // axi_reg_slice_ds_force
  413. #define GNSS_SYS_DOWM_SREAM_DISABLE_FORCE_SEL (1 << 0)
  414. #define GNSS_SYS_DOWM_SREAM_DISABLE_FORCE (1 << 1)
  415. // gnss_axi_qos
  416. #define GNSS_SYS_GNSS_ARQOS(n) (((n)&0xf) << 0)
  417. #define GNSS_SYS_GNSS_AWQOS(n) (((n)&0xf) << 4)
  418. // gnss_ahb_err_resp_en
  419. #define GNSS_SYS_AHB_ERR_RESP_EN (1 << 0)
  420. #endif // _GNSS_SYS_H_