pmic_adc.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  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_ADC_H_
  13. #define _PMIC_ADC_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_PMIC_ADC_BASE (0x51108100)
  17. typedef volatile struct
  18. {
  19. uint32_t auxadc_version; // 0x00000000
  20. uint32_t adc_cfg_ctrl; // 0x00000004
  21. uint32_t adc_sw_ch_cfg; // 0x00000008
  22. uint32_t adc_fast_hw_ch0_cfg; // 0x0000000c
  23. uint32_t adc_fast_hw_ch1_cfg; // 0x00000010
  24. uint32_t adc_fast_hw_ch2_cfg; // 0x00000014
  25. uint32_t adc_fast_hw_ch3_cfg; // 0x00000018
  26. uint32_t adc_fast_hw_ch4_cfg; // 0x0000001c
  27. uint32_t adc_fast_hw_ch5_cfg; // 0x00000020
  28. uint32_t adc_fast_hw_ch6_cfg; // 0x00000024
  29. uint32_t adc_fast_hw_ch7_cfg; // 0x00000028
  30. uint32_t adc_slow_hw_ch0_cfg; // 0x0000002c
  31. uint32_t adc_slow_hw_ch1_cfg; // 0x00000030
  32. uint32_t adc_slow_hw_ch2_cfg; // 0x00000034
  33. uint32_t adc_slow_hw_ch3_cfg; // 0x00000038
  34. uint32_t adc_slow_hw_ch4_cfg; // 0x0000003c
  35. uint32_t adc_slow_hw_ch5_cfg; // 0x00000040
  36. uint32_t adc_slow_hw_ch6_cfg; // 0x00000044
  37. uint32_t adc_slow_hw_ch7_cfg; // 0x00000048
  38. uint32_t adc_hw_ch_delay; // 0x0000004c
  39. uint32_t adc_dat; // 0x00000050
  40. uint32_t adc_cfg_int_en; // 0x00000054
  41. uint32_t adc_cfg_int_clr; // 0x00000058
  42. uint32_t adc_cfg_int_sattus; // 0x0000005c
  43. uint32_t adc_cfg_int_raw; // 0x00000060
  44. uint32_t adc_debug; // 0x00000064
  45. uint32_t adc_fast_hw_timer_en; // 0x00000068
  46. uint32_t adc_fast_hw_timer_div; // 0x0000006c
  47. uint32_t adc_fast_hw_ch0_timer_thresh; // 0x00000070
  48. uint32_t adc_fast_hw_ch1_timer_thresh; // 0x00000074
  49. uint32_t adc_fast_hw_ch2_timer_thresh; // 0x00000078
  50. uint32_t adc_fast_hw_ch3_timer_thresh; // 0x0000007c
  51. uint32_t adc_fast_hw_ch4_timer_thresh; // 0x00000080
  52. uint32_t adc_fast_hw_ch5_timer_thresh; // 0x00000084
  53. uint32_t adc_fast_hw_ch6_timer_thresh; // 0x00000088
  54. uint32_t adc_fast_hw_ch7_timer_thresh; // 0x0000008c
  55. uint32_t adc_fast_hw_ch0_dat; // 0x00000090
  56. uint32_t adc_fast_hw_ch1_dat; // 0x00000094
  57. uint32_t adc_fast_hw_ch2_dat; // 0x00000098
  58. uint32_t adc_fast_hw_ch3_dat; // 0x0000009c
  59. uint32_t adc_fast_hw_ch4_dat; // 0x000000a0
  60. uint32_t adc_fast_hw_ch5_dat; // 0x000000a4
  61. uint32_t adc_fast_hw_ch6_dat; // 0x000000a8
  62. uint32_t adc_fast_hw_ch7_dat; // 0x000000ac
  63. uint32_t auxadc_ctrl0; // 0x000000b0
  64. uint32_t adc_fast_hw_dvalid; // 0x000000b4
  65. } HWP_PMIC_ADC_T;
  66. #define hwp_pmicAdc ((HWP_PMIC_ADC_T *)REG_ACCESS_ADDRESS(REG_PMIC_ADC_BASE))
  67. // auxadc_version
  68. typedef union {
  69. uint32_t v;
  70. struct
  71. {
  72. uint32_t auxadc_version : 16; // [15:0], read only
  73. uint32_t __31_16 : 16; // [31:16]
  74. } b;
  75. } REG_PMIC_ADC_AUXADC_VERSION_T;
  76. // adc_cfg_ctrl
  77. typedef union {
  78. uint32_t v;
  79. struct
  80. {
  81. uint32_t adc_en : 1; // [0]
  82. uint32_t sw_ch_run : 1; // [1]
  83. uint32_t adc_12b : 1; // [2]
  84. uint32_t adc_sign_code : 1; // [3]
  85. uint32_t sw_ch_run_num : 4; // [7:4]
  86. uint32_t rg_auxad_average : 3; // [10:8]
  87. uint32_t __11_11 : 1; // [11]
  88. uint32_t adc_offset_cal_en : 1; // [12]
  89. uint32_t __31_13 : 19; // [31:13]
  90. } b;
  91. } REG_PMIC_ADC_ADC_CFG_CTRL_T;
  92. // adc_sw_ch_cfg
  93. typedef union {
  94. uint32_t v;
  95. struct
  96. {
  97. uint32_t adc_cs : 5; // [4:0]
  98. uint32_t __5_5 : 1; // [5]
  99. uint32_t adc_slow : 1; // [6]
  100. uint32_t __8_7 : 2; // [8:7]
  101. uint32_t adc_scale : 2; // [10:9]
  102. uint32_t __31_11 : 21; // [31:11]
  103. } b;
  104. } REG_PMIC_ADC_ADC_SW_CH_CFG_T;
  105. // adc_fast_hw_ch0_cfg
  106. typedef union {
  107. uint32_t v;
  108. struct
  109. {
  110. uint32_t frq_cs : 5; // [4:0]
  111. uint32_t __5_5 : 1; // [5]
  112. uint32_t frq_slow : 1; // [6]
  113. uint32_t frq_delay_en : 1; // [7]
  114. uint32_t __8_8 : 1; // [8]
  115. uint32_t frq_scale : 2; // [10:9]
  116. uint32_t __31_11 : 21; // [31:11]
  117. } b;
  118. } REG_PMIC_ADC_ADC_FAST_HW_CH0_CFG_T;
  119. // adc_fast_hw_ch1_cfg
  120. typedef union {
  121. uint32_t v;
  122. struct
  123. {
  124. uint32_t frq_cs : 5; // [4:0]
  125. uint32_t __5_5 : 1; // [5]
  126. uint32_t frq_slow : 1; // [6]
  127. uint32_t frq_delay_en : 1; // [7]
  128. uint32_t __8_8 : 1; // [8]
  129. uint32_t frq_scale : 2; // [10:9]
  130. uint32_t __31_11 : 21; // [31:11]
  131. } b;
  132. } REG_PMIC_ADC_ADC_FAST_HW_CH1_CFG_T;
  133. // adc_fast_hw_ch2_cfg
  134. typedef union {
  135. uint32_t v;
  136. struct
  137. {
  138. uint32_t frq_cs : 5; // [4:0]
  139. uint32_t __5_5 : 1; // [5]
  140. uint32_t frq_slow : 1; // [6]
  141. uint32_t frq_delay_en : 1; // [7]
  142. uint32_t __8_8 : 1; // [8]
  143. uint32_t frq_scale : 2; // [10:9]
  144. uint32_t __31_11 : 21; // [31:11]
  145. } b;
  146. } REG_PMIC_ADC_ADC_FAST_HW_CH2_CFG_T;
  147. // adc_fast_hw_ch3_cfg
  148. typedef union {
  149. uint32_t v;
  150. struct
  151. {
  152. uint32_t frq_cs : 5; // [4:0]
  153. uint32_t __5_5 : 1; // [5]
  154. uint32_t frq_slow : 1; // [6]
  155. uint32_t frq_delay_en : 1; // [7]
  156. uint32_t __8_8 : 1; // [8]
  157. uint32_t frq_scale : 2; // [10:9]
  158. uint32_t __31_11 : 21; // [31:11]
  159. } b;
  160. } REG_PMIC_ADC_ADC_FAST_HW_CH3_CFG_T;
  161. // adc_fast_hw_ch4_cfg
  162. typedef union {
  163. uint32_t v;
  164. struct
  165. {
  166. uint32_t frq_cs : 5; // [4:0]
  167. uint32_t __5_5 : 1; // [5]
  168. uint32_t frq_slow : 1; // [6]
  169. uint32_t frq_delay_en : 1; // [7]
  170. uint32_t __8_8 : 1; // [8]
  171. uint32_t frq_scale : 2; // [10:9]
  172. uint32_t __31_11 : 21; // [31:11]
  173. } b;
  174. } REG_PMIC_ADC_ADC_FAST_HW_CH4_CFG_T;
  175. // adc_fast_hw_ch5_cfg
  176. typedef union {
  177. uint32_t v;
  178. struct
  179. {
  180. uint32_t frq_cs : 5; // [4:0]
  181. uint32_t __5_5 : 1; // [5]
  182. uint32_t frq_slow : 1; // [6]
  183. uint32_t frq_delay_en : 1; // [7]
  184. uint32_t __8_8 : 1; // [8]
  185. uint32_t frq_scale : 2; // [10:9]
  186. uint32_t __31_11 : 21; // [31:11]
  187. } b;
  188. } REG_PMIC_ADC_ADC_FAST_HW_CH5_CFG_T;
  189. // adc_fast_hw_ch6_cfg
  190. typedef union {
  191. uint32_t v;
  192. struct
  193. {
  194. uint32_t frq_cs : 5; // [4:0]
  195. uint32_t __5_5 : 1; // [5]
  196. uint32_t frq_slow : 1; // [6]
  197. uint32_t frq_delay_en : 1; // [7]
  198. uint32_t __8_8 : 1; // [8]
  199. uint32_t frq_scale : 2; // [10:9]
  200. uint32_t __31_11 : 21; // [31:11]
  201. } b;
  202. } REG_PMIC_ADC_ADC_FAST_HW_CH6_CFG_T;
  203. // adc_fast_hw_ch7_cfg
  204. typedef union {
  205. uint32_t v;
  206. struct
  207. {
  208. uint32_t frq_cs : 5; // [4:0]
  209. uint32_t __5_5 : 1; // [5]
  210. uint32_t frq_slow : 1; // [6]
  211. uint32_t frq_delay_en : 1; // [7]
  212. uint32_t __8_8 : 1; // [8]
  213. uint32_t frq_scale : 2; // [10:9]
  214. uint32_t __31_11 : 21; // [31:11]
  215. } b;
  216. } REG_PMIC_ADC_ADC_FAST_HW_CH7_CFG_T;
  217. // adc_slow_hw_ch0_cfg
  218. typedef union {
  219. uint32_t v;
  220. struct
  221. {
  222. uint32_t req_cs : 5; // [4:0]
  223. uint32_t __5_5 : 1; // [5]
  224. uint32_t req_slow : 1; // [6]
  225. uint32_t req_delay_en : 1; // [7]
  226. uint32_t __8_8 : 1; // [8]
  227. uint32_t req_scale : 2; // [10:9]
  228. uint32_t __31_11 : 21; // [31:11]
  229. } b;
  230. } REG_PMIC_ADC_ADC_SLOW_HW_CH0_CFG_T;
  231. // adc_slow_hw_ch1_cfg
  232. typedef union {
  233. uint32_t v;
  234. struct
  235. {
  236. uint32_t req_cs : 5; // [4:0]
  237. uint32_t __5_5 : 1; // [5]
  238. uint32_t req_slow : 1; // [6]
  239. uint32_t req_delay_en : 1; // [7]
  240. uint32_t __8_8 : 1; // [8]
  241. uint32_t req_scale : 2; // [10:9]
  242. uint32_t __31_11 : 21; // [31:11]
  243. } b;
  244. } REG_PMIC_ADC_ADC_SLOW_HW_CH1_CFG_T;
  245. // adc_slow_hw_ch2_cfg
  246. typedef union {
  247. uint32_t v;
  248. struct
  249. {
  250. uint32_t req_cs : 5; // [4:0]
  251. uint32_t __5_5 : 1; // [5]
  252. uint32_t req_slow : 1; // [6]
  253. uint32_t req_delay_en : 1; // [7]
  254. uint32_t __8_8 : 1; // [8]
  255. uint32_t req_scale : 2; // [10:9]
  256. uint32_t __31_11 : 21; // [31:11]
  257. } b;
  258. } REG_PMIC_ADC_ADC_SLOW_HW_CH2_CFG_T;
  259. // adc_slow_hw_ch3_cfg
  260. typedef union {
  261. uint32_t v;
  262. struct
  263. {
  264. uint32_t req_cs : 5; // [4:0]
  265. uint32_t __5_5 : 1; // [5]
  266. uint32_t req_slow : 1; // [6]
  267. uint32_t req_delay_en : 1; // [7]
  268. uint32_t __8_8 : 1; // [8]
  269. uint32_t req_scale : 2; // [10:9]
  270. uint32_t __31_11 : 21; // [31:11]
  271. } b;
  272. } REG_PMIC_ADC_ADC_SLOW_HW_CH3_CFG_T;
  273. // adc_slow_hw_ch4_cfg
  274. typedef union {
  275. uint32_t v;
  276. struct
  277. {
  278. uint32_t req_cs : 5; // [4:0]
  279. uint32_t __5_5 : 1; // [5]
  280. uint32_t req_slow : 1; // [6]
  281. uint32_t req_delay_en : 1; // [7]
  282. uint32_t __8_8 : 1; // [8]
  283. uint32_t req_scale : 2; // [10:9]
  284. uint32_t __31_11 : 21; // [31:11]
  285. } b;
  286. } REG_PMIC_ADC_ADC_SLOW_HW_CH4_CFG_T;
  287. // adc_slow_hw_ch5_cfg
  288. typedef union {
  289. uint32_t v;
  290. struct
  291. {
  292. uint32_t req_cs : 5; // [4:0]
  293. uint32_t __5_5 : 1; // [5]
  294. uint32_t req_slow : 1; // [6]
  295. uint32_t req_delay_en : 1; // [7]
  296. uint32_t __8_8 : 1; // [8]
  297. uint32_t req_scale : 2; // [10:9]
  298. uint32_t __31_11 : 21; // [31:11]
  299. } b;
  300. } REG_PMIC_ADC_ADC_SLOW_HW_CH5_CFG_T;
  301. // adc_slow_hw_ch6_cfg
  302. typedef union {
  303. uint32_t v;
  304. struct
  305. {
  306. uint32_t req_cs : 5; // [4:0]
  307. uint32_t __5_5 : 1; // [5]
  308. uint32_t req_slow : 1; // [6]
  309. uint32_t req_delay_en : 1; // [7]
  310. uint32_t __8_8 : 1; // [8]
  311. uint32_t req_scale : 2; // [10:9]
  312. uint32_t __31_11 : 21; // [31:11]
  313. } b;
  314. } REG_PMIC_ADC_ADC_SLOW_HW_CH6_CFG_T;
  315. // adc_slow_hw_ch7_cfg
  316. typedef union {
  317. uint32_t v;
  318. struct
  319. {
  320. uint32_t req_cs : 5; // [4:0]
  321. uint32_t __5_5 : 1; // [5]
  322. uint32_t req_slow : 1; // [6]
  323. uint32_t req_delay_en : 1; // [7]
  324. uint32_t __8_8 : 1; // [8]
  325. uint32_t req_scale : 2; // [10:9]
  326. uint32_t __31_11 : 21; // [31:11]
  327. } b;
  328. } REG_PMIC_ADC_ADC_SLOW_HW_CH7_CFG_T;
  329. // adc_hw_ch_delay
  330. typedef union {
  331. uint32_t v;
  332. struct
  333. {
  334. uint32_t hw_ch_delay : 8; // [7:0]
  335. uint32_t __31_8 : 24; // [31:8]
  336. } b;
  337. } REG_PMIC_ADC_ADC_HW_CH_DELAY_T;
  338. // adc_dat
  339. typedef union {
  340. uint32_t v;
  341. struct
  342. {
  343. uint32_t adc_dat_sw : 12; // [11:0], read only
  344. uint32_t __31_12 : 20; // [31:12]
  345. } b;
  346. } REG_PMIC_ADC_ADC_DAT_T;
  347. // adc_cfg_int_en
  348. typedef union {
  349. uint32_t v;
  350. struct
  351. {
  352. uint32_t adc_int_en : 1; // [0]
  353. uint32_t __31_1 : 31; // [31:1]
  354. } b;
  355. } REG_PMIC_ADC_ADC_CFG_INT_EN_T;
  356. // adc_cfg_int_clr
  357. typedef union {
  358. uint32_t v;
  359. struct
  360. {
  361. uint32_t adc_int_clr : 1; // [0]
  362. uint32_t __31_1 : 31; // [31:1]
  363. } b;
  364. } REG_PMIC_ADC_ADC_CFG_INT_CLR_T;
  365. // adc_cfg_int_sattus
  366. typedef union {
  367. uint32_t v;
  368. struct
  369. {
  370. uint32_t adc_int_status : 1; // [0], read only
  371. uint32_t __31_1 : 31; // [31:1]
  372. } b;
  373. } REG_PMIC_ADC_ADC_CFG_INT_SATTUS_T;
  374. // adc_cfg_int_raw
  375. typedef union {
  376. uint32_t v;
  377. struct
  378. {
  379. uint32_t adc_int_raw : 1; // [0], read only
  380. uint32_t __31_1 : 31; // [31:1]
  381. } b;
  382. } REG_PMIC_ADC_ADC_CFG_INT_RAW_T;
  383. // adc_debug
  384. typedef union {
  385. uint32_t v;
  386. struct
  387. {
  388. uint32_t adc_dbg_cnt : 8; // [7:0], read only
  389. uint32_t adc_dbg_state : 3; // [10:8], read only
  390. uint32_t adc_dbg_ch : 5; // [15:11], read only
  391. uint32_t __31_16 : 16; // [31:16]
  392. } b;
  393. } REG_PMIC_ADC_ADC_DEBUG_T;
  394. // adc_fast_hw_timer_en
  395. typedef union {
  396. uint32_t v;
  397. struct
  398. {
  399. uint32_t rg_adc_fast_hw_ch0_timer_en : 1; // [0]
  400. uint32_t rg_adc_fast_hw_ch1_timer_en : 1; // [1]
  401. uint32_t rg_adc_fast_hw_ch2_timer_en : 1; // [2]
  402. uint32_t rg_adc_fast_hw_ch3_timer_en : 1; // [3]
  403. uint32_t rg_adc_fast_hw_ch4_timer_en : 1; // [4]
  404. uint32_t rg_adc_fast_hw_ch5_timer_en : 1; // [5]
  405. uint32_t rg_adc_fast_hw_ch6_timer_en : 1; // [6]
  406. uint32_t rg_adc_fast_hw_ch7_timer_en : 1; // [7]
  407. uint32_t __31_8 : 24; // [31:8]
  408. } b;
  409. } REG_PMIC_ADC_ADC_FAST_HW_TIMER_EN_T;
  410. // adc_fast_hw_timer_div
  411. typedef union {
  412. uint32_t v;
  413. struct
  414. {
  415. uint32_t rg_adc_fast_hw_timer_div : 16; // [15:0]
  416. uint32_t __31_16 : 16; // [31:16]
  417. } b;
  418. } REG_PMIC_ADC_ADC_FAST_HW_TIMER_DIV_T;
  419. // adc_fast_hw_ch0_timer_thresh
  420. typedef union {
  421. uint32_t v;
  422. struct
  423. {
  424. uint32_t rg_adc_fast_hw_ch0_timer_thresh : 16; // [15:0]
  425. uint32_t __31_16 : 16; // [31:16]
  426. } b;
  427. } REG_PMIC_ADC_ADC_FAST_HW_CH0_TIMER_THRESH_T;
  428. // adc_fast_hw_ch1_timer_thresh
  429. typedef union {
  430. uint32_t v;
  431. struct
  432. {
  433. uint32_t rg_adc_fast_hw_ch1_timer_thresh : 16; // [15:0]
  434. uint32_t __31_16 : 16; // [31:16]
  435. } b;
  436. } REG_PMIC_ADC_ADC_FAST_HW_CH1_TIMER_THRESH_T;
  437. // adc_fast_hw_ch2_timer_thresh
  438. typedef union {
  439. uint32_t v;
  440. struct
  441. {
  442. uint32_t rg_adc_fast_hw_ch2_timer_thresh : 16; // [15:0]
  443. uint32_t __31_16 : 16; // [31:16]
  444. } b;
  445. } REG_PMIC_ADC_ADC_FAST_HW_CH2_TIMER_THRESH_T;
  446. // adc_fast_hw_ch3_timer_thresh
  447. typedef union {
  448. uint32_t v;
  449. struct
  450. {
  451. uint32_t rg_adc_fast_hw_ch3_timer_thresh : 16; // [15:0]
  452. uint32_t __31_16 : 16; // [31:16]
  453. } b;
  454. } REG_PMIC_ADC_ADC_FAST_HW_CH3_TIMER_THRESH_T;
  455. // adc_fast_hw_ch4_timer_thresh
  456. typedef union {
  457. uint32_t v;
  458. struct
  459. {
  460. uint32_t rg_adc_fast_hw_ch4_timer_thresh : 16; // [15:0]
  461. uint32_t __31_16 : 16; // [31:16]
  462. } b;
  463. } REG_PMIC_ADC_ADC_FAST_HW_CH4_TIMER_THRESH_T;
  464. // adc_fast_hw_ch5_timer_thresh
  465. typedef union {
  466. uint32_t v;
  467. struct
  468. {
  469. uint32_t rg_adc_fast_hw_ch5_timer_thresh : 16; // [15:0]
  470. uint32_t __31_16 : 16; // [31:16]
  471. } b;
  472. } REG_PMIC_ADC_ADC_FAST_HW_CH5_TIMER_THRESH_T;
  473. // adc_fast_hw_ch6_timer_thresh
  474. typedef union {
  475. uint32_t v;
  476. struct
  477. {
  478. uint32_t rg_adc_fast_hw_ch6_timer_thresh : 16; // [15:0]
  479. uint32_t __31_16 : 16; // [31:16]
  480. } b;
  481. } REG_PMIC_ADC_ADC_FAST_HW_CH6_TIMER_THRESH_T;
  482. // adc_fast_hw_ch7_timer_thresh
  483. typedef union {
  484. uint32_t v;
  485. struct
  486. {
  487. uint32_t rg_adc_fast_hw_ch7_timer_thresh : 16; // [15:0]
  488. uint32_t __31_16 : 16; // [31:16]
  489. } b;
  490. } REG_PMIC_ADC_ADC_FAST_HW_CH7_TIMER_THRESH_T;
  491. // adc_fast_hw_ch0_dat
  492. typedef union {
  493. uint32_t v;
  494. struct
  495. {
  496. uint32_t rg_adc_fast_hw_ch0_dat : 12; // [11:0], read only
  497. uint32_t __31_12 : 20; // [31:12]
  498. } b;
  499. } REG_PMIC_ADC_ADC_FAST_HW_CH0_DAT_T;
  500. // adc_fast_hw_ch1_dat
  501. typedef union {
  502. uint32_t v;
  503. struct
  504. {
  505. uint32_t rg_adc_fast_hw_ch0_dat : 12; // [11:0], read only
  506. uint32_t __31_12 : 20; // [31:12]
  507. } b;
  508. } REG_PMIC_ADC_ADC_FAST_HW_CH1_DAT_T;
  509. // adc_fast_hw_ch2_dat
  510. typedef union {
  511. uint32_t v;
  512. struct
  513. {
  514. uint32_t rg_adc_fast_hw_ch0_dat : 12; // [11:0], read only
  515. uint32_t __31_12 : 20; // [31:12]
  516. } b;
  517. } REG_PMIC_ADC_ADC_FAST_HW_CH2_DAT_T;
  518. // adc_fast_hw_ch3_dat
  519. typedef union {
  520. uint32_t v;
  521. struct
  522. {
  523. uint32_t rg_adc_fast_hw_ch0_dat : 12; // [11:0], read only
  524. uint32_t __31_12 : 20; // [31:12]
  525. } b;
  526. } REG_PMIC_ADC_ADC_FAST_HW_CH3_DAT_T;
  527. // adc_fast_hw_ch4_dat
  528. typedef union {
  529. uint32_t v;
  530. struct
  531. {
  532. uint32_t rg_adc_fast_hw_ch0_dat : 12; // [11:0], read only
  533. uint32_t __31_12 : 20; // [31:12]
  534. } b;
  535. } REG_PMIC_ADC_ADC_FAST_HW_CH4_DAT_T;
  536. // adc_fast_hw_ch5_dat
  537. typedef union {
  538. uint32_t v;
  539. struct
  540. {
  541. uint32_t rg_adc_fast_hw_ch0_dat : 12; // [11:0], read only
  542. uint32_t __31_12 : 20; // [31:12]
  543. } b;
  544. } REG_PMIC_ADC_ADC_FAST_HW_CH5_DAT_T;
  545. // adc_fast_hw_ch6_dat
  546. typedef union {
  547. uint32_t v;
  548. struct
  549. {
  550. uint32_t rg_adc_fast_hw_ch0_dat : 12; // [11:0], read only
  551. uint32_t __31_12 : 20; // [31:12]
  552. } b;
  553. } REG_PMIC_ADC_ADC_FAST_HW_CH6_DAT_T;
  554. // adc_fast_hw_ch7_dat
  555. typedef union {
  556. uint32_t v;
  557. struct
  558. {
  559. uint32_t rg_adc_fast_hw_ch0_dat : 12; // [11:0], read only
  560. uint32_t __31_12 : 20; // [31:12]
  561. } b;
  562. } REG_PMIC_ADC_ADC_FAST_HW_CH7_DAT_T;
  563. // auxadc_ctrl0
  564. typedef union {
  565. uint32_t v;
  566. struct
  567. {
  568. uint32_t rg_auxad_currentsen_en : 1; // [0]
  569. uint32_t __3_1 : 3; // [3:1]
  570. uint32_t rg_auxad_thm_cal : 1; // [4]
  571. uint32_t rg_auxad_ref_sel : 1; // [5]
  572. uint32_t __31_6 : 26; // [31:6]
  573. } b;
  574. } REG_PMIC_ADC_AUXADC_CTRL0_T;
  575. // adc_fast_hw_dvalid
  576. typedef union {
  577. uint32_t v;
  578. struct
  579. {
  580. uint32_t rg_adc_fast_hw_ch0_dvld : 1; // [0], read only
  581. uint32_t rg_adc_fast_hw_ch1_dvld : 1; // [1], read only
  582. uint32_t rg_adc_fast_hw_ch2_dvld : 1; // [2], read only
  583. uint32_t rg_adc_fast_hw_ch3_dvld : 1; // [3], read only
  584. uint32_t rg_adc_fast_hw_ch4_dvld : 1; // [4], read only
  585. uint32_t rg_adc_fast_hw_ch5_dvld : 1; // [5], read only
  586. uint32_t rg_adc_fast_hw_ch6_dvld : 1; // [6], read only
  587. uint32_t rg_adc_fast_hw_ch7_dvld : 1; // [7], read only
  588. uint32_t __31_8 : 24; // [31:8]
  589. } b;
  590. } REG_PMIC_ADC_ADC_FAST_HW_DVALID_T;
  591. // auxadc_version
  592. #define PMIC_ADC_AUXADC_VERSION(n) (((n)&0xffff) << 0)
  593. // adc_cfg_ctrl
  594. #define PMIC_ADC_ADC_EN (1 << 0)
  595. #define PMIC_ADC_SW_CH_RUN (1 << 1)
  596. #define PMIC_ADC_ADC_12B (1 << 2)
  597. #define PMIC_ADC_ADC_SIGN_CODE (1 << 3)
  598. #define PMIC_ADC_SW_CH_RUN_NUM(n) (((n)&0xf) << 4)
  599. #define PMIC_ADC_RG_AUXAD_AVERAGE(n) (((n)&0x7) << 8)
  600. #define PMIC_ADC_ADC_OFFSET_CAL_EN (1 << 12)
  601. // adc_sw_ch_cfg
  602. #define PMIC_ADC_ADC_CS(n) (((n)&0x1f) << 0)
  603. #define PMIC_ADC_ADC_SLOW (1 << 6)
  604. #define PMIC_ADC_ADC_SCALE(n) (((n)&0x3) << 9)
  605. // adc_fast_hw_ch0_cfg
  606. #define PMIC_ADC_FRQ_CS(n) (((n)&0x1f) << 0)
  607. #define PMIC_ADC_FRQ_SLOW (1 << 6)
  608. #define PMIC_ADC_FRQ_DELAY_EN (1 << 7)
  609. #define PMIC_ADC_FRQ_SCALE(n) (((n)&0x3) << 9)
  610. // adc_fast_hw_ch1_cfg
  611. #define PMIC_ADC_FRQ_CS(n) (((n)&0x1f) << 0)
  612. #define PMIC_ADC_FRQ_SLOW (1 << 6)
  613. #define PMIC_ADC_FRQ_DELAY_EN (1 << 7)
  614. #define PMIC_ADC_FRQ_SCALE(n) (((n)&0x3) << 9)
  615. // adc_fast_hw_ch2_cfg
  616. #define PMIC_ADC_FRQ_CS(n) (((n)&0x1f) << 0)
  617. #define PMIC_ADC_FRQ_SLOW (1 << 6)
  618. #define PMIC_ADC_FRQ_DELAY_EN (1 << 7)
  619. #define PMIC_ADC_FRQ_SCALE(n) (((n)&0x3) << 9)
  620. // adc_fast_hw_ch3_cfg
  621. #define PMIC_ADC_FRQ_CS(n) (((n)&0x1f) << 0)
  622. #define PMIC_ADC_FRQ_SLOW (1 << 6)
  623. #define PMIC_ADC_FRQ_DELAY_EN (1 << 7)
  624. #define PMIC_ADC_FRQ_SCALE(n) (((n)&0x3) << 9)
  625. // adc_fast_hw_ch4_cfg
  626. #define PMIC_ADC_FRQ_CS(n) (((n)&0x1f) << 0)
  627. #define PMIC_ADC_FRQ_SLOW (1 << 6)
  628. #define PMIC_ADC_FRQ_DELAY_EN (1 << 7)
  629. #define PMIC_ADC_FRQ_SCALE(n) (((n)&0x3) << 9)
  630. // adc_fast_hw_ch5_cfg
  631. #define PMIC_ADC_FRQ_CS(n) (((n)&0x1f) << 0)
  632. #define PMIC_ADC_FRQ_SLOW (1 << 6)
  633. #define PMIC_ADC_FRQ_DELAY_EN (1 << 7)
  634. #define PMIC_ADC_FRQ_SCALE(n) (((n)&0x3) << 9)
  635. // adc_fast_hw_ch6_cfg
  636. #define PMIC_ADC_FRQ_CS(n) (((n)&0x1f) << 0)
  637. #define PMIC_ADC_FRQ_SLOW (1 << 6)
  638. #define PMIC_ADC_FRQ_DELAY_EN (1 << 7)
  639. #define PMIC_ADC_FRQ_SCALE(n) (((n)&0x3) << 9)
  640. // adc_fast_hw_ch7_cfg
  641. #define PMIC_ADC_FRQ_CS(n) (((n)&0x1f) << 0)
  642. #define PMIC_ADC_FRQ_SLOW (1 << 6)
  643. #define PMIC_ADC_FRQ_DELAY_EN (1 << 7)
  644. #define PMIC_ADC_FRQ_SCALE(n) (((n)&0x3) << 9)
  645. // adc_slow_hw_ch0_cfg
  646. #define PMIC_ADC_REQ_CS(n) (((n)&0x1f) << 0)
  647. #define PMIC_ADC_REQ_SLOW (1 << 6)
  648. #define PMIC_ADC_REQ_DELAY_EN (1 << 7)
  649. #define PMIC_ADC_REQ_SCALE(n) (((n)&0x3) << 9)
  650. // adc_slow_hw_ch1_cfg
  651. #define PMIC_ADC_REQ_CS(n) (((n)&0x1f) << 0)
  652. #define PMIC_ADC_REQ_SLOW (1 << 6)
  653. #define PMIC_ADC_REQ_DELAY_EN (1 << 7)
  654. #define PMIC_ADC_REQ_SCALE(n) (((n)&0x3) << 9)
  655. // adc_slow_hw_ch2_cfg
  656. #define PMIC_ADC_REQ_CS(n) (((n)&0x1f) << 0)
  657. #define PMIC_ADC_REQ_SLOW (1 << 6)
  658. #define PMIC_ADC_REQ_DELAY_EN (1 << 7)
  659. #define PMIC_ADC_REQ_SCALE(n) (((n)&0x3) << 9)
  660. // adc_slow_hw_ch3_cfg
  661. #define PMIC_ADC_REQ_CS(n) (((n)&0x1f) << 0)
  662. #define PMIC_ADC_REQ_SLOW (1 << 6)
  663. #define PMIC_ADC_REQ_DELAY_EN (1 << 7)
  664. #define PMIC_ADC_REQ_SCALE(n) (((n)&0x3) << 9)
  665. // adc_slow_hw_ch4_cfg
  666. #define PMIC_ADC_REQ_CS(n) (((n)&0x1f) << 0)
  667. #define PMIC_ADC_REQ_SLOW (1 << 6)
  668. #define PMIC_ADC_REQ_DELAY_EN (1 << 7)
  669. #define PMIC_ADC_REQ_SCALE(n) (((n)&0x3) << 9)
  670. // adc_slow_hw_ch5_cfg
  671. #define PMIC_ADC_REQ_CS(n) (((n)&0x1f) << 0)
  672. #define PMIC_ADC_REQ_SLOW (1 << 6)
  673. #define PMIC_ADC_REQ_DELAY_EN (1 << 7)
  674. #define PMIC_ADC_REQ_SCALE(n) (((n)&0x3) << 9)
  675. // adc_slow_hw_ch6_cfg
  676. #define PMIC_ADC_REQ_CS(n) (((n)&0x1f) << 0)
  677. #define PMIC_ADC_REQ_SLOW (1 << 6)
  678. #define PMIC_ADC_REQ_DELAY_EN (1 << 7)
  679. #define PMIC_ADC_REQ_SCALE(n) (((n)&0x3) << 9)
  680. // adc_slow_hw_ch7_cfg
  681. #define PMIC_ADC_REQ_CS(n) (((n)&0x1f) << 0)
  682. #define PMIC_ADC_REQ_SLOW (1 << 6)
  683. #define PMIC_ADC_REQ_DELAY_EN (1 << 7)
  684. #define PMIC_ADC_REQ_SCALE(n) (((n)&0x3) << 9)
  685. // adc_hw_ch_delay
  686. #define PMIC_ADC_HW_CH_DELAY(n) (((n)&0xff) << 0)
  687. // adc_dat
  688. #define PMIC_ADC_ADC_DAT_SW(n) (((n)&0xfff) << 0)
  689. // adc_cfg_int_en
  690. #define PMIC_ADC_ADC_INT_EN (1 << 0)
  691. // adc_cfg_int_clr
  692. #define PMIC_ADC_ADC_INT_CLR (1 << 0)
  693. // adc_cfg_int_sattus
  694. #define PMIC_ADC_ADC_INT_STATUS (1 << 0)
  695. // adc_cfg_int_raw
  696. #define PMIC_ADC_ADC_INT_RAW (1 << 0)
  697. // adc_debug
  698. #define PMIC_ADC_ADC_DBG_CNT(n) (((n)&0xff) << 0)
  699. #define PMIC_ADC_ADC_DBG_STATE(n) (((n)&0x7) << 8)
  700. #define PMIC_ADC_ADC_DBG_CH(n) (((n)&0x1f) << 11)
  701. // adc_fast_hw_timer_en
  702. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_TIMER_EN (1 << 0)
  703. #define PMIC_ADC_RG_ADC_FAST_HW_CH1_TIMER_EN (1 << 1)
  704. #define PMIC_ADC_RG_ADC_FAST_HW_CH2_TIMER_EN (1 << 2)
  705. #define PMIC_ADC_RG_ADC_FAST_HW_CH3_TIMER_EN (1 << 3)
  706. #define PMIC_ADC_RG_ADC_FAST_HW_CH4_TIMER_EN (1 << 4)
  707. #define PMIC_ADC_RG_ADC_FAST_HW_CH5_TIMER_EN (1 << 5)
  708. #define PMIC_ADC_RG_ADC_FAST_HW_CH6_TIMER_EN (1 << 6)
  709. #define PMIC_ADC_RG_ADC_FAST_HW_CH7_TIMER_EN (1 << 7)
  710. // adc_fast_hw_timer_div
  711. #define PMIC_ADC_RG_ADC_FAST_HW_TIMER_DIV(n) (((n)&0xffff) << 0)
  712. // adc_fast_hw_ch0_timer_thresh
  713. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_TIMER_THRESH(n) (((n)&0xffff) << 0)
  714. // adc_fast_hw_ch1_timer_thresh
  715. #define PMIC_ADC_RG_ADC_FAST_HW_CH1_TIMER_THRESH(n) (((n)&0xffff) << 0)
  716. // adc_fast_hw_ch2_timer_thresh
  717. #define PMIC_ADC_RG_ADC_FAST_HW_CH2_TIMER_THRESH(n) (((n)&0xffff) << 0)
  718. // adc_fast_hw_ch3_timer_thresh
  719. #define PMIC_ADC_RG_ADC_FAST_HW_CH3_TIMER_THRESH(n) (((n)&0xffff) << 0)
  720. // adc_fast_hw_ch4_timer_thresh
  721. #define PMIC_ADC_RG_ADC_FAST_HW_CH4_TIMER_THRESH(n) (((n)&0xffff) << 0)
  722. // adc_fast_hw_ch5_timer_thresh
  723. #define PMIC_ADC_RG_ADC_FAST_HW_CH5_TIMER_THRESH(n) (((n)&0xffff) << 0)
  724. // adc_fast_hw_ch6_timer_thresh
  725. #define PMIC_ADC_RG_ADC_FAST_HW_CH6_TIMER_THRESH(n) (((n)&0xffff) << 0)
  726. // adc_fast_hw_ch7_timer_thresh
  727. #define PMIC_ADC_RG_ADC_FAST_HW_CH7_TIMER_THRESH(n) (((n)&0xffff) << 0)
  728. // adc_fast_hw_ch0_dat
  729. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DAT(n) (((n)&0xfff) << 0)
  730. // adc_fast_hw_ch1_dat
  731. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DAT(n) (((n)&0xfff) << 0)
  732. // adc_fast_hw_ch2_dat
  733. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DAT(n) (((n)&0xfff) << 0)
  734. // adc_fast_hw_ch3_dat
  735. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DAT(n) (((n)&0xfff) << 0)
  736. // adc_fast_hw_ch4_dat
  737. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DAT(n) (((n)&0xfff) << 0)
  738. // adc_fast_hw_ch5_dat
  739. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DAT(n) (((n)&0xfff) << 0)
  740. // adc_fast_hw_ch6_dat
  741. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DAT(n) (((n)&0xfff) << 0)
  742. // adc_fast_hw_ch7_dat
  743. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DAT(n) (((n)&0xfff) << 0)
  744. // auxadc_ctrl0
  745. #define PMIC_ADC_RG_AUXAD_CURRENTSEN_EN (1 << 0)
  746. #define PMIC_ADC_RG_AUXAD_THM_CAL (1 << 4)
  747. #define PMIC_ADC_RG_AUXAD_REF_SEL (1 << 5)
  748. // adc_fast_hw_dvalid
  749. #define PMIC_ADC_RG_ADC_FAST_HW_CH0_DVLD (1 << 0)
  750. #define PMIC_ADC_RG_ADC_FAST_HW_CH1_DVLD (1 << 1)
  751. #define PMIC_ADC_RG_ADC_FAST_HW_CH2_DVLD (1 << 2)
  752. #define PMIC_ADC_RG_ADC_FAST_HW_CH3_DVLD (1 << 3)
  753. #define PMIC_ADC_RG_ADC_FAST_HW_CH4_DVLD (1 << 4)
  754. #define PMIC_ADC_RG_ADC_FAST_HW_CH5_DVLD (1 << 5)
  755. #define PMIC_ADC_RG_ADC_FAST_HW_CH6_DVLD (1 << 6)
  756. #define PMIC_ADC_RG_ADC_FAST_HW_CH7_DVLD (1 << 7)
  757. #endif // _PMIC_ADC_H_