pmic_rtc_ana.h 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556
  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 _PMIC_RTC_ANA_H_
  13. #define _PMIC_RTC_ANA_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_PMIC_RTC_ANA_SET_OFFSET (256)
  17. #define REG_PMIC_RTC_ANA_CLR_OFFSET (272)
  18. #define REG_PMIC_RTC_ANA_BASE (0x51108800)
  19. typedef volatile struct
  20. {
  21. uint32_t module_en0; // 0x00000000
  22. uint32_t dig_clk_en0; // 0x00000004
  23. uint32_t rtc_clk_en0; // 0x00000008
  24. uint32_t soft_rst0; // 0x0000000c
  25. uint32_t vbat_ctrl1; // 0x00000010
  26. uint32_t ldo_vgen_ctrl3; // 0x00000014
  27. uint32_t dcdc_ctrl1; // 0x00000018
  28. uint32_t pm2_pd_en; // 0x0000001c
  29. uint32_t vgen_ctrl1; // 0x00000020
  30. uint32_t ldo_vbat_ctrl1; // 0x00000024
  31. uint32_t chgr_status; // 0x00000028
  32. uint32_t power_pd_sw0; // 0x0000002c
  33. uint32_t power_pd_hw; // 0x00000030
  34. uint32_t soft_rst_hw; // 0x00000034
  35. uint32_t xtal_rc_ctrl; // 0x00000038
  36. uint32_t rtc_ctrl; // 0x0000003c
  37. uint32_t rg_rtc_reserved1; // 0x00000040
  38. uint32_t dvdd_ctrl; // 0x00000044
  39. uint32_t powon_ctrl; // 0x00000048
  40. uint32_t kpled_ctrl0; // 0x0000004c
  41. uint32_t power_pd_sw1; // 0x00000050
  42. uint32_t power_lp_sw0; // 0x00000054
  43. uint32_t ldo_vosel1; // 0x00000058
  44. uint32_t slp_ldo_ulp_ctrl; // 0x0000005c
  45. uint32_t ldo_vgen_ctrl; // 0x00000060
  46. uint32_t ldo_lp18_vio33_ulp_en; // 0x00000064
  47. uint32_t vcore_ctrl0; // 0x00000068
  48. uint32_t vcore_ctrl1; // 0x0000006c
  49. uint32_t vrf_ctrl2; // 0x00000070
  50. uint32_t vrf_ctrl3; // 0x00000074
  51. uint32_t vgen_ctrl0; // 0x00000078
  52. uint32_t chgr_ctrl0; // 0x0000007c
  53. uint32_t chgr_det_ctrl0; // 0x00000080
  54. uint32_t slp_ldo_pd_ctrl0; // 0x00000084
  55. uint32_t slp_ldo_pd_ctrl1; // 0x00000088
  56. uint32_t slp_dcdc_pd_ctrl; // 0x0000008c
  57. uint32_t dcdc_core_slp_ctrl0; // 0x00000090
  58. uint32_t dcdc_core_slp_ctrl1; // 0x00000094
  59. uint32_t slp_dcdc_lp_ctrl; // 0x00000098
  60. uint32_t slp_ldo_lp_ctrl0; // 0x0000009c
  61. uint32_t slp_ldo_lp_ctrl1; // 0x000000a0
  62. uint32_t reserved_reg_rtc; // 0x000000a4
  63. uint32_t dcdc_vlg_sel; // 0x000000a8
  64. uint32_t ldo_vlg_sel0; // 0x000000ac
  65. uint32_t clk32kless_ctrl0; // 0x000000b0
  66. uint32_t clk32kless_ctrl1; // 0x000000b4
  67. uint32_t xtl_wait_ctrl0; // 0x000000b8
  68. uint32_t por_rst_monitor; // 0x000000bc
  69. uint32_t wdg_rst_monitor; // 0x000000c0
  70. uint32_t por_pin_rst_monitor; // 0x000000c4
  71. uint32_t por_src_flag; // 0x000000c8
  72. uint32_t por_7s_ctrl; // 0x000000cc
  73. uint32_t hwrst_rtc; // 0x000000d0
  74. uint32_t smpl_ctrl0; // 0x000000d4
  75. uint32_t rtc_rst0; // 0x000000d8
  76. uint32_t rtc_rst1; // 0x000000dc
  77. uint32_t rtc_rst2; // 0x000000e0
  78. uint32_t rtc_clk_stop; // 0x000000e4
  79. uint32_t vbat_drop_cnt; // 0x000000e8
  80. uint32_t mixed_ctrl; // 0x000000ec
  81. uint32_t por_off_flag; // 0x000000f0
  82. uint32_t swrst_ctrl0; // 0x000000f4
  83. uint32_t swrst_ctrl1; // 0x000000f8
  84. uint32_t free_timer_low; // 0x000000fc
  85. uint32_t free_timer_high; // 0x00000100
  86. uint32_t reserved_reg1; // 0x00000104
  87. uint32_t reserved_reg2; // 0x00000108
  88. uint32_t reserved_reg3; // 0x0000010c
  89. uint32_t reserved_reg4; // 0x00000110
  90. uint32_t reserved_reg5; // 0x00000114
  91. uint32_t reserved_reg6; // 0x00000118
  92. uint32_t pwr_wr_prot_value; // 0x0000011c
  93. uint32_t vol_tune_ctrl_core; // 0x00000120
  94. uint32_t smpl_ctrl1; // 0x00000124
  95. uint32_t __296[1]; // 0x00000128
  96. uint32_t power_pd_sw0_set; // 0x0000012c
  97. uint32_t __304[3]; // 0x00000130
  98. uint32_t power_pd_sw0_clr; // 0x0000013c
  99. uint32_t __320[4]; // 0x00000140
  100. uint32_t power_pd_sw1_set; // 0x00000150
  101. uint32_t __340[3]; // 0x00000154
  102. uint32_t power_pd_sw1_clr; // 0x00000160
  103. } HWP_PMIC_RTC_ANA_T;
  104. #define hwp_pmicRtcAna ((HWP_PMIC_RTC_ANA_T *)REG_ACCESS_ADDRESS(REG_PMIC_RTC_ANA_BASE))
  105. // module_en0
  106. typedef union {
  107. uint32_t v;
  108. struct
  109. {
  110. uint32_t __0_0 : 1; // [0]
  111. uint32_t rtc_en : 1; // [1]
  112. uint32_t wdg_en : 1; // [2]
  113. uint32_t eic_en : 1; // [3]
  114. uint32_t psm_topa_en : 1; // [4]
  115. uint32_t __6_5 : 2; // [6:5]
  116. uint32_t rtc_topa_en : 1; // [7]
  117. uint32_t iomux_en : 1; // [8]
  118. uint32_t __31_9 : 23; // [31:9]
  119. } b;
  120. } REG_PMIC_RTC_ANA_MODULE_EN0_T;
  121. // dig_clk_en0
  122. typedef union {
  123. uint32_t v;
  124. struct
  125. {
  126. uint32_t clk_wdg_sel : 1; // [0]
  127. uint32_t __31_1 : 31; // [31:1]
  128. } b;
  129. } REG_PMIC_RTC_ANA_DIG_CLK_EN0_T;
  130. // rtc_clk_en0
  131. typedef union {
  132. uint32_t v;
  133. struct
  134. {
  135. uint32_t rtc_arch_en : 1; // [0]
  136. uint32_t rtc_rtc_en : 1; // [1]
  137. uint32_t rtc_wdg_en : 1; // [2]
  138. uint32_t rtc_eic_en : 1; // [3]
  139. uint32_t __10_4 : 7; // [10:4]
  140. uint32_t rtc_efs_en : 1; // [11]
  141. uint32_t __31_12 : 20; // [31:12]
  142. } b;
  143. } REG_PMIC_RTC_ANA_RTC_CLK_EN0_T;
  144. // soft_rst0
  145. typedef union {
  146. uint32_t v;
  147. struct
  148. {
  149. uint32_t __0_0 : 1; // [0]
  150. uint32_t rtc_soft_rst : 1; // [1]
  151. uint32_t wdg_soft_rst : 1; // [2]
  152. uint32_t eic_soft_rst : 1; // [3]
  153. uint32_t __31_4 : 28; // [31:4]
  154. } b;
  155. } REG_PMIC_RTC_ANA_SOFT_RST0_T;
  156. // vbat_ctrl1
  157. typedef union {
  158. uint32_t v;
  159. struct
  160. {
  161. uint32_t da_ldo_vbat_reftrim : 5; // [4:0]
  162. uint32_t __7_5 : 3; // [7:5]
  163. uint32_t da_ldo_vbat_reftrim_ulp : 5; // [12:8]
  164. uint32_t __31_13 : 19; // [31:13]
  165. } b;
  166. } REG_PMIC_RTC_ANA_VBAT_CTRL1_T;
  167. // ldo_vgen_ctrl3
  168. typedef union {
  169. uint32_t v;
  170. struct
  171. {
  172. uint32_t da_ldo_vgen_reftrim : 5; // [4:0]
  173. uint32_t __31_5 : 27; // [31:5]
  174. } b;
  175. } REG_PMIC_RTC_ANA_LDO_VGEN_CTRL3_T;
  176. // dcdc_ctrl1
  177. typedef union {
  178. uint32_t v;
  179. struct
  180. {
  181. uint32_t __4_0 : 5; // [4:0]
  182. uint32_t da_dcdc_osc3m_freq : 5; // [9:5]
  183. uint32_t da_dcdc_osc3m_en : 1; // [10]
  184. uint32_t __31_11 : 21; // [31:11]
  185. } b;
  186. } REG_PMIC_RTC_ANA_DCDC_CTRL1_T;
  187. // pm2_pd_en
  188. typedef union {
  189. uint32_t v;
  190. struct
  191. {
  192. uint32_t pm2_ldovio18_pd_en : 1; // [0]
  193. uint32_t pm2_ldovio33_pd_en : 1; // [1]
  194. uint32_t pm2_ldodcxo_pd_en : 1; // [2]
  195. uint32_t pm2_ldolp18_pd_en : 1; // [3]
  196. uint32_t pm2_dcdcgen_pd_en : 1; // [4]
  197. uint32_t pm2_dcdccore_pd_en : 1; // [5]
  198. uint32_t pm2_ldovio18_lp_en : 1; // [6]
  199. uint32_t pm2_ldovio33_lp_en : 1; // [7]
  200. uint32_t pm2_ldodcxo_lp_en : 1; // [8]
  201. uint32_t pm2_ldolp18_lp_en : 1; // [9]
  202. uint32_t pm2_dcdcgen_lp_en : 1; // [10]
  203. uint32_t pm2_dcdccore_lp_en : 1; // [11]
  204. uint32_t pm2_ldolp18_ulp_en : 1; // [12]
  205. uint32_t pm2_ldovio33_ulp_en : 1; // [13]
  206. uint32_t pm2_dcdc_core_ulp_en : 1; // [14]
  207. uint32_t __31_15 : 17; // [31:15]
  208. } b;
  209. } REG_PMIC_RTC_ANA_PM2_PD_EN_T;
  210. // vgen_ctrl1
  211. typedef union {
  212. uint32_t v;
  213. struct
  214. {
  215. uint32_t rg_vgen_vosel : 8; // [7:0]
  216. uint32_t __31_8 : 24; // [31:8]
  217. } b;
  218. } REG_PMIC_RTC_ANA_VGEN_CTRL1_T;
  219. // chgr_status
  220. typedef union {
  221. uint32_t v;
  222. struct
  223. {
  224. uint32_t __0_0 : 1; // [0]
  225. uint32_t dcp_switch_en : 1; // [1]
  226. uint32_t __12_2 : 11; // [12:2]
  227. uint32_t chgr_int_en : 1; // [13]
  228. uint32_t __31_14 : 18; // [31:14]
  229. } b;
  230. } REG_PMIC_RTC_ANA_CHGR_STATUS_T;
  231. // power_pd_sw0
  232. typedef union {
  233. uint32_t v;
  234. struct
  235. {
  236. uint32_t bg_pd : 1; // [0]
  237. uint32_t da_ldo_mmc_pd : 1; // [1]
  238. uint32_t da_vcore_pd : 1; // [2]
  239. uint32_t da_vrf_pd : 1; // [3]
  240. uint32_t da_vgen_pd : 1; // [4]
  241. uint32_t da_ldo_vio18_pd : 1; // [5]
  242. uint32_t da_ldo_mem_pd : 1; // [6]
  243. uint32_t da_ldo_dcxo_pd : 1; // [7]
  244. uint32_t ldo_cp_pd : 1; // [8]
  245. uint32_t ldo_emm_pd : 1; // [9]
  246. uint32_t da_ldo_vio33_pd : 1; // [10]
  247. uint32_t da_ldo_lp18_pd : 1; // [11]
  248. uint32_t da_ldo_rf12_pd : 1; // [12]
  249. uint32_t da_ldo_ana_pd : 1; // [13]
  250. uint32_t da_ldo_usb33_pd : 1; // [14]
  251. uint32_t da_ldo_spimem_pd : 1; // [15]
  252. uint32_t __31_16 : 16; // [31:16]
  253. } b;
  254. } REG_PMIC_RTC_ANA_POWER_PD_SW0_T;
  255. // power_pd_hw
  256. typedef union {
  257. uint32_t v;
  258. struct
  259. {
  260. uint32_t pwr_off_seq_en : 1; // [0]
  261. uint32_t __31_1 : 31; // [31:1]
  262. } b;
  263. } REG_PMIC_RTC_ANA_POWER_PD_HW_T;
  264. // soft_rst_hw
  265. typedef union {
  266. uint32_t v;
  267. struct
  268. {
  269. uint32_t reg_soft_rst_sw : 1; // [0]
  270. uint32_t __31_1 : 31; // [31:1]
  271. } b;
  272. } REG_PMIC_RTC_ANA_SOFT_RST_HW_T;
  273. // xtal_rc_ctrl
  274. typedef union {
  275. uint32_t v;
  276. struct
  277. {
  278. uint32_t rg_xtal32k_fine : 3; // [2:0]
  279. uint32_t rg_xtal32k_coarse : 3; // [5:3]
  280. uint32_t rg_xtal32k_pu : 1; // [6]
  281. uint32_t rg_rc64k_pu : 1; // [7]
  282. uint32_t __31_8 : 24; // [31:8]
  283. } b;
  284. } REG_PMIC_RTC_ANA_XTAL_RC_CTRL_T;
  285. // rtc_ctrl
  286. typedef union {
  287. uint32_t v;
  288. struct
  289. {
  290. uint32_t da_rtcbg_trim : 5; // [4:0]
  291. uint32_t rg_vbatbk_vosel : 3; // [7:5]
  292. uint32_t rg_rtc_vosel : 3; // [10:8]
  293. uint32_t __31_11 : 21; // [31:11]
  294. } b;
  295. } REG_PMIC_RTC_ANA_RTC_CTRL_T;
  296. // rg_rtc_reserved1
  297. typedef union {
  298. uint32_t v;
  299. struct
  300. {
  301. uint32_t rg_rtc_reserved1 : 8; // [7:0]
  302. uint32_t rg_rtc_reserved0 : 8; // [15:8]
  303. uint32_t __31_16 : 16; // [31:16]
  304. } b;
  305. } REG_PMIC_RTC_ANA_RG_RTC_RESERVED1_T;
  306. // dvdd_ctrl
  307. typedef union {
  308. uint32_t v;
  309. struct
  310. {
  311. uint32_t da_dvdd_pd : 1; // [0]
  312. uint32_t da_dvdd_iso : 1; // [1]
  313. uint32_t da_psm_vref_pd : 1; // [2]
  314. uint32_t __31_3 : 29; // [31:3]
  315. } b;
  316. } REG_PMIC_RTC_ANA_DVDD_CTRL_T;
  317. // powon_ctrl
  318. typedef union {
  319. uint32_t v;
  320. struct
  321. {
  322. uint32_t rg_uvlo_en : 1; // [0]
  323. uint32_t rg_vbatlow_en : 1; // [1]
  324. uint32_t da_powerdet_en : 1; // [2]
  325. uint32_t rg_pbint_pullh_enb : 1; // [3]
  326. uint32_t rg_buadet_en : 1; // [4]
  327. uint32_t rg_vbat_crash_v : 2; // [6:5]
  328. uint32_t rg_uvlo_v : 2; // [8:7]
  329. uint32_t rg_ovlo_v : 2; // [10:9]
  330. uint32_t rg_ovlo_t : 2; // [12:11]
  331. uint32_t rg_ovlo_en : 1; // [13]
  332. uint32_t rg_baton_t : 2; // [15:14]
  333. uint32_t __31_16 : 16; // [31:16]
  334. } b;
  335. } REG_PMIC_RTC_ANA_POWON_CTRL_T;
  336. // kpled_ctrl0
  337. typedef union {
  338. uint32_t v;
  339. struct
  340. {
  341. uint32_t rg_ldo_kpled_reftrim : 5; // [4:0]
  342. uint32_t rg_ldo_kpled_pd : 1; // [5]
  343. uint32_t rg_kpled_pulldown_en : 1; // [6]
  344. uint32_t rg_kpled_pd : 1; // [7]
  345. uint32_t __31_8 : 24; // [31:8]
  346. } b;
  347. } REG_PMIC_RTC_ANA_KPLED_CTRL0_T;
  348. // power_pd_sw1
  349. typedef union {
  350. uint32_t v;
  351. struct
  352. {
  353. uint32_t __2_0 : 3; // [2:0]
  354. uint32_t da_ldo_rf15_pd : 1; // [3]
  355. uint32_t __7_4 : 4; // [7:4]
  356. uint32_t da_ldo_lcd_pd : 1; // [8]
  357. uint32_t __9_9 : 1; // [9]
  358. uint32_t da_ldo_camd_pd : 1; // [10]
  359. uint32_t da_ldo_cama_pd : 1; // [11]
  360. uint32_t __31_12 : 20; // [31:12]
  361. } b;
  362. } REG_PMIC_RTC_ANA_POWER_PD_SW1_T;
  363. // power_lp_sw0
  364. typedef union {
  365. uint32_t v;
  366. struct
  367. {
  368. uint32_t da_ldo_vio33_lp_en : 1; // [0]
  369. uint32_t da_ldo_lp18_lp_en : 1; // [1]
  370. uint32_t da_ldo_rf12_lp_en : 1; // [2]
  371. uint32_t da_ldo_rf15_lp_en : 1; // [3]
  372. uint32_t da_ldo_spimem_lp_en : 1; // [4]
  373. uint32_t da_ldo_mem_lp_en : 1; // [5]
  374. uint32_t da_ldo_ana_lp_en : 1; // [6]
  375. uint32_t da_ldo_vio18_lp_en : 1; // [7]
  376. uint32_t da_ldo_lcd_lp_en : 1; // [8]
  377. uint32_t da_ldo_mmc_lp_en : 1; // [9]
  378. uint32_t da_ldo_camd_lp_en : 1; // [10]
  379. uint32_t da_ldo_cama_lp_en : 1; // [11]
  380. uint32_t da_ldo_dcxo_lp_en : 1; // [12]
  381. uint32_t da_ldo_usb33_lp_en : 1; // [13]
  382. uint32_t __31_14 : 18; // [31:14]
  383. } b;
  384. } REG_PMIC_RTC_ANA_POWER_LP_SW0_T;
  385. // ldo_vosel1
  386. typedef union {
  387. uint32_t v;
  388. struct
  389. {
  390. uint32_t rg_ldo_dcxo_vosel : 6; // [5:0]
  391. uint32_t __31_6 : 26; // [31:6]
  392. } b;
  393. } REG_PMIC_RTC_ANA_LDO_VOSEL1_T;
  394. // slp_ldo_ulp_ctrl
  395. typedef union {
  396. uint32_t v;
  397. struct
  398. {
  399. uint32_t pm1_ldo_lp18_ulp_en : 1; // [0]
  400. uint32_t pm1_ldo_vio33_ulp_en : 1; // [1]
  401. uint32_t pm1_dcdc_core_ulp_en : 1; // [2]
  402. uint32_t __31_3 : 29; // [31:3]
  403. } b;
  404. } REG_PMIC_RTC_ANA_SLP_LDO_ULP_CTRL_T;
  405. // ldo_vgen_ctrl
  406. typedef union {
  407. uint32_t v;
  408. struct
  409. {
  410. uint32_t rg_ldo_vgen_auxcal_sel : 3; // [2:0]
  411. uint32_t __31_3 : 29; // [31:3]
  412. } b;
  413. } REG_PMIC_RTC_ANA_LDO_VGEN_CTRL_T;
  414. // ldo_lp18_vio33_ulp_en
  415. typedef union {
  416. uint32_t v;
  417. struct
  418. {
  419. uint32_t da_ldo_lp18_ulp_en : 1; // [0]
  420. uint32_t da_ldo_vio33_ulp_en : 1; // [1]
  421. uint32_t __31_2 : 30; // [31:2]
  422. } b;
  423. } REG_PMIC_RTC_ANA_LDO_LP18_VIO33_ULP_EN_T;
  424. // vcore_ctrl0
  425. typedef union {
  426. uint32_t v;
  427. struct
  428. {
  429. uint32_t da_vcore_vosel : 9; // [8:0]
  430. uint32_t __31_9 : 23; // [31:9]
  431. } b;
  432. } REG_PMIC_RTC_ANA_VCORE_CTRL0_T;
  433. // vcore_ctrl1
  434. typedef union {
  435. uint32_t v;
  436. struct
  437. {
  438. uint32_t da_vcore_votrim_lp : 5; // [4:0]
  439. uint32_t da_vcore_votrim : 5; // [9:5]
  440. uint32_t __11_10 : 2; // [11:10]
  441. uint32_t da_vcore_ulp_ret : 1; // [12]
  442. uint32_t da_vcore_ulp_en : 1; // [13]
  443. uint32_t rg_vcore_lp_en : 1; // [14]
  444. uint32_t __31_15 : 17; // [31:15]
  445. } b;
  446. } REG_PMIC_RTC_ANA_VCORE_CTRL1_T;
  447. // vrf_ctrl2
  448. typedef union {
  449. uint32_t v;
  450. struct
  451. {
  452. uint32_t da_vrf_votrim : 5; // [4:0]
  453. uint32_t da_vrf_lp_en : 1; // [5]
  454. uint32_t __31_6 : 26; // [31:6]
  455. } b;
  456. } REG_PMIC_RTC_ANA_VRF_CTRL2_T;
  457. // vrf_ctrl3
  458. typedef union {
  459. uint32_t v;
  460. struct
  461. {
  462. uint32_t rg_vrf_vosel : 9; // [8:0]
  463. uint32_t __31_9 : 23; // [31:9]
  464. } b;
  465. } REG_PMIC_RTC_ANA_VRF_CTRL3_T;
  466. // vgen_ctrl0
  467. typedef union {
  468. uint32_t v;
  469. struct
  470. {
  471. uint32_t da_vgen_votrim : 5; // [4:0]
  472. uint32_t da_vgen_lp_en : 1; // [5]
  473. uint32_t __7_6 : 2; // [7:6]
  474. uint32_t pm2_ldo_mem_powersel : 1; // [8]
  475. uint32_t slp_ldo_mem_powersel_en : 1; // [9]
  476. uint32_t __31_10 : 22; // [31:10]
  477. } b;
  478. } REG_PMIC_RTC_ANA_VGEN_CTRL0_T;
  479. // chgr_ctrl0
  480. typedef union {
  481. uint32_t v;
  482. struct
  483. {
  484. uint32_t chgr_cv_v : 6; // [5:0]
  485. uint32_t chgr_dpm : 2; // [7:6]
  486. uint32_t chgr_expower_device : 1; // [8]
  487. uint32_t chgr_ptest : 1; // [9]
  488. uint32_t chgr_pd : 1; // [10]
  489. uint32_t __31_11 : 21; // [31:11]
  490. } b;
  491. } REG_PMIC_RTC_ANA_CHGR_CTRL0_T;
  492. // chgr_det_ctrl0
  493. typedef union {
  494. uint32_t v;
  495. struct
  496. {
  497. uint32_t chg_int_delay : 3; // [2:0]
  498. uint32_t __3_3 : 1; // [3]
  499. uint32_t rg_dp_dm_aux_en : 1; // [4]
  500. uint32_t dp_dm_bc_enb : 1; // [5]
  501. uint32_t __31_6 : 26; // [31:6]
  502. } b;
  503. } REG_PMIC_RTC_ANA_CHGR_DET_CTRL0_T;
  504. // slp_ldo_pd_ctrl0
  505. typedef union {
  506. uint32_t v;
  507. struct
  508. {
  509. uint32_t __1_0 : 2; // [1:0]
  510. uint32_t slp_ldocama_pd_en : 1; // [2]
  511. uint32_t slp_ldocamd_pd_en : 1; // [3]
  512. uint32_t slp_ldolcd_pd_en : 1; // [4]
  513. uint32_t slp_ldommc_pd_en : 1; // [5]
  514. uint32_t slp_ldokpled_pd_en : 1; // [6]
  515. uint32_t pm1_ldousb_pd_en : 1; // [7]
  516. uint32_t slp_ldospimem_pd_en : 1; // [8]
  517. uint32_t slp_ldorf15_pd_en : 1; // [9]
  518. uint32_t pm1_ldovio33_pd_en : 1; // [10]
  519. uint32_t pm1_ldodcxo_pd_en : 1; // [11]
  520. uint32_t pm1_ldolp18_pd_en : 1; // [12]
  521. uint32_t slp_ldorf12_pd_en : 1; // [13]
  522. uint32_t slp_ldoana_pd_en : 1; // [14]
  523. uint32_t pm1_ldovio18_pd_en : 1; // [15]
  524. uint32_t __31_16 : 16; // [31:16]
  525. } b;
  526. } REG_PMIC_RTC_ANA_SLP_LDO_PD_CTRL0_T;
  527. // slp_ldo_pd_ctrl1
  528. typedef union {
  529. uint32_t v;
  530. struct
  531. {
  532. uint32_t pm1_ldomem_pd_en : 1; // [0]
  533. uint32_t ldo_xtl_en : 1; // [1]
  534. uint32_t slp_io_en : 1; // [2]
  535. uint32_t slp_ldo_pd_en : 1; // [3]
  536. uint32_t pm1_ldocp_pd_en : 1; // [4]
  537. uint32_t __31_5 : 27; // [31:5]
  538. } b;
  539. } REG_PMIC_RTC_ANA_SLP_LDO_PD_CTRL1_T;
  540. // slp_dcdc_pd_ctrl
  541. typedef union {
  542. uint32_t v;
  543. struct
  544. {
  545. uint32_t pm1_dcdcgen_pd_en : 1; // [0]
  546. uint32_t slp_dcdcvrf_pd_en : 1; // [1]
  547. uint32_t __2_2 : 1; // [2]
  548. uint32_t slp_dcdccore_drop_en : 1; // [3]
  549. uint32_t __5_4 : 2; // [5:4]
  550. uint32_t slp_dcdccore_pu_rstn_th : 6; // [11:6]
  551. uint32_t slp_dcdccore_pd_rstn_th : 4; // [15:12]
  552. uint32_t __31_16 : 16; // [31:16]
  553. } b;
  554. } REG_PMIC_RTC_ANA_SLP_DCDC_PD_CTRL_T;
  555. // dcdc_core_slp_ctrl0
  556. typedef union {
  557. uint32_t v;
  558. struct
  559. {
  560. uint32_t dcdc_core_slp_step_en : 1; // [0]
  561. uint32_t pm1_dcdccore_pd_en : 1; // [1]
  562. uint32_t __2_2 : 1; // [2]
  563. uint32_t pm1_dcdc_core_slp_step_vol : 5; // [7:3]
  564. uint32_t pm1_dcdc_core_slp_step_num : 4; // [11:8]
  565. uint32_t pm1_dcdc_core_slp_step_delay : 2; // [13:12]
  566. uint32_t __31_14 : 18; // [31:14]
  567. } b;
  568. } REG_PMIC_RTC_ANA_DCDC_CORE_SLP_CTRL0_T;
  569. // dcdc_core_slp_ctrl1
  570. typedef union {
  571. uint32_t v;
  572. struct
  573. {
  574. uint32_t pm1_dcdc_core_vosel_ds_sw : 9; // [8:0]
  575. uint32_t __31_9 : 23; // [31:9]
  576. } b;
  577. } REG_PMIC_RTC_ANA_DCDC_CORE_SLP_CTRL1_T;
  578. // slp_dcdc_lp_ctrl
  579. typedef union {
  580. uint32_t v;
  581. struct
  582. {
  583. uint32_t __0_0 : 1; // [0]
  584. uint32_t pm1_dcdcgen_lp_en : 1; // [1]
  585. uint32_t slp_dcdcvrf_lp_en : 1; // [2]
  586. uint32_t __3_3 : 1; // [3]
  587. uint32_t pm1_dcdccore_lp_en : 1; // [4]
  588. uint32_t __31_5 : 27; // [31:5]
  589. } b;
  590. } REG_PMIC_RTC_ANA_SLP_DCDC_LP_CTRL_T;
  591. // slp_ldo_lp_ctrl0
  592. typedef union {
  593. uint32_t v;
  594. struct
  595. {
  596. uint32_t __1_0 : 2; // [1:0]
  597. uint32_t slp_ldocama_lp_en : 1; // [2]
  598. uint32_t slp_ldocamd_lp_en : 1; // [3]
  599. uint32_t slp_ldolcd_lp_en : 1; // [4]
  600. uint32_t __5_5 : 1; // [5]
  601. uint32_t pm1_ldousb_lp_en : 1; // [6]
  602. uint32_t slp_ldommc_lp_en : 1; // [7]
  603. uint32_t slp_ldospimem_lp_en : 1; // [8]
  604. uint32_t slp_ldoana_lp_en : 1; // [9]
  605. uint32_t pm1_ldovio18_lp_en : 1; // [10]
  606. uint32_t pm1_ldodcxo_lp_en : 1; // [11]
  607. uint32_t pm1_ldovio33_lp_en : 1; // [12]
  608. uint32_t slp_ldorf12_lp_en : 1; // [13]
  609. uint32_t slp_ldorf15_lp_en : 1; // [14]
  610. uint32_t __31_15 : 17; // [31:15]
  611. } b;
  612. } REG_PMIC_RTC_ANA_SLP_LDO_LP_CTRL0_T;
  613. // slp_ldo_lp_ctrl1
  614. typedef union {
  615. uint32_t v;
  616. struct
  617. {
  618. uint32_t pm1_ldomem_lp_en : 1; // [0]
  619. uint32_t __2_1 : 2; // [2:1]
  620. uint32_t pm1_ldolp18_lp_en : 1; // [3]
  621. uint32_t __6_4 : 3; // [6:4]
  622. uint32_t pm2_dcdc_core_vosel_ds_sw : 9; // [15:7]
  623. uint32_t __31_16 : 16; // [31:16]
  624. } b;
  625. } REG_PMIC_RTC_ANA_SLP_LDO_LP_CTRL1_T;
  626. // reserved_reg_rtc
  627. typedef union {
  628. uint32_t v;
  629. struct
  630. {
  631. uint32_t reserved_rtc : 16; // [15:0]
  632. uint32_t __31_16 : 16; // [31:16]
  633. } b;
  634. } REG_PMIC_RTC_ANA_RESERVED_REG_RTC_T;
  635. // dcdc_vlg_sel
  636. typedef union {
  637. uint32_t v;
  638. struct
  639. {
  640. uint32_t dcdc_core_nor_sw_sel : 1; // [0]
  641. uint32_t dcdc_core_slp_sw_sel : 1; // [1]
  642. uint32_t dcdc_core_votrim_sw_sel : 1; // [2]
  643. uint32_t dcdc_gen_sw_sel : 1; // [3]
  644. uint32_t __31_4 : 28; // [31:4]
  645. } b;
  646. } REG_PMIC_RTC_ANA_DCDC_VLG_SEL_T;
  647. // ldo_vlg_sel0
  648. typedef union {
  649. uint32_t v;
  650. struct
  651. {
  652. uint32_t ldo_vcore_votrim_sw_sel : 1; // [0]
  653. uint32_t ldo_vcore_votrim_ulp_sw_sel : 1; // [1]
  654. uint32_t vgen_votrim_sw_sel : 1; // [2]
  655. uint32_t __3_3 : 1; // [3]
  656. uint32_t vrf_votrim_sw_sel : 1; // [4]
  657. uint32_t rtcbg_trim_sw_sel : 1; // [5]
  658. uint32_t dcdc_osc3m_freq_sw_sel : 1; // [6]
  659. uint32_t vbat_reftrim_sw_sel : 1; // [7]
  660. uint32_t vbat_reftrim_ulp_sw_sel : 1; // [8]
  661. uint32_t vgen_reftrim_sw_sel : 1; // [9]
  662. uint32_t __31_10 : 22; // [31:10]
  663. } b;
  664. } REG_PMIC_RTC_ANA_LDO_VLG_SEL0_T;
  665. // clk32kless_ctrl0
  666. typedef union {
  667. uint32_t v;
  668. struct
  669. {
  670. uint32_t rc_32k_en : 1; // [0]
  671. uint32_t rc_32k_sel : 1; // [1]
  672. uint32_t __3_2 : 2; // [3:2]
  673. uint32_t rtc_mode : 1; // [4], read only
  674. uint32_t __5_5 : 1; // [5]
  675. uint32_t ldo_dcxo_lp_en_rtcclr : 1; // [6]
  676. uint32_t ldo_dcxo_lp_en_rtcset : 1; // [7]
  677. uint32_t __9_8 : 2; // [9:8]
  678. uint32_t rc_mode_wr_ack_flag_clr : 1; // [10], write clear
  679. uint32_t __13_11 : 3; // [13:11]
  680. uint32_t rc_mode_wr_ack_flag : 1; // [14], read only
  681. uint32_t __31_15 : 17; // [31:15]
  682. } b;
  683. } REG_PMIC_RTC_ANA_CLK32KLESS_CTRL0_T;
  684. // clk32kless_ctrl1
  685. typedef union {
  686. uint32_t v;
  687. struct
  688. {
  689. uint32_t rc_mode : 16; // [15:0]
  690. uint32_t __31_16 : 16; // [31:16]
  691. } b;
  692. } REG_PMIC_RTC_ANA_CLK32KLESS_CTRL1_T;
  693. // por_rst_monitor
  694. typedef union {
  695. uint32_t v;
  696. struct
  697. {
  698. uint32_t por_rst_monitor : 16; // [15:0]
  699. uint32_t __31_16 : 16; // [31:16]
  700. } b;
  701. } REG_PMIC_RTC_ANA_POR_RST_MONITOR_T;
  702. // wdg_rst_monitor
  703. typedef union {
  704. uint32_t v;
  705. struct
  706. {
  707. uint32_t wdg_rst_monitor : 16; // [15:0]
  708. uint32_t __31_16 : 16; // [31:16]
  709. } b;
  710. } REG_PMIC_RTC_ANA_WDG_RST_MONITOR_T;
  711. // por_pin_rst_monitor
  712. typedef union {
  713. uint32_t v;
  714. struct
  715. {
  716. uint32_t por_pin_rst_monitor : 16; // [15:0]
  717. uint32_t __31_16 : 16; // [31:16]
  718. } b;
  719. } REG_PMIC_RTC_ANA_POR_PIN_RST_MONITOR_T;
  720. // por_src_flag
  721. typedef union {
  722. uint32_t v;
  723. struct
  724. {
  725. uint32_t por_src_flag : 14; // [13:0], read only
  726. uint32_t reg_soft_rst_flag_clr : 1; // [14], write clear
  727. uint32_t por_sw_force_on : 1; // [15]
  728. uint32_t __31_16 : 16; // [31:16]
  729. } b;
  730. } REG_PMIC_RTC_ANA_POR_SRC_FLAG_T;
  731. // por_7s_ctrl
  732. typedef union {
  733. uint32_t v;
  734. struct
  735. {
  736. uint32_t pbint_7s_rst_mode : 1; // [0]
  737. uint32_t pbint_7s_rst_disable : 1; // [1]
  738. uint32_t pbint_7s_auto_on_en : 1; // [2]
  739. uint32_t ext_rstn_mode : 1; // [3]
  740. uint32_t pbint_7s_rst_threshold : 4; // [7:4]
  741. uint32_t pbint_7s_rst_swmode : 1; // [8]
  742. uint32_t key2_7s_rst_en : 1; // [9]
  743. uint32_t __10_10 : 1; // [10]
  744. uint32_t pbint_flag_clr : 1; // [11]
  745. uint32_t __12_12 : 1; // [12]
  746. uint32_t chgr_int_flag_clr : 1; // [13]
  747. uint32_t ext_rstn_flag_clr : 1; // [14]
  748. uint32_t pbint_7s_flag_clr : 1; // [15]
  749. uint32_t __31_16 : 16; // [31:16]
  750. } b;
  751. } REG_PMIC_RTC_ANA_POR_7S_CTRL_T;
  752. // hwrst_rtc
  753. typedef union {
  754. uint32_t v;
  755. struct
  756. {
  757. uint32_t hwrst_rtc_reg_set : 8; // [7:0]
  758. uint32_t hwrst_rtc_reg_sts : 8; // [15:8], read only
  759. uint32_t __31_16 : 16; // [31:16]
  760. } b;
  761. } REG_PMIC_RTC_ANA_HWRST_RTC_T;
  762. // smpl_ctrl0
  763. typedef union {
  764. uint32_t v;
  765. struct
  766. {
  767. uint32_t smpl_mode : 16; // [15:0]
  768. uint32_t __31_16 : 16; // [31:16]
  769. } b;
  770. } REG_PMIC_RTC_ANA_SMPL_CTRL0_T;
  771. // rtc_rst0
  772. typedef union {
  773. uint32_t v;
  774. struct
  775. {
  776. uint32_t rtc_clk_flag_set : 16; // [15:0]
  777. uint32_t __31_16 : 16; // [31:16]
  778. } b;
  779. } REG_PMIC_RTC_ANA_RTC_RST0_T;
  780. // rtc_rst1
  781. typedef union {
  782. uint32_t v;
  783. struct
  784. {
  785. uint32_t rtc_clk_flag_clr : 16; // [15:0]
  786. uint32_t __31_16 : 16; // [31:16]
  787. } b;
  788. } REG_PMIC_RTC_ANA_RTC_RST1_T;
  789. // rtc_rst2
  790. typedef union {
  791. uint32_t v;
  792. struct
  793. {
  794. uint32_t rtc_clk_flag_rtc : 16; // [15:0], read only
  795. uint32_t __31_16 : 16; // [31:16]
  796. } b;
  797. } REG_PMIC_RTC_ANA_RTC_RST2_T;
  798. // rtc_clk_stop
  799. typedef union {
  800. uint32_t v;
  801. struct
  802. {
  803. uint32_t rtc_clk_stop_threshold : 7; // [6:0]
  804. uint32_t rtc_clk_stop_flag : 1; // [7], read only
  805. uint32_t __31_8 : 24; // [31:8]
  806. } b;
  807. } REG_PMIC_RTC_ANA_RTC_CLK_STOP_T;
  808. // vbat_drop_cnt
  809. typedef union {
  810. uint32_t v;
  811. struct
  812. {
  813. uint32_t vbat_drop_cnt : 12; // [11:0], read only
  814. uint32_t __31_12 : 20; // [31:12]
  815. } b;
  816. } REG_PMIC_RTC_ANA_VBAT_DROP_CNT_T;
  817. // mixed_ctrl
  818. typedef union {
  819. uint32_t v;
  820. struct
  821. {
  822. uint32_t int_debug_en : 1; // [0]
  823. uint32_t all_int_deb : 1; // [1]
  824. uint32_t gpi_debug_en : 1; // [2]
  825. uint32_t all_gpi_deb : 1; // [3]
  826. uint32_t __4_4 : 1; // [4]
  827. uint32_t vbat_ok : 1; // [5], read only
  828. uint32_t __7_6 : 2; // [7:6]
  829. uint32_t batdet_ok : 1; // [8], read only
  830. uint32_t __14_9 : 6; // [14:9]
  831. uint32_t ad_buadet : 1; // [15], read only
  832. uint32_t __31_16 : 16; // [31:16]
  833. } b;
  834. } REG_PMIC_RTC_ANA_MIXED_CTRL_T;
  835. // por_off_flag
  836. typedef union {
  837. uint32_t v;
  838. struct
  839. {
  840. uint32_t __1_0 : 2; // [1:0]
  841. uint32_t otp_chip_pd_flag_clr : 1; // [2], write clear
  842. uint32_t otp_chip_pd_flag : 1; // [3], read only
  843. uint32_t hw_chip_pd_flag_clr : 1; // [4], write clear
  844. uint32_t hw_chip_pd_flag : 1; // [5], read only
  845. uint32_t sw_chip_pd_flag_clr : 1; // [6], write clear
  846. uint32_t sw_chip_pd_flag : 1; // [7], read only
  847. uint32_t hard_7s_chip_pd_flag_clr : 1; // [8], write clear
  848. uint32_t hard_7s_chip_pd_flag : 1; // [9], read only
  849. uint32_t uvlo_chip_pd_flag_clr : 1; // [10], write clear
  850. uint32_t uvlo_chip_pd_flag : 1; // [11], read only
  851. uint32_t por_chip_pd_flag_clr : 1; // [12], write clear
  852. uint32_t por_chip_pd_flag : 1; // [13], read only
  853. uint32_t __31_14 : 18; // [31:14]
  854. } b;
  855. } REG_PMIC_RTC_ANA_POR_OFF_FLAG_T;
  856. // swrst_ctrl0
  857. typedef union {
  858. uint32_t v;
  859. struct
  860. {
  861. uint32_t sw_rst_pd_threshold : 4; // [3:0]
  862. uint32_t reg_rst_en : 1; // [4]
  863. uint32_t __6_5 : 2; // [6:5]
  864. uint32_t wdg_rst_pd_en : 1; // [7]
  865. uint32_t reg_rst_pd_en : 1; // [8]
  866. uint32_t pb_7s_rst_pd_en : 1; // [9]
  867. uint32_t ext_rstn_pd_en : 1; // [10]
  868. uint32_t __31_11 : 21; // [31:11]
  869. } b;
  870. } REG_PMIC_RTC_ANA_SWRST_CTRL0_T;
  871. // swrst_ctrl1
  872. typedef union {
  873. uint32_t v;
  874. struct
  875. {
  876. uint32_t __1_0 : 2; // [1:0]
  877. uint32_t sw_rst_vio33_pd_en : 1; // [2]
  878. uint32_t sw_rst_usb_pd_en : 1; // [3]
  879. uint32_t sw_rst_rf15_pd_en : 1; // [4]
  880. uint32_t sw_rst_ana_pd_en : 1; // [5]
  881. uint32_t sw_rst_rf12_pd_en : 1; // [6]
  882. uint32_t sw_rst_dcxo_pd_en : 1; // [7]
  883. uint32_t sw_rst_mem_pd_en : 1; // [8]
  884. uint32_t sw_rst_dcdccore_pd_en : 1; // [9]
  885. uint32_t sw_rst_dcdcgen_pd_en : 1; // [10]
  886. uint32_t __13_11 : 3; // [13:11]
  887. uint32_t sw_rst_vio18_pd_en : 1; // [14]
  888. uint32_t sw_rst_spimem_pd_en : 1; // [15]
  889. uint32_t __31_16 : 16; // [31:16]
  890. } b;
  891. } REG_PMIC_RTC_ANA_SWRST_CTRL1_T;
  892. // free_timer_low
  893. typedef union {
  894. uint32_t v;
  895. struct
  896. {
  897. uint32_t timer_low : 16; // [15:0], read only
  898. uint32_t __31_16 : 16; // [31:16]
  899. } b;
  900. } REG_PMIC_RTC_ANA_FREE_TIMER_LOW_T;
  901. // free_timer_high
  902. typedef union {
  903. uint32_t v;
  904. struct
  905. {
  906. uint32_t timer_high : 16; // [15:0], read only
  907. uint32_t __31_16 : 16; // [31:16]
  908. } b;
  909. } REG_PMIC_RTC_ANA_FREE_TIMER_HIGH_T;
  910. // reserved_reg1
  911. typedef union {
  912. uint32_t v;
  913. struct
  914. {
  915. uint32_t pm1_dvdd_en : 1; // [0]
  916. uint32_t pm1_osw_3m_en : 1; // [1]
  917. uint32_t pm1_bg_pd_en : 1; // [2]
  918. uint32_t pm1_power_det_en : 1; // [3]
  919. uint32_t uvlo_dbnc_en : 1; // [4]
  920. uint32_t ovlo_dbnc_en : 1; // [5]
  921. uint32_t pm1_ldo_mem_powersel : 1; // [6]
  922. uint32_t __7_7 : 1; // [7]
  923. uint32_t pm2_dcdc_core_slp_step_vol : 5; // [12:8]
  924. uint32_t __31_13 : 19; // [31:13]
  925. } b;
  926. } REG_PMIC_RTC_ANA_RESERVED_REG1_T;
  927. // reserved_reg2
  928. typedef union {
  929. uint32_t v;
  930. struct
  931. {
  932. uint32_t ulp_cycle_sel0 : 4; // [3:0]
  933. uint32_t ulp_cycle_sel1 : 4; // [7:4]
  934. uint32_t pm1_sleep_dly1 : 4; // [11:8]
  935. uint32_t pm1_sleep_dly2 : 4; // [15:12]
  936. uint32_t __31_16 : 16; // [31:16]
  937. } b;
  938. } REG_PMIC_RTC_ANA_RESERVED_REG2_T;
  939. // reserved_reg3
  940. typedef union {
  941. uint32_t v;
  942. struct
  943. {
  944. uint32_t uvlo_dbnc_time : 8; // [7:0]
  945. uint32_t ovlo_dbnc_time : 8; // [15:8]
  946. uint32_t __31_16 : 16; // [31:16]
  947. } b;
  948. } REG_PMIC_RTC_ANA_RESERVED_REG3_T;
  949. // reserved_reg4
  950. typedef union {
  951. uint32_t v;
  952. struct
  953. {
  954. uint32_t pm2_sleep_dly1 : 8; // [7:0]
  955. uint32_t pm2_sleep_dly2 : 8; // [15:8]
  956. uint32_t __31_16 : 16; // [31:16]
  957. } b;
  958. } REG_PMIC_RTC_ANA_RESERVED_REG4_T;
  959. // reserved_reg5
  960. typedef union {
  961. uint32_t v;
  962. struct
  963. {
  964. uint32_t pm2_ldomem_pd_en : 1; // [0]
  965. uint32_t pm2_ldousb_pd_en : 1; // [1]
  966. uint32_t pm2_ldomem_lp_en : 1; // [2]
  967. uint32_t pm2_ldousb_lp_en : 1; // [3]
  968. uint32_t pm2_dvdd_en : 1; // [4]
  969. uint32_t pm2_osw_3m_en : 1; // [5]
  970. uint32_t pm2_slp_bg_pd_en : 1; // [6]
  971. uint32_t pm2_power_det_en : 1; // [7]
  972. uint32_t pm2_dcdc_core_slp_step_num : 4; // [11:8]
  973. uint32_t pm2_dcdc_core_slp_step_delay : 2; // [13:12]
  974. uint32_t pm2_ldocp_pd_en : 1; // [14]
  975. uint32_t __31_15 : 17; // [31:15]
  976. } b;
  977. } REG_PMIC_RTC_ANA_RESERVED_REG5_T;
  978. // reserved_reg6
  979. typedef union {
  980. uint32_t v;
  981. struct
  982. {
  983. uint32_t pm2_en : 1; // [0]
  984. uint32_t __31_1 : 31; // [31:1]
  985. } b;
  986. } REG_PMIC_RTC_ANA_RESERVED_REG6_T;
  987. // pwr_wr_prot_value
  988. typedef union {
  989. uint32_t v;
  990. struct
  991. {
  992. uint32_t pwr_wr_prot_value : 15; // [14:0]
  993. uint32_t pwr_wr_prot : 1; // [15], read only
  994. uint32_t __31_16 : 16; // [31:16]
  995. } b;
  996. } REG_PMIC_RTC_ANA_PWR_WR_PROT_VALUE_T;
  997. // vol_tune_ctrl_core
  998. typedef union {
  999. uint32_t v;
  1000. struct
  1001. {
  1002. uint32_t core_vol_tune_en : 1; // [0]
  1003. uint32_t core_vol_tune_flag : 1; // [1], read only
  1004. uint32_t core_vol_tune_start : 1; // [2], write clear
  1005. uint32_t core_step_vol : 5; // [7:3]
  1006. uint32_t core_step_num : 4; // [11:8]
  1007. uint32_t core_step_delay : 2; // [13:12]
  1008. uint32_t core_clk_sel : 1; // [14]
  1009. uint32_t __31_15 : 17; // [31:15]
  1010. } b;
  1011. } REG_PMIC_RTC_ANA_VOL_TUNE_CTRL_CORE_T;
  1012. // smpl_ctrl1
  1013. typedef union {
  1014. uint32_t v;
  1015. struct
  1016. {
  1017. uint32_t smpl_en : 1; // [0], read only
  1018. uint32_t __10_1 : 10; // [10:1]
  1019. uint32_t smpl_pwr_on_set : 1; // [11], read only
  1020. uint32_t smpl_mode_wr_ack_flag_clr : 1; // [12], write clear
  1021. uint32_t smpl_pwr_on_flag_clr : 1; // [13], write clear
  1022. uint32_t smpl_mode_wr_ack_flag : 1; // [14], read only
  1023. uint32_t smpl_pwr_on_flag : 1; // [15], read only
  1024. uint32_t __31_16 : 16; // [31:16]
  1025. } b;
  1026. } REG_PMIC_RTC_ANA_SMPL_CTRL1_T;
  1027. // module_en0
  1028. #define PMIC_RTC_ANA_RTC_EN (1 << 1)
  1029. #define PMIC_RTC_ANA_WDG_EN (1 << 2)
  1030. #define PMIC_RTC_ANA_EIC_EN (1 << 3)
  1031. #define PMIC_RTC_ANA_PSM_TOPA_EN (1 << 4)
  1032. #define PMIC_RTC_ANA_RTC_TOPA_EN (1 << 7)
  1033. #define PMIC_RTC_ANA_IOMUX_EN (1 << 8)
  1034. // dig_clk_en0
  1035. #define PMIC_RTC_ANA_CLK_WDG_SEL (1 << 0)
  1036. // rtc_clk_en0
  1037. #define PMIC_RTC_ANA_RTC_ARCH_EN (1 << 0)
  1038. #define PMIC_RTC_ANA_RTC_RTC_EN (1 << 1)
  1039. #define PMIC_RTC_ANA_RTC_WDG_EN (1 << 2)
  1040. #define PMIC_RTC_ANA_RTC_EIC_EN (1 << 3)
  1041. #define PMIC_RTC_ANA_RTC_EFS_EN (1 << 11)
  1042. // soft_rst0
  1043. #define PMIC_RTC_ANA_RTC_SOFT_RST (1 << 1)
  1044. #define PMIC_RTC_ANA_WDG_SOFT_RST (1 << 2)
  1045. #define PMIC_RTC_ANA_EIC_SOFT_RST (1 << 3)
  1046. // vbat_ctrl1
  1047. #define PMIC_RTC_ANA_DA_LDO_VBAT_REFTRIM(n) (((n)&0x1f) << 0)
  1048. #define PMIC_RTC_ANA_DA_LDO_VBAT_REFTRIM_ULP(n) (((n)&0x1f) << 8)
  1049. // ldo_vgen_ctrl3
  1050. #define PMIC_RTC_ANA_DA_LDO_VGEN_REFTRIM(n) (((n)&0x1f) << 0)
  1051. // dcdc_ctrl1
  1052. #define PMIC_RTC_ANA_DA_DCDC_OSC3M_FREQ(n) (((n)&0x1f) << 5)
  1053. #define PMIC_RTC_ANA_DA_DCDC_OSC3M_EN (1 << 10)
  1054. // pm2_pd_en
  1055. #define PMIC_RTC_ANA_PM2_LDOVIO18_PD_EN (1 << 0)
  1056. #define PMIC_RTC_ANA_PM2_LDOVIO33_PD_EN (1 << 1)
  1057. #define PMIC_RTC_ANA_PM2_LDODCXO_PD_EN (1 << 2)
  1058. #define PMIC_RTC_ANA_PM2_LDOLP18_PD_EN (1 << 3)
  1059. #define PMIC_RTC_ANA_PM2_DCDCGEN_PD_EN (1 << 4)
  1060. #define PMIC_RTC_ANA_PM2_DCDCCORE_PD_EN (1 << 5)
  1061. #define PMIC_RTC_ANA_PM2_LDOVIO18_LP_EN (1 << 6)
  1062. #define PMIC_RTC_ANA_PM2_LDOVIO33_LP_EN (1 << 7)
  1063. #define PMIC_RTC_ANA_PM2_LDODCXO_LP_EN (1 << 8)
  1064. #define PMIC_RTC_ANA_PM2_LDOLP18_LP_EN (1 << 9)
  1065. #define PMIC_RTC_ANA_PM2_DCDCGEN_LP_EN (1 << 10)
  1066. #define PMIC_RTC_ANA_PM2_DCDCCORE_LP_EN (1 << 11)
  1067. #define PMIC_RTC_ANA_PM2_LDOLP18_ULP_EN (1 << 12)
  1068. #define PMIC_RTC_ANA_PM2_LDOVIO33_ULP_EN (1 << 13)
  1069. #define PMIC_RTC_ANA_PM2_DCDC_CORE_ULP_EN (1 << 14)
  1070. // vgen_ctrl1
  1071. #define PMIC_RTC_ANA_RG_VGEN_VOSEL(n) (((n)&0xff) << 0)
  1072. // chgr_status
  1073. #define PMIC_RTC_ANA_DCP_SWITCH_EN (1 << 1)
  1074. #define PMIC_RTC_ANA_CHGR_INT_EN (1 << 13)
  1075. // power_pd_sw0
  1076. #define PMIC_RTC_ANA_BG_PD (1 << 0)
  1077. #define PMIC_RTC_ANA_DA_LDO_MMC_PD (1 << 1)
  1078. #define PMIC_RTC_ANA_DA_VCORE_PD (1 << 2)
  1079. #define PMIC_RTC_ANA_DA_VRF_PD (1 << 3)
  1080. #define PMIC_RTC_ANA_DA_VGEN_PD (1 << 4)
  1081. #define PMIC_RTC_ANA_DA_LDO_VIO18_PD (1 << 5)
  1082. #define PMIC_RTC_ANA_DA_LDO_MEM_PD (1 << 6)
  1083. #define PMIC_RTC_ANA_DA_LDO_DCXO_PD (1 << 7)
  1084. #define PMIC_RTC_ANA_LDO_CP_PD (1 << 8)
  1085. #define PMIC_RTC_ANA_LDO_EMM_PD (1 << 9)
  1086. #define PMIC_RTC_ANA_DA_LDO_VIO33_PD (1 << 10)
  1087. #define PMIC_RTC_ANA_DA_LDO_LP18_PD (1 << 11)
  1088. #define PMIC_RTC_ANA_DA_LDO_RF12_PD (1 << 12)
  1089. #define PMIC_RTC_ANA_DA_LDO_ANA_PD (1 << 13)
  1090. #define PMIC_RTC_ANA_DA_LDO_USB33_PD (1 << 14)
  1091. #define PMIC_RTC_ANA_DA_LDO_SPIMEM_PD (1 << 15)
  1092. // power_pd_hw
  1093. #define PMIC_RTC_ANA_PWR_OFF_SEQ_EN (1 << 0)
  1094. // soft_rst_hw
  1095. #define PMIC_RTC_ANA_REG_SOFT_RST_SW (1 << 0)
  1096. // xtal_rc_ctrl
  1097. #define PMIC_RTC_ANA_RG_XTAL32K_FINE(n) (((n)&0x7) << 0)
  1098. #define PMIC_RTC_ANA_RG_XTAL32K_COARSE(n) (((n)&0x7) << 3)
  1099. #define PMIC_RTC_ANA_RG_XTAL32K_PU (1 << 6)
  1100. #define PMIC_RTC_ANA_RG_RC64K_PU (1 << 7)
  1101. // rtc_ctrl
  1102. #define PMIC_RTC_ANA_DA_RTCBG_TRIM(n) (((n)&0x1f) << 0)
  1103. #define PMIC_RTC_ANA_RG_VBATBK_VOSEL(n) (((n)&0x7) << 5)
  1104. #define PMIC_RTC_ANA_RG_RTC_VOSEL(n) (((n)&0x7) << 8)
  1105. // rg_rtc_reserved1
  1106. #define PMIC_RTC_ANA_RG_RTC_RESERVED1(n) (((n)&0xff) << 0)
  1107. #define PMIC_RTC_ANA_RG_RTC_RESERVED0(n) (((n)&0xff) << 8)
  1108. // dvdd_ctrl
  1109. #define PMIC_RTC_ANA_DA_DVDD_PD (1 << 0)
  1110. #define PMIC_RTC_ANA_DA_DVDD_ISO (1 << 1)
  1111. #define PMIC_RTC_ANA_DA_PSM_VREF_PD (1 << 2)
  1112. // powon_ctrl
  1113. #define PMIC_RTC_ANA_RG_UVLO_EN (1 << 0)
  1114. #define PMIC_RTC_ANA_RG_VBATLOW_EN (1 << 1)
  1115. #define PMIC_RTC_ANA_DA_POWERDET_EN (1 << 2)
  1116. #define PMIC_RTC_ANA_RG_PBINT_PULLH_ENB (1 << 3)
  1117. #define PMIC_RTC_ANA_RG_BUADET_EN (1 << 4)
  1118. #define PMIC_RTC_ANA_RG_VBAT_CRASH_V(n) (((n)&0x3) << 5)
  1119. #define PMIC_RTC_ANA_RG_UVLO_V(n) (((n)&0x3) << 7)
  1120. #define PMIC_RTC_ANA_RG_OVLO_V(n) (((n)&0x3) << 9)
  1121. #define PMIC_RTC_ANA_RG_OVLO_T(n) (((n)&0x3) << 11)
  1122. #define PMIC_RTC_ANA_RG_OVLO_EN (1 << 13)
  1123. #define PMIC_RTC_ANA_RG_BATON_T(n) (((n)&0x3) << 14)
  1124. // kpled_ctrl0
  1125. #define PMIC_RTC_ANA_RG_LDO_KPLED_REFTRIM(n) (((n)&0x1f) << 0)
  1126. #define PMIC_RTC_ANA_RG_LDO_KPLED_PD (1 << 5)
  1127. #define PMIC_RTC_ANA_RG_KPLED_PULLDOWN_EN (1 << 6)
  1128. #define PMIC_RTC_ANA_RG_KPLED_PD (1 << 7)
  1129. // power_pd_sw1
  1130. #define PMIC_RTC_ANA_DA_LDO_RF15_PD (1 << 3)
  1131. #define PMIC_RTC_ANA_DA_LDO_LCD_PD (1 << 8)
  1132. #define PMIC_RTC_ANA_DA_LDO_CAMD_PD (1 << 10)
  1133. #define PMIC_RTC_ANA_DA_LDO_CAMA_PD (1 << 11)
  1134. // power_lp_sw0
  1135. #define PMIC_RTC_ANA_DA_LDO_VIO33_LP_EN (1 << 0)
  1136. #define PMIC_RTC_ANA_DA_LDO_LP18_LP_EN (1 << 1)
  1137. #define PMIC_RTC_ANA_DA_LDO_RF12_LP_EN (1 << 2)
  1138. #define PMIC_RTC_ANA_DA_LDO_RF15_LP_EN (1 << 3)
  1139. #define PMIC_RTC_ANA_DA_LDO_SPIMEM_LP_EN (1 << 4)
  1140. #define PMIC_RTC_ANA_DA_LDO_MEM_LP_EN (1 << 5)
  1141. #define PMIC_RTC_ANA_DA_LDO_ANA_LP_EN (1 << 6)
  1142. #define PMIC_RTC_ANA_DA_LDO_VIO18_LP_EN (1 << 7)
  1143. #define PMIC_RTC_ANA_DA_LDO_LCD_LP_EN (1 << 8)
  1144. #define PMIC_RTC_ANA_DA_LDO_MMC_LP_EN (1 << 9)
  1145. #define PMIC_RTC_ANA_DA_LDO_CAMD_LP_EN (1 << 10)
  1146. #define PMIC_RTC_ANA_DA_LDO_CAMA_LP_EN (1 << 11)
  1147. #define PMIC_RTC_ANA_DA_LDO_DCXO_LP_EN (1 << 12)
  1148. #define PMIC_RTC_ANA_DA_LDO_USB33_LP_EN (1 << 13)
  1149. // ldo_vosel1
  1150. #define PMIC_RTC_ANA_RG_LDO_DCXO_VOSEL(n) (((n)&0x3f) << 0)
  1151. // slp_ldo_ulp_ctrl
  1152. #define PMIC_RTC_ANA_PM1_LDO_LP18_ULP_EN (1 << 0)
  1153. #define PMIC_RTC_ANA_PM1_LDO_VIO33_ULP_EN (1 << 1)
  1154. #define PMIC_RTC_ANA_PM1_DCDC_CORE_ULP_EN (1 << 2)
  1155. // ldo_vgen_ctrl
  1156. #define PMIC_RTC_ANA_RG_LDO_VGEN_AUXCAL_SEL(n) (((n)&0x7) << 0)
  1157. // ldo_lp18_vio33_ulp_en
  1158. #define PMIC_RTC_ANA_DA_LDO_LP18_ULP_EN (1 << 0)
  1159. #define PMIC_RTC_ANA_DA_LDO_VIO33_ULP_EN (1 << 1)
  1160. // vcore_ctrl0
  1161. #define PMIC_RTC_ANA_DA_VCORE_VOSEL(n) (((n)&0x1ff) << 0)
  1162. // vcore_ctrl1
  1163. #define PMIC_RTC_ANA_DA_VCORE_VOTRIM_LP(n) (((n)&0x1f) << 0)
  1164. #define PMIC_RTC_ANA_DA_VCORE_VOTRIM(n) (((n)&0x1f) << 5)
  1165. #define PMIC_RTC_ANA_DA_VCORE_ULP_RET (1 << 12)
  1166. #define PMIC_RTC_ANA_DA_VCORE_ULP_EN (1 << 13)
  1167. #define PMIC_RTC_ANA_RG_VCORE_LP_EN (1 << 14)
  1168. // vrf_ctrl2
  1169. #define PMIC_RTC_ANA_DA_VRF_VOTRIM(n) (((n)&0x1f) << 0)
  1170. #define PMIC_RTC_ANA_DA_VRF_LP_EN (1 << 5)
  1171. // vrf_ctrl3
  1172. #define PMIC_RTC_ANA_RG_VRF_VOSEL(n) (((n)&0x1ff) << 0)
  1173. // vgen_ctrl0
  1174. #define PMIC_RTC_ANA_DA_VGEN_VOTRIM(n) (((n)&0x1f) << 0)
  1175. #define PMIC_RTC_ANA_DA_VGEN_LP_EN (1 << 5)
  1176. #define PMIC_RTC_ANA_PM2_LDO_MEM_POWERSEL (1 << 8)
  1177. #define PMIC_RTC_ANA_SLP_LDO_MEM_POWERSEL_EN (1 << 9)
  1178. // chgr_ctrl0
  1179. #define PMIC_RTC_ANA_CHGR_CV_V(n) (((n)&0x3f) << 0)
  1180. #define PMIC_RTC_ANA_CHGR_DPM(n) (((n)&0x3) << 6)
  1181. #define PMIC_RTC_ANA_CHGR_EXPOWER_DEVICE (1 << 8)
  1182. #define PMIC_RTC_ANA_CHGR_PTEST (1 << 9)
  1183. #define PMIC_RTC_ANA_CHGR_PD (1 << 10)
  1184. // chgr_det_ctrl0
  1185. #define PMIC_RTC_ANA_CHG_INT_DELAY(n) (((n)&0x7) << 0)
  1186. #define PMIC_RTC_ANA_RG_DP_DM_AUX_EN (1 << 4)
  1187. #define PMIC_RTC_ANA_DP_DM_BC_ENB (1 << 5)
  1188. // slp_ldo_pd_ctrl0
  1189. #define PMIC_RTC_ANA_SLP_LDOCAMA_PD_EN (1 << 2)
  1190. #define PMIC_RTC_ANA_SLP_LDOCAMD_PD_EN (1 << 3)
  1191. #define PMIC_RTC_ANA_SLP_LDOLCD_PD_EN (1 << 4)
  1192. #define PMIC_RTC_ANA_SLP_LDOMMC_PD_EN (1 << 5)
  1193. #define PMIC_RTC_ANA_SLP_LDOKPLED_PD_EN (1 << 6)
  1194. #define PMIC_RTC_ANA_PM1_LDOUSB_PD_EN (1 << 7)
  1195. #define PMIC_RTC_ANA_SLP_LDOSPIMEM_PD_EN (1 << 8)
  1196. #define PMIC_RTC_ANA_SLP_LDORF15_PD_EN (1 << 9)
  1197. #define PMIC_RTC_ANA_PM1_LDOVIO33_PD_EN (1 << 10)
  1198. #define PMIC_RTC_ANA_PM1_LDODCXO_PD_EN (1 << 11)
  1199. #define PMIC_RTC_ANA_PM1_LDOLP18_PD_EN (1 << 12)
  1200. #define PMIC_RTC_ANA_SLP_LDORF12_PD_EN (1 << 13)
  1201. #define PMIC_RTC_ANA_SLP_LDOANA_PD_EN (1 << 14)
  1202. #define PMIC_RTC_ANA_PM1_LDOVIO18_PD_EN (1 << 15)
  1203. // slp_ldo_pd_ctrl1
  1204. #define PMIC_RTC_ANA_PM1_LDOMEM_PD_EN (1 << 0)
  1205. #define PMIC_RTC_ANA_LDO_XTL_EN (1 << 1)
  1206. #define PMIC_RTC_ANA_SLP_IO_EN (1 << 2)
  1207. #define PMIC_RTC_ANA_SLP_LDO_PD_EN (1 << 3)
  1208. #define PMIC_RTC_ANA_PM1_LDOCP_PD_EN (1 << 4)
  1209. // slp_dcdc_pd_ctrl
  1210. #define PMIC_RTC_ANA_PM1_DCDCGEN_PD_EN (1 << 0)
  1211. #define PMIC_RTC_ANA_SLP_DCDCVRF_PD_EN (1 << 1)
  1212. #define PMIC_RTC_ANA_SLP_DCDCCORE_DROP_EN (1 << 3)
  1213. #define PMIC_RTC_ANA_SLP_DCDCCORE_PU_RSTN_TH(n) (((n)&0x3f) << 6)
  1214. #define PMIC_RTC_ANA_SLP_DCDCCORE_PD_RSTN_TH(n) (((n)&0xf) << 12)
  1215. // dcdc_core_slp_ctrl0
  1216. #define PMIC_RTC_ANA_DCDC_CORE_SLP_STEP_EN (1 << 0)
  1217. #define PMIC_RTC_ANA_PM1_DCDCCORE_PD_EN (1 << 1)
  1218. #define PMIC_RTC_ANA_PM1_DCDC_CORE_SLP_STEP_VOL(n) (((n)&0x1f) << 3)
  1219. #define PMIC_RTC_ANA_PM1_DCDC_CORE_SLP_STEP_NUM(n) (((n)&0xf) << 8)
  1220. #define PMIC_RTC_ANA_PM1_DCDC_CORE_SLP_STEP_DELAY(n) (((n)&0x3) << 12)
  1221. // dcdc_core_slp_ctrl1
  1222. #define PMIC_RTC_ANA_PM1_DCDC_CORE_VOSEL_DS_SW(n) (((n)&0x1ff) << 0)
  1223. // slp_dcdc_lp_ctrl
  1224. #define PMIC_RTC_ANA_PM1_DCDCGEN_LP_EN (1 << 1)
  1225. #define PMIC_RTC_ANA_SLP_DCDCVRF_LP_EN (1 << 2)
  1226. #define PMIC_RTC_ANA_PM1_DCDCCORE_LP_EN (1 << 4)
  1227. // slp_ldo_lp_ctrl0
  1228. #define PMIC_RTC_ANA_SLP_LDOCAMA_LP_EN (1 << 2)
  1229. #define PMIC_RTC_ANA_SLP_LDOCAMD_LP_EN (1 << 3)
  1230. #define PMIC_RTC_ANA_SLP_LDOLCD_LP_EN (1 << 4)
  1231. #define PMIC_RTC_ANA_PM1_LDOUSB_LP_EN (1 << 6)
  1232. #define PMIC_RTC_ANA_SLP_LDOMMC_LP_EN (1 << 7)
  1233. #define PMIC_RTC_ANA_SLP_LDOSPIMEM_LP_EN (1 << 8)
  1234. #define PMIC_RTC_ANA_SLP_LDOANA_LP_EN (1 << 9)
  1235. #define PMIC_RTC_ANA_PM1_LDOVIO18_LP_EN (1 << 10)
  1236. #define PMIC_RTC_ANA_PM1_LDODCXO_LP_EN (1 << 11)
  1237. #define PMIC_RTC_ANA_PM1_LDOVIO33_LP_EN (1 << 12)
  1238. #define PMIC_RTC_ANA_SLP_LDORF12_LP_EN (1 << 13)
  1239. #define PMIC_RTC_ANA_SLP_LDORF15_LP_EN (1 << 14)
  1240. // slp_ldo_lp_ctrl1
  1241. #define PMIC_RTC_ANA_PM1_LDOMEM_LP_EN (1 << 0)
  1242. #define PMIC_RTC_ANA_PM1_LDOLP18_LP_EN (1 << 3)
  1243. #define PMIC_RTC_ANA_PM2_DCDC_CORE_VOSEL_DS_SW(n) (((n)&0x1ff) << 7)
  1244. // reserved_reg_rtc
  1245. #define PMIC_RTC_ANA_RESERVED_RTC(n) (((n)&0xffff) << 0)
  1246. // dcdc_vlg_sel
  1247. #define PMIC_RTC_ANA_DCDC_CORE_NOR_SW_SEL (1 << 0)
  1248. #define PMIC_RTC_ANA_DCDC_CORE_SLP_SW_SEL (1 << 1)
  1249. #define PMIC_RTC_ANA_DCDC_CORE_VOTRIM_SW_SEL (1 << 2)
  1250. #define PMIC_RTC_ANA_DCDC_GEN_SW_SEL (1 << 3)
  1251. // ldo_vlg_sel0
  1252. #define PMIC_RTC_ANA_LDO_VCORE_VOTRIM_SW_SEL (1 << 0)
  1253. #define PMIC_RTC_ANA_LDO_VCORE_VOTRIM_ULP_SW_SEL (1 << 1)
  1254. #define PMIC_RTC_ANA_VGEN_VOTRIM_SW_SEL (1 << 2)
  1255. #define PMIC_RTC_ANA_VRF_VOTRIM_SW_SEL (1 << 4)
  1256. #define PMIC_RTC_ANA_RTCBG_TRIM_SW_SEL (1 << 5)
  1257. #define PMIC_RTC_ANA_DCDC_OSC3M_FREQ_SW_SEL (1 << 6)
  1258. #define PMIC_RTC_ANA_VBAT_REFTRIM_SW_SEL (1 << 7)
  1259. #define PMIC_RTC_ANA_VBAT_REFTRIM_ULP_SW_SEL (1 << 8)
  1260. #define PMIC_RTC_ANA_VGEN_REFTRIM_SW_SEL (1 << 9)
  1261. // clk32kless_ctrl0
  1262. #define PMIC_RTC_ANA_RC_32K_EN (1 << 0)
  1263. #define PMIC_RTC_ANA_RC_32K_SEL (1 << 1)
  1264. #define PMIC_RTC_ANA_RTC_MODE (1 << 4)
  1265. #define PMIC_RTC_ANA_LDO_DCXO_LP_EN_RTCCLR (1 << 6)
  1266. #define PMIC_RTC_ANA_LDO_DCXO_LP_EN_RTCSET (1 << 7)
  1267. #define PMIC_RTC_ANA_RC_MODE_WR_ACK_FLAG_CLR (1 << 10)
  1268. #define PMIC_RTC_ANA_RC_MODE_WR_ACK_FLAG (1 << 14)
  1269. // clk32kless_ctrl1
  1270. #define PMIC_RTC_ANA_RC_MODE(n) (((n)&0xffff) << 0)
  1271. // por_rst_monitor
  1272. #define PMIC_RTC_ANA_POR_RST_MONITOR(n) (((n)&0xffff) << 0)
  1273. // wdg_rst_monitor
  1274. #define PMIC_RTC_ANA_WDG_RST_MONITOR(n) (((n)&0xffff) << 0)
  1275. // por_pin_rst_monitor
  1276. #define PMIC_RTC_ANA_POR_PIN_RST_MONITOR(n) (((n)&0xffff) << 0)
  1277. // por_src_flag
  1278. #define PMIC_RTC_ANA_POR_SRC_FLAG(n) (((n)&0x3fff) << 0)
  1279. #define PMIC_RTC_ANA_REG_SOFT_RST_FLAG_CLR (1 << 14)
  1280. #define PMIC_RTC_ANA_POR_SW_FORCE_ON (1 << 15)
  1281. // por_7s_ctrl
  1282. #define PMIC_RTC_ANA_PBINT_7S_RST_MODE (1 << 0)
  1283. #define PMIC_RTC_ANA_PBINT_7S_RST_DISABLE (1 << 1)
  1284. #define PMIC_RTC_ANA_PBINT_7S_AUTO_ON_EN (1 << 2)
  1285. #define PMIC_RTC_ANA_EXT_RSTN_MODE (1 << 3)
  1286. #define PMIC_RTC_ANA_PBINT_7S_RST_THRESHOLD(n) (((n)&0xf) << 4)
  1287. #define PMIC_RTC_ANA_PBINT_7S_RST_SWMODE (1 << 8)
  1288. #define PMIC_RTC_ANA_KEY2_7S_RST_EN (1 << 9)
  1289. #define PMIC_RTC_ANA_PBINT_FLAG_CLR (1 << 11)
  1290. #define PMIC_RTC_ANA_CHGR_INT_FLAG_CLR (1 << 13)
  1291. #define PMIC_RTC_ANA_EXT_RSTN_FLAG_CLR (1 << 14)
  1292. #define PMIC_RTC_ANA_PBINT_7S_FLAG_CLR (1 << 15)
  1293. // hwrst_rtc
  1294. #define PMIC_RTC_ANA_HWRST_RTC_REG_SET(n) (((n)&0xff) << 0)
  1295. #define PMIC_RTC_ANA_HWRST_RTC_REG_STS(n) (((n)&0xff) << 8)
  1296. // smpl_ctrl0
  1297. #define PMIC_RTC_ANA_SMPL_MODE(n) (((n)&0xffff) << 0)
  1298. // rtc_rst0
  1299. #define PMIC_RTC_ANA_RTC_CLK_FLAG_SET(n) (((n)&0xffff) << 0)
  1300. // rtc_rst1
  1301. #define PMIC_RTC_ANA_RTC_CLK_FLAG_CLR(n) (((n)&0xffff) << 0)
  1302. // rtc_rst2
  1303. #define PMIC_RTC_ANA_RTC_CLK_FLAG_RTC(n) (((n)&0xffff) << 0)
  1304. // rtc_clk_stop
  1305. #define PMIC_RTC_ANA_RTC_CLK_STOP_THRESHOLD(n) (((n)&0x7f) << 0)
  1306. #define PMIC_RTC_ANA_RTC_CLK_STOP_FLAG (1 << 7)
  1307. // vbat_drop_cnt
  1308. #define PMIC_RTC_ANA_VBAT_DROP_CNT(n) (((n)&0xfff) << 0)
  1309. // mixed_ctrl
  1310. #define PMIC_RTC_ANA_INT_DEBUG_EN (1 << 0)
  1311. #define PMIC_RTC_ANA_ALL_INT_DEB (1 << 1)
  1312. #define PMIC_RTC_ANA_GPI_DEBUG_EN (1 << 2)
  1313. #define PMIC_RTC_ANA_ALL_GPI_DEB (1 << 3)
  1314. #define PMIC_RTC_ANA_VBAT_OK (1 << 5)
  1315. #define PMIC_RTC_ANA_BATDET_OK (1 << 8)
  1316. #define PMIC_RTC_ANA_AD_BUADET (1 << 15)
  1317. // por_off_flag
  1318. #define PMIC_RTC_ANA_OTP_CHIP_PD_FLAG_CLR (1 << 2)
  1319. #define PMIC_RTC_ANA_OTP_CHIP_PD_FLAG (1 << 3)
  1320. #define PMIC_RTC_ANA_HW_CHIP_PD_FLAG_CLR (1 << 4)
  1321. #define PMIC_RTC_ANA_HW_CHIP_PD_FLAG (1 << 5)
  1322. #define PMIC_RTC_ANA_SW_CHIP_PD_FLAG_CLR (1 << 6)
  1323. #define PMIC_RTC_ANA_SW_CHIP_PD_FLAG (1 << 7)
  1324. #define PMIC_RTC_ANA_HARD_7S_CHIP_PD_FLAG_CLR (1 << 8)
  1325. #define PMIC_RTC_ANA_HARD_7S_CHIP_PD_FLAG (1 << 9)
  1326. #define PMIC_RTC_ANA_UVLO_CHIP_PD_FLAG_CLR (1 << 10)
  1327. #define PMIC_RTC_ANA_UVLO_CHIP_PD_FLAG (1 << 11)
  1328. #define PMIC_RTC_ANA_POR_CHIP_PD_FLAG_CLR (1 << 12)
  1329. #define PMIC_RTC_ANA_POR_CHIP_PD_FLAG (1 << 13)
  1330. // swrst_ctrl0
  1331. #define PMIC_RTC_ANA_SW_RST_PD_THRESHOLD(n) (((n)&0xf) << 0)
  1332. #define PMIC_RTC_ANA_REG_RST_EN (1 << 4)
  1333. #define PMIC_RTC_ANA_WDG_RST_PD_EN (1 << 7)
  1334. #define PMIC_RTC_ANA_REG_RST_PD_EN (1 << 8)
  1335. #define PMIC_RTC_ANA_PB_7S_RST_PD_EN (1 << 9)
  1336. #define PMIC_RTC_ANA_EXT_RSTN_PD_EN (1 << 10)
  1337. // swrst_ctrl1
  1338. #define PMIC_RTC_ANA_SW_RST_VIO33_PD_EN (1 << 2)
  1339. #define PMIC_RTC_ANA_SW_RST_USB_PD_EN (1 << 3)
  1340. #define PMIC_RTC_ANA_SW_RST_RF15_PD_EN (1 << 4)
  1341. #define PMIC_RTC_ANA_SW_RST_ANA_PD_EN (1 << 5)
  1342. #define PMIC_RTC_ANA_SW_RST_RF12_PD_EN (1 << 6)
  1343. #define PMIC_RTC_ANA_SW_RST_DCXO_PD_EN (1 << 7)
  1344. #define PMIC_RTC_ANA_SW_RST_MEM_PD_EN (1 << 8)
  1345. #define PMIC_RTC_ANA_SW_RST_DCDCCORE_PD_EN (1 << 9)
  1346. #define PMIC_RTC_ANA_SW_RST_DCDCGEN_PD_EN (1 << 10)
  1347. #define PMIC_RTC_ANA_SW_RST_VIO18_PD_EN (1 << 14)
  1348. #define PMIC_RTC_ANA_SW_RST_SPIMEM_PD_EN (1 << 15)
  1349. // free_timer_low
  1350. #define PMIC_RTC_ANA_TIMER_LOW(n) (((n)&0xffff) << 0)
  1351. // free_timer_high
  1352. #define PMIC_RTC_ANA_TIMER_HIGH(n) (((n)&0xffff) << 0)
  1353. // reserved_reg1
  1354. #define PMIC_RTC_ANA_PM1_DVDD_EN (1 << 0)
  1355. #define PMIC_RTC_ANA_PM1_OSW_3M_EN (1 << 1)
  1356. #define PMIC_RTC_ANA_PM1_BG_PD_EN (1 << 2)
  1357. #define PMIC_RTC_ANA_PM1_POWER_DET_EN (1 << 3)
  1358. #define PMIC_RTC_ANA_UVLO_DBNC_EN (1 << 4)
  1359. #define PMIC_RTC_ANA_OVLO_DBNC_EN (1 << 5)
  1360. #define PMIC_RTC_ANA_PM1_LDO_MEM_POWERSEL (1 << 6)
  1361. #define PMIC_RTC_ANA_PM2_DCDC_CORE_SLP_STEP_VOL(n) (((n)&0x1f) << 8)
  1362. // reserved_reg2
  1363. #define PMIC_RTC_ANA_ULP_CYCLE_SEL0(n) (((n)&0xf) << 0)
  1364. #define PMIC_RTC_ANA_ULP_CYCLE_SEL1(n) (((n)&0xf) << 4)
  1365. #define PMIC_RTC_ANA_PM1_SLEEP_DLY1(n) (((n)&0xf) << 8)
  1366. #define PMIC_RTC_ANA_PM1_SLEEP_DLY2(n) (((n)&0xf) << 12)
  1367. // reserved_reg3
  1368. #define PMIC_RTC_ANA_UVLO_DBNC_TIME(n) (((n)&0xff) << 0)
  1369. #define PMIC_RTC_ANA_OVLO_DBNC_TIME(n) (((n)&0xff) << 8)
  1370. // reserved_reg4
  1371. #define PMIC_RTC_ANA_PM2_SLEEP_DLY1(n) (((n)&0xff) << 0)
  1372. #define PMIC_RTC_ANA_PM2_SLEEP_DLY2(n) (((n)&0xff) << 8)
  1373. // reserved_reg5
  1374. #define PMIC_RTC_ANA_PM2_LDOMEM_PD_EN (1 << 0)
  1375. #define PMIC_RTC_ANA_PM2_LDOUSB_PD_EN (1 << 1)
  1376. #define PMIC_RTC_ANA_PM2_LDOMEM_LP_EN (1 << 2)
  1377. #define PMIC_RTC_ANA_PM2_LDOUSB_LP_EN (1 << 3)
  1378. #define PMIC_RTC_ANA_PM2_DVDD_EN (1 << 4)
  1379. #define PMIC_RTC_ANA_PM2_OSW_3M_EN (1 << 5)
  1380. #define PMIC_RTC_ANA_PM2_SLP_BG_PD_EN (1 << 6)
  1381. #define PMIC_RTC_ANA_PM2_POWER_DET_EN (1 << 7)
  1382. #define PMIC_RTC_ANA_PM2_DCDC_CORE_SLP_STEP_NUM(n) (((n)&0xf) << 8)
  1383. #define PMIC_RTC_ANA_PM2_DCDC_CORE_SLP_STEP_DELAY(n) (((n)&0x3) << 12)
  1384. #define PMIC_RTC_ANA_PM2_LDOCP_PD_EN (1 << 14)
  1385. // reserved_reg6
  1386. #define PMIC_RTC_ANA_PM2_EN (1 << 0)
  1387. // pwr_wr_prot_value
  1388. #define PMIC_RTC_ANA_PWR_WR_PROT_VALUE(n) (((n)&0x7fff) << 0)
  1389. #define PMIC_RTC_ANA_PWR_WR_PROT (1 << 15)
  1390. // vol_tune_ctrl_core
  1391. #define PMIC_RTC_ANA_CORE_VOL_TUNE_EN (1 << 0)
  1392. #define PMIC_RTC_ANA_CORE_VOL_TUNE_FLAG (1 << 1)
  1393. #define PMIC_RTC_ANA_CORE_VOL_TUNE_START (1 << 2)
  1394. #define PMIC_RTC_ANA_CORE_STEP_VOL(n) (((n)&0x1f) << 3)
  1395. #define PMIC_RTC_ANA_CORE_STEP_NUM(n) (((n)&0xf) << 8)
  1396. #define PMIC_RTC_ANA_CORE_STEP_DELAY(n) (((n)&0x3) << 12)
  1397. #define PMIC_RTC_ANA_CORE_CLK_SEL (1 << 14)
  1398. // smpl_ctrl1
  1399. #define PMIC_RTC_ANA_SMPL_EN (1 << 0)
  1400. #define PMIC_RTC_ANA_SMPL_PWR_ON_SET (1 << 11)
  1401. #define PMIC_RTC_ANA_SMPL_MODE_WR_ACK_FLAG_CLR (1 << 12)
  1402. #define PMIC_RTC_ANA_SMPL_PWR_ON_FLAG_CLR (1 << 13)
  1403. #define PMIC_RTC_ANA_SMPL_MODE_WR_ACK_FLAG (1 << 14)
  1404. #define PMIC_RTC_ANA_SMPL_PWR_ON_FLAG (1 << 15)
  1405. #endif // _PMIC_RTC_ANA_H_