wm8985.h 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046
  1. /*
  2. * wm8985.h -- WM8985 ASoC driver
  3. *
  4. * Copyright 2010 Wolfson Microelectronics plc
  5. *
  6. * Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef _WM8985_H
  13. #define _WM8985_H
  14. #define WM8985_SOFTWARE_RESET 0x00
  15. #define WM8985_POWER_MANAGEMENT_1 0x01
  16. #define WM8985_POWER_MANAGEMENT_2 0x02
  17. #define WM8985_POWER_MANAGEMENT_3 0x03
  18. #define WM8985_AUDIO_INTERFACE 0x04
  19. #define WM8985_COMPANDING_CONTROL 0x05
  20. #define WM8985_CLOCK_GEN_CONTROL 0x06
  21. #define WM8985_ADDITIONAL_CONTROL 0x07
  22. #define WM8985_GPIO_CONTROL 0x08
  23. #define WM8985_JACK_DETECT_CONTROL_1 0x09
  24. #define WM8985_DAC_CONTROL 0x0A
  25. #define WM8985_LEFT_DAC_DIGITAL_VOL 0x0B
  26. #define WM8985_RIGHT_DAC_DIGITAL_VOL 0x0C
  27. #define WM8985_JACK_DETECT_CONTROL_2 0x0D
  28. #define WM8985_ADC_CONTROL 0x0E
  29. #define WM8985_LEFT_ADC_DIGITAL_VOL 0x0F
  30. #define WM8985_RIGHT_ADC_DIGITAL_VOL 0x10
  31. #define WM8985_EQ1_LOW_SHELF 0x12
  32. #define WM8985_EQ2_PEAK_1 0x13
  33. #define WM8985_EQ3_PEAK_2 0x14
  34. #define WM8985_EQ4_PEAK_3 0x15
  35. #define WM8985_EQ5_HIGH_SHELF 0x16
  36. #define WM8985_DAC_LIMITER_1 0x18
  37. #define WM8985_DAC_LIMITER_2 0x19
  38. #define WM8985_NOTCH_FILTER_1 0x1B
  39. #define WM8985_NOTCH_FILTER_2 0x1C
  40. #define WM8985_NOTCH_FILTER_3 0x1D
  41. #define WM8985_NOTCH_FILTER_4 0x1E
  42. #define WM8985_ALC_CONTROL_1 0x20
  43. #define WM8985_ALC_CONTROL_2 0x21
  44. #define WM8985_ALC_CONTROL_3 0x22
  45. #define WM8985_NOISE_GATE 0x23
  46. #define WM8985_PLL_N 0x24
  47. #define WM8985_PLL_K_1 0x25
  48. #define WM8985_PLL_K_2 0x26
  49. #define WM8985_PLL_K_3 0x27
  50. #define WM8985_3D_CONTROL 0x29
  51. #define WM8985_OUT4_TO_ADC 0x2A
  52. #define WM8985_BEEP_CONTROL 0x2B
  53. #define WM8985_INPUT_CTRL 0x2C
  54. #define WM8985_LEFT_INP_PGA_GAIN_CTRL 0x2D
  55. #define WM8985_RIGHT_INP_PGA_GAIN_CTRL 0x2E
  56. #define WM8985_LEFT_ADC_BOOST_CTRL 0x2F
  57. #define WM8985_RIGHT_ADC_BOOST_CTRL 0x30
  58. #define WM8985_OUTPUT_CTRL0 0x31
  59. #define WM8985_LEFT_MIXER_CTRL 0x32
  60. #define WM8985_RIGHT_MIXER_CTRL 0x33
  61. #define WM8985_LOUT1_HP_VOLUME_CTRL 0x34
  62. #define WM8985_ROUT1_HP_VOLUME_CTRL 0x35
  63. #define WM8985_LOUT2_SPK_VOLUME_CTRL 0x36
  64. #define WM8985_ROUT2_SPK_VOLUME_CTRL 0x37
  65. #define WM8985_OUT3_MIXER_CTRL 0x38
  66. #define WM8985_OUT4_MONO_MIX_CTRL 0x39
  67. #define WM8985_OUTPUT_CTRL1 0x3C
  68. #define WM8985_BIAS_CTRL 0x3D
  69. #define WM8985_REGISTER_COUNT 59
  70. #define WM8985_MAX_REGISTER 0x3F
  71. /*
  72. * Field Definitions.
  73. */
  74. /*
  75. * R0 (0x00) - Software Reset
  76. */
  77. #define WM8985_SOFTWARE_RESET_MASK 0x01FF /* SOFTWARE_RESET - [8:0] */
  78. #define WM8985_SOFTWARE_RESET_SHIFT 0 /* SOFTWARE_RESET - [8:0] */
  79. #define WM8985_SOFTWARE_RESET_WIDTH 9 /* SOFTWARE_RESET - [8:0] */
  80. /*
  81. * R1 (0x01) - Power management 1
  82. */
  83. #define WM8985_OUT4MIXEN 0x0080 /* OUT4MIXEN */
  84. #define WM8985_OUT4MIXEN_MASK 0x0080 /* OUT4MIXEN */
  85. #define WM8985_OUT4MIXEN_SHIFT 7 /* OUT4MIXEN */
  86. #define WM8985_OUT4MIXEN_WIDTH 1 /* OUT4MIXEN */
  87. #define WM8985_OUT3MIXEN 0x0040 /* OUT3MIXEN */
  88. #define WM8985_OUT3MIXEN_MASK 0x0040 /* OUT3MIXEN */
  89. #define WM8985_OUT3MIXEN_SHIFT 6 /* OUT3MIXEN */
  90. #define WM8985_OUT3MIXEN_WIDTH 1 /* OUT3MIXEN */
  91. #define WM8985_PLLEN 0x0020 /* PLLEN */
  92. #define WM8985_PLLEN_MASK 0x0020 /* PLLEN */
  93. #define WM8985_PLLEN_SHIFT 5 /* PLLEN */
  94. #define WM8985_PLLEN_WIDTH 1 /* PLLEN */
  95. #define WM8985_MICBEN 0x0010 /* MICBEN */
  96. #define WM8985_MICBEN_MASK 0x0010 /* MICBEN */
  97. #define WM8985_MICBEN_SHIFT 4 /* MICBEN */
  98. #define WM8985_MICBEN_WIDTH 1 /* MICBEN */
  99. #define WM8985_BIASEN 0x0008 /* BIASEN */
  100. #define WM8985_BIASEN_MASK 0x0008 /* BIASEN */
  101. #define WM8985_BIASEN_SHIFT 3 /* BIASEN */
  102. #define WM8985_BIASEN_WIDTH 1 /* BIASEN */
  103. #define WM8985_BUFIOEN 0x0004 /* BUFIOEN */
  104. #define WM8985_BUFIOEN_MASK 0x0004 /* BUFIOEN */
  105. #define WM8985_BUFIOEN_SHIFT 2 /* BUFIOEN */
  106. #define WM8985_BUFIOEN_WIDTH 1 /* BUFIOEN */
  107. #define WM8985_VMIDSEL 0x0003 /* VMIDSEL */
  108. #define WM8985_VMIDSEL_MASK 0x0003 /* VMIDSEL - [1:0] */
  109. #define WM8985_VMIDSEL_SHIFT 0 /* VMIDSEL - [1:0] */
  110. #define WM8985_VMIDSEL_WIDTH 2 /* VMIDSEL - [1:0] */
  111. /*
  112. * R2 (0x02) - Power management 2
  113. */
  114. #define WM8985_ROUT1EN 0x0100 /* ROUT1EN */
  115. #define WM8985_ROUT1EN_MASK 0x0100 /* ROUT1EN */
  116. #define WM8985_ROUT1EN_SHIFT 8 /* ROUT1EN */
  117. #define WM8985_ROUT1EN_WIDTH 1 /* ROUT1EN */
  118. #define WM8985_LOUT1EN 0x0080 /* LOUT1EN */
  119. #define WM8985_LOUT1EN_MASK 0x0080 /* LOUT1EN */
  120. #define WM8985_LOUT1EN_SHIFT 7 /* LOUT1EN */
  121. #define WM8985_LOUT1EN_WIDTH 1 /* LOUT1EN */
  122. #define WM8985_SLEEP 0x0040 /* SLEEP */
  123. #define WM8985_SLEEP_MASK 0x0040 /* SLEEP */
  124. #define WM8985_SLEEP_SHIFT 6 /* SLEEP */
  125. #define WM8985_SLEEP_WIDTH 1 /* SLEEP */
  126. #define WM8985_BOOSTENR 0x0020 /* BOOSTENR */
  127. #define WM8985_BOOSTENR_MASK 0x0020 /* BOOSTENR */
  128. #define WM8985_BOOSTENR_SHIFT 5 /* BOOSTENR */
  129. #define WM8985_BOOSTENR_WIDTH 1 /* BOOSTENR */
  130. #define WM8985_BOOSTENL 0x0010 /* BOOSTENL */
  131. #define WM8985_BOOSTENL_MASK 0x0010 /* BOOSTENL */
  132. #define WM8985_BOOSTENL_SHIFT 4 /* BOOSTENL */
  133. #define WM8985_BOOSTENL_WIDTH 1 /* BOOSTENL */
  134. #define WM8985_INPGAENR 0x0008 /* INPGAENR */
  135. #define WM8985_INPGAENR_MASK 0x0008 /* INPGAENR */
  136. #define WM8985_INPGAENR_SHIFT 3 /* INPGAENR */
  137. #define WM8985_INPGAENR_WIDTH 1 /* INPGAENR */
  138. #define WM8985_INPPGAENL 0x0004 /* INPPGAENL */
  139. #define WM8985_INPPGAENL_MASK 0x0004 /* INPPGAENL */
  140. #define WM8985_INPPGAENL_SHIFT 2 /* INPPGAENL */
  141. #define WM8985_INPPGAENL_WIDTH 1 /* INPPGAENL */
  142. #define WM8985_ADCENR 0x0002 /* ADCENR */
  143. #define WM8985_ADCENR_MASK 0x0002 /* ADCENR */
  144. #define WM8985_ADCENR_SHIFT 1 /* ADCENR */
  145. #define WM8985_ADCENR_WIDTH 1 /* ADCENR */
  146. #define WM8985_ADCENL 0x0001 /* ADCENL */
  147. #define WM8985_ADCENL_MASK 0x0001 /* ADCENL */
  148. #define WM8985_ADCENL_SHIFT 0 /* ADCENL */
  149. #define WM8985_ADCENL_WIDTH 1 /* ADCENL */
  150. /*
  151. * R3 (0x03) - Power management 3
  152. */
  153. #define WM8985_OUT4EN 0x0100 /* OUT4EN */
  154. #define WM8985_OUT4EN_MASK 0x0100 /* OUT4EN */
  155. #define WM8985_OUT4EN_SHIFT 8 /* OUT4EN */
  156. #define WM8985_OUT4EN_WIDTH 1 /* OUT4EN */
  157. #define WM8985_OUT3EN 0x0080 /* OUT3EN */
  158. #define WM8985_OUT3EN_MASK 0x0080 /* OUT3EN */
  159. #define WM8985_OUT3EN_SHIFT 7 /* OUT3EN */
  160. #define WM8985_OUT3EN_WIDTH 1 /* OUT3EN */
  161. #define WM8985_ROUT2EN 0x0040 /* ROUT2EN */
  162. #define WM8985_ROUT2EN_MASK 0x0040 /* ROUT2EN */
  163. #define WM8985_ROUT2EN_SHIFT 6 /* ROUT2EN */
  164. #define WM8985_ROUT2EN_WIDTH 1 /* ROUT2EN */
  165. #define WM8985_LOUT2EN 0x0020 /* LOUT2EN */
  166. #define WM8985_LOUT2EN_MASK 0x0020 /* LOUT2EN */
  167. #define WM8985_LOUT2EN_SHIFT 5 /* LOUT2EN */
  168. #define WM8985_LOUT2EN_WIDTH 1 /* LOUT2EN */
  169. #define WM8985_RMIXEN 0x0008 /* RMIXEN */
  170. #define WM8985_RMIXEN_MASK 0x0008 /* RMIXEN */
  171. #define WM8985_RMIXEN_SHIFT 3 /* RMIXEN */
  172. #define WM8985_RMIXEN_WIDTH 1 /* RMIXEN */
  173. #define WM8985_LMIXEN 0x0004 /* LMIXEN */
  174. #define WM8985_LMIXEN_MASK 0x0004 /* LMIXEN */
  175. #define WM8985_LMIXEN_SHIFT 2 /* LMIXEN */
  176. #define WM8985_LMIXEN_WIDTH 1 /* LMIXEN */
  177. #define WM8985_DACENR 0x0002 /* DACENR */
  178. #define WM8985_DACENR_MASK 0x0002 /* DACENR */
  179. #define WM8985_DACENR_SHIFT 1 /* DACENR */
  180. #define WM8985_DACENR_WIDTH 1 /* DACENR */
  181. #define WM8985_DACENL 0x0001 /* DACENL */
  182. #define WM8985_DACENL_MASK 0x0001 /* DACENL */
  183. #define WM8985_DACENL_SHIFT 0 /* DACENL */
  184. #define WM8985_DACENL_WIDTH 1 /* DACENL */
  185. /*
  186. * R4 (0x04) - Audio Interface
  187. */
  188. #define WM8985_BCP 0x0100 /* BCP */
  189. #define WM8985_BCP_MASK 0x0100 /* BCP */
  190. #define WM8985_BCP_SHIFT 8 /* BCP */
  191. #define WM8985_BCP_WIDTH 1 /* BCP */
  192. #define WM8985_LRP 0x0080 /* LRP */
  193. #define WM8985_LRP_MASK 0x0080 /* LRP */
  194. #define WM8985_LRP_SHIFT 7 /* LRP */
  195. #define WM8985_LRP_WIDTH 1 /* LRP */
  196. #define WM8985_WL_MASK 0x0060 /* WL - [6:5] */
  197. #define WM8985_WL_SHIFT 5 /* WL - [6:5] */
  198. #define WM8985_WL_WIDTH 2 /* WL - [6:5] */
  199. #define WM8985_FMT_MASK 0x0018 /* FMT - [4:3] */
  200. #define WM8985_FMT_SHIFT 3 /* FMT - [4:3] */
  201. #define WM8985_FMT_WIDTH 2 /* FMT - [4:3] */
  202. #define WM8985_DLRSWAP 0x0004 /* DLRSWAP */
  203. #define WM8985_DLRSWAP_MASK 0x0004 /* DLRSWAP */
  204. #define WM8985_DLRSWAP_SHIFT 2 /* DLRSWAP */
  205. #define WM8985_DLRSWAP_WIDTH 1 /* DLRSWAP */
  206. #define WM8985_ALRSWAP 0x0002 /* ALRSWAP */
  207. #define WM8985_ALRSWAP_MASK 0x0002 /* ALRSWAP */
  208. #define WM8985_ALRSWAP_SHIFT 1 /* ALRSWAP */
  209. #define WM8985_ALRSWAP_WIDTH 1 /* ALRSWAP */
  210. #define WM8985_MONO 0x0001 /* MONO */
  211. #define WM8985_MONO_MASK 0x0001 /* MONO */
  212. #define WM8985_MONO_SHIFT 0 /* MONO */
  213. #define WM8985_MONO_WIDTH 1 /* MONO */
  214. /*
  215. * R5 (0x05) - Companding control
  216. */
  217. #define WM8985_WL8 0x0020 /* WL8 */
  218. #define WM8985_WL8_MASK 0x0020 /* WL8 */
  219. #define WM8985_WL8_SHIFT 5 /* WL8 */
  220. #define WM8985_WL8_WIDTH 1 /* WL8 */
  221. #define WM8985_DAC_COMP_MASK 0x0018 /* DAC_COMP - [4:3] */
  222. #define WM8985_DAC_COMP_SHIFT 3 /* DAC_COMP - [4:3] */
  223. #define WM8985_DAC_COMP_WIDTH 2 /* DAC_COMP - [4:3] */
  224. #define WM8985_ADC_COMP_MASK 0x0006 /* ADC_COMP - [2:1] */
  225. #define WM8985_ADC_COMP_SHIFT 1 /* ADC_COMP - [2:1] */
  226. #define WM8985_ADC_COMP_WIDTH 2 /* ADC_COMP - [2:1] */
  227. #define WM8985_LOOPBACK 0x0001 /* LOOPBACK */
  228. #define WM8985_LOOPBACK_MASK 0x0001 /* LOOPBACK */
  229. #define WM8985_LOOPBACK_SHIFT 0 /* LOOPBACK */
  230. #define WM8985_LOOPBACK_WIDTH 1 /* LOOPBACK */
  231. /*
  232. * R6 (0x06) - Clock Gen control
  233. */
  234. #define WM8985_CLKSEL 0x0100 /* CLKSEL */
  235. #define WM8985_CLKSEL_MASK 0x0100 /* CLKSEL */
  236. #define WM8985_CLKSEL_SHIFT 8 /* CLKSEL */
  237. #define WM8985_CLKSEL_WIDTH 1 /* CLKSEL */
  238. #define WM8985_MCLKDIV_MASK 0x00E0 /* MCLKDIV - [7:5] */
  239. #define WM8985_MCLKDIV_SHIFT 5 /* MCLKDIV - [7:5] */
  240. #define WM8985_MCLKDIV_WIDTH 3 /* MCLKDIV - [7:5] */
  241. #define WM8985_BCLKDIV_MASK 0x001C /* BCLKDIV - [4:2] */
  242. #define WM8985_BCLKDIV_SHIFT 2 /* BCLKDIV - [4:2] */
  243. #define WM8985_BCLKDIV_WIDTH 3 /* BCLKDIV - [4:2] */
  244. #define WM8985_MS 0x0001 /* MS */
  245. #define WM8985_MS_MASK 0x0001 /* MS */
  246. #define WM8985_MS_SHIFT 0 /* MS */
  247. #define WM8985_MS_WIDTH 1 /* MS */
  248. /*
  249. * R7 (0x07) - Additional control
  250. */
  251. #define WM8985_M128ENB 0x0100 /* M128ENB */
  252. #define WM8985_M128ENB_MASK 0x0100 /* M128ENB */
  253. #define WM8985_M128ENB_SHIFT 8 /* M128ENB */
  254. #define WM8985_M128ENB_WIDTH 1 /* M128ENB */
  255. #define WM8985_DCLKDIV_MASK 0x00F0 /* DCLKDIV - [7:4] */
  256. #define WM8985_DCLKDIV_SHIFT 4 /* DCLKDIV - [7:4] */
  257. #define WM8985_DCLKDIV_WIDTH 4 /* DCLKDIV - [7:4] */
  258. #define WM8985_SR_MASK 0x000E /* SR - [3:1] */
  259. #define WM8985_SR_SHIFT 1 /* SR - [3:1] */
  260. #define WM8985_SR_WIDTH 3 /* SR - [3:1] */
  261. #define WM8985_SLOWCLKEN 0x0001 /* SLOWCLKEN */
  262. #define WM8985_SLOWCLKEN_MASK 0x0001 /* SLOWCLKEN */
  263. #define WM8985_SLOWCLKEN_SHIFT 0 /* SLOWCLKEN */
  264. #define WM8985_SLOWCLKEN_WIDTH 1 /* SLOWCLKEN */
  265. /*
  266. * R8 (0x08) - GPIO Control
  267. */
  268. #define WM8985_GPIO1GP 0x0100 /* GPIO1GP */
  269. #define WM8985_GPIO1GP_MASK 0x0100 /* GPIO1GP */
  270. #define WM8985_GPIO1GP_SHIFT 8 /* GPIO1GP */
  271. #define WM8985_GPIO1GP_WIDTH 1 /* GPIO1GP */
  272. #define WM8985_GPIO1GPU 0x0080 /* GPIO1GPU */
  273. #define WM8985_GPIO1GPU_MASK 0x0080 /* GPIO1GPU */
  274. #define WM8985_GPIO1GPU_SHIFT 7 /* GPIO1GPU */
  275. #define WM8985_GPIO1GPU_WIDTH 1 /* GPIO1GPU */
  276. #define WM8985_GPIO1GPD 0x0040 /* GPIO1GPD */
  277. #define WM8985_GPIO1GPD_MASK 0x0040 /* GPIO1GPD */
  278. #define WM8985_GPIO1GPD_SHIFT 6 /* GPIO1GPD */
  279. #define WM8985_GPIO1GPD_WIDTH 1 /* GPIO1GPD */
  280. #define WM8985_GPIO1POL 0x0008 /* GPIO1POL */
  281. #define WM8985_GPIO1POL_MASK 0x0008 /* GPIO1POL */
  282. #define WM8985_GPIO1POL_SHIFT 3 /* GPIO1POL */
  283. #define WM8985_GPIO1POL_WIDTH 1 /* GPIO1POL */
  284. #define WM8985_GPIO1SEL_MASK 0x0007 /* GPIO1SEL - [2:0] */
  285. #define WM8985_GPIO1SEL_SHIFT 0 /* GPIO1SEL - [2:0] */
  286. #define WM8985_GPIO1SEL_WIDTH 3 /* GPIO1SEL - [2:0] */
  287. /*
  288. * R9 (0x09) - Jack Detect Control 1
  289. */
  290. #define WM8985_JD_EN 0x0040 /* JD_EN */
  291. #define WM8985_JD_EN_MASK 0x0040 /* JD_EN */
  292. #define WM8985_JD_EN_SHIFT 6 /* JD_EN */
  293. #define WM8985_JD_EN_WIDTH 1 /* JD_EN */
  294. #define WM8985_JD_SEL_MASK 0x0030 /* JD_SEL - [5:4] */
  295. #define WM8985_JD_SEL_SHIFT 4 /* JD_SEL - [5:4] */
  296. #define WM8985_JD_SEL_WIDTH 2 /* JD_SEL - [5:4] */
  297. /*
  298. * R10 (0x0A) - DAC Control
  299. */
  300. #define WM8985_SOFTMUTE 0x0040 /* SOFTMUTE */
  301. #define WM8985_SOFTMUTE_MASK 0x0040 /* SOFTMUTE */
  302. #define WM8985_SOFTMUTE_SHIFT 6 /* SOFTMUTE */
  303. #define WM8985_SOFTMUTE_WIDTH 1 /* SOFTMUTE */
  304. #define WM8985_DACOSR128 0x0008 /* DACOSR128 */
  305. #define WM8985_DACOSR128_MASK 0x0008 /* DACOSR128 */
  306. #define WM8985_DACOSR128_SHIFT 3 /* DACOSR128 */
  307. #define WM8985_DACOSR128_WIDTH 1 /* DACOSR128 */
  308. #define WM8985_AMUTE 0x0004 /* AMUTE */
  309. #define WM8985_AMUTE_MASK 0x0004 /* AMUTE */
  310. #define WM8985_AMUTE_SHIFT 2 /* AMUTE */
  311. #define WM8985_AMUTE_WIDTH 1 /* AMUTE */
  312. #define WM8985_DACPOLR 0x0002 /* DACPOLR */
  313. #define WM8985_DACPOLR_MASK 0x0002 /* DACPOLR */
  314. #define WM8985_DACPOLR_SHIFT 1 /* DACPOLR */
  315. #define WM8985_DACPOLR_WIDTH 1 /* DACPOLR */
  316. #define WM8985_DACPOLL 0x0001 /* DACPOLL */
  317. #define WM8985_DACPOLL_MASK 0x0001 /* DACPOLL */
  318. #define WM8985_DACPOLL_SHIFT 0 /* DACPOLL */
  319. #define WM8985_DACPOLL_WIDTH 1 /* DACPOLL */
  320. /*
  321. * R11 (0x0B) - Left DAC digital Vol
  322. */
  323. #define WM8985_DACVU 0x0100 /* DACVU */
  324. #define WM8985_DACVU_MASK 0x0100 /* DACVU */
  325. #define WM8985_DACVU_SHIFT 8 /* DACVU */
  326. #define WM8985_DACVU_WIDTH 1 /* DACVU */
  327. #define WM8985_DACVOLL_MASK 0x00FF /* DACVOLL - [7:0] */
  328. #define WM8985_DACVOLL_SHIFT 0 /* DACVOLL - [7:0] */
  329. #define WM8985_DACVOLL_WIDTH 8 /* DACVOLL - [7:0] */
  330. /*
  331. * R12 (0x0C) - Right DAC digital vol
  332. */
  333. #define WM8985_DACVU 0x0100 /* DACVU */
  334. #define WM8985_DACVU_MASK 0x0100 /* DACVU */
  335. #define WM8985_DACVU_SHIFT 8 /* DACVU */
  336. #define WM8985_DACVU_WIDTH 1 /* DACVU */
  337. #define WM8985_DACVOLR_MASK 0x00FF /* DACVOLR - [7:0] */
  338. #define WM8985_DACVOLR_SHIFT 0 /* DACVOLR - [7:0] */
  339. #define WM8985_DACVOLR_WIDTH 8 /* DACVOLR - [7:0] */
  340. /*
  341. * R13 (0x0D) - Jack Detect Control 2
  342. */
  343. #define WM8985_JD_EN1_MASK 0x00F0 /* JD_EN1 - [7:4] */
  344. #define WM8985_JD_EN1_SHIFT 4 /* JD_EN1 - [7:4] */
  345. #define WM8985_JD_EN1_WIDTH 4 /* JD_EN1 - [7:4] */
  346. #define WM8985_JD_EN0_MASK 0x000F /* JD_EN0 - [3:0] */
  347. #define WM8985_JD_EN0_SHIFT 0 /* JD_EN0 - [3:0] */
  348. #define WM8985_JD_EN0_WIDTH 4 /* JD_EN0 - [3:0] */
  349. /*
  350. * R14 (0x0E) - ADC Control
  351. */
  352. #define WM8985_HPFEN 0x0100 /* HPFEN */
  353. #define WM8985_HPFEN_MASK 0x0100 /* HPFEN */
  354. #define WM8985_HPFEN_SHIFT 8 /* HPFEN */
  355. #define WM8985_HPFEN_WIDTH 1 /* HPFEN */
  356. #define WM8985_HPFAPP 0x0080 /* HPFAPP */
  357. #define WM8985_HPFAPP_MASK 0x0080 /* HPFAPP */
  358. #define WM8985_HPFAPP_SHIFT 7 /* HPFAPP */
  359. #define WM8985_HPFAPP_WIDTH 1 /* HPFAPP */
  360. #define WM8985_HPFCUT_MASK 0x0070 /* HPFCUT - [6:4] */
  361. #define WM8985_HPFCUT_SHIFT 4 /* HPFCUT - [6:4] */
  362. #define WM8985_HPFCUT_WIDTH 3 /* HPFCUT - [6:4] */
  363. #define WM8985_ADCOSR128 0x0008 /* ADCOSR128 */
  364. #define WM8985_ADCOSR128_MASK 0x0008 /* ADCOSR128 */
  365. #define WM8985_ADCOSR128_SHIFT 3 /* ADCOSR128 */
  366. #define WM8985_ADCOSR128_WIDTH 1 /* ADCOSR128 */
  367. #define WM8985_ADCRPOL 0x0002 /* ADCRPOL */
  368. #define WM8985_ADCRPOL_MASK 0x0002 /* ADCRPOL */
  369. #define WM8985_ADCRPOL_SHIFT 1 /* ADCRPOL */
  370. #define WM8985_ADCRPOL_WIDTH 1 /* ADCRPOL */
  371. #define WM8985_ADCLPOL 0x0001 /* ADCLPOL */
  372. #define WM8985_ADCLPOL_MASK 0x0001 /* ADCLPOL */
  373. #define WM8985_ADCLPOL_SHIFT 0 /* ADCLPOL */
  374. #define WM8985_ADCLPOL_WIDTH 1 /* ADCLPOL */
  375. /*
  376. * R15 (0x0F) - Left ADC Digital Vol
  377. */
  378. #define WM8985_ADCVU 0x0100 /* ADCVU */
  379. #define WM8985_ADCVU_MASK 0x0100 /* ADCVU */
  380. #define WM8985_ADCVU_SHIFT 8 /* ADCVU */
  381. #define WM8985_ADCVU_WIDTH 1 /* ADCVU */
  382. #define WM8985_ADCVOLL_MASK 0x00FF /* ADCVOLL - [7:0] */
  383. #define WM8985_ADCVOLL_SHIFT 0 /* ADCVOLL - [7:0] */
  384. #define WM8985_ADCVOLL_WIDTH 8 /* ADCVOLL - [7:0] */
  385. /*
  386. * R16 (0x10) - Right ADC Digital Vol
  387. */
  388. #define WM8985_ADCVU 0x0100 /* ADCVU */
  389. #define WM8985_ADCVU_MASK 0x0100 /* ADCVU */
  390. #define WM8985_ADCVU_SHIFT 8 /* ADCVU */
  391. #define WM8985_ADCVU_WIDTH 1 /* ADCVU */
  392. #define WM8985_ADCVOLR_MASK 0x00FF /* ADCVOLR - [7:0] */
  393. #define WM8985_ADCVOLR_SHIFT 0 /* ADCVOLR - [7:0] */
  394. #define WM8985_ADCVOLR_WIDTH 8 /* ADCVOLR - [7:0] */
  395. /*
  396. * R18 (0x12) - EQ1 - low shelf
  397. */
  398. #define WM8985_EQ3DMODE 0x0100 /* EQ3DMODE */
  399. #define WM8985_EQ3DMODE_MASK 0x0100 /* EQ3DMODE */
  400. #define WM8985_EQ3DMODE_SHIFT 8 /* EQ3DMODE */
  401. #define WM8985_EQ3DMODE_WIDTH 1 /* EQ3DMODE */
  402. #define WM8985_EQ1C_MASK 0x0060 /* EQ1C - [6:5] */
  403. #define WM8985_EQ1C_SHIFT 5 /* EQ1C - [6:5] */
  404. #define WM8985_EQ1C_WIDTH 2 /* EQ1C - [6:5] */
  405. #define WM8985_EQ1G_MASK 0x001F /* EQ1G - [4:0] */
  406. #define WM8985_EQ1G_SHIFT 0 /* EQ1G - [4:0] */
  407. #define WM8985_EQ1G_WIDTH 5 /* EQ1G - [4:0] */
  408. /*
  409. * R19 (0x13) - EQ2 - peak 1
  410. */
  411. #define WM8985_EQ2BW 0x0100 /* EQ2BW */
  412. #define WM8985_EQ2BW_MASK 0x0100 /* EQ2BW */
  413. #define WM8985_EQ2BW_SHIFT 8 /* EQ2BW */
  414. #define WM8985_EQ2BW_WIDTH 1 /* EQ2BW */
  415. #define WM8985_EQ2C_MASK 0x0060 /* EQ2C - [6:5] */
  416. #define WM8985_EQ2C_SHIFT 5 /* EQ2C - [6:5] */
  417. #define WM8985_EQ2C_WIDTH 2 /* EQ2C - [6:5] */
  418. #define WM8985_EQ2G_MASK 0x001F /* EQ2G - [4:0] */
  419. #define WM8985_EQ2G_SHIFT 0 /* EQ2G - [4:0] */
  420. #define WM8985_EQ2G_WIDTH 5 /* EQ2G - [4:0] */
  421. /*
  422. * R20 (0x14) - EQ3 - peak 2
  423. */
  424. #define WM8985_EQ3BW 0x0100 /* EQ3BW */
  425. #define WM8985_EQ3BW_MASK 0x0100 /* EQ3BW */
  426. #define WM8985_EQ3BW_SHIFT 8 /* EQ3BW */
  427. #define WM8985_EQ3BW_WIDTH 1 /* EQ3BW */
  428. #define WM8985_EQ3C_MASK 0x0060 /* EQ3C - [6:5] */
  429. #define WM8985_EQ3C_SHIFT 5 /* EQ3C - [6:5] */
  430. #define WM8985_EQ3C_WIDTH 2 /* EQ3C - [6:5] */
  431. #define WM8985_EQ3G_MASK 0x001F /* EQ3G - [4:0] */
  432. #define WM8985_EQ3G_SHIFT 0 /* EQ3G - [4:0] */
  433. #define WM8985_EQ3G_WIDTH 5 /* EQ3G - [4:0] */
  434. /*
  435. * R21 (0x15) - EQ4 - peak 3
  436. */
  437. #define WM8985_EQ4BW 0x0100 /* EQ4BW */
  438. #define WM8985_EQ4BW_MASK 0x0100 /* EQ4BW */
  439. #define WM8985_EQ4BW_SHIFT 8 /* EQ4BW */
  440. #define WM8985_EQ4BW_WIDTH 1 /* EQ4BW */
  441. #define WM8985_EQ4C_MASK 0x0060 /* EQ4C - [6:5] */
  442. #define WM8985_EQ4C_SHIFT 5 /* EQ4C - [6:5] */
  443. #define WM8985_EQ4C_WIDTH 2 /* EQ4C - [6:5] */
  444. #define WM8985_EQ4G_MASK 0x001F /* EQ4G - [4:0] */
  445. #define WM8985_EQ4G_SHIFT 0 /* EQ4G - [4:0] */
  446. #define WM8985_EQ4G_WIDTH 5 /* EQ4G - [4:0] */
  447. /*
  448. * R22 (0x16) - EQ5 - high shelf
  449. */
  450. #define WM8985_EQ5C_MASK 0x0060 /* EQ5C - [6:5] */
  451. #define WM8985_EQ5C_SHIFT 5 /* EQ5C - [6:5] */
  452. #define WM8985_EQ5C_WIDTH 2 /* EQ5C - [6:5] */
  453. #define WM8985_EQ5G_MASK 0x001F /* EQ5G - [4:0] */
  454. #define WM8985_EQ5G_SHIFT 0 /* EQ5G - [4:0] */
  455. #define WM8985_EQ5G_WIDTH 5 /* EQ5G - [4:0] */
  456. /*
  457. * R24 (0x18) - DAC Limiter 1
  458. */
  459. #define WM8985_LIMEN 0x0100 /* LIMEN */
  460. #define WM8985_LIMEN_MASK 0x0100 /* LIMEN */
  461. #define WM8985_LIMEN_SHIFT 8 /* LIMEN */
  462. #define WM8985_LIMEN_WIDTH 1 /* LIMEN */
  463. #define WM8985_LIMDCY_MASK 0x00F0 /* LIMDCY - [7:4] */
  464. #define WM8985_LIMDCY_SHIFT 4 /* LIMDCY - [7:4] */
  465. #define WM8985_LIMDCY_WIDTH 4 /* LIMDCY - [7:4] */
  466. #define WM8985_LIMATK_MASK 0x000F /* LIMATK - [3:0] */
  467. #define WM8985_LIMATK_SHIFT 0 /* LIMATK - [3:0] */
  468. #define WM8985_LIMATK_WIDTH 4 /* LIMATK - [3:0] */
  469. /*
  470. * R25 (0x19) - DAC Limiter 2
  471. */
  472. #define WM8985_LIMLVL_MASK 0x0070 /* LIMLVL - [6:4] */
  473. #define WM8985_LIMLVL_SHIFT 4 /* LIMLVL - [6:4] */
  474. #define WM8985_LIMLVL_WIDTH 3 /* LIMLVL - [6:4] */
  475. #define WM8985_LIMBOOST_MASK 0x000F /* LIMBOOST - [3:0] */
  476. #define WM8985_LIMBOOST_SHIFT 0 /* LIMBOOST - [3:0] */
  477. #define WM8985_LIMBOOST_WIDTH 4 /* LIMBOOST - [3:0] */
  478. /*
  479. * R27 (0x1B) - Notch Filter 1
  480. */
  481. #define WM8985_NFU 0x0100 /* NFU */
  482. #define WM8985_NFU_MASK 0x0100 /* NFU */
  483. #define WM8985_NFU_SHIFT 8 /* NFU */
  484. #define WM8985_NFU_WIDTH 1 /* NFU */
  485. #define WM8985_NFEN 0x0080 /* NFEN */
  486. #define WM8985_NFEN_MASK 0x0080 /* NFEN */
  487. #define WM8985_NFEN_SHIFT 7 /* NFEN */
  488. #define WM8985_NFEN_WIDTH 1 /* NFEN */
  489. #define WM8985_NFA0_13_7_MASK 0x007F /* NFA0(13:7) - [6:0] */
  490. #define WM8985_NFA0_13_7_SHIFT 0 /* NFA0(13:7) - [6:0] */
  491. #define WM8985_NFA0_13_7_WIDTH 7 /* NFA0(13:7) - [6:0] */
  492. /*
  493. * R28 (0x1C) - Notch Filter 2
  494. */
  495. #define WM8985_NFU 0x0100 /* NFU */
  496. #define WM8985_NFU_MASK 0x0100 /* NFU */
  497. #define WM8985_NFU_SHIFT 8 /* NFU */
  498. #define WM8985_NFU_WIDTH 1 /* NFU */
  499. #define WM8985_NFA0_6_0_MASK 0x007F /* NFA0(6:0) - [6:0] */
  500. #define WM8985_NFA0_6_0_SHIFT 0 /* NFA0(6:0) - [6:0] */
  501. #define WM8985_NFA0_6_0_WIDTH 7 /* NFA0(6:0) - [6:0] */
  502. /*
  503. * R29 (0x1D) - Notch Filter 3
  504. */
  505. #define WM8985_NFU 0x0100 /* NFU */
  506. #define WM8985_NFU_MASK 0x0100 /* NFU */
  507. #define WM8985_NFU_SHIFT 8 /* NFU */
  508. #define WM8985_NFU_WIDTH 1 /* NFU */
  509. #define WM8985_NFA1_13_7_MASK 0x007F /* NFA1(13:7) - [6:0] */
  510. #define WM8985_NFA1_13_7_SHIFT 0 /* NFA1(13:7) - [6:0] */
  511. #define WM8985_NFA1_13_7_WIDTH 7 /* NFA1(13:7) - [6:0] */
  512. /*
  513. * R30 (0x1E) - Notch Filter 4
  514. */
  515. #define WM8985_NFU 0x0100 /* NFU */
  516. #define WM8985_NFU_MASK 0x0100 /* NFU */
  517. #define WM8985_NFU_SHIFT 8 /* NFU */
  518. #define WM8985_NFU_WIDTH 1 /* NFU */
  519. #define WM8985_NFA1_6_0_MASK 0x007F /* NFA1(6:0) - [6:0] */
  520. #define WM8985_NFA1_6_0_SHIFT 0 /* NFA1(6:0) - [6:0] */
  521. #define WM8985_NFA1_6_0_WIDTH 7 /* NFA1(6:0) - [6:0] */
  522. /*
  523. * R32 (0x20) - ALC control 1
  524. */
  525. #define WM8985_ALCSEL_MASK 0x0180 /* ALCSEL - [8:7] */
  526. #define WM8985_ALCSEL_SHIFT 7 /* ALCSEL - [8:7] */
  527. #define WM8985_ALCSEL_WIDTH 2 /* ALCSEL - [8:7] */
  528. #define WM8985_ALCMAX_MASK 0x0038 /* ALCMAX - [5:3] */
  529. #define WM8985_ALCMAX_SHIFT 3 /* ALCMAX - [5:3] */
  530. #define WM8985_ALCMAX_WIDTH 3 /* ALCMAX - [5:3] */
  531. #define WM8985_ALCMIN_MASK 0x0007 /* ALCMIN - [2:0] */
  532. #define WM8985_ALCMIN_SHIFT 0 /* ALCMIN - [2:0] */
  533. #define WM8985_ALCMIN_WIDTH 3 /* ALCMIN - [2:0] */
  534. /*
  535. * R33 (0x21) - ALC control 2
  536. */
  537. #define WM8985_ALCHLD_MASK 0x00F0 /* ALCHLD - [7:4] */
  538. #define WM8985_ALCHLD_SHIFT 4 /* ALCHLD - [7:4] */
  539. #define WM8985_ALCHLD_WIDTH 4 /* ALCHLD - [7:4] */
  540. #define WM8985_ALCLVL_MASK 0x000F /* ALCLVL - [3:0] */
  541. #define WM8985_ALCLVL_SHIFT 0 /* ALCLVL - [3:0] */
  542. #define WM8985_ALCLVL_WIDTH 4 /* ALCLVL - [3:0] */
  543. /*
  544. * R34 (0x22) - ALC control 3
  545. */
  546. #define WM8985_ALCMODE 0x0100 /* ALCMODE */
  547. #define WM8985_ALCMODE_MASK 0x0100 /* ALCMODE */
  548. #define WM8985_ALCMODE_SHIFT 8 /* ALCMODE */
  549. #define WM8985_ALCMODE_WIDTH 1 /* ALCMODE */
  550. #define WM8985_ALCDCY_MASK 0x00F0 /* ALCDCY - [7:4] */
  551. #define WM8985_ALCDCY_SHIFT 4 /* ALCDCY - [7:4] */
  552. #define WM8985_ALCDCY_WIDTH 4 /* ALCDCY - [7:4] */
  553. #define WM8985_ALCATK_MASK 0x000F /* ALCATK - [3:0] */
  554. #define WM8985_ALCATK_SHIFT 0 /* ALCATK - [3:0] */
  555. #define WM8985_ALCATK_WIDTH 4 /* ALCATK - [3:0] */
  556. /*
  557. * R35 (0x23) - Noise Gate
  558. */
  559. #define WM8985_NGEN 0x0008 /* NGEN */
  560. #define WM8985_NGEN_MASK 0x0008 /* NGEN */
  561. #define WM8985_NGEN_SHIFT 3 /* NGEN */
  562. #define WM8985_NGEN_WIDTH 1 /* NGEN */
  563. #define WM8985_NGTH_MASK 0x0007 /* NGTH - [2:0] */
  564. #define WM8985_NGTH_SHIFT 0 /* NGTH - [2:0] */
  565. #define WM8985_NGTH_WIDTH 3 /* NGTH - [2:0] */
  566. /*
  567. * R36 (0x24) - PLL N
  568. */
  569. #define WM8985_PLL_PRESCALE 0x0010 /* PLL_PRESCALE */
  570. #define WM8985_PLL_PRESCALE_MASK 0x0010 /* PLL_PRESCALE */
  571. #define WM8985_PLL_PRESCALE_SHIFT 4 /* PLL_PRESCALE */
  572. #define WM8985_PLL_PRESCALE_WIDTH 1 /* PLL_PRESCALE */
  573. #define WM8985_PLLN_MASK 0x000F /* PLLN - [3:0] */
  574. #define WM8985_PLLN_SHIFT 0 /* PLLN - [3:0] */
  575. #define WM8985_PLLN_WIDTH 4 /* PLLN - [3:0] */
  576. /*
  577. * R37 (0x25) - PLL K 1
  578. */
  579. #define WM8985_PLLK_23_18_MASK 0x003F /* PLLK(23:18) - [5:0] */
  580. #define WM8985_PLLK_23_18_SHIFT 0 /* PLLK(23:18) - [5:0] */
  581. #define WM8985_PLLK_23_18_WIDTH 6 /* PLLK(23:18) - [5:0] */
  582. /*
  583. * R38 (0x26) - PLL K 2
  584. */
  585. #define WM8985_PLLK_17_9_MASK 0x01FF /* PLLK(17:9) - [8:0] */
  586. #define WM8985_PLLK_17_9_SHIFT 0 /* PLLK(17:9) - [8:0] */
  587. #define WM8985_PLLK_17_9_WIDTH 9 /* PLLK(17:9) - [8:0] */
  588. /*
  589. * R39 (0x27) - PLL K 3
  590. */
  591. #define WM8985_PLLK_8_0_MASK 0x01FF /* PLLK(8:0) - [8:0] */
  592. #define WM8985_PLLK_8_0_SHIFT 0 /* PLLK(8:0) - [8:0] */
  593. #define WM8985_PLLK_8_0_WIDTH 9 /* PLLK(8:0) - [8:0] */
  594. /*
  595. * R41 (0x29) - 3D control
  596. */
  597. #define WM8985_DEPTH3D_MASK 0x000F /* DEPTH3D - [3:0] */
  598. #define WM8985_DEPTH3D_SHIFT 0 /* DEPTH3D - [3:0] */
  599. #define WM8985_DEPTH3D_WIDTH 4 /* DEPTH3D - [3:0] */
  600. /*
  601. * R42 (0x2A) - OUT4 to ADC
  602. */
  603. #define WM8985_OUT4_2ADCVOL_MASK 0x01C0 /* OUT4_2ADCVOL - [8:6] */
  604. #define WM8985_OUT4_2ADCVOL_SHIFT 6 /* OUT4_2ADCVOL - [8:6] */
  605. #define WM8985_OUT4_2ADCVOL_WIDTH 3 /* OUT4_2ADCVOL - [8:6] */
  606. #define WM8985_OUT4_2LNR 0x0020 /* OUT4_2LNR */
  607. #define WM8985_OUT4_2LNR_MASK 0x0020 /* OUT4_2LNR */
  608. #define WM8985_OUT4_2LNR_SHIFT 5 /* OUT4_2LNR */
  609. #define WM8985_OUT4_2LNR_WIDTH 1 /* OUT4_2LNR */
  610. #define WM8985_POBCTRL 0x0004 /* POBCTRL */
  611. #define WM8985_POBCTRL_MASK 0x0004 /* POBCTRL */
  612. #define WM8985_POBCTRL_SHIFT 2 /* POBCTRL */
  613. #define WM8985_POBCTRL_WIDTH 1 /* POBCTRL */
  614. #define WM8985_DELEN 0x0002 /* DELEN */
  615. #define WM8985_DELEN_MASK 0x0002 /* DELEN */
  616. #define WM8985_DELEN_SHIFT 1 /* DELEN */
  617. #define WM8985_DELEN_WIDTH 1 /* DELEN */
  618. #define WM8985_OUT1DEL 0x0001 /* OUT1DEL */
  619. #define WM8985_OUT1DEL_MASK 0x0001 /* OUT1DEL */
  620. #define WM8985_OUT1DEL_SHIFT 0 /* OUT1DEL */
  621. #define WM8985_OUT1DEL_WIDTH 1 /* OUT1DEL */
  622. /*
  623. * R43 (0x2B) - Beep control
  624. */
  625. #define WM8985_BYPL2RMIX 0x0100 /* BYPL2RMIX */
  626. #define WM8985_BYPL2RMIX_MASK 0x0100 /* BYPL2RMIX */
  627. #define WM8985_BYPL2RMIX_SHIFT 8 /* BYPL2RMIX */
  628. #define WM8985_BYPL2RMIX_WIDTH 1 /* BYPL2RMIX */
  629. #define WM8985_BYPR2LMIX 0x0080 /* BYPR2LMIX */
  630. #define WM8985_BYPR2LMIX_MASK 0x0080 /* BYPR2LMIX */
  631. #define WM8985_BYPR2LMIX_SHIFT 7 /* BYPR2LMIX */
  632. #define WM8985_BYPR2LMIX_WIDTH 1 /* BYPR2LMIX */
  633. #define WM8985_MUTERPGA2INV 0x0020 /* MUTERPGA2INV */
  634. #define WM8985_MUTERPGA2INV_MASK 0x0020 /* MUTERPGA2INV */
  635. #define WM8985_MUTERPGA2INV_SHIFT 5 /* MUTERPGA2INV */
  636. #define WM8985_MUTERPGA2INV_WIDTH 1 /* MUTERPGA2INV */
  637. #define WM8985_INVROUT2 0x0010 /* INVROUT2 */
  638. #define WM8985_INVROUT2_MASK 0x0010 /* INVROUT2 */
  639. #define WM8985_INVROUT2_SHIFT 4 /* INVROUT2 */
  640. #define WM8985_INVROUT2_WIDTH 1 /* INVROUT2 */
  641. #define WM8985_BEEPVOL_MASK 0x000E /* BEEPVOL - [3:1] */
  642. #define WM8985_BEEPVOL_SHIFT 1 /* BEEPVOL - [3:1] */
  643. #define WM8985_BEEPVOL_WIDTH 3 /* BEEPVOL - [3:1] */
  644. #define WM8985_BEEPEN 0x0001 /* BEEPEN */
  645. #define WM8985_BEEPEN_MASK 0x0001 /* BEEPEN */
  646. #define WM8985_BEEPEN_SHIFT 0 /* BEEPEN */
  647. #define WM8985_BEEPEN_WIDTH 1 /* BEEPEN */
  648. /*
  649. * R44 (0x2C) - Input ctrl
  650. */
  651. #define WM8985_MBVSEL 0x0100 /* MBVSEL */
  652. #define WM8985_MBVSEL_MASK 0x0100 /* MBVSEL */
  653. #define WM8985_MBVSEL_SHIFT 8 /* MBVSEL */
  654. #define WM8985_MBVSEL_WIDTH 1 /* MBVSEL */
  655. #define WM8985_R2_2INPPGA 0x0040 /* R2_2INPPGA */
  656. #define WM8985_R2_2INPPGA_MASK 0x0040 /* R2_2INPPGA */
  657. #define WM8985_R2_2INPPGA_SHIFT 6 /* R2_2INPPGA */
  658. #define WM8985_R2_2INPPGA_WIDTH 1 /* R2_2INPPGA */
  659. #define WM8985_RIN2INPPGA 0x0020 /* RIN2INPPGA */
  660. #define WM8985_RIN2INPPGA_MASK 0x0020 /* RIN2INPPGA */
  661. #define WM8985_RIN2INPPGA_SHIFT 5 /* RIN2INPPGA */
  662. #define WM8985_RIN2INPPGA_WIDTH 1 /* RIN2INPPGA */
  663. #define WM8985_RIP2INPPGA 0x0010 /* RIP2INPPGA */
  664. #define WM8985_RIP2INPPGA_MASK 0x0010 /* RIP2INPPGA */
  665. #define WM8985_RIP2INPPGA_SHIFT 4 /* RIP2INPPGA */
  666. #define WM8985_RIP2INPPGA_WIDTH 1 /* RIP2INPPGA */
  667. #define WM8985_L2_2INPPGA 0x0004 /* L2_2INPPGA */
  668. #define WM8985_L2_2INPPGA_MASK 0x0004 /* L2_2INPPGA */
  669. #define WM8985_L2_2INPPGA_SHIFT 2 /* L2_2INPPGA */
  670. #define WM8985_L2_2INPPGA_WIDTH 1 /* L2_2INPPGA */
  671. #define WM8985_LIN2INPPGA 0x0002 /* LIN2INPPGA */
  672. #define WM8985_LIN2INPPGA_MASK 0x0002 /* LIN2INPPGA */
  673. #define WM8985_LIN2INPPGA_SHIFT 1 /* LIN2INPPGA */
  674. #define WM8985_LIN2INPPGA_WIDTH 1 /* LIN2INPPGA */
  675. #define WM8985_LIP2INPPGA 0x0001 /* LIP2INPPGA */
  676. #define WM8985_LIP2INPPGA_MASK 0x0001 /* LIP2INPPGA */
  677. #define WM8985_LIP2INPPGA_SHIFT 0 /* LIP2INPPGA */
  678. #define WM8985_LIP2INPPGA_WIDTH 1 /* LIP2INPPGA */
  679. /*
  680. * R45 (0x2D) - Left INP PGA gain ctrl
  681. */
  682. #define WM8985_INPGAVU 0x0100 /* INPGAVU */
  683. #define WM8985_INPGAVU_MASK 0x0100 /* INPGAVU */
  684. #define WM8985_INPGAVU_SHIFT 8 /* INPGAVU */
  685. #define WM8985_INPGAVU_WIDTH 1 /* INPGAVU */
  686. #define WM8985_INPPGAZCL 0x0080 /* INPPGAZCL */
  687. #define WM8985_INPPGAZCL_MASK 0x0080 /* INPPGAZCL */
  688. #define WM8985_INPPGAZCL_SHIFT 7 /* INPPGAZCL */
  689. #define WM8985_INPPGAZCL_WIDTH 1 /* INPPGAZCL */
  690. #define WM8985_INPPGAMUTEL 0x0040 /* INPPGAMUTEL */
  691. #define WM8985_INPPGAMUTEL_MASK 0x0040 /* INPPGAMUTEL */
  692. #define WM8985_INPPGAMUTEL_SHIFT 6 /* INPPGAMUTEL */
  693. #define WM8985_INPPGAMUTEL_WIDTH 1 /* INPPGAMUTEL */
  694. #define WM8985_INPPGAVOLL_MASK 0x003F /* INPPGAVOLL - [5:0] */
  695. #define WM8985_INPPGAVOLL_SHIFT 0 /* INPPGAVOLL - [5:0] */
  696. #define WM8985_INPPGAVOLL_WIDTH 6 /* INPPGAVOLL - [5:0] */
  697. /*
  698. * R46 (0x2E) - Right INP PGA gain ctrl
  699. */
  700. #define WM8985_INPGAVU 0x0100 /* INPGAVU */
  701. #define WM8985_INPGAVU_MASK 0x0100 /* INPGAVU */
  702. #define WM8985_INPGAVU_SHIFT 8 /* INPGAVU */
  703. #define WM8985_INPGAVU_WIDTH 1 /* INPGAVU */
  704. #define WM8985_INPPGAZCR 0x0080 /* INPPGAZCR */
  705. #define WM8985_INPPGAZCR_MASK 0x0080 /* INPPGAZCR */
  706. #define WM8985_INPPGAZCR_SHIFT 7 /* INPPGAZCR */
  707. #define WM8985_INPPGAZCR_WIDTH 1 /* INPPGAZCR */
  708. #define WM8985_INPPGAMUTER 0x0040 /* INPPGAMUTER */
  709. #define WM8985_INPPGAMUTER_MASK 0x0040 /* INPPGAMUTER */
  710. #define WM8985_INPPGAMUTER_SHIFT 6 /* INPPGAMUTER */
  711. #define WM8985_INPPGAMUTER_WIDTH 1 /* INPPGAMUTER */
  712. #define WM8985_INPPGAVOLR_MASK 0x003F /* INPPGAVOLR - [5:0] */
  713. #define WM8985_INPPGAVOLR_SHIFT 0 /* INPPGAVOLR - [5:0] */
  714. #define WM8985_INPPGAVOLR_WIDTH 6 /* INPPGAVOLR - [5:0] */
  715. /*
  716. * R47 (0x2F) - Left ADC BOOST ctrl
  717. */
  718. #define WM8985_PGABOOSTL 0x0100 /* PGABOOSTL */
  719. #define WM8985_PGABOOSTL_MASK 0x0100 /* PGABOOSTL */
  720. #define WM8985_PGABOOSTL_SHIFT 8 /* PGABOOSTL */
  721. #define WM8985_PGABOOSTL_WIDTH 1 /* PGABOOSTL */
  722. #define WM8985_L2_2BOOSTVOL_MASK 0x0070 /* L2_2BOOSTVOL - [6:4] */
  723. #define WM8985_L2_2BOOSTVOL_SHIFT 4 /* L2_2BOOSTVOL - [6:4] */
  724. #define WM8985_L2_2BOOSTVOL_WIDTH 3 /* L2_2BOOSTVOL - [6:4] */
  725. #define WM8985_AUXL2BOOSTVOL_MASK 0x0007 /* AUXL2BOOSTVOL - [2:0] */
  726. #define WM8985_AUXL2BOOSTVOL_SHIFT 0 /* AUXL2BOOSTVOL - [2:0] */
  727. #define WM8985_AUXL2BOOSTVOL_WIDTH 3 /* AUXL2BOOSTVOL - [2:0] */
  728. /*
  729. * R48 (0x30) - Right ADC BOOST ctrl
  730. */
  731. #define WM8985_PGABOOSTR 0x0100 /* PGABOOSTR */
  732. #define WM8985_PGABOOSTR_MASK 0x0100 /* PGABOOSTR */
  733. #define WM8985_PGABOOSTR_SHIFT 8 /* PGABOOSTR */
  734. #define WM8985_PGABOOSTR_WIDTH 1 /* PGABOOSTR */
  735. #define WM8985_R2_2BOOSTVOL_MASK 0x0070 /* R2_2BOOSTVOL - [6:4] */
  736. #define WM8985_R2_2BOOSTVOL_SHIFT 4 /* R2_2BOOSTVOL - [6:4] */
  737. #define WM8985_R2_2BOOSTVOL_WIDTH 3 /* R2_2BOOSTVOL - [6:4] */
  738. #define WM8985_AUXR2BOOSTVOL_MASK 0x0007 /* AUXR2BOOSTVOL - [2:0] */
  739. #define WM8985_AUXR2BOOSTVOL_SHIFT 0 /* AUXR2BOOSTVOL - [2:0] */
  740. #define WM8985_AUXR2BOOSTVOL_WIDTH 3 /* AUXR2BOOSTVOL - [2:0] */
  741. /*
  742. * R49 (0x31) - Output ctrl
  743. */
  744. #define WM8985_DACL2RMIX 0x0040 /* DACL2RMIX */
  745. #define WM8985_DACL2RMIX_MASK 0x0040 /* DACL2RMIX */
  746. #define WM8985_DACL2RMIX_SHIFT 6 /* DACL2RMIX */
  747. #define WM8985_DACL2RMIX_WIDTH 1 /* DACL2RMIX */
  748. #define WM8985_DACR2LMIX 0x0020 /* DACR2LMIX */
  749. #define WM8985_DACR2LMIX_MASK 0x0020 /* DACR2LMIX */
  750. #define WM8985_DACR2LMIX_SHIFT 5 /* DACR2LMIX */
  751. #define WM8985_DACR2LMIX_WIDTH 1 /* DACR2LMIX */
  752. #define WM8985_OUT4BOOST 0x0010 /* OUT4BOOST */
  753. #define WM8985_OUT4BOOST_MASK 0x0010 /* OUT4BOOST */
  754. #define WM8985_OUT4BOOST_SHIFT 4 /* OUT4BOOST */
  755. #define WM8985_OUT4BOOST_WIDTH 1 /* OUT4BOOST */
  756. #define WM8985_OUT3BOOST 0x0008 /* OUT3BOOST */
  757. #define WM8985_OUT3BOOST_MASK 0x0008 /* OUT3BOOST */
  758. #define WM8985_OUT3BOOST_SHIFT 3 /* OUT3BOOST */
  759. #define WM8985_OUT3BOOST_WIDTH 1 /* OUT3BOOST */
  760. #define WM8985_TSOPCTRL 0x0004 /* TSOPCTRL */
  761. #define WM8985_TSOPCTRL_MASK 0x0004 /* TSOPCTRL */
  762. #define WM8985_TSOPCTRL_SHIFT 2 /* TSOPCTRL */
  763. #define WM8985_TSOPCTRL_WIDTH 1 /* TSOPCTRL */
  764. #define WM8985_TSDEN 0x0002 /* TSDEN */
  765. #define WM8985_TSDEN_MASK 0x0002 /* TSDEN */
  766. #define WM8985_TSDEN_SHIFT 1 /* TSDEN */
  767. #define WM8985_TSDEN_WIDTH 1 /* TSDEN */
  768. #define WM8985_VROI 0x0001 /* VROI */
  769. #define WM8985_VROI_MASK 0x0001 /* VROI */
  770. #define WM8985_VROI_SHIFT 0 /* VROI */
  771. #define WM8985_VROI_WIDTH 1 /* VROI */
  772. /*
  773. * R50 (0x32) - Left mixer ctrl
  774. */
  775. #define WM8985_AUXLMIXVOL_MASK 0x01C0 /* AUXLMIXVOL - [8:6] */
  776. #define WM8985_AUXLMIXVOL_SHIFT 6 /* AUXLMIXVOL - [8:6] */
  777. #define WM8985_AUXLMIXVOL_WIDTH 3 /* AUXLMIXVOL - [8:6] */
  778. #define WM8985_AUXL2LMIX 0x0020 /* AUXL2LMIX */
  779. #define WM8985_AUXL2LMIX_MASK 0x0020 /* AUXL2LMIX */
  780. #define WM8985_AUXL2LMIX_SHIFT 5 /* AUXL2LMIX */
  781. #define WM8985_AUXL2LMIX_WIDTH 1 /* AUXL2LMIX */
  782. #define WM8985_BYPLMIXVOL_MASK 0x001C /* BYPLMIXVOL - [4:2] */
  783. #define WM8985_BYPLMIXVOL_SHIFT 2 /* BYPLMIXVOL - [4:2] */
  784. #define WM8985_BYPLMIXVOL_WIDTH 3 /* BYPLMIXVOL - [4:2] */
  785. #define WM8985_BYPL2LMIX 0x0002 /* BYPL2LMIX */
  786. #define WM8985_BYPL2LMIX_MASK 0x0002 /* BYPL2LMIX */
  787. #define WM8985_BYPL2LMIX_SHIFT 1 /* BYPL2LMIX */
  788. #define WM8985_BYPL2LMIX_WIDTH 1 /* BYPL2LMIX */
  789. #define WM8985_DACL2LMIX 0x0001 /* DACL2LMIX */
  790. #define WM8985_DACL2LMIX_MASK 0x0001 /* DACL2LMIX */
  791. #define WM8985_DACL2LMIX_SHIFT 0 /* DACL2LMIX */
  792. #define WM8985_DACL2LMIX_WIDTH 1 /* DACL2LMIX */
  793. /*
  794. * R51 (0x33) - Right mixer ctrl
  795. */
  796. #define WM8985_AUXRMIXVOL_MASK 0x01C0 /* AUXRMIXVOL - [8:6] */
  797. #define WM8985_AUXRMIXVOL_SHIFT 6 /* AUXRMIXVOL - [8:6] */
  798. #define WM8985_AUXRMIXVOL_WIDTH 3 /* AUXRMIXVOL - [8:6] */
  799. #define WM8985_AUXR2RMIX 0x0020 /* AUXR2RMIX */
  800. #define WM8985_AUXR2RMIX_MASK 0x0020 /* AUXR2RMIX */
  801. #define WM8985_AUXR2RMIX_SHIFT 5 /* AUXR2RMIX */
  802. #define WM8985_AUXR2RMIX_WIDTH 1 /* AUXR2RMIX */
  803. #define WM8985_BYPRMIXVOL_MASK 0x001C /* BYPRMIXVOL - [4:2] */
  804. #define WM8985_BYPRMIXVOL_SHIFT 2 /* BYPRMIXVOL - [4:2] */
  805. #define WM8985_BYPRMIXVOL_WIDTH 3 /* BYPRMIXVOL - [4:2] */
  806. #define WM8985_BYPR2RMIX 0x0002 /* BYPR2RMIX */
  807. #define WM8985_BYPR2RMIX_MASK 0x0002 /* BYPR2RMIX */
  808. #define WM8985_BYPR2RMIX_SHIFT 1 /* BYPR2RMIX */
  809. #define WM8985_BYPR2RMIX_WIDTH 1 /* BYPR2RMIX */
  810. #define WM8985_DACR2RMIX 0x0001 /* DACR2RMIX */
  811. #define WM8985_DACR2RMIX_MASK 0x0001 /* DACR2RMIX */
  812. #define WM8985_DACR2RMIX_SHIFT 0 /* DACR2RMIX */
  813. #define WM8985_DACR2RMIX_WIDTH 1 /* DACR2RMIX */
  814. /*
  815. * R52 (0x34) - LOUT1 (HP) volume ctrl
  816. */
  817. #define WM8985_OUT1VU 0x0100 /* OUT1VU */
  818. #define WM8985_OUT1VU_MASK 0x0100 /* OUT1VU */
  819. #define WM8985_OUT1VU_SHIFT 8 /* OUT1VU */
  820. #define WM8985_OUT1VU_WIDTH 1 /* OUT1VU */
  821. #define WM8985_LOUT1ZC 0x0080 /* LOUT1ZC */
  822. #define WM8985_LOUT1ZC_MASK 0x0080 /* LOUT1ZC */
  823. #define WM8985_LOUT1ZC_SHIFT 7 /* LOUT1ZC */
  824. #define WM8985_LOUT1ZC_WIDTH 1 /* LOUT1ZC */
  825. #define WM8985_LOUT1MUTE 0x0040 /* LOUT1MUTE */
  826. #define WM8985_LOUT1MUTE_MASK 0x0040 /* LOUT1MUTE */
  827. #define WM8985_LOUT1MUTE_SHIFT 6 /* LOUT1MUTE */
  828. #define WM8985_LOUT1MUTE_WIDTH 1 /* LOUT1MUTE */
  829. #define WM8985_LOUT1VOL_MASK 0x003F /* LOUT1VOL - [5:0] */
  830. #define WM8985_LOUT1VOL_SHIFT 0 /* LOUT1VOL - [5:0] */
  831. #define WM8985_LOUT1VOL_WIDTH 6 /* LOUT1VOL - [5:0] */
  832. /*
  833. * R53 (0x35) - ROUT1 (HP) volume ctrl
  834. */
  835. #define WM8985_OUT1VU 0x0100 /* OUT1VU */
  836. #define WM8985_OUT1VU_MASK 0x0100 /* OUT1VU */
  837. #define WM8985_OUT1VU_SHIFT 8 /* OUT1VU */
  838. #define WM8985_OUT1VU_WIDTH 1 /* OUT1VU */
  839. #define WM8985_ROUT1ZC 0x0080 /* ROUT1ZC */
  840. #define WM8985_ROUT1ZC_MASK 0x0080 /* ROUT1ZC */
  841. #define WM8985_ROUT1ZC_SHIFT 7 /* ROUT1ZC */
  842. #define WM8985_ROUT1ZC_WIDTH 1 /* ROUT1ZC */
  843. #define WM8985_ROUT1MUTE 0x0040 /* ROUT1MUTE */
  844. #define WM8985_ROUT1MUTE_MASK 0x0040 /* ROUT1MUTE */
  845. #define WM8985_ROUT1MUTE_SHIFT 6 /* ROUT1MUTE */
  846. #define WM8985_ROUT1MUTE_WIDTH 1 /* ROUT1MUTE */
  847. #define WM8985_ROUT1VOL_MASK 0x003F /* ROUT1VOL - [5:0] */
  848. #define WM8985_ROUT1VOL_SHIFT 0 /* ROUT1VOL - [5:0] */
  849. #define WM8985_ROUT1VOL_WIDTH 6 /* ROUT1VOL - [5:0] */
  850. /*
  851. * R54 (0x36) - LOUT2 (SPK) volume ctrl
  852. */
  853. #define WM8985_OUT2VU 0x0100 /* OUT2VU */
  854. #define WM8985_OUT2VU_MASK 0x0100 /* OUT2VU */
  855. #define WM8985_OUT2VU_SHIFT 8 /* OUT2VU */
  856. #define WM8985_OUT2VU_WIDTH 1 /* OUT2VU */
  857. #define WM8985_LOUT2ZC 0x0080 /* LOUT2ZC */
  858. #define WM8985_LOUT2ZC_MASK 0x0080 /* LOUT2ZC */
  859. #define WM8985_LOUT2ZC_SHIFT 7 /* LOUT2ZC */
  860. #define WM8985_LOUT2ZC_WIDTH 1 /* LOUT2ZC */
  861. #define WM8985_LOUT2MUTE 0x0040 /* LOUT2MUTE */
  862. #define WM8985_LOUT2MUTE_MASK 0x0040 /* LOUT2MUTE */
  863. #define WM8985_LOUT2MUTE_SHIFT 6 /* LOUT2MUTE */
  864. #define WM8985_LOUT2MUTE_WIDTH 1 /* LOUT2MUTE */
  865. #define WM8985_LOUT2VOL_MASK 0x003F /* LOUT2VOL - [5:0] */
  866. #define WM8985_LOUT2VOL_SHIFT 0 /* LOUT2VOL - [5:0] */
  867. #define WM8985_LOUT2VOL_WIDTH 6 /* LOUT2VOL - [5:0] */
  868. /*
  869. * R55 (0x37) - ROUT2 (SPK) volume ctrl
  870. */
  871. #define WM8985_OUT2VU 0x0100 /* OUT2VU */
  872. #define WM8985_OUT2VU_MASK 0x0100 /* OUT2VU */
  873. #define WM8985_OUT2VU_SHIFT 8 /* OUT2VU */
  874. #define WM8985_OUT2VU_WIDTH 1 /* OUT2VU */
  875. #define WM8985_ROUT2ZC 0x0080 /* ROUT2ZC */
  876. #define WM8985_ROUT2ZC_MASK 0x0080 /* ROUT2ZC */
  877. #define WM8985_ROUT2ZC_SHIFT 7 /* ROUT2ZC */
  878. #define WM8985_ROUT2ZC_WIDTH 1 /* ROUT2ZC */
  879. #define WM8985_ROUT2MUTE 0x0040 /* ROUT2MUTE */
  880. #define WM8985_ROUT2MUTE_MASK 0x0040 /* ROUT2MUTE */
  881. #define WM8985_ROUT2MUTE_SHIFT 6 /* ROUT2MUTE */
  882. #define WM8985_ROUT2MUTE_WIDTH 1 /* ROUT2MUTE */
  883. #define WM8985_ROUT2VOL_MASK 0x003F /* ROUT2VOL - [5:0] */
  884. #define WM8985_ROUT2VOL_SHIFT 0 /* ROUT2VOL - [5:0] */
  885. #define WM8985_ROUT2VOL_WIDTH 6 /* ROUT2VOL - [5:0] */
  886. /*
  887. * R56 (0x38) - OUT3 mixer ctrl
  888. */
  889. #define WM8985_OUT3MUTE 0x0040 /* OUT3MUTE */
  890. #define WM8985_OUT3MUTE_MASK 0x0040 /* OUT3MUTE */
  891. #define WM8985_OUT3MUTE_SHIFT 6 /* OUT3MUTE */
  892. #define WM8985_OUT3MUTE_WIDTH 1 /* OUT3MUTE */
  893. #define WM8985_OUT4_2OUT3 0x0008 /* OUT4_2OUT3 */
  894. #define WM8985_OUT4_2OUT3_MASK 0x0008 /* OUT4_2OUT3 */
  895. #define WM8985_OUT4_2OUT3_SHIFT 3 /* OUT4_2OUT3 */
  896. #define WM8985_OUT4_2OUT3_WIDTH 1 /* OUT4_2OUT3 */
  897. #define WM8985_BYPL2OUT3 0x0004 /* BYPL2OUT3 */
  898. #define WM8985_BYPL2OUT3_MASK 0x0004 /* BYPL2OUT3 */
  899. #define WM8985_BYPL2OUT3_SHIFT 2 /* BYPL2OUT3 */
  900. #define WM8985_BYPL2OUT3_WIDTH 1 /* BYPL2OUT3 */
  901. #define WM8985_LMIX2OUT3 0x0002 /* LMIX2OUT3 */
  902. #define WM8985_LMIX2OUT3_MASK 0x0002 /* LMIX2OUT3 */
  903. #define WM8985_LMIX2OUT3_SHIFT 1 /* LMIX2OUT3 */
  904. #define WM8985_LMIX2OUT3_WIDTH 1 /* LMIX2OUT3 */
  905. #define WM8985_LDAC2OUT3 0x0001 /* LDAC2OUT3 */
  906. #define WM8985_LDAC2OUT3_MASK 0x0001 /* LDAC2OUT3 */
  907. #define WM8985_LDAC2OUT3_SHIFT 0 /* LDAC2OUT3 */
  908. #define WM8985_LDAC2OUT3_WIDTH 1 /* LDAC2OUT3 */
  909. /*
  910. * R57 (0x39) - OUT4 (MONO) mix ctrl
  911. */
  912. #define WM8985_OUT3_2OUT4 0x0080 /* OUT3_2OUT4 */
  913. #define WM8985_OUT3_2OUT4_MASK 0x0080 /* OUT3_2OUT4 */
  914. #define WM8985_OUT3_2OUT4_SHIFT 7 /* OUT3_2OUT4 */
  915. #define WM8985_OUT3_2OUT4_WIDTH 1 /* OUT3_2OUT4 */
  916. #define WM8985_OUT4MUTE 0x0040 /* OUT4MUTE */
  917. #define WM8985_OUT4MUTE_MASK 0x0040 /* OUT4MUTE */
  918. #define WM8985_OUT4MUTE_SHIFT 6 /* OUT4MUTE */
  919. #define WM8985_OUT4MUTE_WIDTH 1 /* OUT4MUTE */
  920. #define WM8985_OUT4ATTN 0x0020 /* OUT4ATTN */
  921. #define WM8985_OUT4ATTN_MASK 0x0020 /* OUT4ATTN */
  922. #define WM8985_OUT4ATTN_SHIFT 5 /* OUT4ATTN */
  923. #define WM8985_OUT4ATTN_WIDTH 1 /* OUT4ATTN */
  924. #define WM8985_LMIX2OUT4 0x0010 /* LMIX2OUT4 */
  925. #define WM8985_LMIX2OUT4_MASK 0x0010 /* LMIX2OUT4 */
  926. #define WM8985_LMIX2OUT4_SHIFT 4 /* LMIX2OUT4 */
  927. #define WM8985_LMIX2OUT4_WIDTH 1 /* LMIX2OUT4 */
  928. #define WM8985_LDAC2OUT4 0x0008 /* LDAC2OUT4 */
  929. #define WM8985_LDAC2OUT4_MASK 0x0008 /* LDAC2OUT4 */
  930. #define WM8985_LDAC2OUT4_SHIFT 3 /* LDAC2OUT4 */
  931. #define WM8985_LDAC2OUT4_WIDTH 1 /* LDAC2OUT4 */
  932. #define WM8985_BYPR2OUT4 0x0004 /* BYPR2OUT4 */
  933. #define WM8985_BYPR2OUT4_MASK 0x0004 /* BYPR2OUT4 */
  934. #define WM8985_BYPR2OUT4_SHIFT 2 /* BYPR2OUT4 */
  935. #define WM8985_BYPR2OUT4_WIDTH 1 /* BYPR2OUT4 */
  936. #define WM8985_RMIX2OUT4 0x0002 /* RMIX2OUT4 */
  937. #define WM8985_RMIX2OUT4_MASK 0x0002 /* RMIX2OUT4 */
  938. #define WM8985_RMIX2OUT4_SHIFT 1 /* RMIX2OUT4 */
  939. #define WM8985_RMIX2OUT4_WIDTH 1 /* RMIX2OUT4 */
  940. #define WM8985_RDAC2OUT4 0x0001 /* RDAC2OUT4 */
  941. #define WM8985_RDAC2OUT4_MASK 0x0001 /* RDAC2OUT4 */
  942. #define WM8985_RDAC2OUT4_SHIFT 0 /* RDAC2OUT4 */
  943. #define WM8985_RDAC2OUT4_WIDTH 1 /* RDAC2OUT4 */
  944. /*
  945. * R60 (0x3C) - OUTPUT ctrl
  946. */
  947. #define WM8985_VIDBUFFTST_MASK 0x01E0 /* VIDBUFFTST - [8:5] */
  948. #define WM8985_VIDBUFFTST_SHIFT 5 /* VIDBUFFTST - [8:5] */
  949. #define WM8985_VIDBUFFTST_WIDTH 4 /* VIDBUFFTST - [8:5] */
  950. #define WM8985_HPTOG 0x0008 /* HPTOG */
  951. #define WM8985_HPTOG_MASK 0x0008 /* HPTOG */
  952. #define WM8985_HPTOG_SHIFT 3 /* HPTOG */
  953. #define WM8985_HPTOG_WIDTH 1 /* HPTOG */
  954. /*
  955. * R61 (0x3D) - BIAS CTRL
  956. */
  957. #define WM8985_BIASCUT 0x0100 /* BIASCUT */
  958. #define WM8985_BIASCUT_MASK 0x0100 /* BIASCUT */
  959. #define WM8985_BIASCUT_SHIFT 8 /* BIASCUT */
  960. #define WM8985_BIASCUT_WIDTH 1 /* BIASCUT */
  961. #define WM8985_HALFIPBIAS 0x0080 /* HALFIPBIAS */
  962. #define WM8985_HALFIPBIAS_MASK 0x0080 /* HALFIPBIAS */
  963. #define WM8985_HALFIPBIAS_SHIFT 7 /* HALFIPBIAS */
  964. #define WM8985_HALFIPBIAS_WIDTH 1 /* HALFIPBIAS */
  965. #define WM8985_VBBIASTST_MASK 0x0060 /* VBBIASTST - [6:5] */
  966. #define WM8985_VBBIASTST_SHIFT 5 /* VBBIASTST - [6:5] */
  967. #define WM8985_VBBIASTST_WIDTH 2 /* VBBIASTST - [6:5] */
  968. #define WM8985_BUFBIAS_MASK 0x0018 /* BUFBIAS - [4:3] */
  969. #define WM8985_BUFBIAS_SHIFT 3 /* BUFBIAS - [4:3] */
  970. #define WM8985_BUFBIAS_WIDTH 2 /* BUFBIAS - [4:3] */
  971. #define WM8985_ADCBIAS_MASK 0x0006 /* ADCBIAS - [2:1] */
  972. #define WM8985_ADCBIAS_SHIFT 1 /* ADCBIAS - [2:1] */
  973. #define WM8985_ADCBIAS_WIDTH 2 /* ADCBIAS - [2:1] */
  974. #define WM8985_HALFOPBIAS 0x0001 /* HALFOPBIAS */
  975. #define WM8985_HALFOPBIAS_MASK 0x0001 /* HALFOPBIAS */
  976. #define WM8985_HALFOPBIAS_SHIFT 0 /* HALFOPBIAS */
  977. #define WM8985_HALFOPBIAS_WIDTH 1 /* HALFOPBIAS */
  978. enum clk_src {
  979. WM8985_CLKSRC_MCLK,
  980. WM8985_CLKSRC_PLL
  981. };
  982. #define WM8985_PLL 0
  983. #endif