wm9090.h 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  1. /*
  2. * ALSA SoC WM9090 driver
  3. *
  4. * Copyright 2009 Wolfson Microelectronics
  5. *
  6. * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * version 2 as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. */
  22. #ifndef __WM9090_H
  23. #define __WM9090_H
  24. /*
  25. * Register values.
  26. */
  27. #define WM9090_SOFTWARE_RESET 0x00
  28. #define WM9090_POWER_MANAGEMENT_1 0x01
  29. #define WM9090_POWER_MANAGEMENT_2 0x02
  30. #define WM9090_POWER_MANAGEMENT_3 0x03
  31. #define WM9090_CLOCKING_1 0x06
  32. #define WM9090_IN1_LINE_CONTROL 0x16
  33. #define WM9090_IN2_LINE_CONTROL 0x17
  34. #define WM9090_IN1_LINE_INPUT_A_VOLUME 0x18
  35. #define WM9090_IN1_LINE_INPUT_B_VOLUME 0x19
  36. #define WM9090_IN2_LINE_INPUT_A_VOLUME 0x1A
  37. #define WM9090_IN2_LINE_INPUT_B_VOLUME 0x1B
  38. #define WM9090_LEFT_OUTPUT_VOLUME 0x1C
  39. #define WM9090_RIGHT_OUTPUT_VOLUME 0x1D
  40. #define WM9090_SPKMIXL_ATTENUATION 0x22
  41. #define WM9090_SPKOUT_MIXERS 0x24
  42. #define WM9090_CLASSD3 0x25
  43. #define WM9090_SPEAKER_VOLUME_LEFT 0x26
  44. #define WM9090_OUTPUT_MIXER1 0x2D
  45. #define WM9090_OUTPUT_MIXER2 0x2E
  46. #define WM9090_OUTPUT_MIXER3 0x2F
  47. #define WM9090_OUTPUT_MIXER4 0x30
  48. #define WM9090_SPEAKER_MIXER 0x36
  49. #define WM9090_ANTIPOP2 0x39
  50. #define WM9090_WRITE_SEQUENCER_0 0x46
  51. #define WM9090_WRITE_SEQUENCER_1 0x47
  52. #define WM9090_WRITE_SEQUENCER_2 0x48
  53. #define WM9090_WRITE_SEQUENCER_3 0x49
  54. #define WM9090_WRITE_SEQUENCER_4 0x4A
  55. #define WM9090_WRITE_SEQUENCER_5 0x4B
  56. #define WM9090_CHARGE_PUMP_1 0x4C
  57. #define WM9090_DC_SERVO_0 0x54
  58. #define WM9090_DC_SERVO_1 0x55
  59. #define WM9090_DC_SERVO_3 0x57
  60. #define WM9090_DC_SERVO_READBACK_0 0x58
  61. #define WM9090_DC_SERVO_READBACK_1 0x59
  62. #define WM9090_DC_SERVO_READBACK_2 0x5A
  63. #define WM9090_ANALOGUE_HP_0 0x60
  64. #define WM9090_AGC_CONTROL_0 0x62
  65. #define WM9090_AGC_CONTROL_1 0x63
  66. #define WM9090_AGC_CONTROL_2 0x64
  67. #define WM9090_REGISTER_COUNT 40
  68. #define WM9090_MAX_REGISTER 0x64
  69. /*
  70. * Field Definitions.
  71. */
  72. /*
  73. * R0 (0x00) - Software Reset
  74. */
  75. #define WM9090_SW_RESET_MASK 0xFFFF /* SW_RESET - [15:0] */
  76. #define WM9090_SW_RESET_SHIFT 0 /* SW_RESET - [15:0] */
  77. #define WM9090_SW_RESET_WIDTH 16 /* SW_RESET - [15:0] */
  78. /*
  79. * R1 (0x01) - Power Management (1)
  80. */
  81. #define WM9090_SPKOUTL_ENA 0x1000 /* SPKOUTL_ENA */
  82. #define WM9090_SPKOUTL_ENA_MASK 0x1000 /* SPKOUTL_ENA */
  83. #define WM9090_SPKOUTL_ENA_SHIFT 12 /* SPKOUTL_ENA */
  84. #define WM9090_SPKOUTL_ENA_WIDTH 1 /* SPKOUTL_ENA */
  85. #define WM9090_HPOUT1L_ENA 0x0200 /* HPOUT1L_ENA */
  86. #define WM9090_HPOUT1L_ENA_MASK 0x0200 /* HPOUT1L_ENA */
  87. #define WM9090_HPOUT1L_ENA_SHIFT 9 /* HPOUT1L_ENA */
  88. #define WM9090_HPOUT1L_ENA_WIDTH 1 /* HPOUT1L_ENA */
  89. #define WM9090_HPOUT1R_ENA 0x0100 /* HPOUT1R_ENA */
  90. #define WM9090_HPOUT1R_ENA_MASK 0x0100 /* HPOUT1R_ENA */
  91. #define WM9090_HPOUT1R_ENA_SHIFT 8 /* HPOUT1R_ENA */
  92. #define WM9090_HPOUT1R_ENA_WIDTH 1 /* HPOUT1R_ENA */
  93. #define WM9090_OSC_ENA 0x0008 /* OSC_ENA */
  94. #define WM9090_OSC_ENA_MASK 0x0008 /* OSC_ENA */
  95. #define WM9090_OSC_ENA_SHIFT 3 /* OSC_ENA */
  96. #define WM9090_OSC_ENA_WIDTH 1 /* OSC_ENA */
  97. #define WM9090_VMID_RES_MASK 0x0006 /* VMID_RES - [2:1] */
  98. #define WM9090_VMID_RES_SHIFT 1 /* VMID_RES - [2:1] */
  99. #define WM9090_VMID_RES_WIDTH 2 /* VMID_RES - [2:1] */
  100. #define WM9090_BIAS_ENA 0x0001 /* BIAS_ENA */
  101. #define WM9090_BIAS_ENA_MASK 0x0001 /* BIAS_ENA */
  102. #define WM9090_BIAS_ENA_SHIFT 0 /* BIAS_ENA */
  103. #define WM9090_BIAS_ENA_WIDTH 1 /* BIAS_ENA */
  104. /*
  105. * R2 (0x02) - Power Management (2)
  106. */
  107. #define WM9090_TSHUT 0x8000 /* TSHUT */
  108. #define WM9090_TSHUT_MASK 0x8000 /* TSHUT */
  109. #define WM9090_TSHUT_SHIFT 15 /* TSHUT */
  110. #define WM9090_TSHUT_WIDTH 1 /* TSHUT */
  111. #define WM9090_TSHUT_ENA 0x4000 /* TSHUT_ENA */
  112. #define WM9090_TSHUT_ENA_MASK 0x4000 /* TSHUT_ENA */
  113. #define WM9090_TSHUT_ENA_SHIFT 14 /* TSHUT_ENA */
  114. #define WM9090_TSHUT_ENA_WIDTH 1 /* TSHUT_ENA */
  115. #define WM9090_TSHUT_OPDIS 0x2000 /* TSHUT_OPDIS */
  116. #define WM9090_TSHUT_OPDIS_MASK 0x2000 /* TSHUT_OPDIS */
  117. #define WM9090_TSHUT_OPDIS_SHIFT 13 /* TSHUT_OPDIS */
  118. #define WM9090_TSHUT_OPDIS_WIDTH 1 /* TSHUT_OPDIS */
  119. #define WM9090_IN1A_ENA 0x0080 /* IN1A_ENA */
  120. #define WM9090_IN1A_ENA_MASK 0x0080 /* IN1A_ENA */
  121. #define WM9090_IN1A_ENA_SHIFT 7 /* IN1A_ENA */
  122. #define WM9090_IN1A_ENA_WIDTH 1 /* IN1A_ENA */
  123. #define WM9090_IN1B_ENA 0x0040 /* IN1B_ENA */
  124. #define WM9090_IN1B_ENA_MASK 0x0040 /* IN1B_ENA */
  125. #define WM9090_IN1B_ENA_SHIFT 6 /* IN1B_ENA */
  126. #define WM9090_IN1B_ENA_WIDTH 1 /* IN1B_ENA */
  127. #define WM9090_IN2A_ENA 0x0020 /* IN2A_ENA */
  128. #define WM9090_IN2A_ENA_MASK 0x0020 /* IN2A_ENA */
  129. #define WM9090_IN2A_ENA_SHIFT 5 /* IN2A_ENA */
  130. #define WM9090_IN2A_ENA_WIDTH 1 /* IN2A_ENA */
  131. #define WM9090_IN2B_ENA 0x0010 /* IN2B_ENA */
  132. #define WM9090_IN2B_ENA_MASK 0x0010 /* IN2B_ENA */
  133. #define WM9090_IN2B_ENA_SHIFT 4 /* IN2B_ENA */
  134. #define WM9090_IN2B_ENA_WIDTH 1 /* IN2B_ENA */
  135. /*
  136. * R3 (0x03) - Power Management (3)
  137. */
  138. #define WM9090_AGC_ENA 0x4000 /* AGC_ENA */
  139. #define WM9090_AGC_ENA_MASK 0x4000 /* AGC_ENA */
  140. #define WM9090_AGC_ENA_SHIFT 14 /* AGC_ENA */
  141. #define WM9090_AGC_ENA_WIDTH 1 /* AGC_ENA */
  142. #define WM9090_SPKLVOL_ENA 0x0100 /* SPKLVOL_ENA */
  143. #define WM9090_SPKLVOL_ENA_MASK 0x0100 /* SPKLVOL_ENA */
  144. #define WM9090_SPKLVOL_ENA_SHIFT 8 /* SPKLVOL_ENA */
  145. #define WM9090_SPKLVOL_ENA_WIDTH 1 /* SPKLVOL_ENA */
  146. #define WM9090_MIXOUTL_ENA 0x0020 /* MIXOUTL_ENA */
  147. #define WM9090_MIXOUTL_ENA_MASK 0x0020 /* MIXOUTL_ENA */
  148. #define WM9090_MIXOUTL_ENA_SHIFT 5 /* MIXOUTL_ENA */
  149. #define WM9090_MIXOUTL_ENA_WIDTH 1 /* MIXOUTL_ENA */
  150. #define WM9090_MIXOUTR_ENA 0x0010 /* MIXOUTR_ENA */
  151. #define WM9090_MIXOUTR_ENA_MASK 0x0010 /* MIXOUTR_ENA */
  152. #define WM9090_MIXOUTR_ENA_SHIFT 4 /* MIXOUTR_ENA */
  153. #define WM9090_MIXOUTR_ENA_WIDTH 1 /* MIXOUTR_ENA */
  154. #define WM9090_SPKMIX_ENA 0x0008 /* SPKMIX_ENA */
  155. #define WM9090_SPKMIX_ENA_MASK 0x0008 /* SPKMIX_ENA */
  156. #define WM9090_SPKMIX_ENA_SHIFT 3 /* SPKMIX_ENA */
  157. #define WM9090_SPKMIX_ENA_WIDTH 1 /* SPKMIX_ENA */
  158. /*
  159. * R6 (0x06) - Clocking 1
  160. */
  161. #define WM9090_TOCLK_RATE 0x8000 /* TOCLK_RATE */
  162. #define WM9090_TOCLK_RATE_MASK 0x8000 /* TOCLK_RATE */
  163. #define WM9090_TOCLK_RATE_SHIFT 15 /* TOCLK_RATE */
  164. #define WM9090_TOCLK_RATE_WIDTH 1 /* TOCLK_RATE */
  165. #define WM9090_TOCLK_ENA 0x4000 /* TOCLK_ENA */
  166. #define WM9090_TOCLK_ENA_MASK 0x4000 /* TOCLK_ENA */
  167. #define WM9090_TOCLK_ENA_SHIFT 14 /* TOCLK_ENA */
  168. #define WM9090_TOCLK_ENA_WIDTH 1 /* TOCLK_ENA */
  169. /*
  170. * R22 (0x16) - IN1 Line Control
  171. */
  172. #define WM9090_IN1_DIFF 0x0002 /* IN1_DIFF */
  173. #define WM9090_IN1_DIFF_MASK 0x0002 /* IN1_DIFF */
  174. #define WM9090_IN1_DIFF_SHIFT 1 /* IN1_DIFF */
  175. #define WM9090_IN1_DIFF_WIDTH 1 /* IN1_DIFF */
  176. #define WM9090_IN1_CLAMP 0x0001 /* IN1_CLAMP */
  177. #define WM9090_IN1_CLAMP_MASK 0x0001 /* IN1_CLAMP */
  178. #define WM9090_IN1_CLAMP_SHIFT 0 /* IN1_CLAMP */
  179. #define WM9090_IN1_CLAMP_WIDTH 1 /* IN1_CLAMP */
  180. /*
  181. * R23 (0x17) - IN2 Line Control
  182. */
  183. #define WM9090_IN2_DIFF 0x0002 /* IN2_DIFF */
  184. #define WM9090_IN2_DIFF_MASK 0x0002 /* IN2_DIFF */
  185. #define WM9090_IN2_DIFF_SHIFT 1 /* IN2_DIFF */
  186. #define WM9090_IN2_DIFF_WIDTH 1 /* IN2_DIFF */
  187. #define WM9090_IN2_CLAMP 0x0001 /* IN2_CLAMP */
  188. #define WM9090_IN2_CLAMP_MASK 0x0001 /* IN2_CLAMP */
  189. #define WM9090_IN2_CLAMP_SHIFT 0 /* IN2_CLAMP */
  190. #define WM9090_IN2_CLAMP_WIDTH 1 /* IN2_CLAMP */
  191. /*
  192. * R24 (0x18) - IN1 Line Input A Volume
  193. */
  194. #define WM9090_IN1_VU 0x0100 /* IN1_VU */
  195. #define WM9090_IN1_VU_MASK 0x0100 /* IN1_VU */
  196. #define WM9090_IN1_VU_SHIFT 8 /* IN1_VU */
  197. #define WM9090_IN1_VU_WIDTH 1 /* IN1_VU */
  198. #define WM9090_IN1A_MUTE 0x0080 /* IN1A_MUTE */
  199. #define WM9090_IN1A_MUTE_MASK 0x0080 /* IN1A_MUTE */
  200. #define WM9090_IN1A_MUTE_SHIFT 7 /* IN1A_MUTE */
  201. #define WM9090_IN1A_MUTE_WIDTH 1 /* IN1A_MUTE */
  202. #define WM9090_IN1A_ZC 0x0040 /* IN1A_ZC */
  203. #define WM9090_IN1A_ZC_MASK 0x0040 /* IN1A_ZC */
  204. #define WM9090_IN1A_ZC_SHIFT 6 /* IN1A_ZC */
  205. #define WM9090_IN1A_ZC_WIDTH 1 /* IN1A_ZC */
  206. #define WM9090_IN1A_VOL_MASK 0x0007 /* IN1A_VOL - [2:0] */
  207. #define WM9090_IN1A_VOL_SHIFT 0 /* IN1A_VOL - [2:0] */
  208. #define WM9090_IN1A_VOL_WIDTH 3 /* IN1A_VOL - [2:0] */
  209. /*
  210. * R25 (0x19) - IN1 Line Input B Volume
  211. */
  212. #define WM9090_IN1_VU 0x0100 /* IN1_VU */
  213. #define WM9090_IN1_VU_MASK 0x0100 /* IN1_VU */
  214. #define WM9090_IN1_VU_SHIFT 8 /* IN1_VU */
  215. #define WM9090_IN1_VU_WIDTH 1 /* IN1_VU */
  216. #define WM9090_IN1B_MUTE 0x0080 /* IN1B_MUTE */
  217. #define WM9090_IN1B_MUTE_MASK 0x0080 /* IN1B_MUTE */
  218. #define WM9090_IN1B_MUTE_SHIFT 7 /* IN1B_MUTE */
  219. #define WM9090_IN1B_MUTE_WIDTH 1 /* IN1B_MUTE */
  220. #define WM9090_IN1B_ZC 0x0040 /* IN1B_ZC */
  221. #define WM9090_IN1B_ZC_MASK 0x0040 /* IN1B_ZC */
  222. #define WM9090_IN1B_ZC_SHIFT 6 /* IN1B_ZC */
  223. #define WM9090_IN1B_ZC_WIDTH 1 /* IN1B_ZC */
  224. #define WM9090_IN1B_VOL_MASK 0x0007 /* IN1B_VOL - [2:0] */
  225. #define WM9090_IN1B_VOL_SHIFT 0 /* IN1B_VOL - [2:0] */
  226. #define WM9090_IN1B_VOL_WIDTH 3 /* IN1B_VOL - [2:0] */
  227. /*
  228. * R26 (0x1A) - IN2 Line Input A Volume
  229. */
  230. #define WM9090_IN2_VU 0x0100 /* IN2_VU */
  231. #define WM9090_IN2_VU_MASK 0x0100 /* IN2_VU */
  232. #define WM9090_IN2_VU_SHIFT 8 /* IN2_VU */
  233. #define WM9090_IN2_VU_WIDTH 1 /* IN2_VU */
  234. #define WM9090_IN2A_MUTE 0x0080 /* IN2A_MUTE */
  235. #define WM9090_IN2A_MUTE_MASK 0x0080 /* IN2A_MUTE */
  236. #define WM9090_IN2A_MUTE_SHIFT 7 /* IN2A_MUTE */
  237. #define WM9090_IN2A_MUTE_WIDTH 1 /* IN2A_MUTE */
  238. #define WM9090_IN2A_ZC 0x0040 /* IN2A_ZC */
  239. #define WM9090_IN2A_ZC_MASK 0x0040 /* IN2A_ZC */
  240. #define WM9090_IN2A_ZC_SHIFT 6 /* IN2A_ZC */
  241. #define WM9090_IN2A_ZC_WIDTH 1 /* IN2A_ZC */
  242. #define WM9090_IN2A_VOL_MASK 0x0007 /* IN2A_VOL - [2:0] */
  243. #define WM9090_IN2A_VOL_SHIFT 0 /* IN2A_VOL - [2:0] */
  244. #define WM9090_IN2A_VOL_WIDTH 3 /* IN2A_VOL - [2:0] */
  245. /*
  246. * R27 (0x1B) - IN2 Line Input B Volume
  247. */
  248. #define WM9090_IN2_VU 0x0100 /* IN2_VU */
  249. #define WM9090_IN2_VU_MASK 0x0100 /* IN2_VU */
  250. #define WM9090_IN2_VU_SHIFT 8 /* IN2_VU */
  251. #define WM9090_IN2_VU_WIDTH 1 /* IN2_VU */
  252. #define WM9090_IN2B_MUTE 0x0080 /* IN2B_MUTE */
  253. #define WM9090_IN2B_MUTE_MASK 0x0080 /* IN2B_MUTE */
  254. #define WM9090_IN2B_MUTE_SHIFT 7 /* IN2B_MUTE */
  255. #define WM9090_IN2B_MUTE_WIDTH 1 /* IN2B_MUTE */
  256. #define WM9090_IN2B_ZC 0x0040 /* IN2B_ZC */
  257. #define WM9090_IN2B_ZC_MASK 0x0040 /* IN2B_ZC */
  258. #define WM9090_IN2B_ZC_SHIFT 6 /* IN2B_ZC */
  259. #define WM9090_IN2B_ZC_WIDTH 1 /* IN2B_ZC */
  260. #define WM9090_IN2B_VOL_MASK 0x0007 /* IN2B_VOL - [2:0] */
  261. #define WM9090_IN2B_VOL_SHIFT 0 /* IN2B_VOL - [2:0] */
  262. #define WM9090_IN2B_VOL_WIDTH 3 /* IN2B_VOL - [2:0] */
  263. /*
  264. * R28 (0x1C) - Left Output Volume
  265. */
  266. #define WM9090_HPOUT1_VU 0x0100 /* HPOUT1_VU */
  267. #define WM9090_HPOUT1_VU_MASK 0x0100 /* HPOUT1_VU */
  268. #define WM9090_HPOUT1_VU_SHIFT 8 /* HPOUT1_VU */
  269. #define WM9090_HPOUT1_VU_WIDTH 1 /* HPOUT1_VU */
  270. #define WM9090_HPOUT1L_ZC 0x0080 /* HPOUT1L_ZC */
  271. #define WM9090_HPOUT1L_ZC_MASK 0x0080 /* HPOUT1L_ZC */
  272. #define WM9090_HPOUT1L_ZC_SHIFT 7 /* HPOUT1L_ZC */
  273. #define WM9090_HPOUT1L_ZC_WIDTH 1 /* HPOUT1L_ZC */
  274. #define WM9090_HPOUT1L_MUTE 0x0040 /* HPOUT1L_MUTE */
  275. #define WM9090_HPOUT1L_MUTE_MASK 0x0040 /* HPOUT1L_MUTE */
  276. #define WM9090_HPOUT1L_MUTE_SHIFT 6 /* HPOUT1L_MUTE */
  277. #define WM9090_HPOUT1L_MUTE_WIDTH 1 /* HPOUT1L_MUTE */
  278. #define WM9090_HPOUT1L_VOL_MASK 0x003F /* HPOUT1L_VOL - [5:0] */
  279. #define WM9090_HPOUT1L_VOL_SHIFT 0 /* HPOUT1L_VOL - [5:0] */
  280. #define WM9090_HPOUT1L_VOL_WIDTH 6 /* HPOUT1L_VOL - [5:0] */
  281. /*
  282. * R29 (0x1D) - Right Output Volume
  283. */
  284. #define WM9090_HPOUT1_VU 0x0100 /* HPOUT1_VU */
  285. #define WM9090_HPOUT1_VU_MASK 0x0100 /* HPOUT1_VU */
  286. #define WM9090_HPOUT1_VU_SHIFT 8 /* HPOUT1_VU */
  287. #define WM9090_HPOUT1_VU_WIDTH 1 /* HPOUT1_VU */
  288. #define WM9090_HPOUT1R_ZC 0x0080 /* HPOUT1R_ZC */
  289. #define WM9090_HPOUT1R_ZC_MASK 0x0080 /* HPOUT1R_ZC */
  290. #define WM9090_HPOUT1R_ZC_SHIFT 7 /* HPOUT1R_ZC */
  291. #define WM9090_HPOUT1R_ZC_WIDTH 1 /* HPOUT1R_ZC */
  292. #define WM9090_HPOUT1R_MUTE 0x0040 /* HPOUT1R_MUTE */
  293. #define WM9090_HPOUT1R_MUTE_MASK 0x0040 /* HPOUT1R_MUTE */
  294. #define WM9090_HPOUT1R_MUTE_SHIFT 6 /* HPOUT1R_MUTE */
  295. #define WM9090_HPOUT1R_MUTE_WIDTH 1 /* HPOUT1R_MUTE */
  296. #define WM9090_HPOUT1R_VOL_MASK 0x003F /* HPOUT1R_VOL - [5:0] */
  297. #define WM9090_HPOUT1R_VOL_SHIFT 0 /* HPOUT1R_VOL - [5:0] */
  298. #define WM9090_HPOUT1R_VOL_WIDTH 6 /* HPOUT1R_VOL - [5:0] */
  299. /*
  300. * R34 (0x22) - SPKMIXL Attenuation
  301. */
  302. #define WM9090_SPKMIX_MUTE 0x0100 /* SPKMIX_MUTE */
  303. #define WM9090_SPKMIX_MUTE_MASK 0x0100 /* SPKMIX_MUTE */
  304. #define WM9090_SPKMIX_MUTE_SHIFT 8 /* SPKMIX_MUTE */
  305. #define WM9090_SPKMIX_MUTE_WIDTH 1 /* SPKMIX_MUTE */
  306. #define WM9090_IN1A_SPKMIX_VOL_MASK 0x00C0 /* IN1A_SPKMIX_VOL - [7:6] */
  307. #define WM9090_IN1A_SPKMIX_VOL_SHIFT 6 /* IN1A_SPKMIX_VOL - [7:6] */
  308. #define WM9090_IN1A_SPKMIX_VOL_WIDTH 2 /* IN1A_SPKMIX_VOL - [7:6] */
  309. #define WM9090_IN1B_SPKMIX_VOL_MASK 0x0030 /* IN1B_SPKMIX_VOL - [5:4] */
  310. #define WM9090_IN1B_SPKMIX_VOL_SHIFT 4 /* IN1B_SPKMIX_VOL - [5:4] */
  311. #define WM9090_IN1B_SPKMIX_VOL_WIDTH 2 /* IN1B_SPKMIX_VOL - [5:4] */
  312. #define WM9090_IN2A_SPKMIX_VOL_MASK 0x000C /* IN2A_SPKMIX_VOL - [3:2] */
  313. #define WM9090_IN2A_SPKMIX_VOL_SHIFT 2 /* IN2A_SPKMIX_VOL - [3:2] */
  314. #define WM9090_IN2A_SPKMIX_VOL_WIDTH 2 /* IN2A_SPKMIX_VOL - [3:2] */
  315. #define WM9090_IN2B_SPKMIX_VOL_MASK 0x0003 /* IN2B_SPKMIX_VOL - [1:0] */
  316. #define WM9090_IN2B_SPKMIX_VOL_SHIFT 0 /* IN2B_SPKMIX_VOL - [1:0] */
  317. #define WM9090_IN2B_SPKMIX_VOL_WIDTH 2 /* IN2B_SPKMIX_VOL - [1:0] */
  318. /*
  319. * R36 (0x24) - SPKOUT Mixers
  320. */
  321. #define WM9090_SPKMIXL_TO_SPKOUTL 0x0010 /* SPKMIXL_TO_SPKOUTL */
  322. #define WM9090_SPKMIXL_TO_SPKOUTL_MASK 0x0010 /* SPKMIXL_TO_SPKOUTL */
  323. #define WM9090_SPKMIXL_TO_SPKOUTL_SHIFT 4 /* SPKMIXL_TO_SPKOUTL */
  324. #define WM9090_SPKMIXL_TO_SPKOUTL_WIDTH 1 /* SPKMIXL_TO_SPKOUTL */
  325. /*
  326. * R37 (0x25) - ClassD3
  327. */
  328. #define WM9090_SPKOUTL_BOOST_MASK 0x0038 /* SPKOUTL_BOOST - [5:3] */
  329. #define WM9090_SPKOUTL_BOOST_SHIFT 3 /* SPKOUTL_BOOST - [5:3] */
  330. #define WM9090_SPKOUTL_BOOST_WIDTH 3 /* SPKOUTL_BOOST - [5:3] */
  331. /*
  332. * R38 (0x26) - Speaker Volume Left
  333. */
  334. #define WM9090_SPKOUT_VU 0x0100 /* SPKOUT_VU */
  335. #define WM9090_SPKOUT_VU_MASK 0x0100 /* SPKOUT_VU */
  336. #define WM9090_SPKOUT_VU_SHIFT 8 /* SPKOUT_VU */
  337. #define WM9090_SPKOUT_VU_WIDTH 1 /* SPKOUT_VU */
  338. #define WM9090_SPKOUTL_ZC 0x0080 /* SPKOUTL_ZC */
  339. #define WM9090_SPKOUTL_ZC_MASK 0x0080 /* SPKOUTL_ZC */
  340. #define WM9090_SPKOUTL_ZC_SHIFT 7 /* SPKOUTL_ZC */
  341. #define WM9090_SPKOUTL_ZC_WIDTH 1 /* SPKOUTL_ZC */
  342. #define WM9090_SPKOUTL_MUTE 0x0040 /* SPKOUTL_MUTE */
  343. #define WM9090_SPKOUTL_MUTE_MASK 0x0040 /* SPKOUTL_MUTE */
  344. #define WM9090_SPKOUTL_MUTE_SHIFT 6 /* SPKOUTL_MUTE */
  345. #define WM9090_SPKOUTL_MUTE_WIDTH 1 /* SPKOUTL_MUTE */
  346. #define WM9090_SPKOUTL_VOL_MASK 0x003F /* SPKOUTL_VOL - [5:0] */
  347. #define WM9090_SPKOUTL_VOL_SHIFT 0 /* SPKOUTL_VOL - [5:0] */
  348. #define WM9090_SPKOUTL_VOL_WIDTH 6 /* SPKOUTL_VOL - [5:0] */
  349. /*
  350. * R45 (0x2D) - Output Mixer1
  351. */
  352. #define WM9090_IN1A_TO_MIXOUTL 0x0040 /* IN1A_TO_MIXOUTL */
  353. #define WM9090_IN1A_TO_MIXOUTL_MASK 0x0040 /* IN1A_TO_MIXOUTL */
  354. #define WM9090_IN1A_TO_MIXOUTL_SHIFT 6 /* IN1A_TO_MIXOUTL */
  355. #define WM9090_IN1A_TO_MIXOUTL_WIDTH 1 /* IN1A_TO_MIXOUTL */
  356. #define WM9090_IN2A_TO_MIXOUTL 0x0004 /* IN2A_TO_MIXOUTL */
  357. #define WM9090_IN2A_TO_MIXOUTL_MASK 0x0004 /* IN2A_TO_MIXOUTL */
  358. #define WM9090_IN2A_TO_MIXOUTL_SHIFT 2 /* IN2A_TO_MIXOUTL */
  359. #define WM9090_IN2A_TO_MIXOUTL_WIDTH 1 /* IN2A_TO_MIXOUTL */
  360. /*
  361. * R46 (0x2E) - Output Mixer2
  362. */
  363. #define WM9090_IN1A_TO_MIXOUTR 0x0040 /* IN1A_TO_MIXOUTR */
  364. #define WM9090_IN1A_TO_MIXOUTR_MASK 0x0040 /* IN1A_TO_MIXOUTR */
  365. #define WM9090_IN1A_TO_MIXOUTR_SHIFT 6 /* IN1A_TO_MIXOUTR */
  366. #define WM9090_IN1A_TO_MIXOUTR_WIDTH 1 /* IN1A_TO_MIXOUTR */
  367. #define WM9090_IN1B_TO_MIXOUTR 0x0010 /* IN1B_TO_MIXOUTR */
  368. #define WM9090_IN1B_TO_MIXOUTR_MASK 0x0010 /* IN1B_TO_MIXOUTR */
  369. #define WM9090_IN1B_TO_MIXOUTR_SHIFT 4 /* IN1B_TO_MIXOUTR */
  370. #define WM9090_IN1B_TO_MIXOUTR_WIDTH 1 /* IN1B_TO_MIXOUTR */
  371. #define WM9090_IN2A_TO_MIXOUTR 0x0004 /* IN2A_TO_MIXOUTR */
  372. #define WM9090_IN2A_TO_MIXOUTR_MASK 0x0004 /* IN2A_TO_MIXOUTR */
  373. #define WM9090_IN2A_TO_MIXOUTR_SHIFT 2 /* IN2A_TO_MIXOUTR */
  374. #define WM9090_IN2A_TO_MIXOUTR_WIDTH 1 /* IN2A_TO_MIXOUTR */
  375. #define WM9090_IN2B_TO_MIXOUTR 0x0001 /* IN2B_TO_MIXOUTR */
  376. #define WM9090_IN2B_TO_MIXOUTR_MASK 0x0001 /* IN2B_TO_MIXOUTR */
  377. #define WM9090_IN2B_TO_MIXOUTR_SHIFT 0 /* IN2B_TO_MIXOUTR */
  378. #define WM9090_IN2B_TO_MIXOUTR_WIDTH 1 /* IN2B_TO_MIXOUTR */
  379. /*
  380. * R47 (0x2F) - Output Mixer3
  381. */
  382. #define WM9090_MIXOUTL_MUTE 0x0100 /* MIXOUTL_MUTE */
  383. #define WM9090_MIXOUTL_MUTE_MASK 0x0100 /* MIXOUTL_MUTE */
  384. #define WM9090_MIXOUTL_MUTE_SHIFT 8 /* MIXOUTL_MUTE */
  385. #define WM9090_MIXOUTL_MUTE_WIDTH 1 /* MIXOUTL_MUTE */
  386. #define WM9090_IN1A_MIXOUTL_VOL_MASK 0x00C0 /* IN1A_MIXOUTL_VOL - [7:6] */
  387. #define WM9090_IN1A_MIXOUTL_VOL_SHIFT 6 /* IN1A_MIXOUTL_VOL - [7:6] */
  388. #define WM9090_IN1A_MIXOUTL_VOL_WIDTH 2 /* IN1A_MIXOUTL_VOL - [7:6] */
  389. #define WM9090_IN2A_MIXOUTL_VOL_MASK 0x000C /* IN2A_MIXOUTL_VOL - [3:2] */
  390. #define WM9090_IN2A_MIXOUTL_VOL_SHIFT 2 /* IN2A_MIXOUTL_VOL - [3:2] */
  391. #define WM9090_IN2A_MIXOUTL_VOL_WIDTH 2 /* IN2A_MIXOUTL_VOL - [3:2] */
  392. /*
  393. * R48 (0x30) - Output Mixer4
  394. */
  395. #define WM9090_MIXOUTR_MUTE 0x0100 /* MIXOUTR_MUTE */
  396. #define WM9090_MIXOUTR_MUTE_MASK 0x0100 /* MIXOUTR_MUTE */
  397. #define WM9090_MIXOUTR_MUTE_SHIFT 8 /* MIXOUTR_MUTE */
  398. #define WM9090_MIXOUTR_MUTE_WIDTH 1 /* MIXOUTR_MUTE */
  399. #define WM9090_IN1A_MIXOUTR_VOL_MASK 0x00C0 /* IN1A_MIXOUTR_VOL - [7:6] */
  400. #define WM9090_IN1A_MIXOUTR_VOL_SHIFT 6 /* IN1A_MIXOUTR_VOL - [7:6] */
  401. #define WM9090_IN1A_MIXOUTR_VOL_WIDTH 2 /* IN1A_MIXOUTR_VOL - [7:6] */
  402. #define WM9090_IN1B_MIXOUTR_VOL_MASK 0x0030 /* IN1B_MIXOUTR_VOL - [5:4] */
  403. #define WM9090_IN1B_MIXOUTR_VOL_SHIFT 4 /* IN1B_MIXOUTR_VOL - [5:4] */
  404. #define WM9090_IN1B_MIXOUTR_VOL_WIDTH 2 /* IN1B_MIXOUTR_VOL - [5:4] */
  405. #define WM9090_IN2A_MIXOUTR_VOL_MASK 0x000C /* IN2A_MIXOUTR_VOL - [3:2] */
  406. #define WM9090_IN2A_MIXOUTR_VOL_SHIFT 2 /* IN2A_MIXOUTR_VOL - [3:2] */
  407. #define WM9090_IN2A_MIXOUTR_VOL_WIDTH 2 /* IN2A_MIXOUTR_VOL - [3:2] */
  408. #define WM9090_IN2B_MIXOUTR_VOL_MASK 0x0003 /* IN2B_MIXOUTR_VOL - [1:0] */
  409. #define WM9090_IN2B_MIXOUTR_VOL_SHIFT 0 /* IN2B_MIXOUTR_VOL - [1:0] */
  410. #define WM9090_IN2B_MIXOUTR_VOL_WIDTH 2 /* IN2B_MIXOUTR_VOL - [1:0] */
  411. /*
  412. * R54 (0x36) - Speaker Mixer
  413. */
  414. #define WM9090_IN1A_TO_SPKMIX 0x0040 /* IN1A_TO_SPKMIX */
  415. #define WM9090_IN1A_TO_SPKMIX_MASK 0x0040 /* IN1A_TO_SPKMIX */
  416. #define WM9090_IN1A_TO_SPKMIX_SHIFT 6 /* IN1A_TO_SPKMIX */
  417. #define WM9090_IN1A_TO_SPKMIX_WIDTH 1 /* IN1A_TO_SPKMIX */
  418. #define WM9090_IN1B_TO_SPKMIX 0x0010 /* IN1B_TO_SPKMIX */
  419. #define WM9090_IN1B_TO_SPKMIX_MASK 0x0010 /* IN1B_TO_SPKMIX */
  420. #define WM9090_IN1B_TO_SPKMIX_SHIFT 4 /* IN1B_TO_SPKMIX */
  421. #define WM9090_IN1B_TO_SPKMIX_WIDTH 1 /* IN1B_TO_SPKMIX */
  422. #define WM9090_IN2A_TO_SPKMIX 0x0004 /* IN2A_TO_SPKMIX */
  423. #define WM9090_IN2A_TO_SPKMIX_MASK 0x0004 /* IN2A_TO_SPKMIX */
  424. #define WM9090_IN2A_TO_SPKMIX_SHIFT 2 /* IN2A_TO_SPKMIX */
  425. #define WM9090_IN2A_TO_SPKMIX_WIDTH 1 /* IN2A_TO_SPKMIX */
  426. #define WM9090_IN2B_TO_SPKMIX 0x0001 /* IN2B_TO_SPKMIX */
  427. #define WM9090_IN2B_TO_SPKMIX_MASK 0x0001 /* IN2B_TO_SPKMIX */
  428. #define WM9090_IN2B_TO_SPKMIX_SHIFT 0 /* IN2B_TO_SPKMIX */
  429. #define WM9090_IN2B_TO_SPKMIX_WIDTH 1 /* IN2B_TO_SPKMIX */
  430. /*
  431. * R57 (0x39) - AntiPOP2
  432. */
  433. #define WM9090_VMID_BUF_ENA 0x0008 /* VMID_BUF_ENA */
  434. #define WM9090_VMID_BUF_ENA_MASK 0x0008 /* VMID_BUF_ENA */
  435. #define WM9090_VMID_BUF_ENA_SHIFT 3 /* VMID_BUF_ENA */
  436. #define WM9090_VMID_BUF_ENA_WIDTH 1 /* VMID_BUF_ENA */
  437. #define WM9090_VMID_ENA 0x0001 /* VMID_ENA */
  438. #define WM9090_VMID_ENA_MASK 0x0001 /* VMID_ENA */
  439. #define WM9090_VMID_ENA_SHIFT 0 /* VMID_ENA */
  440. #define WM9090_VMID_ENA_WIDTH 1 /* VMID_ENA */
  441. /*
  442. * R70 (0x46) - Write Sequencer 0
  443. */
  444. #define WM9090_WSEQ_ENA 0x0100 /* WSEQ_ENA */
  445. #define WM9090_WSEQ_ENA_MASK 0x0100 /* WSEQ_ENA */
  446. #define WM9090_WSEQ_ENA_SHIFT 8 /* WSEQ_ENA */
  447. #define WM9090_WSEQ_ENA_WIDTH 1 /* WSEQ_ENA */
  448. #define WM9090_WSEQ_WRITE_INDEX_MASK 0x000F /* WSEQ_WRITE_INDEX - [3:0] */
  449. #define WM9090_WSEQ_WRITE_INDEX_SHIFT 0 /* WSEQ_WRITE_INDEX - [3:0] */
  450. #define WM9090_WSEQ_WRITE_INDEX_WIDTH 4 /* WSEQ_WRITE_INDEX - [3:0] */
  451. /*
  452. * R71 (0x47) - Write Sequencer 1
  453. */
  454. #define WM9090_WSEQ_DATA_WIDTH_MASK 0x7000 /* WSEQ_DATA_WIDTH - [14:12] */
  455. #define WM9090_WSEQ_DATA_WIDTH_SHIFT 12 /* WSEQ_DATA_WIDTH - [14:12] */
  456. #define WM9090_WSEQ_DATA_WIDTH_WIDTH 3 /* WSEQ_DATA_WIDTH - [14:12] */
  457. #define WM9090_WSEQ_DATA_START_MASK 0x0F00 /* WSEQ_DATA_START - [11:8] */
  458. #define WM9090_WSEQ_DATA_START_SHIFT 8 /* WSEQ_DATA_START - [11:8] */
  459. #define WM9090_WSEQ_DATA_START_WIDTH 4 /* WSEQ_DATA_START - [11:8] */
  460. #define WM9090_WSEQ_ADDR_MASK 0x00FF /* WSEQ_ADDR - [7:0] */
  461. #define WM9090_WSEQ_ADDR_SHIFT 0 /* WSEQ_ADDR - [7:0] */
  462. #define WM9090_WSEQ_ADDR_WIDTH 8 /* WSEQ_ADDR - [7:0] */
  463. /*
  464. * R72 (0x48) - Write Sequencer 2
  465. */
  466. #define WM9090_WSEQ_EOS 0x4000 /* WSEQ_EOS */
  467. #define WM9090_WSEQ_EOS_MASK 0x4000 /* WSEQ_EOS */
  468. #define WM9090_WSEQ_EOS_SHIFT 14 /* WSEQ_EOS */
  469. #define WM9090_WSEQ_EOS_WIDTH 1 /* WSEQ_EOS */
  470. #define WM9090_WSEQ_DELAY_MASK 0x0F00 /* WSEQ_DELAY - [11:8] */
  471. #define WM9090_WSEQ_DELAY_SHIFT 8 /* WSEQ_DELAY - [11:8] */
  472. #define WM9090_WSEQ_DELAY_WIDTH 4 /* WSEQ_DELAY - [11:8] */
  473. #define WM9090_WSEQ_DATA_MASK 0x00FF /* WSEQ_DATA - [7:0] */
  474. #define WM9090_WSEQ_DATA_SHIFT 0 /* WSEQ_DATA - [7:0] */
  475. #define WM9090_WSEQ_DATA_WIDTH 8 /* WSEQ_DATA - [7:0] */
  476. /*
  477. * R73 (0x49) - Write Sequencer 3
  478. */
  479. #define WM9090_WSEQ_ABORT 0x0200 /* WSEQ_ABORT */
  480. #define WM9090_WSEQ_ABORT_MASK 0x0200 /* WSEQ_ABORT */
  481. #define WM9090_WSEQ_ABORT_SHIFT 9 /* WSEQ_ABORT */
  482. #define WM9090_WSEQ_ABORT_WIDTH 1 /* WSEQ_ABORT */
  483. #define WM9090_WSEQ_START 0x0100 /* WSEQ_START */
  484. #define WM9090_WSEQ_START_MASK 0x0100 /* WSEQ_START */
  485. #define WM9090_WSEQ_START_SHIFT 8 /* WSEQ_START */
  486. #define WM9090_WSEQ_START_WIDTH 1 /* WSEQ_START */
  487. #define WM9090_WSEQ_START_INDEX_MASK 0x003F /* WSEQ_START_INDEX - [5:0] */
  488. #define WM9090_WSEQ_START_INDEX_SHIFT 0 /* WSEQ_START_INDEX - [5:0] */
  489. #define WM9090_WSEQ_START_INDEX_WIDTH 6 /* WSEQ_START_INDEX - [5:0] */
  490. /*
  491. * R74 (0x4A) - Write Sequencer 4
  492. */
  493. #define WM9090_WSEQ_BUSY 0x0001 /* WSEQ_BUSY */
  494. #define WM9090_WSEQ_BUSY_MASK 0x0001 /* WSEQ_BUSY */
  495. #define WM9090_WSEQ_BUSY_SHIFT 0 /* WSEQ_BUSY */
  496. #define WM9090_WSEQ_BUSY_WIDTH 1 /* WSEQ_BUSY */
  497. /*
  498. * R75 (0x4B) - Write Sequencer 5
  499. */
  500. #define WM9090_WSEQ_CURRENT_INDEX_MASK 0x003F /* WSEQ_CURRENT_INDEX - [5:0] */
  501. #define WM9090_WSEQ_CURRENT_INDEX_SHIFT 0 /* WSEQ_CURRENT_INDEX - [5:0] */
  502. #define WM9090_WSEQ_CURRENT_INDEX_WIDTH 6 /* WSEQ_CURRENT_INDEX - [5:0] */
  503. /*
  504. * R76 (0x4C) - Charge Pump 1
  505. */
  506. #define WM9090_CP_ENA 0x8000 /* CP_ENA */
  507. #define WM9090_CP_ENA_MASK 0x8000 /* CP_ENA */
  508. #define WM9090_CP_ENA_SHIFT 15 /* CP_ENA */
  509. #define WM9090_CP_ENA_WIDTH 1 /* CP_ENA */
  510. /*
  511. * R84 (0x54) - DC Servo 0
  512. */
  513. #define WM9090_DCS_TRIG_SINGLE_1 0x2000 /* DCS_TRIG_SINGLE_1 */
  514. #define WM9090_DCS_TRIG_SINGLE_1_MASK 0x2000 /* DCS_TRIG_SINGLE_1 */
  515. #define WM9090_DCS_TRIG_SINGLE_1_SHIFT 13 /* DCS_TRIG_SINGLE_1 */
  516. #define WM9090_DCS_TRIG_SINGLE_1_WIDTH 1 /* DCS_TRIG_SINGLE_1 */
  517. #define WM9090_DCS_TRIG_SINGLE_0 0x1000 /* DCS_TRIG_SINGLE_0 */
  518. #define WM9090_DCS_TRIG_SINGLE_0_MASK 0x1000 /* DCS_TRIG_SINGLE_0 */
  519. #define WM9090_DCS_TRIG_SINGLE_0_SHIFT 12 /* DCS_TRIG_SINGLE_0 */
  520. #define WM9090_DCS_TRIG_SINGLE_0_WIDTH 1 /* DCS_TRIG_SINGLE_0 */
  521. #define WM9090_DCS_TRIG_SERIES_1 0x0200 /* DCS_TRIG_SERIES_1 */
  522. #define WM9090_DCS_TRIG_SERIES_1_MASK 0x0200 /* DCS_TRIG_SERIES_1 */
  523. #define WM9090_DCS_TRIG_SERIES_1_SHIFT 9 /* DCS_TRIG_SERIES_1 */
  524. #define WM9090_DCS_TRIG_SERIES_1_WIDTH 1 /* DCS_TRIG_SERIES_1 */
  525. #define WM9090_DCS_TRIG_SERIES_0 0x0100 /* DCS_TRIG_SERIES_0 */
  526. #define WM9090_DCS_TRIG_SERIES_0_MASK 0x0100 /* DCS_TRIG_SERIES_0 */
  527. #define WM9090_DCS_TRIG_SERIES_0_SHIFT 8 /* DCS_TRIG_SERIES_0 */
  528. #define WM9090_DCS_TRIG_SERIES_0_WIDTH 1 /* DCS_TRIG_SERIES_0 */
  529. #define WM9090_DCS_TRIG_STARTUP_1 0x0020 /* DCS_TRIG_STARTUP_1 */
  530. #define WM9090_DCS_TRIG_STARTUP_1_MASK 0x0020 /* DCS_TRIG_STARTUP_1 */
  531. #define WM9090_DCS_TRIG_STARTUP_1_SHIFT 5 /* DCS_TRIG_STARTUP_1 */
  532. #define WM9090_DCS_TRIG_STARTUP_1_WIDTH 1 /* DCS_TRIG_STARTUP_1 */
  533. #define WM9090_DCS_TRIG_STARTUP_0 0x0010 /* DCS_TRIG_STARTUP_0 */
  534. #define WM9090_DCS_TRIG_STARTUP_0_MASK 0x0010 /* DCS_TRIG_STARTUP_0 */
  535. #define WM9090_DCS_TRIG_STARTUP_0_SHIFT 4 /* DCS_TRIG_STARTUP_0 */
  536. #define WM9090_DCS_TRIG_STARTUP_0_WIDTH 1 /* DCS_TRIG_STARTUP_0 */
  537. #define WM9090_DCS_TRIG_DAC_WR_1 0x0008 /* DCS_TRIG_DAC_WR_1 */
  538. #define WM9090_DCS_TRIG_DAC_WR_1_MASK 0x0008 /* DCS_TRIG_DAC_WR_1 */
  539. #define WM9090_DCS_TRIG_DAC_WR_1_SHIFT 3 /* DCS_TRIG_DAC_WR_1 */
  540. #define WM9090_DCS_TRIG_DAC_WR_1_WIDTH 1 /* DCS_TRIG_DAC_WR_1 */
  541. #define WM9090_DCS_TRIG_DAC_WR_0 0x0004 /* DCS_TRIG_DAC_WR_0 */
  542. #define WM9090_DCS_TRIG_DAC_WR_0_MASK 0x0004 /* DCS_TRIG_DAC_WR_0 */
  543. #define WM9090_DCS_TRIG_DAC_WR_0_SHIFT 2 /* DCS_TRIG_DAC_WR_0 */
  544. #define WM9090_DCS_TRIG_DAC_WR_0_WIDTH 1 /* DCS_TRIG_DAC_WR_0 */
  545. #define WM9090_DCS_ENA_CHAN_1 0x0002 /* DCS_ENA_CHAN_1 */
  546. #define WM9090_DCS_ENA_CHAN_1_MASK 0x0002 /* DCS_ENA_CHAN_1 */
  547. #define WM9090_DCS_ENA_CHAN_1_SHIFT 1 /* DCS_ENA_CHAN_1 */
  548. #define WM9090_DCS_ENA_CHAN_1_WIDTH 1 /* DCS_ENA_CHAN_1 */
  549. #define WM9090_DCS_ENA_CHAN_0 0x0001 /* DCS_ENA_CHAN_0 */
  550. #define WM9090_DCS_ENA_CHAN_0_MASK 0x0001 /* DCS_ENA_CHAN_0 */
  551. #define WM9090_DCS_ENA_CHAN_0_SHIFT 0 /* DCS_ENA_CHAN_0 */
  552. #define WM9090_DCS_ENA_CHAN_0_WIDTH 1 /* DCS_ENA_CHAN_0 */
  553. /*
  554. * R85 (0x55) - DC Servo 1
  555. */
  556. #define WM9090_DCS_SERIES_NO_01_MASK 0x0FE0 /* DCS_SERIES_NO_01 - [11:5] */
  557. #define WM9090_DCS_SERIES_NO_01_SHIFT 5 /* DCS_SERIES_NO_01 - [11:5] */
  558. #define WM9090_DCS_SERIES_NO_01_WIDTH 7 /* DCS_SERIES_NO_01 - [11:5] */
  559. #define WM9090_DCS_TIMER_PERIOD_01_MASK 0x000F /* DCS_TIMER_PERIOD_01 - [3:0] */
  560. #define WM9090_DCS_TIMER_PERIOD_01_SHIFT 0 /* DCS_TIMER_PERIOD_01 - [3:0] */
  561. #define WM9090_DCS_TIMER_PERIOD_01_WIDTH 4 /* DCS_TIMER_PERIOD_01 - [3:0] */
  562. /*
  563. * R87 (0x57) - DC Servo 3
  564. */
  565. #define WM9090_DCS_DAC_WR_VAL_1_MASK 0xFF00 /* DCS_DAC_WR_VAL_1 - [15:8] */
  566. #define WM9090_DCS_DAC_WR_VAL_1_SHIFT 8 /* DCS_DAC_WR_VAL_1 - [15:8] */
  567. #define WM9090_DCS_DAC_WR_VAL_1_WIDTH 8 /* DCS_DAC_WR_VAL_1 - [15:8] */
  568. #define WM9090_DCS_DAC_WR_VAL_0_MASK 0x00FF /* DCS_DAC_WR_VAL_0 - [7:0] */
  569. #define WM9090_DCS_DAC_WR_VAL_0_SHIFT 0 /* DCS_DAC_WR_VAL_0 - [7:0] */
  570. #define WM9090_DCS_DAC_WR_VAL_0_WIDTH 8 /* DCS_DAC_WR_VAL_0 - [7:0] */
  571. /*
  572. * R88 (0x58) - DC Servo Readback 0
  573. */
  574. #define WM9090_DCS_CAL_COMPLETE_MASK 0x0300 /* DCS_CAL_COMPLETE - [9:8] */
  575. #define WM9090_DCS_CAL_COMPLETE_SHIFT 8 /* DCS_CAL_COMPLETE - [9:8] */
  576. #define WM9090_DCS_CAL_COMPLETE_WIDTH 2 /* DCS_CAL_COMPLETE - [9:8] */
  577. #define WM9090_DCS_DAC_WR_COMPLETE_MASK 0x0030 /* DCS_DAC_WR_COMPLETE - [5:4] */
  578. #define WM9090_DCS_DAC_WR_COMPLETE_SHIFT 4 /* DCS_DAC_WR_COMPLETE - [5:4] */
  579. #define WM9090_DCS_DAC_WR_COMPLETE_WIDTH 2 /* DCS_DAC_WR_COMPLETE - [5:4] */
  580. #define WM9090_DCS_STARTUP_COMPLETE_MASK 0x0003 /* DCS_STARTUP_COMPLETE - [1:0] */
  581. #define WM9090_DCS_STARTUP_COMPLETE_SHIFT 0 /* DCS_STARTUP_COMPLETE - [1:0] */
  582. #define WM9090_DCS_STARTUP_COMPLETE_WIDTH 2 /* DCS_STARTUP_COMPLETE - [1:0] */
  583. /*
  584. * R89 (0x59) - DC Servo Readback 1
  585. */
  586. #define WM9090_DCS_DAC_WR_VAL_1_RD_MASK 0x00FF /* DCS_DAC_WR_VAL_1_RD - [7:0] */
  587. #define WM9090_DCS_DAC_WR_VAL_1_RD_SHIFT 0 /* DCS_DAC_WR_VAL_1_RD - [7:0] */
  588. #define WM9090_DCS_DAC_WR_VAL_1_RD_WIDTH 8 /* DCS_DAC_WR_VAL_1_RD - [7:0] */
  589. /*
  590. * R90 (0x5A) - DC Servo Readback 2
  591. */
  592. #define WM9090_DCS_DAC_WR_VAL_0_RD_MASK 0x00FF /* DCS_DAC_WR_VAL_0_RD - [7:0] */
  593. #define WM9090_DCS_DAC_WR_VAL_0_RD_SHIFT 0 /* DCS_DAC_WR_VAL_0_RD - [7:0] */
  594. #define WM9090_DCS_DAC_WR_VAL_0_RD_WIDTH 8 /* DCS_DAC_WR_VAL_0_RD - [7:0] */
  595. /*
  596. * R96 (0x60) - Analogue HP 0
  597. */
  598. #define WM9090_HPOUT1L_RMV_SHORT 0x0080 /* HPOUT1L_RMV_SHORT */
  599. #define WM9090_HPOUT1L_RMV_SHORT_MASK 0x0080 /* HPOUT1L_RMV_SHORT */
  600. #define WM9090_HPOUT1L_RMV_SHORT_SHIFT 7 /* HPOUT1L_RMV_SHORT */
  601. #define WM9090_HPOUT1L_RMV_SHORT_WIDTH 1 /* HPOUT1L_RMV_SHORT */
  602. #define WM9090_HPOUT1L_OUTP 0x0040 /* HPOUT1L_OUTP */
  603. #define WM9090_HPOUT1L_OUTP_MASK 0x0040 /* HPOUT1L_OUTP */
  604. #define WM9090_HPOUT1L_OUTP_SHIFT 6 /* HPOUT1L_OUTP */
  605. #define WM9090_HPOUT1L_OUTP_WIDTH 1 /* HPOUT1L_OUTP */
  606. #define WM9090_HPOUT1L_DLY 0x0020 /* HPOUT1L_DLY */
  607. #define WM9090_HPOUT1L_DLY_MASK 0x0020 /* HPOUT1L_DLY */
  608. #define WM9090_HPOUT1L_DLY_SHIFT 5 /* HPOUT1L_DLY */
  609. #define WM9090_HPOUT1L_DLY_WIDTH 1 /* HPOUT1L_DLY */
  610. #define WM9090_HPOUT1R_RMV_SHORT 0x0008 /* HPOUT1R_RMV_SHORT */
  611. #define WM9090_HPOUT1R_RMV_SHORT_MASK 0x0008 /* HPOUT1R_RMV_SHORT */
  612. #define WM9090_HPOUT1R_RMV_SHORT_SHIFT 3 /* HPOUT1R_RMV_SHORT */
  613. #define WM9090_HPOUT1R_RMV_SHORT_WIDTH 1 /* HPOUT1R_RMV_SHORT */
  614. #define WM9090_HPOUT1R_OUTP 0x0004 /* HPOUT1R_OUTP */
  615. #define WM9090_HPOUT1R_OUTP_MASK 0x0004 /* HPOUT1R_OUTP */
  616. #define WM9090_HPOUT1R_OUTP_SHIFT 2 /* HPOUT1R_OUTP */
  617. #define WM9090_HPOUT1R_OUTP_WIDTH 1 /* HPOUT1R_OUTP */
  618. #define WM9090_HPOUT1R_DLY 0x0002 /* HPOUT1R_DLY */
  619. #define WM9090_HPOUT1R_DLY_MASK 0x0002 /* HPOUT1R_DLY */
  620. #define WM9090_HPOUT1R_DLY_SHIFT 1 /* HPOUT1R_DLY */
  621. #define WM9090_HPOUT1R_DLY_WIDTH 1 /* HPOUT1R_DLY */
  622. /*
  623. * R98 (0x62) - AGC Control 0
  624. */
  625. #define WM9090_AGC_CLIP_ENA 0x8000 /* AGC_CLIP_ENA */
  626. #define WM9090_AGC_CLIP_ENA_MASK 0x8000 /* AGC_CLIP_ENA */
  627. #define WM9090_AGC_CLIP_ENA_SHIFT 15 /* AGC_CLIP_ENA */
  628. #define WM9090_AGC_CLIP_ENA_WIDTH 1 /* AGC_CLIP_ENA */
  629. #define WM9090_AGC_CLIP_THR_MASK 0x0F00 /* AGC_CLIP_THR - [11:8] */
  630. #define WM9090_AGC_CLIP_THR_SHIFT 8 /* AGC_CLIP_THR - [11:8] */
  631. #define WM9090_AGC_CLIP_THR_WIDTH 4 /* AGC_CLIP_THR - [11:8] */
  632. #define WM9090_AGC_CLIP_ATK_MASK 0x0070 /* AGC_CLIP_ATK - [6:4] */
  633. #define WM9090_AGC_CLIP_ATK_SHIFT 4 /* AGC_CLIP_ATK - [6:4] */
  634. #define WM9090_AGC_CLIP_ATK_WIDTH 3 /* AGC_CLIP_ATK - [6:4] */
  635. #define WM9090_AGC_CLIP_DCY_MASK 0x0007 /* AGC_CLIP_DCY - [2:0] */
  636. #define WM9090_AGC_CLIP_DCY_SHIFT 0 /* AGC_CLIP_DCY - [2:0] */
  637. #define WM9090_AGC_CLIP_DCY_WIDTH 3 /* AGC_CLIP_DCY - [2:0] */
  638. /*
  639. * R99 (0x63) - AGC Control 1
  640. */
  641. #define WM9090_AGC_PWR_ENA 0x8000 /* AGC_PWR_ENA */
  642. #define WM9090_AGC_PWR_ENA_MASK 0x8000 /* AGC_PWR_ENA */
  643. #define WM9090_AGC_PWR_ENA_SHIFT 15 /* AGC_PWR_ENA */
  644. #define WM9090_AGC_PWR_ENA_WIDTH 1 /* AGC_PWR_ENA */
  645. #define WM9090_AGC_PWR_AVG 0x1000 /* AGC_PWR_AVG */
  646. #define WM9090_AGC_PWR_AVG_MASK 0x1000 /* AGC_PWR_AVG */
  647. #define WM9090_AGC_PWR_AVG_SHIFT 12 /* AGC_PWR_AVG */
  648. #define WM9090_AGC_PWR_AVG_WIDTH 1 /* AGC_PWR_AVG */
  649. #define WM9090_AGC_PWR_THR_MASK 0x0F00 /* AGC_PWR_THR - [11:8] */
  650. #define WM9090_AGC_PWR_THR_SHIFT 8 /* AGC_PWR_THR - [11:8] */
  651. #define WM9090_AGC_PWR_THR_WIDTH 4 /* AGC_PWR_THR - [11:8] */
  652. #define WM9090_AGC_PWR_ATK_MASK 0x0070 /* AGC_PWR_ATK - [6:4] */
  653. #define WM9090_AGC_PWR_ATK_SHIFT 4 /* AGC_PWR_ATK - [6:4] */
  654. #define WM9090_AGC_PWR_ATK_WIDTH 3 /* AGC_PWR_ATK - [6:4] */
  655. #define WM9090_AGC_PWR_DCY_MASK 0x0007 /* AGC_PWR_DCY - [2:0] */
  656. #define WM9090_AGC_PWR_DCY_SHIFT 0 /* AGC_PWR_DCY - [2:0] */
  657. #define WM9090_AGC_PWR_DCY_WIDTH 3 /* AGC_PWR_DCY - [2:0] */
  658. /*
  659. * R100 (0x64) - AGC Control 2
  660. */
  661. #define WM9090_AGC_RAMP 0x0100 /* AGC_RAMP */
  662. #define WM9090_AGC_RAMP_MASK 0x0100 /* AGC_RAMP */
  663. #define WM9090_AGC_RAMP_SHIFT 8 /* AGC_RAMP */
  664. #define WM9090_AGC_RAMP_WIDTH 1 /* AGC_RAMP */
  665. #define WM9090_AGC_MINGAIN_MASK 0x003F /* AGC_MINGAIN - [5:0] */
  666. #define WM9090_AGC_MINGAIN_SHIFT 0 /* AGC_MINGAIN - [5:0] */
  667. #define WM9090_AGC_MINGAIN_WIDTH 6 /* AGC_MINGAIN - [5:0] */
  668. #endif