ab8500-codec.h 18 KB

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