pmic_rtc.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  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_H_
  13. #define _PMIC_RTC_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_PMIC_RTC_BASE (0x51108600)
  17. typedef volatile struct
  18. {
  19. uint32_t rtc_sec_cnt_value; // 0x00000000
  20. uint32_t rtc_min_cnt_value; // 0x00000004
  21. uint32_t rtc_hrs_cnt_value; // 0x00000008
  22. uint32_t rtc_day_cnt_value; // 0x0000000c
  23. uint32_t rtc_sec_cnt_upd; // 0x00000010
  24. uint32_t rtc_min_cnt_upd; // 0x00000014
  25. uint32_t rtc_hrs_cnt_upd; // 0x00000018
  26. uint32_t rtc_day_cnt_upd; // 0x0000001c
  27. uint32_t rtc_sec_alm_upd; // 0x00000020
  28. uint32_t rtc_min_alm_upd; // 0x00000024
  29. uint32_t rtc_hrs_alm_upd; // 0x00000028
  30. uint32_t rtc_day_alm_upd; // 0x0000002c
  31. uint32_t rtc_int_en; // 0x00000030
  32. uint32_t rtc_int_raw_sts; // 0x00000034
  33. uint32_t rtc_int_clr; // 0x00000038
  34. uint32_t rtc_int_mask_sts; // 0x0000003c
  35. uint32_t rtc_sec_alm_value; // 0x00000040
  36. uint32_t rtc_min_alm_value; // 0x00000044
  37. uint32_t rtc_hrs_alm_value; // 0x00000048
  38. uint32_t rtc_day_alm_value; // 0x0000004c
  39. uint32_t rtc_spg_value; // 0x00000050
  40. uint32_t rtc_spg_upd; // 0x00000054
  41. uint32_t rtc_pwr_flag_ctrl; // 0x00000058
  42. uint32_t rtc_pwr_flag_sts; // 0x0000005c
  43. uint32_t rtc_sec_auxalm_upd; // 0x00000060
  44. uint32_t rtc_min_auxalm_upd; // 0x00000064
  45. uint32_t rtc_hrs_auxalm_upd; // 0x00000068
  46. uint32_t rtc_day_auxalm_upd; // 0x0000006c
  47. uint32_t rtc_sec_cnt_raw; // 0x00000070
  48. uint32_t rtc_min_cnt_raw; // 0x00000074
  49. uint32_t rtc_hrs_cnt_raw; // 0x00000078
  50. uint32_t rtc_day_cnt_raw; // 0x0000007c
  51. } HWP_PMIC_RTC_T;
  52. #define hwp_pmicRtc ((HWP_PMIC_RTC_T *)REG_ACCESS_ADDRESS(REG_PMIC_RTC_BASE))
  53. // rtc_sec_cnt_value
  54. typedef union {
  55. uint32_t v;
  56. struct
  57. {
  58. uint32_t rtc_sec_cnt_value : 6; // [5:0], read only
  59. uint32_t __31_6 : 26; // [31:6]
  60. } b;
  61. } REG_PMIC_RTC_RTC_SEC_CNT_VALUE_T;
  62. // rtc_min_cnt_value
  63. typedef union {
  64. uint32_t v;
  65. struct
  66. {
  67. uint32_t rtc_min_cnt_value : 6; // [5:0], read only
  68. uint32_t __31_6 : 26; // [31:6]
  69. } b;
  70. } REG_PMIC_RTC_RTC_MIN_CNT_VALUE_T;
  71. // rtc_hrs_cnt_value
  72. typedef union {
  73. uint32_t v;
  74. struct
  75. {
  76. uint32_t rtc_hrs_cnt_value : 6; // [5:0], read only
  77. uint32_t __31_6 : 26; // [31:6]
  78. } b;
  79. } REG_PMIC_RTC_RTC_HRS_CNT_VALUE_T;
  80. // rtc_day_cnt_value
  81. typedef union {
  82. uint32_t v;
  83. struct
  84. {
  85. uint32_t rtc_day_cnt_value : 6; // [5:0], read only
  86. uint32_t __31_6 : 26; // [31:6]
  87. } b;
  88. } REG_PMIC_RTC_RTC_DAY_CNT_VALUE_T;
  89. // rtc_sec_cnt_upd
  90. typedef union {
  91. uint32_t v;
  92. struct
  93. {
  94. uint32_t rtc_sec_cnt_upd : 6; // [5:0]
  95. uint32_t __31_6 : 26; // [31:6]
  96. } b;
  97. } REG_PMIC_RTC_RTC_SEC_CNT_UPD_T;
  98. // rtc_min_cnt_upd
  99. typedef union {
  100. uint32_t v;
  101. struct
  102. {
  103. uint32_t rtc_min_cnt_upd : 6; // [5:0]
  104. uint32_t __31_6 : 26; // [31:6]
  105. } b;
  106. } REG_PMIC_RTC_RTC_MIN_CNT_UPD_T;
  107. // rtc_hrs_cnt_upd
  108. typedef union {
  109. uint32_t v;
  110. struct
  111. {
  112. uint32_t rtc_hrs_cnt_upd : 5; // [4:0]
  113. uint32_t __31_5 : 27; // [31:5]
  114. } b;
  115. } REG_PMIC_RTC_RTC_HRS_CNT_UPD_T;
  116. // rtc_day_cnt_upd
  117. typedef union {
  118. uint32_t v;
  119. struct
  120. {
  121. uint32_t rtc_day_cnt_upd : 6; // [5:0]
  122. uint32_t __31_6 : 26; // [31:6]
  123. } b;
  124. } REG_PMIC_RTC_RTC_DAY_CNT_UPD_T;
  125. // rtc_sec_alm_upd
  126. typedef union {
  127. uint32_t v;
  128. struct
  129. {
  130. uint32_t rtc_sec_alm_upd : 6; // [5:0]
  131. uint32_t __31_6 : 26; // [31:6]
  132. } b;
  133. } REG_PMIC_RTC_RTC_SEC_ALM_UPD_T;
  134. // rtc_min_alm_upd
  135. typedef union {
  136. uint32_t v;
  137. struct
  138. {
  139. uint32_t rtc_min_alm_upd : 6; // [5:0]
  140. uint32_t __31_6 : 26; // [31:6]
  141. } b;
  142. } REG_PMIC_RTC_RTC_MIN_ALM_UPD_T;
  143. // rtc_hrs_alm_upd
  144. typedef union {
  145. uint32_t v;
  146. struct
  147. {
  148. uint32_t rtc_hrs_alm_upd : 5; // [4:0]
  149. uint32_t __31_5 : 27; // [31:5]
  150. } b;
  151. } REG_PMIC_RTC_RTC_HRS_ALM_UPD_T;
  152. // rtc_day_alm_upd
  153. typedef union {
  154. uint32_t v;
  155. struct
  156. {
  157. uint32_t rtc_day_alm_upd : 6; // [5:0]
  158. uint32_t __31_6 : 26; // [31:6]
  159. } b;
  160. } REG_PMIC_RTC_RTC_DAY_ALM_UPD_T;
  161. // rtc_int_en
  162. typedef union {
  163. uint32_t v;
  164. struct
  165. {
  166. uint32_t rtc_sec_int_en : 1; // [0]
  167. uint32_t rtc_min_int_en : 1; // [1]
  168. uint32_t rtc_hrs_int_en : 1; // [2]
  169. uint32_t rtc_day_int_en : 1; // [3]
  170. uint32_t rtc_alm_int_en : 1; // [4]
  171. uint32_t rtc_hrs_format_sel : 1; // [5]
  172. uint32_t rtc_auxalm_int_en : 1; // [6]
  173. uint32_t rtc_spg_upd_int_en : 1; // [7]
  174. uint32_t rtc_sec_cnt_upd_int_en : 1; // [8]
  175. uint32_t rtc_min_cnt_upd_int_en : 1; // [9]
  176. uint32_t rtc_hrs_cnt_upd_int_en : 1; // [10]
  177. uint32_t rtc_day_cnt_upd_int_en : 1; // [11]
  178. uint32_t rtc_sec_alm_upd_int_en : 1; // [12]
  179. uint32_t rtc_min_alm_upd_int_en : 1; // [13]
  180. uint32_t rtc_hrs_alm_upd_int_en : 1; // [14]
  181. uint32_t rtc_day_alm_upd_int_en : 1; // [15]
  182. uint32_t __31_16 : 16; // [31:16]
  183. } b;
  184. } REG_PMIC_RTC_RTC_INT_EN_T;
  185. // rtc_int_raw_sts
  186. typedef union {
  187. uint32_t v;
  188. struct
  189. {
  190. uint32_t rtc_sec_int_raw_sts : 1; // [0], read only
  191. uint32_t rtc_min_int_raw_sts : 1; // [1], read only
  192. uint32_t rtc_hrs_int_raw_sts : 1; // [2], read only
  193. uint32_t rtc_day_int_raw_sts : 1; // [3], read only
  194. uint32_t rtc_alm_int_raw_sts : 1; // [4], read only
  195. uint32_t rtc_alm_int0_raw_sts : 1; // [5], read only
  196. uint32_t rtc_auxalm_int_raw_sts : 1; // [6], read only
  197. uint32_t rtc_spg_upd_int_raw_sts : 1; // [7], read only
  198. uint32_t rtc_sec_cnt_upd_int_raw_sts : 1; // [8], read only
  199. uint32_t rtc_min_cnt_upd_int_raw_sts : 1; // [9], read only
  200. uint32_t rtc_hrs_cnt_upd_int_raw_sts : 1; // [10], read only
  201. uint32_t rtc_day_cnt_upd_int_raw_sts : 1; // [11], read only
  202. uint32_t rtc_sec_alm_upd_int_raw_sts : 1; // [12], read only
  203. uint32_t rtc_min_alm_upd_int_raw_sts : 1; // [13], read only
  204. uint32_t rtc_hrs_alm_upd_int_raw_sts : 1; // [14], read only
  205. uint32_t rtc_day_alm_upd_int_raw_sts : 1; // [15], read only
  206. uint32_t __31_16 : 16; // [31:16]
  207. } b;
  208. } REG_PMIC_RTC_RTC_INT_RAW_STS_T;
  209. // rtc_int_clr
  210. typedef union {
  211. uint32_t v;
  212. struct
  213. {
  214. uint32_t rtc_sec_int_clr : 1; // [0]
  215. uint32_t rtc_min_int_clr : 1; // [1]
  216. uint32_t rtc_hrs_int_clr : 1; // [2]
  217. uint32_t rtc_day_int_clr : 1; // [3]
  218. uint32_t rtc_alm_int_clr : 1; // [4]
  219. uint32_t __5_5 : 1; // [5]
  220. uint32_t rtc_auxalm_int_clr : 1; // [6]
  221. uint32_t rtc_spg_upd_int_clr : 1; // [7]
  222. uint32_t rtc_sec_cnt_upd_int_clr : 1; // [8]
  223. uint32_t rtc_min_cnt_upd_int_clr : 1; // [9]
  224. uint32_t rtc_hrs_cnt_upd_int_clr : 1; // [10]
  225. uint32_t rtc_day_cnt_upd_int_clr : 1; // [11]
  226. uint32_t rtc_sec_alm_upd_int_clr : 1; // [12]
  227. uint32_t rtc_min_alm_upd_int_clr : 1; // [13]
  228. uint32_t rtc_hrs_alm_upd_int_clr : 1; // [14]
  229. uint32_t rtc_day_alm_upd_int_clr : 1; // [15]
  230. uint32_t __31_16 : 16; // [31:16]
  231. } b;
  232. } REG_PMIC_RTC_RTC_INT_CLR_T;
  233. // rtc_int_mask_sts
  234. typedef union {
  235. uint32_t v;
  236. struct
  237. {
  238. uint32_t rtc_sec_int_mask_sts : 1; // [0], read only
  239. uint32_t rtc_min_int_mask_sts : 1; // [1], read only
  240. uint32_t rtc_hrs_int_mask_sts : 1; // [2], read only
  241. uint32_t rtc_day_int_mask_sts : 1; // [3], read only
  242. uint32_t rtc_alm_int_mask_sts : 1; // [4], read only
  243. uint32_t __5_5 : 1; // [5]
  244. uint32_t rtc_auxalm_int_mask_sts : 1; // [6], read only
  245. uint32_t rtc_spg_upd_int_mask_sts : 1; // [7], read only
  246. uint32_t rtc_sec_cnt_upd_int_mask_sts : 1; // [8], read only
  247. uint32_t rtc_min_cnt_upd_int_mask_sts : 1; // [9], read only
  248. uint32_t rtc_hrs_cnt_upd_int_mask_sts : 1; // [10], read only
  249. uint32_t rtc_day_cnt_upd_int_mask_sts : 1; // [11], read only
  250. uint32_t rtc_sec_alm_upd_int_mask_sts : 1; // [12], read only
  251. uint32_t rtc_min_alm_upd_int_mask_sts : 1; // [13], read only
  252. uint32_t rtc_hrs_alm_upd_int_mask_sts : 1; // [14], read only
  253. uint32_t rtc_day_alm_upd_int_mask_sts : 1; // [15], read only
  254. uint32_t __31_16 : 16; // [31:16]
  255. } b;
  256. } REG_PMIC_RTC_RTC_INT_MASK_STS_T;
  257. // rtc_sec_alm_value
  258. typedef union {
  259. uint32_t v;
  260. struct
  261. {
  262. uint32_t rtc_sec_alm_value : 6; // [5:0], read only
  263. uint32_t __31_6 : 26; // [31:6]
  264. } b;
  265. } REG_PMIC_RTC_RTC_SEC_ALM_VALUE_T;
  266. // rtc_min_alm_value
  267. typedef union {
  268. uint32_t v;
  269. struct
  270. {
  271. uint32_t rtc_min_alm_value : 6; // [5:0], read only
  272. uint32_t __31_6 : 26; // [31:6]
  273. } b;
  274. } REG_PMIC_RTC_RTC_MIN_ALM_VALUE_T;
  275. // rtc_hrs_alm_value
  276. typedef union {
  277. uint32_t v;
  278. struct
  279. {
  280. uint32_t rtc_hrs_alm_value : 6; // [5:0], read only
  281. uint32_t __31_6 : 26; // [31:6]
  282. } b;
  283. } REG_PMIC_RTC_RTC_HRS_ALM_VALUE_T;
  284. // rtc_day_alm_value
  285. typedef union {
  286. uint32_t v;
  287. struct
  288. {
  289. uint32_t rtc_day_alm_value : 6; // [5:0], read only
  290. uint32_t __31_6 : 26; // [31:6]
  291. } b;
  292. } REG_PMIC_RTC_RTC_DAY_ALM_VALUE_T;
  293. // rtc_spg_value
  294. typedef union {
  295. uint32_t v;
  296. struct
  297. {
  298. uint32_t rtc_almlock_value : 8; // [7:0], read only
  299. uint32_t rtc_spg_value : 8; // [15:8], read only
  300. uint32_t __31_16 : 16; // [31:16]
  301. } b;
  302. } REG_PMIC_RTC_RTC_SPG_VALUE_T;
  303. // rtc_spg_upd
  304. typedef union {
  305. uint32_t v;
  306. struct
  307. {
  308. uint32_t rtc_almlock_upd : 8; // [7:0]
  309. uint32_t rtc_spg_upd : 8; // [15:8]
  310. uint32_t __31_16 : 16; // [31:16]
  311. } b;
  312. } REG_PMIC_RTC_RTC_SPG_UPD_T;
  313. // rtc_pwr_flag_ctrl
  314. typedef union {
  315. uint32_t v;
  316. struct
  317. {
  318. uint32_t rtc_pwr_flag_clr : 8; // [7:0]
  319. uint32_t rtc_pwr_flag_set : 8; // [15:8]
  320. uint32_t __31_16 : 16; // [31:16]
  321. } b;
  322. } REG_PMIC_RTC_RTC_PWR_FLAG_CTRL_T;
  323. // rtc_pwr_flag_sts
  324. typedef union {
  325. uint32_t v;
  326. struct
  327. {
  328. uint32_t rtc_power_flag_status_register : 8; // [7:0], read only
  329. uint32_t __31_8 : 24; // [31:8]
  330. } b;
  331. } REG_PMIC_RTC_RTC_PWR_FLAG_STS_T;
  332. // rtc_sec_auxalm_upd
  333. typedef union {
  334. uint32_t v;
  335. struct
  336. {
  337. uint32_t rtc_sec_auxalm_upd : 6; // [5:0]
  338. uint32_t __31_6 : 26; // [31:6]
  339. } b;
  340. } REG_PMIC_RTC_RTC_SEC_AUXALM_UPD_T;
  341. // rtc_min_auxalm_upd
  342. typedef union {
  343. uint32_t v;
  344. struct
  345. {
  346. uint32_t rtc_min_auxalm_upd : 6; // [5:0]
  347. uint32_t __31_6 : 26; // [31:6]
  348. } b;
  349. } REG_PMIC_RTC_RTC_MIN_AUXALM_UPD_T;
  350. // rtc_hrs_auxalm_upd
  351. typedef union {
  352. uint32_t v;
  353. struct
  354. {
  355. uint32_t rtc_hrs_auxalm_upd : 5; // [4:0]
  356. uint32_t __31_5 : 27; // [31:5]
  357. } b;
  358. } REG_PMIC_RTC_RTC_HRS_AUXALM_UPD_T;
  359. // rtc_day_auxalm_upd
  360. typedef union {
  361. uint32_t v;
  362. struct
  363. {
  364. uint32_t rtc_day_auxalm_upd : 6; // [5:0]
  365. uint32_t __31_6 : 26; // [31:6]
  366. } b;
  367. } REG_PMIC_RTC_RTC_DAY_AUXALM_UPD_T;
  368. // rtc_sec_cnt_raw
  369. typedef union {
  370. uint32_t v;
  371. struct
  372. {
  373. uint32_t rtc_sec_cnt_raw : 6; // [5:0], read only
  374. uint32_t __31_6 : 26; // [31:6]
  375. } b;
  376. } REG_PMIC_RTC_RTC_SEC_CNT_RAW_T;
  377. // rtc_min_cnt_raw
  378. typedef union {
  379. uint32_t v;
  380. struct
  381. {
  382. uint32_t rtc_min_cnt_raw : 6; // [5:0], read only
  383. uint32_t __31_6 : 26; // [31:6]
  384. } b;
  385. } REG_PMIC_RTC_RTC_MIN_CNT_RAW_T;
  386. // rtc_hrs_cnt_raw
  387. typedef union {
  388. uint32_t v;
  389. struct
  390. {
  391. uint32_t rtc_hrs_cnt_raw : 6; // [5:0], read only
  392. uint32_t __31_6 : 26; // [31:6]
  393. } b;
  394. } REG_PMIC_RTC_RTC_HRS_CNT_RAW_T;
  395. // rtc_day_cnt_raw
  396. typedef union {
  397. uint32_t v;
  398. struct
  399. {
  400. uint32_t rtc_day_cnt_raw : 6; // [5:0], read only
  401. uint32_t __31_6 : 26; // [31:6]
  402. } b;
  403. } REG_PMIC_RTC_RTC_DAY_CNT_RAW_T;
  404. // rtc_sec_cnt_value
  405. #define PMIC_RTC_RTC_SEC_CNT_VALUE(n) (((n)&0x3f) << 0)
  406. // rtc_min_cnt_value
  407. #define PMIC_RTC_RTC_MIN_CNT_VALUE(n) (((n)&0x3f) << 0)
  408. // rtc_hrs_cnt_value
  409. #define PMIC_RTC_RTC_HRS_CNT_VALUE(n) (((n)&0x3f) << 0)
  410. // rtc_day_cnt_value
  411. #define PMIC_RTC_RTC_DAY_CNT_VALUE(n) (((n)&0x3f) << 0)
  412. // rtc_sec_cnt_upd
  413. #define PMIC_RTC_RTC_SEC_CNT_UPD(n) (((n)&0x3f) << 0)
  414. // rtc_min_cnt_upd
  415. #define PMIC_RTC_RTC_MIN_CNT_UPD(n) (((n)&0x3f) << 0)
  416. // rtc_hrs_cnt_upd
  417. #define PMIC_RTC_RTC_HRS_CNT_UPD(n) (((n)&0x1f) << 0)
  418. // rtc_day_cnt_upd
  419. #define PMIC_RTC_RTC_DAY_CNT_UPD(n) (((n)&0x3f) << 0)
  420. // rtc_sec_alm_upd
  421. #define PMIC_RTC_RTC_SEC_ALM_UPD(n) (((n)&0x3f) << 0)
  422. // rtc_min_alm_upd
  423. #define PMIC_RTC_RTC_MIN_ALM_UPD(n) (((n)&0x3f) << 0)
  424. // rtc_hrs_alm_upd
  425. #define PMIC_RTC_RTC_HRS_ALM_UPD(n) (((n)&0x1f) << 0)
  426. // rtc_day_alm_upd
  427. #define PMIC_RTC_RTC_DAY_ALM_UPD(n) (((n)&0x3f) << 0)
  428. // rtc_int_en
  429. #define PMIC_RTC_RTC_SEC_INT_EN (1 << 0)
  430. #define PMIC_RTC_RTC_MIN_INT_EN (1 << 1)
  431. #define PMIC_RTC_RTC_HRS_INT_EN (1 << 2)
  432. #define PMIC_RTC_RTC_DAY_INT_EN (1 << 3)
  433. #define PMIC_RTC_RTC_ALM_INT_EN (1 << 4)
  434. #define PMIC_RTC_RTC_HRS_FORMAT_SEL (1 << 5)
  435. #define PMIC_RTC_RTC_AUXALM_INT_EN (1 << 6)
  436. #define PMIC_RTC_RTC_SPG_UPD_INT_EN (1 << 7)
  437. #define PMIC_RTC_RTC_SEC_CNT_UPD_INT_EN (1 << 8)
  438. #define PMIC_RTC_RTC_MIN_CNT_UPD_INT_EN (1 << 9)
  439. #define PMIC_RTC_RTC_HRS_CNT_UPD_INT_EN (1 << 10)
  440. #define PMIC_RTC_RTC_DAY_CNT_UPD_INT_EN (1 << 11)
  441. #define PMIC_RTC_RTC_SEC_ALM_UPD_INT_EN (1 << 12)
  442. #define PMIC_RTC_RTC_MIN_ALM_UPD_INT_EN (1 << 13)
  443. #define PMIC_RTC_RTC_HRS_ALM_UPD_INT_EN (1 << 14)
  444. #define PMIC_RTC_RTC_DAY_ALM_UPD_INT_EN (1 << 15)
  445. // rtc_int_raw_sts
  446. #define PMIC_RTC_RTC_SEC_INT_RAW_STS (1 << 0)
  447. #define PMIC_RTC_RTC_MIN_INT_RAW_STS (1 << 1)
  448. #define PMIC_RTC_RTC_HRS_INT_RAW_STS (1 << 2)
  449. #define PMIC_RTC_RTC_DAY_INT_RAW_STS (1 << 3)
  450. #define PMIC_RTC_RTC_ALM_INT_RAW_STS (1 << 4)
  451. #define PMIC_RTC_RTC_ALM_INT0_RAW_STS (1 << 5)
  452. #define PMIC_RTC_RTC_AUXALM_INT_RAW_STS (1 << 6)
  453. #define PMIC_RTC_RTC_SPG_UPD_INT_RAW_STS (1 << 7)
  454. #define PMIC_RTC_RTC_SEC_CNT_UPD_INT_RAW_STS (1 << 8)
  455. #define PMIC_RTC_RTC_MIN_CNT_UPD_INT_RAW_STS (1 << 9)
  456. #define PMIC_RTC_RTC_HRS_CNT_UPD_INT_RAW_STS (1 << 10)
  457. #define PMIC_RTC_RTC_DAY_CNT_UPD_INT_RAW_STS (1 << 11)
  458. #define PMIC_RTC_RTC_SEC_ALM_UPD_INT_RAW_STS (1 << 12)
  459. #define PMIC_RTC_RTC_MIN_ALM_UPD_INT_RAW_STS (1 << 13)
  460. #define PMIC_RTC_RTC_HRS_ALM_UPD_INT_RAW_STS (1 << 14)
  461. #define PMIC_RTC_RTC_DAY_ALM_UPD_INT_RAW_STS (1 << 15)
  462. // rtc_int_clr
  463. #define PMIC_RTC_RTC_SEC_INT_CLR (1 << 0)
  464. #define PMIC_RTC_RTC_MIN_INT_CLR (1 << 1)
  465. #define PMIC_RTC_RTC_HRS_INT_CLR (1 << 2)
  466. #define PMIC_RTC_RTC_DAY_INT_CLR (1 << 3)
  467. #define PMIC_RTC_RTC_ALM_INT_CLR (1 << 4)
  468. #define PMIC_RTC_RTC_AUXALM_INT_CLR (1 << 6)
  469. #define PMIC_RTC_RTC_SPG_UPD_INT_CLR (1 << 7)
  470. #define PMIC_RTC_RTC_SEC_CNT_UPD_INT_CLR (1 << 8)
  471. #define PMIC_RTC_RTC_MIN_CNT_UPD_INT_CLR (1 << 9)
  472. #define PMIC_RTC_RTC_HRS_CNT_UPD_INT_CLR (1 << 10)
  473. #define PMIC_RTC_RTC_DAY_CNT_UPD_INT_CLR (1 << 11)
  474. #define PMIC_RTC_RTC_SEC_ALM_UPD_INT_CLR (1 << 12)
  475. #define PMIC_RTC_RTC_MIN_ALM_UPD_INT_CLR (1 << 13)
  476. #define PMIC_RTC_RTC_HRS_ALM_UPD_INT_CLR (1 << 14)
  477. #define PMIC_RTC_RTC_DAY_ALM_UPD_INT_CLR (1 << 15)
  478. // rtc_int_mask_sts
  479. #define PMIC_RTC_RTC_SEC_INT_MASK_STS (1 << 0)
  480. #define PMIC_RTC_RTC_MIN_INT_MASK_STS (1 << 1)
  481. #define PMIC_RTC_RTC_HRS_INT_MASK_STS (1 << 2)
  482. #define PMIC_RTC_RTC_DAY_INT_MASK_STS (1 << 3)
  483. #define PMIC_RTC_RTC_ALM_INT_MASK_STS (1 << 4)
  484. #define PMIC_RTC_RTC_AUXALM_INT_MASK_STS (1 << 6)
  485. #define PMIC_RTC_RTC_SPG_UPD_INT_MASK_STS (1 << 7)
  486. #define PMIC_RTC_RTC_SEC_CNT_UPD_INT_MASK_STS (1 << 8)
  487. #define PMIC_RTC_RTC_MIN_CNT_UPD_INT_MASK_STS (1 << 9)
  488. #define PMIC_RTC_RTC_HRS_CNT_UPD_INT_MASK_STS (1 << 10)
  489. #define PMIC_RTC_RTC_DAY_CNT_UPD_INT_MASK_STS (1 << 11)
  490. #define PMIC_RTC_RTC_SEC_ALM_UPD_INT_MASK_STS (1 << 12)
  491. #define PMIC_RTC_RTC_MIN_ALM_UPD_INT_MASK_STS (1 << 13)
  492. #define PMIC_RTC_RTC_HRS_ALM_UPD_INT_MASK_STS (1 << 14)
  493. #define PMIC_RTC_RTC_DAY_ALM_UPD_INT_MASK_STS (1 << 15)
  494. // rtc_sec_alm_value
  495. #define PMIC_RTC_RTC_SEC_ALM_VALUE(n) (((n)&0x3f) << 0)
  496. // rtc_min_alm_value
  497. #define PMIC_RTC_RTC_MIN_ALM_VALUE(n) (((n)&0x3f) << 0)
  498. // rtc_hrs_alm_value
  499. #define PMIC_RTC_RTC_HRS_ALM_VALUE(n) (((n)&0x3f) << 0)
  500. // rtc_day_alm_value
  501. #define PMIC_RTC_RTC_DAY_ALM_VALUE(n) (((n)&0x3f) << 0)
  502. // rtc_spg_value
  503. #define PMIC_RTC_RTC_ALMLOCK_VALUE(n) (((n)&0xff) << 0)
  504. #define PMIC_RTC_RTC_SPG_VALUE(n) (((n)&0xff) << 8)
  505. // rtc_spg_upd
  506. #define PMIC_RTC_RTC_ALMLOCK_UPD(n) (((n)&0xff) << 0)
  507. #define PMIC_RTC_RTC_SPG_UPD(n) (((n)&0xff) << 8)
  508. // rtc_pwr_flag_ctrl
  509. #define PMIC_RTC_RTC_PWR_FLAG_CLR(n) (((n)&0xff) << 0)
  510. #define PMIC_RTC_RTC_PWR_FLAG_SET(n) (((n)&0xff) << 8)
  511. // rtc_pwr_flag_sts
  512. #define PMIC_RTC_RTC_POWER_FLAG_STATUS_REGISTER(n) (((n)&0xff) << 0)
  513. // rtc_sec_auxalm_upd
  514. #define PMIC_RTC_RTC_SEC_AUXALM_UPD(n) (((n)&0x3f) << 0)
  515. // rtc_min_auxalm_upd
  516. #define PMIC_RTC_RTC_MIN_AUXALM_UPD(n) (((n)&0x3f) << 0)
  517. // rtc_hrs_auxalm_upd
  518. #define PMIC_RTC_RTC_HRS_AUXALM_UPD(n) (((n)&0x1f) << 0)
  519. // rtc_day_auxalm_upd
  520. #define PMIC_RTC_RTC_DAY_AUXALM_UPD(n) (((n)&0x3f) << 0)
  521. // rtc_sec_cnt_raw
  522. #define PMIC_RTC_RTC_SEC_CNT_RAW(n) (((n)&0x3f) << 0)
  523. // rtc_min_cnt_raw
  524. #define PMIC_RTC_RTC_MIN_CNT_RAW(n) (((n)&0x3f) << 0)
  525. // rtc_hrs_cnt_raw
  526. #define PMIC_RTC_RTC_HRS_CNT_RAW(n) (((n)&0x3f) << 0)
  527. // rtc_day_cnt_raw
  528. #define PMIC_RTC_RTC_DAY_CNT_RAW(n) (((n)&0x3f) << 0)
  529. #endif // _PMIC_RTC_H_