tlv320aic32x4.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. * tlv320aic32x4.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _TLV320AIC32X4_H
  9. #define _TLV320AIC32X4_H
  10. /* tlv320aic32x4 register space (in decimal to match datasheet) */
  11. #define AIC32X4_PAGE1 128
  12. #define AIC32X4_PSEL 0
  13. #define AIC32X4_RESET 1
  14. #define AIC32X4_CLKMUX 4
  15. #define AIC32X4_PLLPR 5
  16. #define AIC32X4_PLLJ 6
  17. #define AIC32X4_PLLDMSB 7
  18. #define AIC32X4_PLLDLSB 8
  19. #define AIC32X4_NDAC 11
  20. #define AIC32X4_MDAC 12
  21. #define AIC32X4_DOSRMSB 13
  22. #define AIC32X4_DOSRLSB 14
  23. #define AIC32X4_NADC 18
  24. #define AIC32X4_MADC 19
  25. #define AIC32X4_AOSR 20
  26. #define AIC32X4_CLKMUX2 25
  27. #define AIC32X4_CLKOUTM 26
  28. #define AIC32X4_IFACE1 27
  29. #define AIC32X4_IFACE2 28
  30. #define AIC32X4_IFACE3 29
  31. #define AIC32X4_BCLKN 30
  32. #define AIC32X4_IFACE4 31
  33. #define AIC32X4_IFACE5 32
  34. #define AIC32X4_IFACE6 33
  35. #define AIC32X4_DOUTCTL 53
  36. #define AIC32X4_DINCTL 54
  37. #define AIC32X4_DACSPB 60
  38. #define AIC32X4_ADCSPB 61
  39. #define AIC32X4_DACSETUP 63
  40. #define AIC32X4_DACMUTE 64
  41. #define AIC32X4_LDACVOL 65
  42. #define AIC32X4_RDACVOL 66
  43. #define AIC32X4_ADCSETUP 81
  44. #define AIC32X4_ADCFGA 82
  45. #define AIC32X4_LADCVOL 83
  46. #define AIC32X4_RADCVOL 84
  47. #define AIC32X4_LAGC1 86
  48. #define AIC32X4_LAGC2 87
  49. #define AIC32X4_LAGC3 88
  50. #define AIC32X4_LAGC4 89
  51. #define AIC32X4_LAGC5 90
  52. #define AIC32X4_LAGC6 91
  53. #define AIC32X4_LAGC7 92
  54. #define AIC32X4_RAGC1 94
  55. #define AIC32X4_RAGC2 95
  56. #define AIC32X4_RAGC3 96
  57. #define AIC32X4_RAGC4 97
  58. #define AIC32X4_RAGC5 98
  59. #define AIC32X4_RAGC6 99
  60. #define AIC32X4_RAGC7 100
  61. #define AIC32X4_PWRCFG (AIC32X4_PAGE1 + 1)
  62. #define AIC32X4_LDOCTL (AIC32X4_PAGE1 + 2)
  63. #define AIC32X4_OUTPWRCTL (AIC32X4_PAGE1 + 9)
  64. #define AIC32X4_CMMODE (AIC32X4_PAGE1 + 10)
  65. #define AIC32X4_HPLROUTE (AIC32X4_PAGE1 + 12)
  66. #define AIC32X4_HPRROUTE (AIC32X4_PAGE1 + 13)
  67. #define AIC32X4_LOLROUTE (AIC32X4_PAGE1 + 14)
  68. #define AIC32X4_LORROUTE (AIC32X4_PAGE1 + 15)
  69. #define AIC32X4_HPLGAIN (AIC32X4_PAGE1 + 16)
  70. #define AIC32X4_HPRGAIN (AIC32X4_PAGE1 + 17)
  71. #define AIC32X4_LOLGAIN (AIC32X4_PAGE1 + 18)
  72. #define AIC32X4_LORGAIN (AIC32X4_PAGE1 + 19)
  73. #define AIC32X4_HEADSTART (AIC32X4_PAGE1 + 20)
  74. #define AIC32X4_MICBIAS (AIC32X4_PAGE1 + 51)
  75. #define AIC32X4_LMICPGAPIN (AIC32X4_PAGE1 + 52)
  76. #define AIC32X4_LMICPGANIN (AIC32X4_PAGE1 + 54)
  77. #define AIC32X4_RMICPGAPIN (AIC32X4_PAGE1 + 55)
  78. #define AIC32X4_RMICPGANIN (AIC32X4_PAGE1 + 57)
  79. #define AIC32X4_FLOATINGINPUT (AIC32X4_PAGE1 + 58)
  80. #define AIC32X4_LMICPGAVOL (AIC32X4_PAGE1 + 59)
  81. #define AIC32X4_RMICPGAVOL (AIC32X4_PAGE1 + 60)
  82. #define AIC32X4_FREQ_12000000 12000000
  83. #define AIC32X4_FREQ_24000000 24000000
  84. #define AIC32X4_FREQ_25000000 25000000
  85. #define AIC32X4_WORD_LEN_16BITS 0x00
  86. #define AIC32X4_WORD_LEN_20BITS 0x01
  87. #define AIC32X4_WORD_LEN_24BITS 0x02
  88. #define AIC32X4_WORD_LEN_32BITS 0x03
  89. #define AIC32X4_I2S_MODE 0x00
  90. #define AIC32X4_DSP_MODE 0x01
  91. #define AIC32X4_RIGHT_JUSTIFIED_MODE 0x02
  92. #define AIC32X4_LEFT_JUSTIFIED_MODE 0x03
  93. #define AIC32X4_AVDDWEAKDISABLE 0x08
  94. #define AIC32X4_LDOCTLEN 0x01
  95. #define AIC32X4_LDOIN_18_36 0x01
  96. #define AIC32X4_LDOIN2HP 0x02
  97. #define AIC32X4_DACSPBLOCK_MASK 0x1f
  98. #define AIC32X4_ADCSPBLOCK_MASK 0x1f
  99. #define AIC32X4_PLLJ_SHIFT 6
  100. #define AIC32X4_DOSRMSB_SHIFT 4
  101. #define AIC32X4_PLLCLKIN 0x03
  102. #define AIC32X4_MICBIAS_LDOIN 0x08
  103. #define AIC32X4_MICBIAS_2075V 0x60
  104. #define AIC32X4_LMICPGANIN_IN2R_10K 0x10
  105. #define AIC32X4_RMICPGANIN_IN1L_10K 0x10
  106. #define AIC32X4_LMICPGAVOL_NOGAIN 0x80
  107. #define AIC32X4_RMICPGAVOL_NOGAIN 0x80
  108. #define AIC32X4_BCLKMASTER 0x08
  109. #define AIC32X4_WCLKMASTER 0x04
  110. #define AIC32X4_PLLEN (0x01 << 7)
  111. #define AIC32X4_NDACEN (0x01 << 7)
  112. #define AIC32X4_MDACEN (0x01 << 7)
  113. #define AIC32X4_NADCEN (0x01 << 7)
  114. #define AIC32X4_MADCEN (0x01 << 7)
  115. #define AIC32X4_BCLKEN (0x01 << 7)
  116. #define AIC32X4_DACEN (0x03 << 6)
  117. #define AIC32X4_RDAC2LCHN (0x02 << 2)
  118. #define AIC32X4_LDAC2RCHN (0x02 << 4)
  119. #define AIC32X4_LDAC2LCHN (0x01 << 4)
  120. #define AIC32X4_RDAC2RCHN (0x01 << 2)
  121. #define AIC32X4_SSTEP2WCLK 0x01
  122. #define AIC32X4_MUTEON 0x0C
  123. #define AIC32X4_DACMOD2BCLK 0x01
  124. #endif /* _TLV320AIC32X4_H */