reg_fw_pwrctrl.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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 _REG_FW_PWRCTRL_H_
  13. #define _REG_FW_PWRCTRL_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_REG_FW_PWRCTRL_BASE (0x51315000)
  17. typedef volatile struct
  18. {
  19. uint32_t reg_rd_ctrl_0; // 0x00000000
  20. uint32_t reg_wr_ctrl_0; // 0x00000004
  21. uint32_t bit_ctrl_addr_array0; // 0x00000008
  22. uint32_t bit_ctrl_addr_array1; // 0x0000000c
  23. uint32_t bit_ctrl_addr_array2; // 0x00000010
  24. uint32_t bit_ctrl_addr_array3; // 0x00000014
  25. uint32_t bit_ctrl_addr_array4; // 0x00000018
  26. uint32_t bit_ctrl_addr_array5; // 0x0000001c
  27. uint32_t bit_ctrl_addr_array6; // 0x00000020
  28. uint32_t bit_ctrl_addr_array7; // 0x00000024
  29. uint32_t bit_ctrl_array0; // 0x00000028
  30. uint32_t bit_ctrl_array1; // 0x0000002c
  31. uint32_t bit_ctrl_array2; // 0x00000030
  32. uint32_t bit_ctrl_array3; // 0x00000034
  33. uint32_t bit_ctrl_array4; // 0x00000038
  34. uint32_t bit_ctrl_array5; // 0x0000003c
  35. uint32_t bit_ctrl_array6; // 0x00000040
  36. uint32_t bit_ctrl_array7; // 0x00000044
  37. } HWP_REG_FW_PWRCTRL_T;
  38. #define hwp_regFwPwrctrl ((HWP_REG_FW_PWRCTRL_T *)REG_ACCESS_ADDRESS(REG_REG_FW_PWRCTRL_BASE))
  39. // reg_rd_ctrl_0
  40. typedef union {
  41. uint32_t v;
  42. struct
  43. {
  44. uint32_t pwrctrl_hwen_rd_sec : 1; // [0]
  45. uint32_t ap_pwr_ctrl_rd_sec : 1; // [1]
  46. uint32_t cp_pwr_ctrl_rd_sec : 1; // [2]
  47. uint32_t pub_pwr_ctrl_rd_sec : 1; // [3]
  48. uint32_t rf_pwr_ctrl_rd_sec : 1; // [4]
  49. uint32_t usb_pwr_ctrl_rd_sec : 1; // [5]
  50. uint32_t lte_pwr_ctrl_rd_sec : 1; // [6]
  51. uint32_t gnss_pwr_ctrl_rd_sec : 1; // [7]
  52. uint32_t ap_pwr_stat_rd_sec : 1; // [8]
  53. uint32_t cp_pwr_stat_rd_sec : 1; // [9]
  54. uint32_t pub_pwr_stat_rd_sec : 1; // [10]
  55. uint32_t rf_pwr_stat_rd_sec : 1; // [11]
  56. uint32_t usb_pwr_stat_rd_sec : 1; // [12]
  57. uint32_t lte_pwr_stat_rd_sec : 1; // [13]
  58. uint32_t gnss_pwr_stat_rd_sec : 1; // [14]
  59. uint32_t state_delay_rd_sec : 1; // [15]
  60. uint32_t pd_m_delay_rd_sec : 1; // [16]
  61. uint32_t pd_d_delay_rd_sec : 1; // [17]
  62. uint32_t psram_hold_ctrl_rd_sec : 1; // [18]
  63. uint32_t slp_bypass_rd_sec : 1; // [19]
  64. uint32_t slp_timeout_flag_rd_sec : 1; // [20]
  65. uint32_t pwrctrl_int_en_ap_rd_sec : 1; // [21]
  66. uint32_t pwrctrl_int_en_cp_rd_sec : 1; // [22]
  67. uint32_t pwrctrl_sm_state_rd_sec : 1; // [23]
  68. uint32_t __31_24 : 8; // [31:24]
  69. } b;
  70. } REG_REG_FW_PWRCTRL_REG_RD_CTRL_0_T;
  71. // reg_wr_ctrl_0
  72. typedef union {
  73. uint32_t v;
  74. struct
  75. {
  76. uint32_t pwrctrl_hwen_wr_sec : 1; // [0]
  77. uint32_t ap_pwr_ctrl_wr_sec : 1; // [1]
  78. uint32_t cp_pwr_ctrl_wr_sec : 1; // [2]
  79. uint32_t pub_pwr_ctrl_wr_sec : 1; // [3]
  80. uint32_t rf_pwr_ctrl_wr_sec : 1; // [4]
  81. uint32_t usb_pwr_ctrl_wr_sec : 1; // [5]
  82. uint32_t lte_pwr_ctrl_wr_sec : 1; // [6]
  83. uint32_t gnss_pwr_ctrl_wr_sec : 1; // [7]
  84. uint32_t ap_pwr_stat_wr_sec : 1; // [8]
  85. uint32_t cp_pwr_stat_wr_sec : 1; // [9]
  86. uint32_t pub_pwr_stat_wr_sec : 1; // [10]
  87. uint32_t rf_pwr_stat_wr_sec : 1; // [11]
  88. uint32_t usb_pwr_stat_wr_sec : 1; // [12]
  89. uint32_t lte_pwr_stat_wr_sec : 1; // [13]
  90. uint32_t gnss_pwr_stat_wr_sec : 1; // [14]
  91. uint32_t state_delay_wr_sec : 1; // [15]
  92. uint32_t pd_m_delay_wr_sec : 1; // [16]
  93. uint32_t pd_d_delay_wr_sec : 1; // [17]
  94. uint32_t psram_hold_ctrl_wr_sec : 1; // [18]
  95. uint32_t slp_bypass_wr_sec : 1; // [19]
  96. uint32_t slp_timeout_flag_wr_sec : 1; // [20]
  97. uint32_t pwrctrl_int_en_ap_wr_sec : 1; // [21]
  98. uint32_t pwrctrl_int_en_cp_wr_sec : 1; // [22]
  99. uint32_t pwrctrl_sm_state_wr_sec : 1; // [23]
  100. uint32_t __31_24 : 8; // [31:24]
  101. } b;
  102. } REG_REG_FW_PWRCTRL_REG_WR_CTRL_0_T;
  103. // bit_ctrl_addr_array0
  104. typedef union {
  105. uint32_t v;
  106. struct
  107. {
  108. uint32_t bit_ctrl_addr_array0 : 12; // [11:0]
  109. uint32_t __31_12 : 20; // [31:12]
  110. } b;
  111. } REG_REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY0_T;
  112. // bit_ctrl_addr_array1
  113. typedef union {
  114. uint32_t v;
  115. struct
  116. {
  117. uint32_t bit_ctrl_addr_array1 : 12; // [11:0]
  118. uint32_t __31_12 : 20; // [31:12]
  119. } b;
  120. } REG_REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY1_T;
  121. // bit_ctrl_addr_array2
  122. typedef union {
  123. uint32_t v;
  124. struct
  125. {
  126. uint32_t bit_ctrl_addr_array2 : 12; // [11:0]
  127. uint32_t __31_12 : 20; // [31:12]
  128. } b;
  129. } REG_REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY2_T;
  130. // bit_ctrl_addr_array3
  131. typedef union {
  132. uint32_t v;
  133. struct
  134. {
  135. uint32_t bit_ctrl_addr_array3 : 12; // [11:0]
  136. uint32_t __31_12 : 20; // [31:12]
  137. } b;
  138. } REG_REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY3_T;
  139. // bit_ctrl_addr_array4
  140. typedef union {
  141. uint32_t v;
  142. struct
  143. {
  144. uint32_t bit_ctrl_addr_array4 : 12; // [11:0]
  145. uint32_t __31_12 : 20; // [31:12]
  146. } b;
  147. } REG_REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY4_T;
  148. // bit_ctrl_addr_array5
  149. typedef union {
  150. uint32_t v;
  151. struct
  152. {
  153. uint32_t bit_ctrl_addr_array5 : 12; // [11:0]
  154. uint32_t __31_12 : 20; // [31:12]
  155. } b;
  156. } REG_REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY5_T;
  157. // bit_ctrl_addr_array6
  158. typedef union {
  159. uint32_t v;
  160. struct
  161. {
  162. uint32_t bit_ctrl_addr_array6 : 12; // [11:0]
  163. uint32_t __31_12 : 20; // [31:12]
  164. } b;
  165. } REG_REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY6_T;
  166. // bit_ctrl_addr_array7
  167. typedef union {
  168. uint32_t v;
  169. struct
  170. {
  171. uint32_t bit_ctrl_addr_array7 : 12; // [11:0]
  172. uint32_t __31_12 : 20; // [31:12]
  173. } b;
  174. } REG_REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY7_T;
  175. // reg_rd_ctrl_0
  176. #define REG_FW_PWRCTRL_PWRCTRL_HWEN_RD_SEC (1 << 0)
  177. #define REG_FW_PWRCTRL_AP_PWR_CTRL_RD_SEC (1 << 1)
  178. #define REG_FW_PWRCTRL_CP_PWR_CTRL_RD_SEC (1 << 2)
  179. #define REG_FW_PWRCTRL_PUB_PWR_CTRL_RD_SEC (1 << 3)
  180. #define REG_FW_PWRCTRL_RF_PWR_CTRL_RD_SEC (1 << 4)
  181. #define REG_FW_PWRCTRL_USB_PWR_CTRL_RD_SEC (1 << 5)
  182. #define REG_FW_PWRCTRL_LTE_PWR_CTRL_RD_SEC (1 << 6)
  183. #define REG_FW_PWRCTRL_GNSS_PWR_CTRL_RD_SEC (1 << 7)
  184. #define REG_FW_PWRCTRL_AP_PWR_STAT_RD_SEC (1 << 8)
  185. #define REG_FW_PWRCTRL_CP_PWR_STAT_RD_SEC (1 << 9)
  186. #define REG_FW_PWRCTRL_PUB_PWR_STAT_RD_SEC (1 << 10)
  187. #define REG_FW_PWRCTRL_RF_PWR_STAT_RD_SEC (1 << 11)
  188. #define REG_FW_PWRCTRL_USB_PWR_STAT_RD_SEC (1 << 12)
  189. #define REG_FW_PWRCTRL_LTE_PWR_STAT_RD_SEC (1 << 13)
  190. #define REG_FW_PWRCTRL_GNSS_PWR_STAT_RD_SEC (1 << 14)
  191. #define REG_FW_PWRCTRL_STATE_DELAY_RD_SEC (1 << 15)
  192. #define REG_FW_PWRCTRL_PD_M_DELAY_RD_SEC (1 << 16)
  193. #define REG_FW_PWRCTRL_PD_D_DELAY_RD_SEC (1 << 17)
  194. #define REG_FW_PWRCTRL_PSRAM_HOLD_CTRL_RD_SEC (1 << 18)
  195. #define REG_FW_PWRCTRL_SLP_BYPASS_RD_SEC (1 << 19)
  196. #define REG_FW_PWRCTRL_SLP_TIMEOUT_FLAG_RD_SEC (1 << 20)
  197. #define REG_FW_PWRCTRL_PWRCTRL_INT_EN_AP_RD_SEC (1 << 21)
  198. #define REG_FW_PWRCTRL_PWRCTRL_INT_EN_CP_RD_SEC (1 << 22)
  199. #define REG_FW_PWRCTRL_PWRCTRL_SM_STATE_RD_SEC (1 << 23)
  200. // reg_wr_ctrl_0
  201. #define REG_FW_PWRCTRL_PWRCTRL_HWEN_WR_SEC (1 << 0)
  202. #define REG_FW_PWRCTRL_AP_PWR_CTRL_WR_SEC (1 << 1)
  203. #define REG_FW_PWRCTRL_CP_PWR_CTRL_WR_SEC (1 << 2)
  204. #define REG_FW_PWRCTRL_PUB_PWR_CTRL_WR_SEC (1 << 3)
  205. #define REG_FW_PWRCTRL_RF_PWR_CTRL_WR_SEC (1 << 4)
  206. #define REG_FW_PWRCTRL_USB_PWR_CTRL_WR_SEC (1 << 5)
  207. #define REG_FW_PWRCTRL_LTE_PWR_CTRL_WR_SEC (1 << 6)
  208. #define REG_FW_PWRCTRL_GNSS_PWR_CTRL_WR_SEC (1 << 7)
  209. #define REG_FW_PWRCTRL_AP_PWR_STAT_WR_SEC (1 << 8)
  210. #define REG_FW_PWRCTRL_CP_PWR_STAT_WR_SEC (1 << 9)
  211. #define REG_FW_PWRCTRL_PUB_PWR_STAT_WR_SEC (1 << 10)
  212. #define REG_FW_PWRCTRL_RF_PWR_STAT_WR_SEC (1 << 11)
  213. #define REG_FW_PWRCTRL_USB_PWR_STAT_WR_SEC (1 << 12)
  214. #define REG_FW_PWRCTRL_LTE_PWR_STAT_WR_SEC (1 << 13)
  215. #define REG_FW_PWRCTRL_GNSS_PWR_STAT_WR_SEC (1 << 14)
  216. #define REG_FW_PWRCTRL_STATE_DELAY_WR_SEC (1 << 15)
  217. #define REG_FW_PWRCTRL_PD_M_DELAY_WR_SEC (1 << 16)
  218. #define REG_FW_PWRCTRL_PD_D_DELAY_WR_SEC (1 << 17)
  219. #define REG_FW_PWRCTRL_PSRAM_HOLD_CTRL_WR_SEC (1 << 18)
  220. #define REG_FW_PWRCTRL_SLP_BYPASS_WR_SEC (1 << 19)
  221. #define REG_FW_PWRCTRL_SLP_TIMEOUT_FLAG_WR_SEC (1 << 20)
  222. #define REG_FW_PWRCTRL_PWRCTRL_INT_EN_AP_WR_SEC (1 << 21)
  223. #define REG_FW_PWRCTRL_PWRCTRL_INT_EN_CP_WR_SEC (1 << 22)
  224. #define REG_FW_PWRCTRL_PWRCTRL_SM_STATE_WR_SEC (1 << 23)
  225. // bit_ctrl_addr_array0
  226. #define REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY0(n) (((n)&0xfff) << 0)
  227. // bit_ctrl_addr_array1
  228. #define REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY1(n) (((n)&0xfff) << 0)
  229. // bit_ctrl_addr_array2
  230. #define REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY2(n) (((n)&0xfff) << 0)
  231. // bit_ctrl_addr_array3
  232. #define REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY3(n) (((n)&0xfff) << 0)
  233. // bit_ctrl_addr_array4
  234. #define REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY4(n) (((n)&0xfff) << 0)
  235. // bit_ctrl_addr_array5
  236. #define REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY5(n) (((n)&0xfff) << 0)
  237. // bit_ctrl_addr_array6
  238. #define REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY6(n) (((n)&0xfff) << 0)
  239. // bit_ctrl_addr_array7
  240. #define REG_FW_PWRCTRL_BIT_CTRL_ADDR_ARRAY7(n) (((n)&0xfff) << 0)
  241. #endif // _REG_FW_PWRCTRL_H_