AudDrv_Ana.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. #ifndef _AUDDRV_ANA_H_
  38. #define _AUDDRV_ANA_H_
  39. /*****************************************************************************
  40. * C O M P I L E R F L A G S
  41. *****************************************************************************/
  42. /*****************************************************************************
  43. * E X T E R N A L R E F E R E N C E S
  44. *****************************************************************************/
  45. #include "AudDrv_Common.h"
  46. #include "AudDrv_Def.h"
  47. /*****************************************************************************
  48. * D A T A T Y P E S
  49. *****************************************************************************/
  50. /*****************************************************************************
  51. * M A C R O
  52. *****************************************************************************/
  53. /*****************************************************************************
  54. * R E G I S T E R D E F I N I T I O N
  55. *****************************************************************************/
  56. #define PMIC_REG_BASE (0x0000)
  57. /* 6323 pmic reg */
  58. /* ---------------digital pmic register define ------------------------------------------- */
  59. #define ABB_AFE_CON0 (PMIC_REG_BASE+0x4000 + 0x0000)
  60. #define ABB_AFE_CON1 (PMIC_REG_BASE+0x4000 + 0x0002)
  61. #define ABB_AFE_CON2 (PMIC_REG_BASE+0x4000 + 0x0004)
  62. #define ABB_AFE_CON3 (PMIC_REG_BASE+0x4000 + 0x0006)
  63. #define ABB_AFE_CON4 (PMIC_REG_BASE+0x4000 + 0x0008)
  64. #define ABB_AFE_CON5 (PMIC_REG_BASE+0x4000 + 0x000A)
  65. #define ABB_AFE_CON6 (PMIC_REG_BASE+0x4000 + 0x000C)
  66. #define ABB_AFE_CON7 (PMIC_REG_BASE+0x4000 + 0x000E)
  67. #define ABB_AFE_CON8 (PMIC_REG_BASE+0x4000 + 0x0010)
  68. #define ABB_AFE_CON9 (PMIC_REG_BASE+0x4000 + 0x0012)
  69. #define ABB_AFE_CON10 (PMIC_REG_BASE+0x4000 + 0x0014)
  70. #define ABB_AFE_CON11 (PMIC_REG_BASE+0x4000 + 0x0016)
  71. #define ABB_AFE_STA0 (PMIC_REG_BASE+0x4000 + 0x0018)
  72. #define ABB_AFE_STA1 (PMIC_REG_BASE+0x4000 + 0x001A)
  73. #define ABB_AFE_STA2 (PMIC_REG_BASE+0x4000 + 0x001C)
  74. #define AFE_UP8X_FIFO_CFG0 (PMIC_REG_BASE+0x4000 + 0x001E)
  75. #define AFE_UP8X_FIFO_LOG_MON0 (PMIC_REG_BASE+0x4000 + 0x0020)
  76. #define AFE_UP8X_FIFO_LOG_MON1 (PMIC_REG_BASE+0x4000 + 0x0022)
  77. #define AFE_PMIC_NEWIF_CFG0 (PMIC_REG_BASE+0x4000 + 0x0024)
  78. #define AFE_PMIC_NEWIF_CFG1 (PMIC_REG_BASE+0x4000 + 0x0026)
  79. #define AFE_PMIC_NEWIF_CFG2 (PMIC_REG_BASE+0x4000 + 0x0028)
  80. #define AFE_PMIC_NEWIF_CFG3 (PMIC_REG_BASE+0x4000 + 0x002A)
  81. #define ABB_AFE_TOP_CON0 (PMIC_REG_BASE+0x4000 + 0x002C)
  82. #define ABB_MON_DEBUG0 (PMIC_REG_BASE+0x4000 + 0x002E)
  83. /* ---------------digital pmic register define end --------------------------------------- */
  84. /* ---------------analog pmic register define start -------------------------------------- */
  85. #define TOP_CKPDN0 (PMIC_REG_BASE + 0x102)
  86. #define TOP_CKPDN0_SET (PMIC_REG_BASE + 0x104)
  87. #define TOP_CKPDN0_CLR (PMIC_REG_BASE + 0x106)
  88. #define TOP_CKPDN1 (PMIC_REG_BASE + 0x108)
  89. #define TOP_CKPDN1_SET (PMIC_REG_BASE + 0x10A)
  90. #define TOP_CKPDN1_CLR (PMIC_REG_BASE + 0x10C)
  91. #define TOP_CKPDN2 (PMIC_REG_BASE + 0x10E)
  92. #define TOP_CKPDN2_SET (PMIC_REG_BASE + 0x110)
  93. #define TOP_CKPDN2_CLR (PMIC_REG_BASE + 0x112)
  94. #define TOP_RST_CON_SET (PMIC_REG_BASE + 0x116)
  95. #define TOP_RST_CON_CLR (PMIC_REG_BASE + 0x118)
  96. #define TOP_CKCON1 (PMIC_REG_BASE + 0x126)
  97. #define SPK_CON0 (PMIC_REG_BASE + 0x052)
  98. #define SPK_CON1 (PMIC_REG_BASE + 0x054)
  99. #define SPK_CON2 (PMIC_REG_BASE + 0x056)
  100. #define SPK_CON6 (PMIC_REG_BASE + 0x05E)
  101. #define SPK_CON7 (PMIC_REG_BASE + 0x060)
  102. #define SPK_CON8 (PMIC_REG_BASE + 0x062)
  103. #define SPK_CON9 (PMIC_REG_BASE + 0x064)
  104. #define SPK_CON10 (PMIC_REG_BASE + 0x066)
  105. #define SPK_CON11 (PMIC_REG_BASE + 0x068)
  106. #define SPK_CON12 (PMIC_REG_BASE + 0x06A)
  107. #define CID (PMIC_REG_BASE + 0x100)
  108. #define AUDTOP_CON0 (PMIC_REG_BASE + 0x700)
  109. #define AUDTOP_CON1 (PMIC_REG_BASE + 0x702)
  110. #define AUDTOP_CON2 (PMIC_REG_BASE + 0x704)
  111. #define AUDTOP_CON3 (PMIC_REG_BASE + 0x706)
  112. #define AUDTOP_CON4 (PMIC_REG_BASE + 0x708)
  113. #define AUDTOP_CON5 (PMIC_REG_BASE + 0x70A)
  114. #define AUDTOP_CON6 (PMIC_REG_BASE + 0x70C)
  115. #define AUDTOP_CON7 (PMIC_REG_BASE + 0x70E)
  116. #define AUDTOP_CON8 (PMIC_REG_BASE + 0x710)
  117. #define AUDTOP_CON9 (PMIC_REG_BASE + 0x712)
  118. /* ---------------analog pmic register define end --------------------------------------- */
  119. void Ana_Set_Reg(uint32 offset, uint32 value, uint32 mask);
  120. uint32 Ana_Get_Reg(uint32 offset);
  121. /* for debug usage */
  122. void Ana_Log_Print(void);
  123. #endif