AudDrv_Ana.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. /*
  2. * Copyright (C) 2007 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*******************************************************************************
  17. *
  18. * Filename:
  19. * ---------
  20. * AudDrv_Ana.h
  21. *
  22. * Project:
  23. * --------
  24. * MT6797 Audio Driver Ana
  25. *
  26. * Description:
  27. * ------------
  28. * Audio register
  29. *
  30. * Author:
  31. * -------
  32. * Chipeng Chang (mtk02308)
  33. *
  34. *------------------------------------------------------------------------------
  35. *
  36. *
  37. *******************************************************************************/
  38. #ifndef _AUDDRV_ANA_H_
  39. #define _AUDDRV_ANA_H_
  40. /*****************************************************************************
  41. * C O M P I L E R F L A G S
  42. *****************************************************************************/
  43. /*****************************************************************************
  44. * E X T E R N A L R E F E R E N C E S
  45. *****************************************************************************/
  46. #include "AudDrv_Common.h"
  47. #include "AudDrv_Def.h"
  48. /*****************************************************************************
  49. * D A T A T Y P E S
  50. *****************************************************************************/
  51. /*****************************************************************************
  52. * M A C R O
  53. *****************************************************************************/
  54. /*****************************************************************************
  55. * R E G I S T E R D E F I N I T I O N
  56. *****************************************************************************/
  57. #define PMIC_REG_BASE (0x0000)
  58. #define AFE_UL_DL_CON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0000))
  59. #define AFE_DL_SRC2_CON0_H ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0002))
  60. #define AFE_DL_SRC2_CON0_L ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0004))
  61. #define AFE_DL_SDM_CON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0006))
  62. #define AFE_DL_SDM_CON1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0008))
  63. #define AFE_UL_SRC_CON0_H ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x000a))
  64. #define AFE_UL_SRC_CON0_L ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x000c))
  65. #define AFE_UL_SRC_CON1_H ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x000e))
  66. #define AFE_UL_SRC_CON1_L ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0010))
  67. #define PMIC_AFE_TOP_CON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0012))
  68. #define AFE_AUDIO_TOP_CON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0014))
  69. #define AFE_DL_SRC_MON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0016))
  70. #define AFE_DL_SDM_TEST0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0018))
  71. #define AFE_MON_DEBUG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x001a))
  72. #define AFUNC_AUD_CON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x001c))
  73. #define AFUNC_AUD_CON1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x001e))
  74. #define AFUNC_AUD_CON2 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0020))
  75. #define AFUNC_AUD_CON3 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0022))
  76. #define AFUNC_AUD_CON4 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0024))
  77. #define AFUNC_AUD_MON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0026))
  78. #define AFUNC_AUD_MON1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0028))
  79. #define AUDRC_TUNE_MON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x002a))
  80. #define AFE_UP8X_FIFO_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x002c))
  81. #define AFE_UP8X_FIFO_LOG_MON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x002e))
  82. #define AFE_UP8X_FIFO_LOG_MON1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0030))
  83. #define AFE_DL_DC_COMP_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0032))
  84. #define AFE_DL_DC_COMP_CFG1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0034))
  85. #define AFE_DL_DC_COMP_CFG2 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0036))
  86. #define AFE_PMIC_NEWIF_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0038))
  87. #define AFE_PMIC_NEWIF_CFG1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x003a))
  88. #define AFE_PMIC_NEWIF_CFG2 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x003c))
  89. #define AFE_PMIC_NEWIF_CFG3 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x003e))
  90. #define AFE_SGEN_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0040))
  91. #define AFE_SGEN_CFG1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0042))
  92. #define AFE_ADDA2_UP8X_FIFO_LOG_MON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x004c))
  93. #define AFE_ADDA2_UP8X_FIFO_LOG_MON1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x004e))
  94. #define AFE_ADDA2_PMIC_NEWIF_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0050))
  95. #define AFE_ADDA2_PMIC_NEWIF_CFG1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0052))
  96. #define AFE_ADDA2_PMIC_NEWIF_CFG2 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0054))
  97. #define AFE_VOW_TOP ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0070))
  98. #define AFE_VOW_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0072))
  99. #define AFE_VOW_CFG1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0074))
  100. #define AFE_VOW_CFG2 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0076))
  101. #define AFE_VOW_CFG3 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0078))
  102. #define AFE_VOW_CFG4 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x007a))
  103. #define AFE_VOW_CFG5 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x007c))
  104. #define AFE_VOW_MON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x007e))
  105. #define AFE_VOW_MON1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0080))
  106. #define AFE_VOW_MON2 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0082))
  107. #define AFE_VOW_MON3 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0084))
  108. #define AFE_VOW_MON4 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0086))
  109. #define AFE_VOW_MON5 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0088))
  110. #define AFE_VOW_TGEN_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x008a))
  111. #define AFE_VOW_POSDIV_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x008c))
  112. #define AFE_VOW_HPF_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x008e))
  113. #define AFE_DCCLK_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0090))
  114. #define AFE_DCCLK_CFG1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0092))
  115. #define AFE_HPANC_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0094))
  116. #define AFE_NCP_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0096))
  117. #define AFE_NCP_CFG1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x0098))
  118. #define AFE_VOW_PERIODIC_CFG0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00a0))
  119. #define AFE_VOW_PERIODIC_CFG1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00a2))
  120. #define AFE_VOW_PERIODIC_CFG2 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00a4))
  121. #define AFE_VOW_PERIODIC_CFG3 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00a6))
  122. #define AFE_VOW_PERIODIC_CFG4 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00a8))
  123. #define AFE_VOW_PERIODIC_CFG5 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00aa))
  124. #define AFE_VOW_PERIODIC_CFG6 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00ac))
  125. #define AFE_VOW_PERIODIC_CFG7 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00ae))
  126. #define AFE_VOW_PERIODIC_CFG8 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00b0))
  127. #define AFE_VOW_PERIODIC_CFG9 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00b2))
  128. #define AFE_VOW_PERIODIC_CFG10 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00b4))
  129. #define AFE_VOW_PERIODIC_CFG11 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00b6))
  130. #define AFE_VOW_PERIODIC_CFG12 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00b8))
  131. #define AFE_VOW_PERIODIC_CFG13 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00ba))
  132. #define AFE_VOW_PERIODIC_CFG14 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00bc))
  133. #define AFE_VOW_PERIODIC_CFG15 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00be))
  134. #define AFE_VOW_PERIODIC_CFG16 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00c0))
  135. #define AFE_VOW_PERIODIC_CFG17 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00c2))
  136. #define AFE_VOW_PERIODIC_CFG18 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00c4))
  137. #define AFE_VOW_PERIODIC_CFG19 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00c6))
  138. #define AFE_VOW_PERIODIC_CFG20 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00c8))
  139. #define AFE_VOW_PERIODIC_CFG21 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00ca))
  140. #define AFE_VOW_PERIODIC_CFG22 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00cc))
  141. #define AFE_VOW_PERIODIC_CFG23 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00ce))
  142. #define AFE_VOW_PERIODIC_MON0 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00d0))
  143. #define AFE_VOW_PERIODIC_MON1 ((UINT32)(PMIC_REG_BASE + 0x2000 + 0x00d2))
  144. /* TODO: 6328 analog part */
  145. /* TODO: KC: not used */
  146. #define STRUP_CON0 ((UINT32)(PMIC_REG_BASE + 0x0000))
  147. #define STRUP_CON1 ((UINT32)(PMIC_REG_BASE + 0x0002))
  148. #define STRUP_CON2 ((UINT32)(PMIC_REG_BASE + 0x0004))
  149. #define STRUP_CON3 ((UINT32)(PMIC_REG_BASE + 0x0006))
  150. #define STRUP_CON4 ((UINT32)(PMIC_REG_BASE + 0x0008))
  151. #define STRUP_CON5 ((UINT32)(PMIC_REG_BASE + 0x000a))
  152. #define STRUP_CON6 ((UINT32)(PMIC_REG_BASE + 0x000c))
  153. #define STRUP_CON7 ((UINT32)(PMIC_REG_BASE + 0x000e))
  154. #define STRUP_CON8 ((UINT32)(PMIC_REG_BASE + 0x0010))
  155. #define STRUP_CON9 ((UINT32)(PMIC_REG_BASE + 0x0012))
  156. #define STRUP_CON10 ((UINT32)(PMIC_REG_BASE + 0x0014))
  157. #define STRUP_CON11 ((UINT32)(PMIC_REG_BASE + 0x0016))
  158. #define STRUP_CON12 ((UINT32)(PMIC_REG_BASE + 0x0018))
  159. #define STRUP_CON13 ((UINT32)(PMIC_REG_BASE + 0x001a))
  160. #define STRUP_CON14 ((UINT32)(PMIC_REG_BASE + 0x001c))
  161. #define STRUP_CON15 ((UINT32)(PMIC_REG_BASE + 0x001e))
  162. #define STRUP_CON16 ((UINT32)(PMIC_REG_BASE + 0x0020))
  163. #define STRUP_CON17 ((UINT32)(PMIC_REG_BASE + 0x0022))
  164. #define STRUP_CON18 ((UINT32)(PMIC_REG_BASE + 0x0024))
  165. #define STRUP_CON19 ((UINT32)(PMIC_REG_BASE + 0x0026))
  166. #define STRUP_CON20 ((UINT32)(PMIC_REG_BASE + 0x0028))
  167. #define STRUP_CON21 ((UINT32)(PMIC_REG_BASE + 0x002a))
  168. #define STRUP_CON22 ((UINT32)(PMIC_REG_BASE + 0x002c))
  169. #define STRUP_CON23 ((UINT32)(PMIC_REG_BASE + 0x002e))
  170. #define STRUP_ANA_CON0 ((UINT32)(PMIC_REG_BASE+0x0030))
  171. #define STRUP_ANA_CON1 ((UINT32)(PMIC_REG_BASE+0x0032))
  172. /* TODO: KC: not used end */
  173. #define HWCID ((UINT32)(PMIC_REG_BASE+0x0200))
  174. #define SWCID ((UINT32)(PMIC_REG_BASE+0x0202))
  175. #define TOP_CON ((UINT32)(PMIC_REG_BASE+0x0204))
  176. #define TEST_OUT ((UINT32)(PMIC_REG_BASE+0x0206))
  177. #define TEST_CON0 ((UINT32)(PMIC_REG_BASE+0x0208))
  178. #define TEST_CON1 ((UINT32)(PMIC_REG_BASE+0x020A))
  179. #define TOP_STATUS ((UINT32)(PMIC_REG_BASE+0x0234))
  180. #define TOP_CKPDN_CON0 ((UINT32)(PMIC_REG_BASE+0x023A))
  181. #define TOP_CKPDN_CON0_SET ((UINT32)(PMIC_REG_BASE+0x023C))
  182. #define TOP_CKPDN_CON0_CLR ((UINT32)(PMIC_REG_BASE+0x023E))
  183. #define TOP_CKPDN_CON1 ((UINT32)(PMIC_REG_BASE+0x0240))
  184. #define TOP_CKPDN_CON1_SET ((UINT32)(PMIC_REG_BASE+0x0242))
  185. #define TOP_CKPDN_CON1_CLR ((UINT32)(PMIC_REG_BASE+0x0244))
  186. #define TOP_CKPDN_CON2 ((UINT32)(PMIC_REG_BASE+0x0246))
  187. #define TOP_CKPDN_CON2_SET ((UINT32)(PMIC_REG_BASE+0x0248))
  188. #define TOP_CKPDN_CON2_CLR ((UINT32)(PMIC_REG_BASE+0x024A))
  189. #define TOP_CKPDN_CON3 ((UINT32)(PMIC_REG_BASE+0x024C))
  190. #define TOP_CKPDN_CON3_SET ((UINT32)(PMIC_REG_BASE+0x024E))
  191. #define TOP_CKPDN_CON3_CLR ((UINT32)(PMIC_REG_BASE+0x0250))
  192. #define TOP_CKPDN_CON4 ((UINT32)(PMIC_REG_BASE+0x0252))
  193. #define TOP_CKPDN_CON4_SET ((UINT32)(PMIC_REG_BASE+0x0254))
  194. #define TOP_CKPDN_CON4_CLR ((UINT32)(PMIC_REG_BASE+0x0256))
  195. #define TOP_CKPDN_CON5 ((UINT32)(PMIC_REG_BASE+0x0258))
  196. #define TOP_CKPDN_CON5_SET ((UINT32)(PMIC_REG_BASE+0x025A))
  197. #define TOP_CKPDN_CON5_CLR ((UINT32)(PMIC_REG_BASE+0x025C))
  198. #define TOP_CKSEL_CON0 ((UINT32)(PMIC_REG_BASE+0x025E))
  199. #define TOP_CKSEL_CON0_SET ((UINT32)(PMIC_REG_BASE+0x0260))
  200. #define TOP_CKSEL_CON0_CLR ((UINT32)(PMIC_REG_BASE+0x0262))
  201. #define TOP_CKSEL_CON1 ((UINT32)(PMIC_REG_BASE+0x0264))
  202. #define TOP_CKSEL_CON1_SET ((UINT32)(PMIC_REG_BASE+0x0266))
  203. #define TOP_CKSEL_CON1_CLR ((UINT32)(PMIC_REG_BASE+0x0268))
  204. #define TOP_CKSEL_CON2 ((UINT32)(PMIC_REG_BASE+0x026A))
  205. #define TOP_CKSEL_CON2_SET ((UINT32)(PMIC_REG_BASE+0x026C))
  206. #define TOP_CKSEL_CON2_CLR ((UINT32)(PMIC_REG_BASE+0x026E))
  207. #define TOP_CKSEL_CON3 ((UINT32)(PMIC_REG_BASE+0x0270))
  208. #define TOP_CKSEL_CON3_SET ((UINT32)(PMIC_REG_BASE+0x0272))
  209. #define TOP_CKSEL_CON3_CLR ((UINT32)(PMIC_REG_BASE+0x0274))
  210. #define TOP_CKDIVSEL_CON0 ((UINT32)(PMIC_REG_BASE+0x0276))
  211. #define TOP_CKDIVSEL_CON0_SET ((UINT32)(PMIC_REG_BASE+0x0278))
  212. #define TOP_CKDIVSEL_CON0_CLR ((UINT32)(PMIC_REG_BASE+0x027A))
  213. #define TOP_CKDIVSEL_CON1 ((UINT32)(PMIC_REG_BASE+0x027C))
  214. #define TOP_CKDIVSEL_CON1_SET ((UINT32)(PMIC_REG_BASE+0x027E))
  215. #define TOP_CKDIVSEL_CON1_CLR ((UINT32)(PMIC_REG_BASE+0x0280))
  216. #define TOP_CKHWEN_CON0 ((UINT32)(PMIC_REG_BASE+0x0282))
  217. #define TOP_CKHWEN_CON0_SET ((UINT32)(PMIC_REG_BASE+0x0284))
  218. #define TOP_CKHWEN_CON0_CLR ((UINT32)(PMIC_REG_BASE+0x0286))
  219. #define TOP_CKHWEN_CON1 ((UINT32)(PMIC_REG_BASE+0x0288))
  220. #define TOP_CKHWEN_CON1_SET ((UINT32)(PMIC_REG_BASE+0x028A))
  221. #define TOP_CKHWEN_CON1_CLR ((UINT32)(PMIC_REG_BASE+0x028C))
  222. #define TOP_CKHWEN_CON2 ((UINT32)(PMIC_REG_BASE+0x028E))
  223. #define TOP_CKHWEN_CON2_SET ((UINT32)(PMIC_REG_BASE+0x0290))
  224. #define TOP_CKHWEN_CON2_CLR ((UINT32)(PMIC_REG_BASE+0x0292))
  225. #define TOP_CKTST_CON0 ((UINT32)(PMIC_REG_BASE+0x0294))
  226. #define TOP_CKTST_CON1 ((UINT32)(PMIC_REG_BASE+0x0296))
  227. #define TOP_CKTST_CON2 ((UINT32)(PMIC_REG_BASE+0x0298))
  228. #define TOP_CLKSQ ((UINT32)(PMIC_REG_BASE+0x029A))
  229. #define TOP_CLKSQ_SET ((UINT32)(PMIC_REG_BASE+0x029C))
  230. #define TOP_CLKSQ_CLR ((UINT32)(PMIC_REG_BASE+0x029E))
  231. #define TOP_CLKSQ_RTC ((UINT32)(PMIC_REG_BASE+0x02A0))
  232. #define TOP_CLKSQ_RTC_SET ((UINT32)(PMIC_REG_BASE+0x02A2))
  233. #define TOP_CLKSQ_RTC_CLR ((UINT32)(PMIC_REG_BASE+0x02A4))
  234. #define TOP_CLK_TRIM ((UINT32)(PMIC_REG_BASE+0x02A6))
  235. #define TOP_RST_CON0 ((UINT32)(PMIC_REG_BASE+0x02A8))
  236. #define TOP_RST_CON0_SET ((UINT32)(PMIC_REG_BASE+0x02AA))
  237. #define TOP_RST_CON0_CLR ((UINT32)(PMIC_REG_BASE+0x02AC))
  238. #define TOP_RST_CON1 ((UINT32)(PMIC_REG_BASE+0x02AE))
  239. #define TOP_RST_CON1_SET ((UINT32)(PMIC_REG_BASE+0x02B0))
  240. #define TOP_RST_CON1_CLR ((UINT32)(PMIC_REG_BASE+0x02B2))
  241. #define TOP_RST_CON2 ((UINT32)(PMIC_REG_BASE+0x02B4))
  242. #define TOP_RST_MISC ((UINT32)(PMIC_REG_BASE+0x02B6))
  243. #define TOP_RST_MISC_SET ((UINT32)(PMIC_REG_BASE+0x02B8))
  244. #define TOP_RST_MISC_CLR ((UINT32)(PMIC_REG_BASE+0x02BA))
  245. #define TOP_RST_STATUS ((UINT32)(PMIC_REG_BASE+0x02BC))
  246. #define TOP_RST_STATUS_SET ((UINT32)(PMIC_REG_BASE+0x02BE))
  247. #define TOP_RST_STATUS_CLR ((UINT32)(PMIC_REG_BASE+0x02C0))
  248. #define ZCD_CON0 ((UINT32)(PMIC_REG_BASE+0x0800))
  249. #define ZCD_CON1 ((UINT32)(PMIC_REG_BASE+0x0802))
  250. #define ZCD_CON2 ((UINT32)(PMIC_REG_BASE+0x0804))
  251. #define ZCD_CON3 ((UINT32)(PMIC_REG_BASE+0x0806))
  252. #define ZCD_CON4 ((UINT32)(PMIC_REG_BASE+0x0808))
  253. #define ZCD_CON5 ((UINT32)(PMIC_REG_BASE+0x080A))
  254. #define LDO_VA18_CON0 ((UINT32)(PMIC_REG_BASE + 0x0A00))
  255. #define LDO_VA18_CON1 ((UINT32)(PMIC_REG_BASE + 0x0A02))
  256. #define LDO_VUSB33_CON0 ((UINT32)(PMIC_REG_BASE + 0x0A16))
  257. #define LDO_VUSB33_CON1 ((UINT32)(PMIC_REG_BASE + 0x0A18))
  258. #define AUDDEC_ANA_CON0 ((UINT32)(PMIC_REG_BASE+0x0CF2))
  259. #define AUDDEC_ANA_CON1 ((UINT32)(PMIC_REG_BASE+0x0CF4))
  260. #define AUDDEC_ANA_CON2 ((UINT32)(PMIC_REG_BASE+0x0CF6))
  261. #define AUDDEC_ANA_CON3 ((UINT32)(PMIC_REG_BASE+0x0CF8))
  262. #define AUDDEC_ANA_CON4 ((UINT32)(PMIC_REG_BASE+0x0CFA))
  263. #define AUDDEC_ANA_CON5 ((UINT32)(PMIC_REG_BASE+0x0CFC))
  264. #define AUDDEC_ANA_CON6 ((UINT32)(PMIC_REG_BASE+0x0CFE))
  265. #define AUDDEC_ANA_CON7 ((UINT32)(PMIC_REG_BASE+0x0D00))
  266. #define AUDDEC_ANA_CON8 ((UINT32)(PMIC_REG_BASE+0x0D02))
  267. #define AUDDEC_ANA_CON9 ((UINT32)(PMIC_REG_BASE+0x0D04))
  268. #define AUDDEC_ANA_CON10 ((UINT32)(PMIC_REG_BASE+0x0D06))
  269. #define AUDENC_ANA_CON0 ((UINT32)(PMIC_REG_BASE+0x0D08))
  270. #define AUDENC_ANA_CON1 ((UINT32)(PMIC_REG_BASE+0x0D0A))
  271. #define AUDENC_ANA_CON2 ((UINT32)(PMIC_REG_BASE+0x0D0C))
  272. #define AUDENC_ANA_CON3 ((UINT32)(PMIC_REG_BASE+0x0D0E))
  273. #define AUDENC_ANA_CON4 ((UINT32)(PMIC_REG_BASE+0x0D10))
  274. #define AUDENC_ANA_CON5 ((UINT32)(PMIC_REG_BASE+0x0D12))
  275. #define AUDENC_ANA_CON6 ((UINT32)(PMIC_REG_BASE+0x0D14))
  276. #define AUDENC_ANA_CON7 ((UINT32)(PMIC_REG_BASE+0x0D16))
  277. #define AUDENC_ANA_CON8 ((UINT32)(PMIC_REG_BASE+0x0D18))
  278. #define AUDENC_ANA_CON9 ((UINT32)(PMIC_REG_BASE+0x0D1A))
  279. #define AUDENC_ANA_CON10 ((UINT32)(PMIC_REG_BASE+0x0D1C))
  280. #define AUDENC_ANA_CON11 ((UINT32)(PMIC_REG_BASE+0x0D1E))
  281. #define AUDENC_ANA_CON12 ((UINT32)(PMIC_REG_BASE+0x0D20))
  282. #define AUDENC_ANA_CON13 ((UINT32)(PMIC_REG_BASE+0x0D22))
  283. #define AUDENC_ANA_CON14 ((UINT32)(PMIC_REG_BASE+0x0D24))
  284. #define AUDENC_ANA_CON15 ((UINT32)(PMIC_REG_BASE+0x0D26))
  285. #define AUDENC_ANA_CON16 ((UINT32)(PMIC_REG_BASE+0x0D28))
  286. #define AUDNCP_CLKDIV_CON0 ((UINT32)(PMIC_REG_BASE+0x0D2A))
  287. #define AUDNCP_CLKDIV_CON1 ((UINT32)(PMIC_REG_BASE+0x0D2C))
  288. #define AUDNCP_CLKDIV_CON2 ((UINT32)(PMIC_REG_BASE+0x0D2E))
  289. #define AUDNCP_CLKDIV_CON3 ((UINT32)(PMIC_REG_BASE+0x0D30))
  290. #define AUDNCP_CLKDIV_CON4 ((UINT32)(PMIC_REG_BASE+0x0D32))
  291. #define GPIO_MODE3 ((UINT32)(0x60D0))
  292. #if 1
  293. /* register number */
  294. #else
  295. #include <mach/upmu_hw.h>
  296. #endif
  297. void Ana_Set_Reg(uint32 offset, uint32 value, uint32 mask);
  298. uint32 Ana_Get_Reg(uint32 offset);
  299. /* for debug usage */
  300. void Ana_Log_Print(void);
  301. #endif