xref: /linux/sound/soc/codecs/wm8955.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2b35a28afSMark Brown /*
3b35a28afSMark Brown  * wm8955.h  --  WM8904 ASoC driver
4b35a28afSMark Brown  *
5b35a28afSMark Brown  * Copyright 2009 Wolfson Microelectronics, plc
6b35a28afSMark Brown  *
7b35a28afSMark Brown  * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
8b35a28afSMark Brown  */
9b35a28afSMark Brown 
10b35a28afSMark Brown #ifndef _WM8955_H
11b35a28afSMark Brown #define _WM8955_H
12b35a28afSMark Brown 
13b35a28afSMark Brown #define WM8955_CLK_MCLK 1
14b35a28afSMark Brown 
15b35a28afSMark Brown /*
16b35a28afSMark Brown  * Register values.
17b35a28afSMark Brown  */
18b35a28afSMark Brown #define WM8955_LOUT1_VOLUME                     0x02
19b35a28afSMark Brown #define WM8955_ROUT1_VOLUME                     0x03
20b35a28afSMark Brown #define WM8955_DAC_CONTROL                      0x05
21b35a28afSMark Brown #define WM8955_AUDIO_INTERFACE                  0x07
22b35a28afSMark Brown #define WM8955_SAMPLE_RATE                      0x08
23b35a28afSMark Brown #define WM8955_LEFT_DAC_VOLUME                  0x0A
24b35a28afSMark Brown #define WM8955_RIGHT_DAC_VOLUME                 0x0B
25b35a28afSMark Brown #define WM8955_BASS_CONTROL                     0x0C
26b35a28afSMark Brown #define WM8955_TREBLE_CONTROL                   0x0D
27b35a28afSMark Brown #define WM8955_RESET                            0x0F
28b35a28afSMark Brown #define WM8955_ADDITIONAL_CONTROL_1             0x17
29b35a28afSMark Brown #define WM8955_ADDITIONAL_CONTROL_2             0x18
30b35a28afSMark Brown #define WM8955_POWER_MANAGEMENT_1               0x19
31b35a28afSMark Brown #define WM8955_POWER_MANAGEMENT_2               0x1A
32b35a28afSMark Brown #define WM8955_ADDITIONAL_CONTROL_3             0x1B
33b35a28afSMark Brown #define WM8955_LEFT_OUT_MIX_1                   0x22
34b35a28afSMark Brown #define WM8955_LEFT_OUT_MIX_2                   0x23
35b35a28afSMark Brown #define WM8955_RIGHT_OUT_MIX_1                  0x24
36b35a28afSMark Brown #define WM8955_RIGHT_OUT_MIX_2                  0x25
37b35a28afSMark Brown #define WM8955_MONO_OUT_MIX_1                   0x26
38b35a28afSMark Brown #define WM8955_MONO_OUT_MIX_2                   0x27
39b35a28afSMark Brown #define WM8955_LOUT2_VOLUME                     0x28
40b35a28afSMark Brown #define WM8955_ROUT2_VOLUME                     0x29
41b35a28afSMark Brown #define WM8955_MONOOUT_VOLUME                   0x2A
42b35a28afSMark Brown #define WM8955_CLOCKING_PLL                     0x2B
43b35a28afSMark Brown #define WM8955_PLL_CONTROL_1                    0x2C
44b35a28afSMark Brown #define WM8955_PLL_CONTROL_2                    0x2D
45b35a28afSMark Brown #define WM8955_PLL_CONTROL_3                    0x2E
46b35a28afSMark Brown #define WM8955_PLL_CONTROL_4                    0x3B
47b35a28afSMark Brown 
48b35a28afSMark Brown #define WM8955_REGISTER_COUNT                   29
49b35a28afSMark Brown #define WM8955_MAX_REGISTER                     0x3B
50b35a28afSMark Brown 
51b35a28afSMark Brown /*
52b35a28afSMark Brown  * Field Definitions.
53b35a28afSMark Brown  */
54b35a28afSMark Brown 
55b35a28afSMark Brown /*
56b35a28afSMark Brown  * R2 (0x02) - LOUT1 volume
57b35a28afSMark Brown  */
58b35a28afSMark Brown #define WM8955_LO1VU                            0x0100  /* LO1VU */
59b35a28afSMark Brown #define WM8955_LO1VU_MASK                       0x0100  /* LO1VU */
60b35a28afSMark Brown #define WM8955_LO1VU_SHIFT                           8  /* LO1VU */
61b35a28afSMark Brown #define WM8955_LO1VU_WIDTH                           1  /* LO1VU */
62b35a28afSMark Brown #define WM8955_LO1ZC                            0x0080  /* LO1ZC */
63b35a28afSMark Brown #define WM8955_LO1ZC_MASK                       0x0080  /* LO1ZC */
64b35a28afSMark Brown #define WM8955_LO1ZC_SHIFT                           7  /* LO1ZC */
65b35a28afSMark Brown #define WM8955_LO1ZC_WIDTH                           1  /* LO1ZC */
66b35a28afSMark Brown #define WM8955_LOUTVOL_MASK                     0x007F  /* LOUTVOL - [6:0] */
67b35a28afSMark Brown #define WM8955_LOUTVOL_SHIFT                         0  /* LOUTVOL - [6:0] */
68b35a28afSMark Brown #define WM8955_LOUTVOL_WIDTH                         7  /* LOUTVOL - [6:0] */
69b35a28afSMark Brown 
70b35a28afSMark Brown /*
71b35a28afSMark Brown  * R3 (0x03) - ROUT1 volume
72b35a28afSMark Brown  */
73b35a28afSMark Brown #define WM8955_RO1VU                            0x0100  /* RO1VU */
74b35a28afSMark Brown #define WM8955_RO1VU_MASK                       0x0100  /* RO1VU */
75b35a28afSMark Brown #define WM8955_RO1VU_SHIFT                           8  /* RO1VU */
76b35a28afSMark Brown #define WM8955_RO1VU_WIDTH                           1  /* RO1VU */
77b35a28afSMark Brown #define WM8955_RO1ZC                            0x0080  /* RO1ZC */
78b35a28afSMark Brown #define WM8955_RO1ZC_MASK                       0x0080  /* RO1ZC */
79b35a28afSMark Brown #define WM8955_RO1ZC_SHIFT                           7  /* RO1ZC */
80b35a28afSMark Brown #define WM8955_RO1ZC_WIDTH                           1  /* RO1ZC */
81b35a28afSMark Brown #define WM8955_ROUTVOL_MASK                     0x007F  /* ROUTVOL - [6:0] */
82b35a28afSMark Brown #define WM8955_ROUTVOL_SHIFT                         0  /* ROUTVOL - [6:0] */
83b35a28afSMark Brown #define WM8955_ROUTVOL_WIDTH                         7  /* ROUTVOL - [6:0] */
84b35a28afSMark Brown 
85b35a28afSMark Brown /*
86b35a28afSMark Brown  * R5 (0x05) - DAC Control
87b35a28afSMark Brown  */
88b35a28afSMark Brown #define WM8955_DAT                              0x0080  /* DAT */
89b35a28afSMark Brown #define WM8955_DAT_MASK                         0x0080  /* DAT */
90b35a28afSMark Brown #define WM8955_DAT_SHIFT                             7  /* DAT */
91b35a28afSMark Brown #define WM8955_DAT_WIDTH                             1  /* DAT */
92b35a28afSMark Brown #define WM8955_DACMU                            0x0008  /* DACMU */
93b35a28afSMark Brown #define WM8955_DACMU_MASK                       0x0008  /* DACMU */
94b35a28afSMark Brown #define WM8955_DACMU_SHIFT                           3  /* DACMU */
95b35a28afSMark Brown #define WM8955_DACMU_WIDTH                           1  /* DACMU */
96b35a28afSMark Brown #define WM8955_DEEMPH_MASK                      0x0006  /* DEEMPH - [2:1] */
97b35a28afSMark Brown #define WM8955_DEEMPH_SHIFT                          1  /* DEEMPH - [2:1] */
98b35a28afSMark Brown #define WM8955_DEEMPH_WIDTH                          2  /* DEEMPH - [2:1] */
99b35a28afSMark Brown 
100b35a28afSMark Brown /*
101b35a28afSMark Brown  * R7 (0x07) - Audio Interface
102b35a28afSMark Brown  */
103b35a28afSMark Brown #define WM8955_BCLKINV                          0x0080  /* BCLKINV */
104b35a28afSMark Brown #define WM8955_BCLKINV_MASK                     0x0080  /* BCLKINV */
105b35a28afSMark Brown #define WM8955_BCLKINV_SHIFT                         7  /* BCLKINV */
106b35a28afSMark Brown #define WM8955_BCLKINV_WIDTH                         1  /* BCLKINV */
107b35a28afSMark Brown #define WM8955_MS                               0x0040  /* MS */
108b35a28afSMark Brown #define WM8955_MS_MASK                          0x0040  /* MS */
109b35a28afSMark Brown #define WM8955_MS_SHIFT                              6  /* MS */
110b35a28afSMark Brown #define WM8955_MS_WIDTH                              1  /* MS */
111b35a28afSMark Brown #define WM8955_LRSWAP                           0x0020  /* LRSWAP */
112b35a28afSMark Brown #define WM8955_LRSWAP_MASK                      0x0020  /* LRSWAP */
113b35a28afSMark Brown #define WM8955_LRSWAP_SHIFT                          5  /* LRSWAP */
114b35a28afSMark Brown #define WM8955_LRSWAP_WIDTH                          1  /* LRSWAP */
115b35a28afSMark Brown #define WM8955_LRP                              0x0010  /* LRP */
116b35a28afSMark Brown #define WM8955_LRP_MASK                         0x0010  /* LRP */
117b35a28afSMark Brown #define WM8955_LRP_SHIFT                             4  /* LRP */
118b35a28afSMark Brown #define WM8955_LRP_WIDTH                             1  /* LRP */
119b35a28afSMark Brown #define WM8955_WL_MASK                          0x000C  /* WL - [3:2] */
120b35a28afSMark Brown #define WM8955_WL_SHIFT                              2  /* WL - [3:2] */
121b35a28afSMark Brown #define WM8955_WL_WIDTH                              2  /* WL - [3:2] */
122b35a28afSMark Brown #define WM8955_FORMAT_MASK                      0x0003  /* FORMAT - [1:0] */
123b35a28afSMark Brown #define WM8955_FORMAT_SHIFT                          0  /* FORMAT - [1:0] */
124b35a28afSMark Brown #define WM8955_FORMAT_WIDTH                          2  /* FORMAT - [1:0] */
125b35a28afSMark Brown 
126b35a28afSMark Brown /*
127b35a28afSMark Brown  * R8 (0x08) - Sample Rate
128b35a28afSMark Brown  */
129b35a28afSMark Brown #define WM8955_BCLKDIV2                         0x0080  /* BCLKDIV2 */
130b35a28afSMark Brown #define WM8955_BCLKDIV2_MASK                    0x0080  /* BCLKDIV2 */
131b35a28afSMark Brown #define WM8955_BCLKDIV2_SHIFT                        7  /* BCLKDIV2 */
132b35a28afSMark Brown #define WM8955_BCLKDIV2_WIDTH                        1  /* BCLKDIV2 */
133b35a28afSMark Brown #define WM8955_MCLKDIV2                         0x0040  /* MCLKDIV2 */
134b35a28afSMark Brown #define WM8955_MCLKDIV2_MASK                    0x0040  /* MCLKDIV2 */
135b35a28afSMark Brown #define WM8955_MCLKDIV2_SHIFT                        6  /* MCLKDIV2 */
136b35a28afSMark Brown #define WM8955_MCLKDIV2_WIDTH                        1  /* MCLKDIV2 */
137b35a28afSMark Brown #define WM8955_SR_MASK                          0x003E  /* SR - [5:1] */
138b35a28afSMark Brown #define WM8955_SR_SHIFT                              1  /* SR - [5:1] */
139b35a28afSMark Brown #define WM8955_SR_WIDTH                              5  /* SR - [5:1] */
140b35a28afSMark Brown #define WM8955_USB                              0x0001  /* USB */
141b35a28afSMark Brown #define WM8955_USB_MASK                         0x0001  /* USB */
142b35a28afSMark Brown #define WM8955_USB_SHIFT                             0  /* USB */
143b35a28afSMark Brown #define WM8955_USB_WIDTH                             1  /* USB */
144b35a28afSMark Brown 
145b35a28afSMark Brown /*
146b35a28afSMark Brown  * R10 (0x0A) - Left DAC volume
147b35a28afSMark Brown  */
148b35a28afSMark Brown #define WM8955_LDVU                             0x0100  /* LDVU */
149b35a28afSMark Brown #define WM8955_LDVU_MASK                        0x0100  /* LDVU */
150b35a28afSMark Brown #define WM8955_LDVU_SHIFT                            8  /* LDVU */
151b35a28afSMark Brown #define WM8955_LDVU_WIDTH                            1  /* LDVU */
152b35a28afSMark Brown #define WM8955_LDACVOL_MASK                     0x00FF  /* LDACVOL - [7:0] */
153b35a28afSMark Brown #define WM8955_LDACVOL_SHIFT                         0  /* LDACVOL - [7:0] */
154b35a28afSMark Brown #define WM8955_LDACVOL_WIDTH                         8  /* LDACVOL - [7:0] */
155b35a28afSMark Brown 
156b35a28afSMark Brown /*
157b35a28afSMark Brown  * R11 (0x0B) - Right DAC volume
158b35a28afSMark Brown  */
159b35a28afSMark Brown #define WM8955_RDVU                             0x0100  /* RDVU */
160b35a28afSMark Brown #define WM8955_RDVU_MASK                        0x0100  /* RDVU */
161b35a28afSMark Brown #define WM8955_RDVU_SHIFT                            8  /* RDVU */
162b35a28afSMark Brown #define WM8955_RDVU_WIDTH                            1  /* RDVU */
163b35a28afSMark Brown #define WM8955_RDACVOL_MASK                     0x00FF  /* RDACVOL - [7:0] */
164b35a28afSMark Brown #define WM8955_RDACVOL_SHIFT                         0  /* RDACVOL - [7:0] */
165b35a28afSMark Brown #define WM8955_RDACVOL_WIDTH                         8  /* RDACVOL - [7:0] */
166b35a28afSMark Brown 
167b35a28afSMark Brown /*
168b35a28afSMark Brown  * R12 (0x0C) - Bass control
169b35a28afSMark Brown  */
170b35a28afSMark Brown #define WM8955_BB                               0x0080  /* BB */
171b35a28afSMark Brown #define WM8955_BB_MASK                          0x0080  /* BB */
172b35a28afSMark Brown #define WM8955_BB_SHIFT                              7  /* BB */
173b35a28afSMark Brown #define WM8955_BB_WIDTH                              1  /* BB */
174b35a28afSMark Brown #define WM8955_BC                               0x0040  /* BC */
175b35a28afSMark Brown #define WM8955_BC_MASK                          0x0040  /* BC */
176b35a28afSMark Brown #define WM8955_BC_SHIFT                              6  /* BC */
177b35a28afSMark Brown #define WM8955_BC_WIDTH                              1  /* BC */
178b35a28afSMark Brown #define WM8955_BASS_MASK                        0x000F  /* BASS - [3:0] */
179b35a28afSMark Brown #define WM8955_BASS_SHIFT                            0  /* BASS - [3:0] */
180b35a28afSMark Brown #define WM8955_BASS_WIDTH                            4  /* BASS - [3:0] */
181b35a28afSMark Brown 
182b35a28afSMark Brown /*
183b35a28afSMark Brown  * R13 (0x0D) - Treble control
184b35a28afSMark Brown  */
185b35a28afSMark Brown #define WM8955_TC                               0x0040  /* TC */
186b35a28afSMark Brown #define WM8955_TC_MASK                          0x0040  /* TC */
187b35a28afSMark Brown #define WM8955_TC_SHIFT                              6  /* TC */
188b35a28afSMark Brown #define WM8955_TC_WIDTH                              1  /* TC */
189b35a28afSMark Brown #define WM8955_TRBL_MASK                        0x000F  /* TRBL - [3:0] */
190b35a28afSMark Brown #define WM8955_TRBL_SHIFT                            0  /* TRBL - [3:0] */
191b35a28afSMark Brown #define WM8955_TRBL_WIDTH                            4  /* TRBL - [3:0] */
192b35a28afSMark Brown 
193b35a28afSMark Brown /*
194b35a28afSMark Brown  * R15 (0x0F) - Reset
195b35a28afSMark Brown  */
196b35a28afSMark Brown #define WM8955_RESET_MASK                       0x01FF  /* RESET - [8:0] */
197b35a28afSMark Brown #define WM8955_RESET_SHIFT                           0  /* RESET - [8:0] */
198b35a28afSMark Brown #define WM8955_RESET_WIDTH                           9  /* RESET - [8:0] */
199b35a28afSMark Brown 
200b35a28afSMark Brown /*
201b35a28afSMark Brown  * R23 (0x17) - Additional control (1)
202b35a28afSMark Brown  */
203b35a28afSMark Brown #define WM8955_TSDEN                            0x0100  /* TSDEN */
204b35a28afSMark Brown #define WM8955_TSDEN_MASK                       0x0100  /* TSDEN */
205b35a28afSMark Brown #define WM8955_TSDEN_SHIFT                           8  /* TSDEN */
206b35a28afSMark Brown #define WM8955_TSDEN_WIDTH                           1  /* TSDEN */
207b35a28afSMark Brown #define WM8955_VSEL_MASK                        0x00C0  /* VSEL - [7:6] */
208b35a28afSMark Brown #define WM8955_VSEL_SHIFT                            6  /* VSEL - [7:6] */
209b35a28afSMark Brown #define WM8955_VSEL_WIDTH                            2  /* VSEL - [7:6] */
210b35a28afSMark Brown #define WM8955_DMONOMIX_MASK                    0x0030  /* DMONOMIX - [5:4] */
211b35a28afSMark Brown #define WM8955_DMONOMIX_SHIFT                        4  /* DMONOMIX - [5:4] */
212b35a28afSMark Brown #define WM8955_DMONOMIX_WIDTH                        2  /* DMONOMIX - [5:4] */
213b35a28afSMark Brown #define WM8955_DACINV                           0x0002  /* DACINV */
214b35a28afSMark Brown #define WM8955_DACINV_MASK                      0x0002  /* DACINV */
215b35a28afSMark Brown #define WM8955_DACINV_SHIFT                          1  /* DACINV */
216b35a28afSMark Brown #define WM8955_DACINV_WIDTH                          1  /* DACINV */
217b35a28afSMark Brown #define WM8955_TOEN                             0x0001  /* TOEN */
218b35a28afSMark Brown #define WM8955_TOEN_MASK                        0x0001  /* TOEN */
219b35a28afSMark Brown #define WM8955_TOEN_SHIFT                            0  /* TOEN */
220b35a28afSMark Brown #define WM8955_TOEN_WIDTH                            1  /* TOEN */
221b35a28afSMark Brown 
222b35a28afSMark Brown /*
223b35a28afSMark Brown  * R24 (0x18) - Additional control (2)
224b35a28afSMark Brown  */
225b35a28afSMark Brown #define WM8955_OUT3SW_MASK                      0x0180  /* OUT3SW - [8:7] */
226b35a28afSMark Brown #define WM8955_OUT3SW_SHIFT                          7  /* OUT3SW - [8:7] */
227b35a28afSMark Brown #define WM8955_OUT3SW_WIDTH                          2  /* OUT3SW - [8:7] */
228b35a28afSMark Brown #define WM8955_ROUT2INV                         0x0010  /* ROUT2INV */
229b35a28afSMark Brown #define WM8955_ROUT2INV_MASK                    0x0010  /* ROUT2INV */
230b35a28afSMark Brown #define WM8955_ROUT2INV_SHIFT                        4  /* ROUT2INV */
231b35a28afSMark Brown #define WM8955_ROUT2INV_WIDTH                        1  /* ROUT2INV */
232b35a28afSMark Brown #define WM8955_DACOSR                           0x0001  /* DACOSR */
233b35a28afSMark Brown #define WM8955_DACOSR_MASK                      0x0001  /* DACOSR */
234b35a28afSMark Brown #define WM8955_DACOSR_SHIFT                          0  /* DACOSR */
235b35a28afSMark Brown #define WM8955_DACOSR_WIDTH                          1  /* DACOSR */
236b35a28afSMark Brown 
237b35a28afSMark Brown /*
238b35a28afSMark Brown  * R25 (0x19) - Power Management (1)
239b35a28afSMark Brown  */
240b35a28afSMark Brown #define WM8955_VMIDSEL_MASK                     0x0180  /* VMIDSEL - [8:7] */
241b35a28afSMark Brown #define WM8955_VMIDSEL_SHIFT                         7  /* VMIDSEL - [8:7] */
242b35a28afSMark Brown #define WM8955_VMIDSEL_WIDTH                         2  /* VMIDSEL - [8:7] */
243b35a28afSMark Brown #define WM8955_VREF                             0x0040  /* VREF */
244b35a28afSMark Brown #define WM8955_VREF_MASK                        0x0040  /* VREF */
245b35a28afSMark Brown #define WM8955_VREF_SHIFT                            6  /* VREF */
246b35a28afSMark Brown #define WM8955_VREF_WIDTH                            1  /* VREF */
247b35a28afSMark Brown #define WM8955_DIGENB                           0x0001  /* DIGENB */
248b35a28afSMark Brown #define WM8955_DIGENB_MASK                      0x0001  /* DIGENB */
249b35a28afSMark Brown #define WM8955_DIGENB_SHIFT                          0  /* DIGENB */
250b35a28afSMark Brown #define WM8955_DIGENB_WIDTH                          1  /* DIGENB */
251b35a28afSMark Brown 
252b35a28afSMark Brown /*
253b35a28afSMark Brown  * R26 (0x1A) - Power Management (2)
254b35a28afSMark Brown  */
255b35a28afSMark Brown #define WM8955_DACL                             0x0100  /* DACL */
256b35a28afSMark Brown #define WM8955_DACL_MASK                        0x0100  /* DACL */
257b35a28afSMark Brown #define WM8955_DACL_SHIFT                            8  /* DACL */
258b35a28afSMark Brown #define WM8955_DACL_WIDTH                            1  /* DACL */
259b35a28afSMark Brown #define WM8955_DACR                             0x0080  /* DACR */
260b35a28afSMark Brown #define WM8955_DACR_MASK                        0x0080  /* DACR */
261b35a28afSMark Brown #define WM8955_DACR_SHIFT                            7  /* DACR */
262b35a28afSMark Brown #define WM8955_DACR_WIDTH                            1  /* DACR */
263b35a28afSMark Brown #define WM8955_LOUT1                            0x0040  /* LOUT1 */
264b35a28afSMark Brown #define WM8955_LOUT1_MASK                       0x0040  /* LOUT1 */
265b35a28afSMark Brown #define WM8955_LOUT1_SHIFT                           6  /* LOUT1 */
266b35a28afSMark Brown #define WM8955_LOUT1_WIDTH                           1  /* LOUT1 */
267b35a28afSMark Brown #define WM8955_ROUT1                            0x0020  /* ROUT1 */
268b35a28afSMark Brown #define WM8955_ROUT1_MASK                       0x0020  /* ROUT1 */
269b35a28afSMark Brown #define WM8955_ROUT1_SHIFT                           5  /* ROUT1 */
270b35a28afSMark Brown #define WM8955_ROUT1_WIDTH                           1  /* ROUT1 */
271b35a28afSMark Brown #define WM8955_LOUT2                            0x0010  /* LOUT2 */
272b35a28afSMark Brown #define WM8955_LOUT2_MASK                       0x0010  /* LOUT2 */
273b35a28afSMark Brown #define WM8955_LOUT2_SHIFT                           4  /* LOUT2 */
274b35a28afSMark Brown #define WM8955_LOUT2_WIDTH                           1  /* LOUT2 */
275b35a28afSMark Brown #define WM8955_ROUT2                            0x0008  /* ROUT2 */
276b35a28afSMark Brown #define WM8955_ROUT2_MASK                       0x0008  /* ROUT2 */
277b35a28afSMark Brown #define WM8955_ROUT2_SHIFT                           3  /* ROUT2 */
278b35a28afSMark Brown #define WM8955_ROUT2_WIDTH                           1  /* ROUT2 */
279b35a28afSMark Brown #define WM8955_MONO                             0x0004  /* MONO */
280b35a28afSMark Brown #define WM8955_MONO_MASK                        0x0004  /* MONO */
281b35a28afSMark Brown #define WM8955_MONO_SHIFT                            2  /* MONO */
282b35a28afSMark Brown #define WM8955_MONO_WIDTH                            1  /* MONO */
283b35a28afSMark Brown #define WM8955_OUT3                             0x0002  /* OUT3 */
284b35a28afSMark Brown #define WM8955_OUT3_MASK                        0x0002  /* OUT3 */
285b35a28afSMark Brown #define WM8955_OUT3_SHIFT                            1  /* OUT3 */
286b35a28afSMark Brown #define WM8955_OUT3_WIDTH                            1  /* OUT3 */
287b35a28afSMark Brown 
288b35a28afSMark Brown /*
289b35a28afSMark Brown  * R27 (0x1B) - Additional Control (3)
290b35a28afSMark Brown  */
291b35a28afSMark Brown #define WM8955_VROI                             0x0040  /* VROI */
292b35a28afSMark Brown #define WM8955_VROI_MASK                        0x0040  /* VROI */
293b35a28afSMark Brown #define WM8955_VROI_SHIFT                            6  /* VROI */
294b35a28afSMark Brown #define WM8955_VROI_WIDTH                            1  /* VROI */
295b35a28afSMark Brown 
296b35a28afSMark Brown /*
297b35a28afSMark Brown  * R34 (0x22) - Left out Mix (1)
298b35a28afSMark Brown  */
299b35a28afSMark Brown #define WM8955_LD2LO                            0x0100  /* LD2LO */
300b35a28afSMark Brown #define WM8955_LD2LO_MASK                       0x0100  /* LD2LO */
301b35a28afSMark Brown #define WM8955_LD2LO_SHIFT                           8  /* LD2LO */
302b35a28afSMark Brown #define WM8955_LD2LO_WIDTH                           1  /* LD2LO */
303b35a28afSMark Brown #define WM8955_LI2LO                            0x0080  /* LI2LO */
304b35a28afSMark Brown #define WM8955_LI2LO_MASK                       0x0080  /* LI2LO */
305b35a28afSMark Brown #define WM8955_LI2LO_SHIFT                           7  /* LI2LO */
306b35a28afSMark Brown #define WM8955_LI2LO_WIDTH                           1  /* LI2LO */
307b35a28afSMark Brown #define WM8955_LI2LOVOL_MASK                    0x0070  /* LI2LOVOL - [6:4] */
308b35a28afSMark Brown #define WM8955_LI2LOVOL_SHIFT                        4  /* LI2LOVOL - [6:4] */
309b35a28afSMark Brown #define WM8955_LI2LOVOL_WIDTH                        3  /* LI2LOVOL - [6:4] */
310b35a28afSMark Brown 
311b35a28afSMark Brown /*
312b35a28afSMark Brown  * R35 (0x23) - Left out Mix (2)
313b35a28afSMark Brown  */
314b35a28afSMark Brown #define WM8955_RD2LO                            0x0100  /* RD2LO */
315b35a28afSMark Brown #define WM8955_RD2LO_MASK                       0x0100  /* RD2LO */
316b35a28afSMark Brown #define WM8955_RD2LO_SHIFT                           8  /* RD2LO */
317b35a28afSMark Brown #define WM8955_RD2LO_WIDTH                           1  /* RD2LO */
318b35a28afSMark Brown #define WM8955_RI2LO                            0x0080  /* RI2LO */
319b35a28afSMark Brown #define WM8955_RI2LO_MASK                       0x0080  /* RI2LO */
320b35a28afSMark Brown #define WM8955_RI2LO_SHIFT                           7  /* RI2LO */
321b35a28afSMark Brown #define WM8955_RI2LO_WIDTH                           1  /* RI2LO */
322b35a28afSMark Brown #define WM8955_RI2LOVOL_MASK                    0x0070  /* RI2LOVOL - [6:4] */
323b35a28afSMark Brown #define WM8955_RI2LOVOL_SHIFT                        4  /* RI2LOVOL - [6:4] */
324b35a28afSMark Brown #define WM8955_RI2LOVOL_WIDTH                        3  /* RI2LOVOL - [6:4] */
325b35a28afSMark Brown 
326b35a28afSMark Brown /*
327b35a28afSMark Brown  * R36 (0x24) - Right out Mix (1)
328b35a28afSMark Brown  */
329b35a28afSMark Brown #define WM8955_LD2RO                            0x0100  /* LD2RO */
330b35a28afSMark Brown #define WM8955_LD2RO_MASK                       0x0100  /* LD2RO */
331b35a28afSMark Brown #define WM8955_LD2RO_SHIFT                           8  /* LD2RO */
332b35a28afSMark Brown #define WM8955_LD2RO_WIDTH                           1  /* LD2RO */
333b35a28afSMark Brown #define WM8955_LI2RO                            0x0080  /* LI2RO */
334b35a28afSMark Brown #define WM8955_LI2RO_MASK                       0x0080  /* LI2RO */
335b35a28afSMark Brown #define WM8955_LI2RO_SHIFT                           7  /* LI2RO */
336b35a28afSMark Brown #define WM8955_LI2RO_WIDTH                           1  /* LI2RO */
337b35a28afSMark Brown #define WM8955_LI2ROVOL_MASK                    0x0070  /* LI2ROVOL - [6:4] */
338b35a28afSMark Brown #define WM8955_LI2ROVOL_SHIFT                        4  /* LI2ROVOL - [6:4] */
339b35a28afSMark Brown #define WM8955_LI2ROVOL_WIDTH                        3  /* LI2ROVOL - [6:4] */
340b35a28afSMark Brown 
341b35a28afSMark Brown /*
342b35a28afSMark Brown  * R37 (0x25) - Right Out Mix (2)
343b35a28afSMark Brown  */
344b35a28afSMark Brown #define WM8955_RD2RO                            0x0100  /* RD2RO */
345b35a28afSMark Brown #define WM8955_RD2RO_MASK                       0x0100  /* RD2RO */
346b35a28afSMark Brown #define WM8955_RD2RO_SHIFT                           8  /* RD2RO */
347b35a28afSMark Brown #define WM8955_RD2RO_WIDTH                           1  /* RD2RO */
348b35a28afSMark Brown #define WM8955_RI2RO                            0x0080  /* RI2RO */
349b35a28afSMark Brown #define WM8955_RI2RO_MASK                       0x0080  /* RI2RO */
350b35a28afSMark Brown #define WM8955_RI2RO_SHIFT                           7  /* RI2RO */
351b35a28afSMark Brown #define WM8955_RI2RO_WIDTH                           1  /* RI2RO */
352b35a28afSMark Brown #define WM8955_RI2ROVOL_MASK                    0x0070  /* RI2ROVOL - [6:4] */
353b35a28afSMark Brown #define WM8955_RI2ROVOL_SHIFT                        4  /* RI2ROVOL - [6:4] */
354b35a28afSMark Brown #define WM8955_RI2ROVOL_WIDTH                        3  /* RI2ROVOL - [6:4] */
355b35a28afSMark Brown 
356b35a28afSMark Brown /*
357b35a28afSMark Brown  * R38 (0x26) - Mono out Mix (1)
358b35a28afSMark Brown  */
359b35a28afSMark Brown #define WM8955_LD2MO                            0x0100  /* LD2MO */
360b35a28afSMark Brown #define WM8955_LD2MO_MASK                       0x0100  /* LD2MO */
361b35a28afSMark Brown #define WM8955_LD2MO_SHIFT                           8  /* LD2MO */
362b35a28afSMark Brown #define WM8955_LD2MO_WIDTH                           1  /* LD2MO */
363b35a28afSMark Brown #define WM8955_LI2MO                            0x0080  /* LI2MO */
364b35a28afSMark Brown #define WM8955_LI2MO_MASK                       0x0080  /* LI2MO */
365b35a28afSMark Brown #define WM8955_LI2MO_SHIFT                           7  /* LI2MO */
366b35a28afSMark Brown #define WM8955_LI2MO_WIDTH                           1  /* LI2MO */
367b35a28afSMark Brown #define WM8955_LI2MOVOL_MASK                    0x0070  /* LI2MOVOL - [6:4] */
368b35a28afSMark Brown #define WM8955_LI2MOVOL_SHIFT                        4  /* LI2MOVOL - [6:4] */
369b35a28afSMark Brown #define WM8955_LI2MOVOL_WIDTH                        3  /* LI2MOVOL - [6:4] */
370b35a28afSMark Brown #define WM8955_DMEN                             0x0001  /* DMEN */
371b35a28afSMark Brown #define WM8955_DMEN_MASK                        0x0001  /* DMEN */
372b35a28afSMark Brown #define WM8955_DMEN_SHIFT                            0  /* DMEN */
373b35a28afSMark Brown #define WM8955_DMEN_WIDTH                            1  /* DMEN */
374b35a28afSMark Brown 
375b35a28afSMark Brown /*
376b35a28afSMark Brown  * R39 (0x27) - Mono out Mix (2)
377b35a28afSMark Brown  */
378b35a28afSMark Brown #define WM8955_RD2MO                            0x0100  /* RD2MO */
379b35a28afSMark Brown #define WM8955_RD2MO_MASK                       0x0100  /* RD2MO */
380b35a28afSMark Brown #define WM8955_RD2MO_SHIFT                           8  /* RD2MO */
381b35a28afSMark Brown #define WM8955_RD2MO_WIDTH                           1  /* RD2MO */
382b35a28afSMark Brown #define WM8955_RI2MO                            0x0080  /* RI2MO */
383b35a28afSMark Brown #define WM8955_RI2MO_MASK                       0x0080  /* RI2MO */
384b35a28afSMark Brown #define WM8955_RI2MO_SHIFT                           7  /* RI2MO */
385b35a28afSMark Brown #define WM8955_RI2MO_WIDTH                           1  /* RI2MO */
386b35a28afSMark Brown #define WM8955_RI2MOVOL_MASK                    0x0070  /* RI2MOVOL - [6:4] */
387b35a28afSMark Brown #define WM8955_RI2MOVOL_SHIFT                        4  /* RI2MOVOL - [6:4] */
388b35a28afSMark Brown #define WM8955_RI2MOVOL_WIDTH                        3  /* RI2MOVOL - [6:4] */
389b35a28afSMark Brown 
390b35a28afSMark Brown /*
391b35a28afSMark Brown  * R40 (0x28) - LOUT2 volume
392b35a28afSMark Brown  */
393b35a28afSMark Brown #define WM8955_LO2VU                            0x0100  /* LO2VU */
394b35a28afSMark Brown #define WM8955_LO2VU_MASK                       0x0100  /* LO2VU */
395b35a28afSMark Brown #define WM8955_LO2VU_SHIFT                           8  /* LO2VU */
396b35a28afSMark Brown #define WM8955_LO2VU_WIDTH                           1  /* LO2VU */
397b35a28afSMark Brown #define WM8955_LO2ZC                            0x0080  /* LO2ZC */
398b35a28afSMark Brown #define WM8955_LO2ZC_MASK                       0x0080  /* LO2ZC */
399b35a28afSMark Brown #define WM8955_LO2ZC_SHIFT                           7  /* LO2ZC */
400b35a28afSMark Brown #define WM8955_LO2ZC_WIDTH                           1  /* LO2ZC */
401b35a28afSMark Brown #define WM8955_LOUT2VOL_MASK                    0x007F  /* LOUT2VOL - [6:0] */
402b35a28afSMark Brown #define WM8955_LOUT2VOL_SHIFT                        0  /* LOUT2VOL - [6:0] */
403b35a28afSMark Brown #define WM8955_LOUT2VOL_WIDTH                        7  /* LOUT2VOL - [6:0] */
404b35a28afSMark Brown 
405b35a28afSMark Brown /*
406b35a28afSMark Brown  * R41 (0x29) - ROUT2 volume
407b35a28afSMark Brown  */
408b35a28afSMark Brown #define WM8955_RO2VU                            0x0100  /* RO2VU */
409b35a28afSMark Brown #define WM8955_RO2VU_MASK                       0x0100  /* RO2VU */
410b35a28afSMark Brown #define WM8955_RO2VU_SHIFT                           8  /* RO2VU */
411b35a28afSMark Brown #define WM8955_RO2VU_WIDTH                           1  /* RO2VU */
412b35a28afSMark Brown #define WM8955_RO2ZC                            0x0080  /* RO2ZC */
413b35a28afSMark Brown #define WM8955_RO2ZC_MASK                       0x0080  /* RO2ZC */
414b35a28afSMark Brown #define WM8955_RO2ZC_SHIFT                           7  /* RO2ZC */
415b35a28afSMark Brown #define WM8955_RO2ZC_WIDTH                           1  /* RO2ZC */
416b35a28afSMark Brown #define WM8955_ROUT2VOL_MASK                    0x007F  /* ROUT2VOL - [6:0] */
417b35a28afSMark Brown #define WM8955_ROUT2VOL_SHIFT                        0  /* ROUT2VOL - [6:0] */
418b35a28afSMark Brown #define WM8955_ROUT2VOL_WIDTH                        7  /* ROUT2VOL - [6:0] */
419b35a28afSMark Brown 
420b35a28afSMark Brown /*
421b35a28afSMark Brown  * R42 (0x2A) - MONOOUT volume
422b35a28afSMark Brown  */
423b35a28afSMark Brown #define WM8955_MOZC                             0x0080  /* MOZC */
424b35a28afSMark Brown #define WM8955_MOZC_MASK                        0x0080  /* MOZC */
425b35a28afSMark Brown #define WM8955_MOZC_SHIFT                            7  /* MOZC */
426b35a28afSMark Brown #define WM8955_MOZC_WIDTH                            1  /* MOZC */
427b35a28afSMark Brown #define WM8955_MOUTVOL_MASK                     0x007F  /* MOUTVOL - [6:0] */
428b35a28afSMark Brown #define WM8955_MOUTVOL_SHIFT                         0  /* MOUTVOL - [6:0] */
429b35a28afSMark Brown #define WM8955_MOUTVOL_WIDTH                         7  /* MOUTVOL - [6:0] */
430b35a28afSMark Brown 
431b35a28afSMark Brown /*
432b35a28afSMark Brown  * R43 (0x2B) - Clocking / PLL
433b35a28afSMark Brown  */
434b35a28afSMark Brown #define WM8955_MCLKSEL                          0x0100  /* MCLKSEL */
435b35a28afSMark Brown #define WM8955_MCLKSEL_MASK                     0x0100  /* MCLKSEL */
436b35a28afSMark Brown #define WM8955_MCLKSEL_SHIFT                         8  /* MCLKSEL */
437b35a28afSMark Brown #define WM8955_MCLKSEL_WIDTH                         1  /* MCLKSEL */
438b35a28afSMark Brown #define WM8955_PLLOUTDIV2                       0x0020  /* PLLOUTDIV2 */
439b35a28afSMark Brown #define WM8955_PLLOUTDIV2_MASK                  0x0020  /* PLLOUTDIV2 */
440b35a28afSMark Brown #define WM8955_PLLOUTDIV2_SHIFT                      5  /* PLLOUTDIV2 */
441b35a28afSMark Brown #define WM8955_PLLOUTDIV2_WIDTH                      1  /* PLLOUTDIV2 */
442b35a28afSMark Brown #define WM8955_PLL_RB                           0x0010  /* PLL_RB */
443b35a28afSMark Brown #define WM8955_PLL_RB_MASK                      0x0010  /* PLL_RB */
444b35a28afSMark Brown #define WM8955_PLL_RB_SHIFT                          4  /* PLL_RB */
445b35a28afSMark Brown #define WM8955_PLL_RB_WIDTH                          1  /* PLL_RB */
446b35a28afSMark Brown #define WM8955_PLLEN                            0x0008  /* PLLEN */
447b35a28afSMark Brown #define WM8955_PLLEN_MASK                       0x0008  /* PLLEN */
448b35a28afSMark Brown #define WM8955_PLLEN_SHIFT                           3  /* PLLEN */
449b35a28afSMark Brown #define WM8955_PLLEN_WIDTH                           1  /* PLLEN */
450b35a28afSMark Brown 
451b35a28afSMark Brown /*
452b35a28afSMark Brown  * R44 (0x2C) - PLL Control 1
453b35a28afSMark Brown  */
454b35a28afSMark Brown #define WM8955_N_MASK                           0x01E0  /* N - [8:5] */
455b35a28afSMark Brown #define WM8955_N_SHIFT                               5  /* N - [8:5] */
456b35a28afSMark Brown #define WM8955_N_WIDTH                               4  /* N - [8:5] */
457b35a28afSMark Brown #define WM8955_K_21_18_MASK                     0x000F  /* K(21:18) - [3:0] */
458b35a28afSMark Brown #define WM8955_K_21_18_SHIFT                         0  /* K(21:18) - [3:0] */
459b35a28afSMark Brown #define WM8955_K_21_18_WIDTH                         4  /* K(21:18) - [3:0] */
460b35a28afSMark Brown 
461b35a28afSMark Brown /*
462b35a28afSMark Brown  * R45 (0x2D) - PLL Control 2
463b35a28afSMark Brown  */
464b35a28afSMark Brown #define WM8955_K_17_9_MASK                      0x01FF  /* K(17:9) - [8:0] */
465b35a28afSMark Brown #define WM8955_K_17_9_SHIFT                          0  /* K(17:9) - [8:0] */
466b35a28afSMark Brown #define WM8955_K_17_9_WIDTH                          9  /* K(17:9) - [8:0] */
467b35a28afSMark Brown 
468b35a28afSMark Brown /*
469b35a28afSMark Brown  * R46 (0x2E) - PLL Control 3
470b35a28afSMark Brown  */
471b35a28afSMark Brown #define WM8955_K_8_0_MASK                       0x01FF  /* K(8:0) - [8:0] */
472b35a28afSMark Brown #define WM8955_K_8_0_SHIFT                           0  /* K(8:0) - [8:0] */
473b35a28afSMark Brown #define WM8955_K_8_0_WIDTH                           9  /* K(8:0) - [8:0] */
474b35a28afSMark Brown 
475b35a28afSMark Brown /*
476b35a28afSMark Brown  * R59 (0x3B) - PLL Control 4
477b35a28afSMark Brown  */
478b35a28afSMark Brown #define WM8955_KEN                              0x0080  /* KEN */
479b35a28afSMark Brown #define WM8955_KEN_MASK                         0x0080  /* KEN */
480b35a28afSMark Brown #define WM8955_KEN_SHIFT                             7  /* KEN */
481b35a28afSMark Brown #define WM8955_KEN_WIDTH                             1  /* KEN */
482b35a28afSMark Brown 
483b35a28afSMark Brown #endif
484