ab8500-codec.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) ST-Ericsson SA 2012
  4. *
  5. * Author: Ola Lilja <ola.o.lilja@stericsson.com>,
  6. * Kristoffer Karlsson <kristoffer.karlsson@stericsson.com>,
  7. * Roger Nilsson <roger.xr.nilsson@stericsson.com>,
  8. * for ST-Ericsson.
  9. *
  10. * Based on the early work done by:
  11. * Mikko J. Lehto <mikko.lehto@symbio.com>,
  12. * Mikko Sarmanne <mikko.sarmanne@symbio.com>,
  13. * for ST-Ericsson.
  14. *
  15. * License terms:
  16. */
  17. #ifndef AB8500_CODEC_REGISTERS_H
  18. #define AB8500_CODEC_REGISTERS_H
  19. #define AB8500_SUPPORTED_RATE (SNDRV_PCM_RATE_48000)
  20. #define AB8500_SUPPORTED_FMT (SNDRV_PCM_FMTBIT_S16_LE)
  21. /* AB8500 interface slot offset definitions */
  22. #define AB8500_AD_DATA0_OFFSET 0
  23. #define AB8500_DA_DATA0_OFFSET 8
  24. #define AB8500_AD_DATA1_OFFSET 16
  25. #define AB8500_DA_DATA1_OFFSET 24
  26. /* AB8500 audio bank (0x0d) register definitions */
  27. #define AB8500_POWERUP 0x00
  28. #define AB8500_AUDSWRESET 0x01
  29. #define AB8500_ADPATHENA 0x02
  30. #define AB8500_DAPATHENA 0x03
  31. #define AB8500_ANACONF1 0x04
  32. #define AB8500_ANACONF2 0x05
  33. #define AB8500_DIGMICCONF 0x06
  34. #define AB8500_ANACONF3 0x07
  35. #define AB8500_ANACONF4 0x08
  36. #define AB8500_DAPATHCONF 0x09
  37. #define AB8500_MUTECONF 0x0A
  38. #define AB8500_SHORTCIRCONF 0x0B
  39. #define AB8500_ANACONF5 0x0C
  40. #define AB8500_ENVCPCONF 0x0D
  41. #define AB8500_SIGENVCONF 0x0E
  42. #define AB8500_PWMGENCONF1 0x0F
  43. #define AB8500_PWMGENCONF2 0x10
  44. #define AB8500_PWMGENCONF3 0x11
  45. #define AB8500_PWMGENCONF4 0x12
  46. #define AB8500_PWMGENCONF5 0x13
  47. #define AB8500_ANAGAIN1 0x14
  48. #define AB8500_ANAGAIN2 0x15
  49. #define AB8500_ANAGAIN3 0x16
  50. #define AB8500_ANAGAIN4 0x17
  51. #define AB8500_DIGLINHSLGAIN 0x18
  52. #define AB8500_DIGLINHSRGAIN 0x19
  53. #define AB8500_ADFILTCONF 0x1A
  54. #define AB8500_DIGIFCONF1 0x1B
  55. #define AB8500_DIGIFCONF2 0x1C
  56. #define AB8500_DIGIFCONF3 0x1D
  57. #define AB8500_DIGIFCONF4 0x1E
  58. #define AB8500_ADSLOTSEL1 0x1F
  59. #define AB8500_ADSLOTSEL2 0x20
  60. #define AB8500_ADSLOTSEL3 0x21
  61. #define AB8500_ADSLOTSEL4 0x22
  62. #define AB8500_ADSLOTSEL5 0x23
  63. #define AB8500_ADSLOTSEL6 0x24
  64. #define AB8500_ADSLOTSEL7 0x25
  65. #define AB8500_ADSLOTSEL8 0x26
  66. #define AB8500_ADSLOTSEL9 0x27
  67. #define AB8500_ADSLOTSEL10 0x28
  68. #define AB8500_ADSLOTSEL11 0x29
  69. #define AB8500_ADSLOTSEL12 0x2A
  70. #define AB8500_ADSLOTSEL13 0x2B
  71. #define AB8500_ADSLOTSEL14 0x2C
  72. #define AB8500_ADSLOTSEL15 0x2D
  73. #define AB8500_ADSLOTSEL16 0x2E
  74. #define AB8500_ADSLOTSEL(slot) (AB8500_ADSLOTSEL1 + (slot >> 1))
  75. #define AB8500_ADSLOTHIZCTRL1 0x2F
  76. #define AB8500_ADSLOTHIZCTRL2 0x30
  77. #define AB8500_ADSLOTHIZCTRL3 0x31
  78. #define AB8500_ADSLOTHIZCTRL4 0x32
  79. #define AB8500_DASLOTCONF1 0x33
  80. #define AB8500_DASLOTCONF2 0x34
  81. #define AB8500_DASLOTCONF3 0x35
  82. #define AB8500_DASLOTCONF4 0x36
  83. #define AB8500_DASLOTCONF5 0x37
  84. #define AB8500_DASLOTCONF6 0x38
  85. #define AB8500_DASLOTCONF7 0x39
  86. #define AB8500_DASLOTCONF8 0x3A
  87. #define AB8500_CLASSDCONF1 0x3B
  88. #define AB8500_CLASSDCONF2 0x3C
  89. #define AB8500_CLASSDCONF3 0x3D
  90. #define AB8500_DMICFILTCONF 0x3E
  91. #define AB8500_DIGMULTCONF1 0x3F
  92. #define AB8500_DIGMULTCONF2 0x40
  93. #define AB8500_ADDIGGAIN1 0x41
  94. #define AB8500_ADDIGGAIN2 0x42
  95. #define AB8500_ADDIGGAIN3 0x43
  96. #define AB8500_ADDIGGAIN4 0x44
  97. #define AB8500_ADDIGGAIN5 0x45
  98. #define AB8500_ADDIGGAIN6 0x46
  99. #define AB8500_DADIGGAIN1 0x47
  100. #define AB8500_DADIGGAIN2 0x48
  101. #define AB8500_DADIGGAIN3 0x49
  102. #define AB8500_DADIGGAIN4 0x4A
  103. #define AB8500_DADIGGAIN5 0x4B
  104. #define AB8500_DADIGGAIN6 0x4C
  105. #define AB8500_ADDIGLOOPGAIN1 0x4D
  106. #define AB8500_ADDIGLOOPGAIN2 0x4E
  107. #define AB8500_HSLEARDIGGAIN 0x4F
  108. #define AB8500_HSRDIGGAIN 0x50
  109. #define AB8500_SIDFIRGAIN1 0x51
  110. #define AB8500_SIDFIRGAIN2 0x52
  111. #define AB8500_ANCCONF1 0x53
  112. #define AB8500_ANCCONF2 0x54
  113. #define AB8500_ANCCONF3 0x55
  114. #define AB8500_ANCCONF4 0x56
  115. #define AB8500_ANCCONF5 0x57
  116. #define AB8500_ANCCONF6 0x58
  117. #define AB8500_ANCCONF7 0x59
  118. #define AB8500_ANCCONF8 0x5A
  119. #define AB8500_ANCCONF9 0x5B
  120. #define AB8500_ANCCONF10 0x5C
  121. #define AB8500_ANCCONF11 0x5D
  122. #define AB8500_ANCCONF12 0x5E
  123. #define AB8500_ANCCONF13 0x5F
  124. #define AB8500_ANCCONF14 0x60
  125. #define AB8500_SIDFIRADR 0x61
  126. #define AB8500_SIDFIRCOEF1 0x62
  127. #define AB8500_SIDFIRCOEF2 0x63
  128. #define AB8500_SIDFIRCONF 0x64
  129. #define AB8500_AUDINTMASK1 0x65
  130. #define AB8500_AUDINTSOURCE1 0x66
  131. #define AB8500_AUDINTMASK2 0x67
  132. #define AB8500_AUDINTSOURCE2 0x68
  133. #define AB8500_FIFOCONF1 0x69
  134. #define AB8500_FIFOCONF2 0x6A
  135. #define AB8500_FIFOCONF3 0x6B
  136. #define AB8500_FIFOCONF4 0x6C
  137. #define AB8500_FIFOCONF5 0x6D
  138. #define AB8500_FIFOCONF6 0x6E
  139. #define AB8500_AUDREV 0x6F
  140. #define AB8500_FIRST_REG AB8500_POWERUP
  141. #define AB8500_LAST_REG AB8500_AUDREV
  142. #define AB8500_CACHEREGNUM (AB8500_LAST_REG + 1)
  143. #define AB8500_MASK_ALL 0xFF
  144. #define AB8500_MASK_SLOT(slot) ((slot & 1) ? 0xF0 : 0x0F)
  145. #define AB8500_MASK_NONE 0x00
  146. /* AB8500_POWERUP */
  147. #define AB8500_POWERUP_POWERUP 7
  148. #define AB8500_POWERUP_ENANA 3
  149. /* AB8500_AUDSWRESET */
  150. #define AB8500_AUDSWRESET_SWRESET 7
  151. /* AB8500_ADPATHENA */
  152. #define AB8500_ADPATHENA_ENAD12 7
  153. #define AB8500_ADPATHENA_ENAD34 5
  154. #define AB8500_ADPATHENA_ENAD5768 3
  155. /* AB8500_DAPATHENA */
  156. #define AB8500_DAPATHENA_ENDA1 7
  157. #define AB8500_DAPATHENA_ENDA2 6
  158. #define AB8500_DAPATHENA_ENDA3 5
  159. #define AB8500_DAPATHENA_ENDA4 4
  160. #define AB8500_DAPATHENA_ENDA5 3
  161. #define AB8500_DAPATHENA_ENDA6 2
  162. /* AB8500_ANACONF1 */
  163. #define AB8500_ANACONF1_HSLOWPOW 7
  164. #define AB8500_ANACONF1_DACLOWPOW1 6
  165. #define AB8500_ANACONF1_DACLOWPOW0 5
  166. #define AB8500_ANACONF1_EARDACLOWPOW 4
  167. #define AB8500_ANACONF1_EARSELCM 2
  168. #define AB8500_ANACONF1_HSHPEN 1
  169. #define AB8500_ANACONF1_EARDRVLOWPOW 0
  170. /* AB8500_ANACONF2 */
  171. #define AB8500_ANACONF2_ENMIC1 7
  172. #define AB8500_ANACONF2_ENMIC2 6
  173. #define AB8500_ANACONF2_ENLINL 5
  174. #define AB8500_ANACONF2_ENLINR 4
  175. #define AB8500_ANACONF2_MUTMIC1 3
  176. #define AB8500_ANACONF2_MUTMIC2 2
  177. #define AB8500_ANACONF2_MUTLINL 1
  178. #define AB8500_ANACONF2_MUTLINR 0
  179. /* AB8500_DIGMICCONF */
  180. #define AB8500_DIGMICCONF_ENDMIC1 7
  181. #define AB8500_DIGMICCONF_ENDMIC2 6
  182. #define AB8500_DIGMICCONF_ENDMIC3 5
  183. #define AB8500_DIGMICCONF_ENDMIC4 4
  184. #define AB8500_DIGMICCONF_ENDMIC5 3
  185. #define AB8500_DIGMICCONF_ENDMIC6 2
  186. #define AB8500_DIGMICCONF_HSFADSPEED 0
  187. /* AB8500_ANACONF3 */
  188. #define AB8500_ANACONF3_MIC1SEL 7
  189. #define AB8500_ANACONF3_LINRSEL 6
  190. #define AB8500_ANACONF3_ENDRVHSL 5
  191. #define AB8500_ANACONF3_ENDRVHSR 4
  192. #define AB8500_ANACONF3_ENADCMIC 2
  193. #define AB8500_ANACONF3_ENADCLINL 1
  194. #define AB8500_ANACONF3_ENADCLINR 0
  195. /* AB8500_ANACONF4 */
  196. #define AB8500_ANACONF4_DISPDVSS 7
  197. #define AB8500_ANACONF4_ENEAR 6
  198. #define AB8500_ANACONF4_ENHSL 5
  199. #define AB8500_ANACONF4_ENHSR 4
  200. #define AB8500_ANACONF4_ENHFL 3
  201. #define AB8500_ANACONF4_ENHFR 2
  202. #define AB8500_ANACONF4_ENVIB1 1
  203. #define AB8500_ANACONF4_ENVIB2 0
  204. /* AB8500_DAPATHCONF */
  205. #define AB8500_DAPATHCONF_ENDACEAR 6
  206. #define AB8500_DAPATHCONF_ENDACHSL 5
  207. #define AB8500_DAPATHCONF_ENDACHSR 4
  208. #define AB8500_DAPATHCONF_ENDACHFL 3
  209. #define AB8500_DAPATHCONF_ENDACHFR 2
  210. #define AB8500_DAPATHCONF_ENDACVIB1 1
  211. #define AB8500_DAPATHCONF_ENDACVIB2 0
  212. /* AB8500_MUTECONF */
  213. #define AB8500_MUTECONF_MUTEAR 6
  214. #define AB8500_MUTECONF_MUTHSL 5
  215. #define AB8500_MUTECONF_MUTHSR 4
  216. #define AB8500_MUTECONF_MUTDACEAR 2
  217. #define AB8500_MUTECONF_MUTDACHSL 1
  218. #define AB8500_MUTECONF_MUTDACHSR 0
  219. /* AB8500_SHORTCIRCONF */
  220. #define AB8500_SHORTCIRCONF_ENSHORTPWD 7
  221. #define AB8500_SHORTCIRCONF_EARSHORTDIS 6
  222. #define AB8500_SHORTCIRCONF_HSSHORTDIS 5
  223. #define AB8500_SHORTCIRCONF_HSPULLDEN 4
  224. #define AB8500_SHORTCIRCONF_HSOSCEN 2
  225. #define AB8500_SHORTCIRCONF_HSFADDIS 1
  226. #define AB8500_SHORTCIRCONF_HSZCDDIS 0
  227. /* Zero cross should be disabled */
  228. /* AB8500_ANACONF5 */
  229. #define AB8500_ANACONF5_ENCPHS 7
  230. #define AB8500_ANACONF5_HSLDACTOLOL 5
  231. #define AB8500_ANACONF5_HSRDACTOLOR 4
  232. #define AB8500_ANACONF5_ENLOL 3
  233. #define AB8500_ANACONF5_ENLOR 2
  234. #define AB8500_ANACONF5_HSAUTOEN 0
  235. /* AB8500_ENVCPCONF */
  236. #define AB8500_ENVCPCONF_ENVDETHTHRE 4
  237. #define AB8500_ENVCPCONF_ENVDETLTHRE 0
  238. #define AB8500_ENVCPCONF_ENVDETHTHRE_MAX 0x0F
  239. #define AB8500_ENVCPCONF_ENVDETLTHRE_MAX 0x0F
  240. /* AB8500_SIGENVCONF */
  241. #define AB8500_SIGENVCONF_CPLVEN 5
  242. #define AB8500_SIGENVCONF_ENVDETCPEN 4
  243. #define AB8500_SIGENVCONF_ENVDETTIME 0
  244. #define AB8500_SIGENVCONF_ENVDETTIME_MAX 0x0F
  245. /* AB8500_PWMGENCONF1 */
  246. #define AB8500_PWMGENCONF1_PWMTOVIB1 7
  247. #define AB8500_PWMGENCONF1_PWMTOVIB2 6
  248. #define AB8500_PWMGENCONF1_PWM1CTRL 5
  249. #define AB8500_PWMGENCONF1_PWM2CTRL 4
  250. #define AB8500_PWMGENCONF1_PWM1NCTRL 3
  251. #define AB8500_PWMGENCONF1_PWM1PCTRL 2
  252. #define AB8500_PWMGENCONF1_PWM2NCTRL 1
  253. #define AB8500_PWMGENCONF1_PWM2PCTRL 0
  254. /* AB8500_PWMGENCONF2 */
  255. /* AB8500_PWMGENCONF3 */
  256. /* AB8500_PWMGENCONF4 */
  257. /* AB8500_PWMGENCONF5 */
  258. #define AB8500_PWMGENCONFX_PWMVIBXPOL 7
  259. #define AB8500_PWMGENCONFX_PWMVIBXDUTCYC 0
  260. #define AB8500_PWMGENCONFX_PWMVIBXDUTCYC_MAX 0x64
  261. /* AB8500_ANAGAIN1 */
  262. /* AB8500_ANAGAIN2 */
  263. #define AB8500_ANAGAINX_ENSEMICX 7
  264. #define AB8500_ANAGAINX_LOWPOWMICX 6
  265. #define AB8500_ANAGAINX_MICXGAIN 0
  266. #define AB8500_ANAGAINX_MICXGAIN_MAX 0x1F
  267. /* AB8500_ANAGAIN3 */
  268. #define AB8500_ANAGAIN3_HSLGAIN 4
  269. #define AB8500_ANAGAIN3_HSRGAIN 0
  270. #define AB8500_ANAGAIN3_HSXGAIN_MAX 0x0F
  271. /* AB8500_ANAGAIN4 */
  272. #define AB8500_ANAGAIN4_LINLGAIN 4
  273. #define AB8500_ANAGAIN4_LINRGAIN 0
  274. #define AB8500_ANAGAIN4_LINXGAIN_MAX 0x0F
  275. /* AB8500_DIGLINHSLGAIN */
  276. /* AB8500_DIGLINHSRGAIN */
  277. #define AB8500_DIGLINHSXGAIN_LINTOHSXGAIN 0
  278. #define AB8500_DIGLINHSXGAIN_LINTOHSXGAIN_MAX 0x13
  279. /* AB8500_ADFILTCONF */
  280. #define AB8500_ADFILTCONF_AD1NH 7
  281. #define AB8500_ADFILTCONF_AD2NH 6
  282. #define AB8500_ADFILTCONF_AD3NH 5
  283. #define AB8500_ADFILTCONF_AD4NH 4
  284. #define AB8500_ADFILTCONF_AD1VOICE 3
  285. #define AB8500_ADFILTCONF_AD2VOICE 2
  286. #define AB8500_ADFILTCONF_AD3VOICE 1
  287. #define AB8500_ADFILTCONF_AD4VOICE 0
  288. /* AB8500_DIGIFCONF1 */
  289. #define AB8500_DIGIFCONF1_ENMASTGEN 7
  290. #define AB8500_DIGIFCONF1_IF1BITCLKOS1 6
  291. #define AB8500_DIGIFCONF1_IF1BITCLKOS0 5
  292. #define AB8500_DIGIFCONF1_ENFSBITCLK1 4
  293. #define AB8500_DIGIFCONF1_IF0BITCLKOS1 2
  294. #define AB8500_DIGIFCONF1_IF0BITCLKOS0 1
  295. #define AB8500_DIGIFCONF1_ENFSBITCLK0 0
  296. /* AB8500_DIGIFCONF2 */
  297. #define AB8500_DIGIFCONF2_FSYNC0P 6
  298. #define AB8500_DIGIFCONF2_BITCLK0P 5
  299. #define AB8500_DIGIFCONF2_IF0DEL 4
  300. #define AB8500_DIGIFCONF2_IF0FORMAT1 3
  301. #define AB8500_DIGIFCONF2_IF0FORMAT0 2
  302. #define AB8500_DIGIFCONF2_IF0WL1 1
  303. #define AB8500_DIGIFCONF2_IF0WL0 0
  304. /* AB8500_DIGIFCONF3 */
  305. #define AB8500_DIGIFCONF3_IF0DATOIF1AD 7
  306. #define AB8500_DIGIFCONF3_IF0CLKTOIF1CLK 6
  307. #define AB8500_DIGIFCONF3_IF1MASTER 5
  308. #define AB8500_DIGIFCONF3_IF1DATOIF0AD 3
  309. #define AB8500_DIGIFCONF3_IF1CLKTOIF0CLK 2
  310. #define AB8500_DIGIFCONF3_IF0MASTER 1
  311. #define AB8500_DIGIFCONF3_IF0BFIFOEN 0
  312. /* AB8500_DIGIFCONF4 */
  313. #define AB8500_DIGIFCONF4_FSYNC1P 6
  314. #define AB8500_DIGIFCONF4_BITCLK1P 5
  315. #define AB8500_DIGIFCONF4_IF1DEL 4
  316. #define AB8500_DIGIFCONF4_IF1FORMAT1 3
  317. #define AB8500_DIGIFCONF4_IF1FORMAT0 2
  318. #define AB8500_DIGIFCONF4_IF1WL1 1
  319. #define AB8500_DIGIFCONF4_IF1WL0 0
  320. /* AB8500_ADSLOTSELX */
  321. #define AB8500_AD_OUT1 0x0
  322. #define AB8500_AD_OUT2 0x1
  323. #define AB8500_AD_OUT3 0x2
  324. #define AB8500_AD_OUT4 0x3
  325. #define AB8500_AD_OUT5 0x4
  326. #define AB8500_AD_OUT6 0x5
  327. #define AB8500_AD_OUT7 0x6
  328. #define AB8500_AD_OUT8 0x7
  329. #define AB8500_ZEROES 0x8
  330. #define AB8500_TRISTATE 0xF
  331. #define AB8500_ADSLOTSELX_EVEN_SHIFT 0
  332. #define AB8500_ADSLOTSELX_ODD_SHIFT 4
  333. #define AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(out, slot) \
  334. ((out) << (((slot) & 1) ? \
  335. AB8500_ADSLOTSELX_ODD_SHIFT : AB8500_ADSLOTSELX_EVEN_SHIFT))
  336. /* AB8500_ADSLOTHIZCTRL1 */
  337. /* AB8500_ADSLOTHIZCTRL2 */
  338. /* AB8500_ADSLOTHIZCTRL3 */
  339. /* AB8500_ADSLOTHIZCTRL4 */
  340. /* AB8500_DASLOTCONF1 */
  341. #define AB8500_DASLOTCONF1_DA12VOICE 7
  342. #define AB8500_DASLOTCONF1_SWAPDA12_34 6
  343. #define AB8500_DASLOTCONF1_DAI7TOADO1 5
  344. /* AB8500_DASLOTCONF2 */
  345. #define AB8500_DASLOTCONF2_DAI8TOADO2 5
  346. /* AB8500_DASLOTCONF3 */
  347. #define AB8500_DASLOTCONF3_DA34VOICE 7
  348. #define AB8500_DASLOTCONF3_DAI7TOADO3 5
  349. /* AB8500_DASLOTCONF4 */
  350. #define AB8500_DASLOTCONF4_DAI8TOADO4 5
  351. /* AB8500_DASLOTCONF5 */
  352. #define AB8500_DASLOTCONF5_DA56VOICE 7
  353. #define AB8500_DASLOTCONF5_DAI7TOADO5 5
  354. /* AB8500_DASLOTCONF6 */
  355. #define AB8500_DASLOTCONF6_DAI8TOADO6 5
  356. /* AB8500_DASLOTCONF7 */
  357. #define AB8500_DASLOTCONF7_DAI8TOADO7 5
  358. /* AB8500_DASLOTCONF8 */
  359. #define AB8500_DASLOTCONF8_DAI7TOADO8 5
  360. #define AB8500_DASLOTCONFX_SLTODAX_SHIFT 0
  361. #define AB8500_DASLOTCONFX_SLTODAX_MASK 0x1F
  362. /* AB8500_CLASSDCONF1 */
  363. #define AB8500_CLASSDCONF1_PARLHF 7
  364. #define AB8500_CLASSDCONF1_PARLVIB 6
  365. #define AB8500_CLASSDCONF1_VIB1SWAPEN 3
  366. #define AB8500_CLASSDCONF1_VIB2SWAPEN 2
  367. #define AB8500_CLASSDCONF1_HFLSWAPEN 1
  368. #define AB8500_CLASSDCONF1_HFRSWAPEN 0
  369. /* AB8500_CLASSDCONF2 */
  370. #define AB8500_CLASSDCONF2_FIRBYP3 7
  371. #define AB8500_CLASSDCONF2_FIRBYP2 6
  372. #define AB8500_CLASSDCONF2_FIRBYP1 5
  373. #define AB8500_CLASSDCONF2_FIRBYP0 4
  374. #define AB8500_CLASSDCONF2_HIGHVOLEN3 3
  375. #define AB8500_CLASSDCONF2_HIGHVOLEN2 2
  376. #define AB8500_CLASSDCONF2_HIGHVOLEN1 1
  377. #define AB8500_CLASSDCONF2_HIGHVOLEN0 0
  378. /* AB8500_CLASSDCONF3 */
  379. #define AB8500_CLASSDCONF3_DITHHPGAIN 4
  380. #define AB8500_CLASSDCONF3_DITHHPGAIN_MAX 0x0A
  381. #define AB8500_CLASSDCONF3_DITHWGAIN 0
  382. #define AB8500_CLASSDCONF3_DITHWGAIN_MAX 0x0A
  383. /* AB8500_DMICFILTCONF */
  384. #define AB8500_DMICFILTCONF_ANCINSEL 7
  385. #define AB8500_DMICFILTCONF_DA3TOEAR 6
  386. #define AB8500_DMICFILTCONF_DMIC1SINC3 5
  387. #define AB8500_DMICFILTCONF_DMIC2SINC3 4
  388. #define AB8500_DMICFILTCONF_DMIC3SINC3 3
  389. #define AB8500_DMICFILTCONF_DMIC4SINC3 2
  390. #define AB8500_DMICFILTCONF_DMIC5SINC3 1
  391. #define AB8500_DMICFILTCONF_DMIC6SINC3 0
  392. /* AB8500_DIGMULTCONF1 */
  393. #define AB8500_DIGMULTCONF1_DATOHSLEN 7
  394. #define AB8500_DIGMULTCONF1_DATOHSREN 6
  395. #define AB8500_DIGMULTCONF1_AD1SEL 5
  396. #define AB8500_DIGMULTCONF1_AD2SEL 4
  397. #define AB8500_DIGMULTCONF1_AD3SEL 3
  398. #define AB8500_DIGMULTCONF1_AD5SEL 2
  399. #define AB8500_DIGMULTCONF1_AD6SEL 1
  400. #define AB8500_DIGMULTCONF1_ANCSEL 0
  401. /* AB8500_DIGMULTCONF2 */
  402. #define AB8500_DIGMULTCONF2_DATOHFREN 7
  403. #define AB8500_DIGMULTCONF2_DATOHFLEN 6
  404. #define AB8500_DIGMULTCONF2_HFRSEL 5
  405. #define AB8500_DIGMULTCONF2_HFLSEL 4
  406. #define AB8500_DIGMULTCONF2_FIRSID1SEL 2
  407. #define AB8500_DIGMULTCONF2_FIRSID2SEL 0
  408. /* AB8500_ADDIGGAIN1 */
  409. /* AB8500_ADDIGGAIN2 */
  410. /* AB8500_ADDIGGAIN3 */
  411. /* AB8500_ADDIGGAIN4 */
  412. /* AB8500_ADDIGGAIN5 */
  413. /* AB8500_ADDIGGAIN6 */
  414. #define AB8500_ADDIGGAINX_FADEDISADX 6
  415. #define AB8500_ADDIGGAINX_ADXGAIN_MAX 0x3F
  416. /* AB8500_DADIGGAIN1 */
  417. /* AB8500_DADIGGAIN2 */
  418. /* AB8500_DADIGGAIN3 */
  419. /* AB8500_DADIGGAIN4 */
  420. /* AB8500_DADIGGAIN5 */
  421. /* AB8500_DADIGGAIN6 */
  422. #define AB8500_DADIGGAINX_FADEDISDAX 6
  423. #define AB8500_DADIGGAINX_DAXGAIN_MAX 0x3F
  424. /* AB8500_ADDIGLOOPGAIN1 */
  425. /* AB8500_ADDIGLOOPGAIN2 */
  426. #define AB8500_ADDIGLOOPGAINX_FADEDISADXL 6
  427. #define AB8500_ADDIGLOOPGAINX_ADXLBGAIN_MAX 0x3F
  428. /* AB8500_HSLEARDIGGAIN */
  429. #define AB8500_HSLEARDIGGAIN_HSSINC1 7
  430. #define AB8500_HSLEARDIGGAIN_FADEDISHSL 4
  431. #define AB8500_HSLEARDIGGAIN_HSLDGAIN_MAX 0x09
  432. /* AB8500_HSRDIGGAIN */
  433. #define AB8500_HSRDIGGAIN_FADESPEED 6
  434. #define AB8500_HSRDIGGAIN_FADEDISHSR 4
  435. #define AB8500_HSRDIGGAIN_HSRDGAIN_MAX 0x09
  436. /* AB8500_SIDFIRGAIN1 */
  437. /* AB8500_SIDFIRGAIN2 */
  438. #define AB8500_SIDFIRGAINX_FIRSIDXGAIN_MAX 0x1F
  439. /* AB8500_ANCCONF1 */
  440. #define AB8500_ANCCONF1_ANCIIRUPDATE 3
  441. #define AB8500_ANCCONF1_ENANC 2
  442. #define AB8500_ANCCONF1_ANCIIRINIT 1
  443. #define AB8500_ANCCONF1_ANCFIRUPDATE 0
  444. /* AB8500_ANCCONF2 */
  445. #define AB8500_ANCCONF2_SHIFT 5
  446. #define AB8500_ANCCONF2_MIN -0x10
  447. #define AB8500_ANCCONF2_MAX 0xF
  448. /* AB8500_ANCCONF3 */
  449. #define AB8500_ANCCONF3_SHIFT 5
  450. #define AB8500_ANCCONF3_MIN -0x10
  451. #define AB8500_ANCCONF3_MAX 0xF
  452. /* AB8500_ANCCONF4 */
  453. #define AB8500_ANCCONF4_SHIFT 5
  454. #define AB8500_ANCCONF4_MIN -0x10
  455. #define AB8500_ANCCONF4_MAX 0xF
  456. /* AB8500_ANC_FIR_COEFFS */
  457. #define AB8500_ANC_FIR_COEFF_MIN -0x8000
  458. #define AB8500_ANC_FIR_COEFF_MAX 0x7FFF
  459. #define AB8500_ANC_FIR_COEFFS 15
  460. /* AB8500_ANC_IIR_COEFFS */
  461. #define AB8500_ANC_IIR_COEFF_MIN -0x800000
  462. #define AB8500_ANC_IIR_COEFF_MAX 0x7FFFFF
  463. #define AB8500_ANC_IIR_COEFFS 24
  464. /* AB8500_ANC_WARP_DELAY */
  465. #define AB8500_ANC_WARP_DELAY_SHIFT 16
  466. #define AB8500_ANC_WARP_DELAY_MIN 0x0000
  467. #define AB8500_ANC_WARP_DELAY_MAX 0xFFFF
  468. /* AB8500_ANCCONF11 */
  469. /* AB8500_ANCCONF12 */
  470. /* AB8500_ANCCONF13 */
  471. /* AB8500_ANCCONF14 */
  472. /* AB8500_SIDFIRADR */
  473. #define AB8500_SIDFIRADR_FIRSIDSET 7
  474. #define AB8500_SIDFIRADR_ADDRESS_SHIFT 0
  475. #define AB8500_SIDFIRADR_ADDRESS_MAX 0x7F
  476. /* AB8500_SIDFIRCOEF1 */
  477. /* AB8500_SIDFIRCOEF2 */
  478. #define AB8500_SID_FIR_COEFF_MIN 0
  479. #define AB8500_SID_FIR_COEFF_MAX 0xFFFF
  480. #define AB8500_SID_FIR_COEFFS 128
  481. /* AB8500_SIDFIRCONF */
  482. #define AB8500_SIDFIRCONF_ENFIRSIDS 2
  483. #define AB8500_SIDFIRCONF_FIRSIDSTOIF1 1
  484. #define AB8500_SIDFIRCONF_FIRSIDBUSY 0
  485. /* AB8500_AUDINTMASK1 */
  486. /* AB8500_AUDINTSOURCE1 */
  487. /* AB8500_AUDINTMASK2 */
  488. /* AB8500_AUDINTSOURCE2 */
  489. /* AB8500_FIFOCONF1 */
  490. #define AB8500_FIFOCONF1_BFIFOMASK 0x80
  491. #define AB8500_FIFOCONF1_BFIFO19M2 0x40
  492. #define AB8500_FIFOCONF1_BFIFOINT_SHIFT 0
  493. #define AB8500_FIFOCONF1_BFIFOINT_MAX 0x3F
  494. /* AB8500_FIFOCONF2 */
  495. #define AB8500_FIFOCONF2_BFIFOTX_SHIFT 0
  496. #define AB8500_FIFOCONF2_BFIFOTX_MAX 0xFF
  497. /* AB8500_FIFOCONF3 */
  498. #define AB8500_FIFOCONF3_BFIFOEXSL_SHIFT 5
  499. #define AB8500_FIFOCONF3_BFIFOEXSL_MAX 0x5
  500. #define AB8500_FIFOCONF3_PREBITCLK0_SHIFT 2
  501. #define AB8500_FIFOCONF3_PREBITCLK0_MAX 0x7
  502. #define AB8500_FIFOCONF3_BFIFOMAST_SHIFT 1
  503. #define AB8500_FIFOCONF3_BFIFORUN_SHIFT 0
  504. /* AB8500_FIFOCONF4 */
  505. #define AB8500_FIFOCONF4_BFIFOFRAMSW_SHIFT 0
  506. #define AB8500_FIFOCONF4_BFIFOFRAMSW_MAX 0xFF
  507. /* AB8500_FIFOCONF5 */
  508. #define AB8500_FIFOCONF5_BFIFOWAKEUP_SHIFT 0
  509. #define AB8500_FIFOCONF5_BFIFOWAKEUP_MAX 0xFF
  510. /* AB8500_FIFOCONF6 */
  511. #define AB8500_FIFOCONF6_BFIFOSAMPLE_SHIFT 0
  512. #define AB8500_FIFOCONF6_BFIFOSAMPLE_MAX 0xFF
  513. /* AB8500_AUDREV */
  514. #endif