rf_dig_rtc.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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 _RF_DIG_RTC_H_
  13. #define _RF_DIG_RTC_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_RF_DIG_RTC_SET_OFFSET (256)
  17. #define REG_RF_DIG_RTC_CLR_OFFSET (512)
  18. #define REG_RF_DIG_RTC_BASE (0x50034000)
  19. typedef volatile struct
  20. {
  21. uint32_t reg_00_reg; // 0x00000000
  22. uint32_t reg_18_reg; // 0x00000004
  23. uint32_t reg_1c_reg; // 0x00000008
  24. uint32_t reg_c4_reg; // 0x0000000c
  25. uint32_t reg_c8_reg; // 0x00000010
  26. uint32_t reg_cc_reg; // 0x00000014
  27. uint32_t reg_d0_reg; // 0x00000018
  28. uint32_t reg_d4_reg; // 0x0000001c
  29. uint32_t reg_d8_reg; // 0x00000020
  30. uint32_t reg_dc_reg; // 0x00000024
  31. uint32_t reg_e0_reg; // 0x00000028
  32. uint32_t __44[53]; // 0x0000002c
  33. uint32_t reg_00_reg_set; // 0x00000100
  34. uint32_t reg_18_reg_set; // 0x00000104
  35. uint32_t reg_1c_reg_set; // 0x00000108
  36. uint32_t reg_c4_reg_set; // 0x0000010c
  37. uint32_t reg_c8_reg_set; // 0x00000110
  38. uint32_t reg_cc_reg_set; // 0x00000114
  39. uint32_t reg_d0_reg_set; // 0x00000118
  40. uint32_t reg_d4_reg_set; // 0x0000011c
  41. uint32_t reg_d8_reg_set; // 0x00000120
  42. uint32_t reg_dc_reg_set; // 0x00000124
  43. uint32_t reg_e0_reg_set; // 0x00000128
  44. uint32_t __300[53]; // 0x0000012c
  45. uint32_t reg_00_reg_clr; // 0x00000200
  46. uint32_t reg_18_reg_clr; // 0x00000204
  47. uint32_t reg_1c_reg_clr; // 0x00000208
  48. uint32_t reg_c4_reg_clr; // 0x0000020c
  49. uint32_t reg_c8_reg_clr; // 0x00000210
  50. uint32_t reg_cc_reg_clr; // 0x00000214
  51. uint32_t reg_d0_reg_clr; // 0x00000218
  52. uint32_t reg_d4_reg_clr; // 0x0000021c
  53. uint32_t reg_d8_reg_clr; // 0x00000220
  54. uint32_t reg_dc_reg_clr; // 0x00000224
  55. uint32_t reg_e0_reg_clr; // 0x00000228
  56. } HWP_RF_DIG_RTC_T;
  57. #define hwp_rfDigRtc ((HWP_RF_DIG_RTC_T *)REG_ACCESS_ADDRESS(REG_RF_DIG_RTC_BASE))
  58. // reg_00_reg
  59. typedef union {
  60. uint32_t v;
  61. struct
  62. {
  63. uint32_t pu_xtal_ana_sel_src : 1; // [0]
  64. uint32_t pu_xtal_reg : 1; // [1]
  65. uint32_t xtal_sel_vrtc_vdig : 1; // [2]
  66. uint32_t xtal_sel_vref_vdig : 1; // [3]
  67. uint32_t step_offset_update : 1; // [4]
  68. uint32_t __31_5 : 27; // [31:5]
  69. } b;
  70. } REG_RF_DIG_RTC_REG_00_REG_T;
  71. // reg_18_reg
  72. typedef union {
  73. uint32_t v;
  74. struct
  75. {
  76. uint32_t step_offset_lp : 8; // [7:0]
  77. uint32_t step_offset_normal : 8; // [15:8]
  78. uint32_t __31_16 : 16; // [31:16]
  79. } b;
  80. } REG_RF_DIG_RTC_REG_18_REG_T;
  81. // reg_1c_reg
  82. typedef union {
  83. uint32_t v;
  84. struct
  85. {
  86. uint32_t lp_mode_h_reg : 1; // [0]
  87. uint32_t lp_mode_h_dr : 1; // [1]
  88. uint32_t change_reg_flag_reg : 1; // [2]
  89. uint32_t change_reg_flag_dr : 1; // [3]
  90. uint32_t lp_mode_en_reg : 1; // [4]
  91. uint32_t lp_mode_en_dr : 1; // [5]
  92. uint32_t lp_mode_delay : 2; // [7:6]
  93. uint32_t __31_8 : 24; // [31:8]
  94. } b;
  95. } REG_RF_DIG_RTC_REG_1C_REG_T;
  96. // reg_c4_reg
  97. typedef union {
  98. uint32_t v;
  99. struct
  100. {
  101. uint32_t xtal_osc_ibit_n : 4; // [3:0]
  102. uint32_t xtal_osc_ibit_l : 4; // [7:4]
  103. uint32_t xtal26m_pwadc_en : 1; // [8]
  104. uint32_t xtal26m_pllcal_en : 1; // [9]
  105. uint32_t xtal26m_interface_en : 1; // [10]
  106. uint32_t xtal26m_plls1_en : 1; // [11]
  107. uint32_t xtal26m_plls2_en : 1; // [12]
  108. uint32_t enable_clk_26m : 1; // [13]
  109. uint32_t enable_clk_26m_lp_uart : 1; // [14]
  110. uint32_t __31_15 : 17; // [31:15]
  111. } b;
  112. } REG_RF_DIG_RTC_REG_C4_REG_T;
  113. // reg_c8_reg
  114. typedef union {
  115. uint32_t v;
  116. struct
  117. {
  118. uint32_t xtal_fixi_bit_n : 6; // [5:0]
  119. uint32_t xtal_fixi_bit_l : 6; // [11:6]
  120. uint32_t xtal_cfix_bit_n : 1; // [12]
  121. uint32_t xtal_cfix_bit_l : 1; // [13]
  122. uint32_t __31_14 : 18; // [31:14]
  123. } b;
  124. } REG_RF_DIG_RTC_REG_C8_REG_T;
  125. // reg_cc_reg
  126. typedef union {
  127. uint32_t v;
  128. struct
  129. {
  130. uint32_t xdrv_reg_bit : 4; // [3:0]
  131. uint32_t xtal_reg_bit : 4; // [7:4]
  132. uint32_t xdrv_aux1_power_bit : 3; // [10:8]
  133. uint32_t __31_11 : 21; // [31:11]
  134. } b;
  135. } REG_RF_DIG_RTC_REG_CC_REG_T;
  136. // reg_d0_reg
  137. typedef union {
  138. uint32_t v;
  139. struct
  140. {
  141. uint32_t xtal_capbank_bit_n : 8; // [7:0]
  142. uint32_t xtal_capbank_bit_l : 8; // [15:8]
  143. uint32_t __31_16 : 16; // [31:16]
  144. } b;
  145. } REG_RF_DIG_RTC_REG_D0_REG_T;
  146. // reg_d4_reg
  147. typedef union {
  148. uint32_t v;
  149. struct
  150. {
  151. uint32_t rtc_reser_l : 16; // [15:0]
  152. uint32_t __31_16 : 16; // [31:16]
  153. } b;
  154. } REG_RF_DIG_RTC_REG_D4_REG_T;
  155. // reg_d8_reg
  156. typedef union {
  157. uint32_t v;
  158. struct
  159. {
  160. uint32_t rtc_reser_n : 16; // [15:0]
  161. uint32_t __31_16 : 16; // [31:16]
  162. } b;
  163. } REG_RF_DIG_RTC_REG_D8_REG_T;
  164. // reg_dc_reg
  165. typedef union {
  166. uint32_t v;
  167. struct
  168. {
  169. uint32_t psm_sw_cnt_l : 16; // [15:0]
  170. uint32_t __31_16 : 16; // [31:16]
  171. } b;
  172. } REG_RF_DIG_RTC_REG_DC_REG_T;
  173. // reg_e0_reg
  174. typedef union {
  175. uint32_t v;
  176. struct
  177. {
  178. uint32_t psm_sw_cnt_h : 16; // [15:0]
  179. uint32_t __31_16 : 16; // [31:16]
  180. } b;
  181. } REG_RF_DIG_RTC_REG_E0_REG_T;
  182. // reg_00_reg
  183. #define RF_DIG_RTC_PU_XTAL_ANA_SEL_SRC (1 << 0)
  184. #define RF_DIG_RTC_PU_XTAL_REG (1 << 1)
  185. #define RF_DIG_RTC_XTAL_SEL_VRTC_VDIG (1 << 2)
  186. #define RF_DIG_RTC_XTAL_SEL_VREF_VDIG (1 << 3)
  187. #define RF_DIG_RTC_STEP_OFFSET_UPDATE (1 << 4)
  188. // reg_18_reg
  189. #define RF_DIG_RTC_STEP_OFFSET_LP(n) (((n)&0xff) << 0)
  190. #define RF_DIG_RTC_STEP_OFFSET_NORMAL(n) (((n)&0xff) << 8)
  191. // reg_1c_reg
  192. #define RF_DIG_RTC_LP_MODE_H_REG (1 << 0)
  193. #define RF_DIG_RTC_LP_MODE_H_DR (1 << 1)
  194. #define RF_DIG_RTC_CHANGE_REG_FLAG_REG (1 << 2)
  195. #define RF_DIG_RTC_CHANGE_REG_FLAG_DR (1 << 3)
  196. #define RF_DIG_RTC_LP_MODE_EN_REG (1 << 4)
  197. #define RF_DIG_RTC_LP_MODE_EN_DR (1 << 5)
  198. #define RF_DIG_RTC_LP_MODE_DELAY(n) (((n)&0x3) << 6)
  199. // reg_c4_reg
  200. #define RF_DIG_RTC_XTAL_OSC_IBIT_N(n) (((n)&0xf) << 0)
  201. #define RF_DIG_RTC_XTAL_OSC_IBIT_L(n) (((n)&0xf) << 4)
  202. #define RF_DIG_RTC_XTAL26M_PWADC_EN (1 << 8)
  203. #define RF_DIG_RTC_XTAL26M_PLLCAL_EN (1 << 9)
  204. #define RF_DIG_RTC_XTAL26M_INTERFACE_EN (1 << 10)
  205. #define RF_DIG_RTC_XTAL26M_PLLS1_EN (1 << 11)
  206. #define RF_DIG_RTC_XTAL26M_PLLS2_EN (1 << 12)
  207. #define RF_DIG_RTC_ENABLE_CLK_26M (1 << 13)
  208. #define RF_DIG_RTC_ENABLE_CLK_26M_LP_UART (1 << 14)
  209. // reg_c8_reg
  210. #define RF_DIG_RTC_XTAL_FIXI_BIT_N(n) (((n)&0x3f) << 0)
  211. #define RF_DIG_RTC_XTAL_FIXI_BIT_L(n) (((n)&0x3f) << 6)
  212. #define RF_DIG_RTC_XTAL_CFIX_BIT_N (1 << 12)
  213. #define RF_DIG_RTC_XTAL_CFIX_BIT_L (1 << 13)
  214. // reg_cc_reg
  215. #define RF_DIG_RTC_XDRV_REG_BIT(n) (((n)&0xf) << 0)
  216. #define RF_DIG_RTC_XTAL_REG_BIT(n) (((n)&0xf) << 4)
  217. #define RF_DIG_RTC_XDRV_AUX1_POWER_BIT(n) (((n)&0x7) << 8)
  218. // reg_d0_reg
  219. #define RF_DIG_RTC_XTAL_CAPBANK_BIT_N(n) (((n)&0xff) << 0)
  220. #define RF_DIG_RTC_XTAL_CAPBANK_BIT_L(n) (((n)&0xff) << 8)
  221. // reg_d4_reg
  222. #define RF_DIG_RTC_RTC_RESER_L(n) (((n)&0xffff) << 0)
  223. // reg_d8_reg
  224. #define RF_DIG_RTC_RTC_RESER_N(n) (((n)&0xffff) << 0)
  225. // reg_dc_reg
  226. #define RF_DIG_RTC_PSM_SW_CNT_L(n) (((n)&0xffff) << 0)
  227. // reg_e0_reg
  228. #define RF_DIG_RTC_PSM_SW_CNT_H(n) (((n)&0xffff) << 0)
  229. #endif // _RF_DIG_RTC_H_