AudDrv_Ana.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. * MT6583 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. #if 0 /* defined in <mach/upmu_hw.h> */
  59. /* ---------------digital pmic register define end --------------------------------------- */
  60. /* ---------------analog pmic register define start -------------------------------------- */
  61. #define TOP_CKPDN0 (PMIC_REG_BASE + 0x102)
  62. #define TOP_CKPDN0_SET (PMIC_REG_BASE + 0x104)
  63. #define TOP_CKPDN0_CLR (PMIC_REG_BASE + 0x106)
  64. #define TOP_CKPDN1 (PMIC_REG_BASE + 0x108)
  65. #define TOP_CKPDN1_SET (PMIC_REG_BASE + 0x10A)
  66. #define TOP_CKPDN1_CLR (PMIC_REG_BASE + 0x10C)
  67. #define TOP_CKPDN2 (PMIC_REG_BASE + 0x10E)
  68. #define TOP_CKPDN2_SET (PMIC_REG_BASE + 0x110)
  69. #define TOP_CKPDN2_CLR (PMIC_REG_BASE + 0x112)
  70. #define TOP_CKCON1 (PMIC_REG_BASE + 0x126)
  71. #ifdef SPK_CON0
  72. #undef SPK_CON0
  73. #endif
  74. #define SPK_CON0 (PMIC_REG_BASE + 0x052)
  75. #ifdef SPK_CON1
  76. #undef SPK_CON1
  77. #endif
  78. #define SPK_CON1 (PMIC_REG_BASE + 0x054)
  79. #ifdef SPK_CON2
  80. #undef SPK_CON2
  81. #endif
  82. #define SPK_CON2 (PMIC_REG_BASE + 0x056)
  83. #ifdef SPK_CON6
  84. #undef SPK_CON6
  85. #endif
  86. #define SPK_CON6 (PMIC_REG_BASE + 0x05E)
  87. #ifdef SPK_CON7
  88. #undef SPK_CON7
  89. #endif
  90. #define SPK_CON7 (PMIC_REG_BASE + 0x060)
  91. #ifdef SPK_CON8
  92. #undef SPK_CON8
  93. #endif
  94. #define SPK_CON8 (PMIC_REG_BASE + 0x062)
  95. #ifdef SPK_CON9
  96. #undef SPK_CON9
  97. #endif
  98. #define SPK_CON9 (PMIC_REG_BASE + 0x064)
  99. #ifdef SPK_CON10
  100. #undef SPK_CON10
  101. #endif
  102. #define SPK_CON10 (PMIC_REG_BASE + 0x066)
  103. #ifdef SPK_CON11
  104. #undef SPK_CON11
  105. #endif
  106. #define SPK_CON11 (PMIC_REG_BASE + 0x068)
  107. #ifdef SPK_CON12
  108. #undef SPK_CON12
  109. #endif
  110. #define SPK_CON12 (PMIC_REG_BASE + 0x06A)
  111. #ifdef CID
  112. #undef CID
  113. #endif
  114. #define CID (PMIC_REG_BASE + 0x100)
  115. #ifdef AUDTOP_CON0
  116. #undef AUDTOP_CON0
  117. #endif
  118. #define AUDTOP_CON0 (PMIC_REG_BASE + 0x700)
  119. #ifdef AUDTOP_CON1
  120. #undef AUDTOP_CON1
  121. #endif
  122. #define AUDTOP_CON1 (PMIC_REG_BASE + 0x702)
  123. #ifdef AUDTOP_CON2
  124. #undef AUDTOP_CON2
  125. #endif
  126. #define AUDTOP_CON2 (PMIC_REG_BASE + 0x704)
  127. #ifdef AUDTOP_CON3
  128. #undef AUDTOP_CON3
  129. #endif
  130. #define AUDTOP_CON3 (PMIC_REG_BASE + 0x706)
  131. #ifdef AUDTOP_CON4
  132. #undef AUDTOP_CON4
  133. #endif
  134. #define AUDTOP_CON4 (PMIC_REG_BASE + 0x708)
  135. #ifdef AUDTOP_CON5
  136. #undef AUDTOP_CON5
  137. #endif
  138. #define AUDTOP_CON5 (PMIC_REG_BASE + 0x70A)
  139. #ifdef AUDTOP_CON6
  140. #undef AUDTOP_CON6
  141. #endif
  142. #define AUDTOP_CON6 (PMIC_REG_BASE + 0x70C)
  143. #ifdef AUDTOP_CON7
  144. #undef AUDTOP_CON7
  145. #endif
  146. #define AUDTOP_CON7 (PMIC_REG_BASE + 0x70E)
  147. #ifdef AUDTOP_CON8
  148. #undef AUDTOP_CON8
  149. #endif
  150. #define AUDTOP_CON8 (PMIC_REG_BASE + 0x710)
  151. #ifdef AUDTOP_CON9
  152. #undef AUDTOP_CON9
  153. #endif
  154. #define AUDTOP_CON9 (PMIC_REG_BASE + 0x712)
  155. #else
  156. #include <mach/upmu_hw.h>
  157. #endif
  158. /* 6323 pmic reg */
  159. /* --------------- digital pmic register define --------------- */
  160. #define ABB_AFE_CON0 (PMIC_REG_BASE+0x4000 + 0x0000)
  161. #define ABB_AFE_CON1 (PMIC_REG_BASE+0x4000 + 0x0002)
  162. #define ABB_AFE_CON2 (PMIC_REG_BASE+0x4000 + 0x0004)
  163. #define ABB_AFE_CON3 (PMIC_REG_BASE+0x4000 + 0x0006)
  164. #define ABB_AFE_CON4 (PMIC_REG_BASE+0x4000 + 0x0008)
  165. #define ABB_AFE_CON5 (PMIC_REG_BASE+0x4000 + 0x000A)
  166. #define ABB_AFE_CON6 (PMIC_REG_BASE+0x4000 + 0x000C)
  167. #define ABB_AFE_CON7 (PMIC_REG_BASE+0x4000 + 0x000E)
  168. #define ABB_AFE_CON8 (PMIC_REG_BASE+0x4000 + 0x0010)
  169. #define ABB_AFE_CON9 (PMIC_REG_BASE+0x4000 + 0x0012)
  170. #define ABB_AFE_CON10 (PMIC_REG_BASE+0x4000 + 0x0014)
  171. #define ABB_AFE_CON11 (PMIC_REG_BASE+0x4000 + 0x0016)
  172. #define ABB_AFE_STA0 (PMIC_REG_BASE+0x4000 + 0x0018)
  173. #define ABB_AFE_STA1 (PMIC_REG_BASE+0x4000 + 0x001A)
  174. #define ABB_AFE_STA2 (PMIC_REG_BASE+0x4000 + 0x001C)
  175. #define AFE_UP8X_FIFO_CFG0 (PMIC_REG_BASE+0x4000 + 0x001E)
  176. #define AFE_UP8X_FIFO_LOG_MON0 (PMIC_REG_BASE+0x4000 + 0x0020)
  177. #define AFE_UP8X_FIFO_LOG_MON1 (PMIC_REG_BASE+0x4000 + 0x0022)
  178. #define AFE_PMIC_NEWIF_CFG0 (PMIC_REG_BASE+0x4000 + 0x0024)
  179. #define AFE_PMIC_NEWIF_CFG1 (PMIC_REG_BASE+0x4000 + 0x0026)
  180. #define AFE_PMIC_NEWIF_CFG2 (PMIC_REG_BASE+0x4000 + 0x0028)
  181. #define AFE_PMIC_NEWIF_CFG3 (PMIC_REG_BASE+0x4000 + 0x002A)
  182. #define ABB_AFE_TOP_CON0 (PMIC_REG_BASE+0x4000 + 0x002C)
  183. #define ABB_MON_DEBUG0 (PMIC_REG_BASE+0x4000 + 0x002E)
  184. void Ana_Set_Reg(uint32 offset, uint32 value, uint32 mask);
  185. uint32 Ana_Get_Reg(uint32 offset);
  186. /* for debug usage */
  187. void Ana_Log_Print(void);
  188. #endif