xref: /linux/sound/soc/codecs/max98090.h (revision defcd98b16461e123cb4a6cb6ef24a1d0085c1b2)
1685e4215SJerry Wong /*
2685e4215SJerry Wong  * max98090.h -- MAX98090 ALSA SoC Audio driver
3685e4215SJerry Wong  *
4685e4215SJerry Wong  * Copyright 2011-2012 Maxim Integrated Products
5685e4215SJerry Wong  *
6685e4215SJerry Wong  * This program is free software; you can redistribute it and/or modify
7685e4215SJerry Wong  * it under the terms of the GNU General Public License version 2 as
8685e4215SJerry Wong  * published by the Free Software Foundation.
9685e4215SJerry Wong  */
10685e4215SJerry Wong 
11685e4215SJerry Wong #ifndef _MAX98090_H
12685e4215SJerry Wong #define _MAX98090_H
13685e4215SJerry Wong 
14685e4215SJerry Wong /*
15*defcd98bSDylan Reid  * The default operating frequency for a DMIC attached to the codec.
16*defcd98bSDylan Reid  * This can be overridden by a device tree property.
17*defcd98bSDylan Reid  */
18*defcd98bSDylan Reid #define MAX98090_DEFAULT_DMIC_FREQ		2500000
19*defcd98bSDylan Reid 
20*defcd98bSDylan Reid /*
21685e4215SJerry Wong  * MAX98090 Register Definitions
22685e4215SJerry Wong  */
23685e4215SJerry Wong 
24685e4215SJerry Wong #define M98090_REG_SOFTWARE_RESET		0x00
25685e4215SJerry Wong #define M98090_REG_DEVICE_STATUS		0x01
26685e4215SJerry Wong #define M98090_REG_JACK_STATUS			0x02
27685e4215SJerry Wong #define M98090_REG_INTERRUPT_S			0x03
28685e4215SJerry Wong #define M98090_REG_QUICK_SYSTEM_CLOCK		0x04
29685e4215SJerry Wong #define M98090_REG_QUICK_SAMPLE_RATE		0x05
30685e4215SJerry Wong #define M98090_REG_DAI_INTERFACE		0x06
31685e4215SJerry Wong #define M98090_REG_DAC_PATH			0x07
32685e4215SJerry Wong #define M98090_REG_MIC_DIRECT_TO_ADC		0x08
33685e4215SJerry Wong #define M98090_REG_LINE_TO_ADC			0x09
34685e4215SJerry Wong #define M98090_REG_ANALOG_MIC_LOOP		0x0A
35685e4215SJerry Wong #define M98090_REG_ANALOG_LINE_LOOP		0x0B
36685e4215SJerry Wong #define M98090_REG_RESERVED			0x0C
37685e4215SJerry Wong #define M98090_REG_LINE_INPUT_CONFIG		0x0D
38685e4215SJerry Wong #define M98090_REG_LINE_INPUT_LEVEL		0x0E
39685e4215SJerry Wong #define M98090_REG_INPUT_MODE			0x0F
40685e4215SJerry Wong #define M98090_REG_MIC1_INPUT_LEVEL		0x10
41685e4215SJerry Wong #define M98090_REG_MIC2_INPUT_LEVEL		0x11
42685e4215SJerry Wong #define M98090_REG_MIC_BIAS_VOLTAGE		0x12
43685e4215SJerry Wong #define M98090_REG_DIGITAL_MIC_ENABLE		0x13
44685e4215SJerry Wong #define M98090_REG_DIGITAL_MIC_CONFIG		0x14
45685e4215SJerry Wong #define M98090_REG_LEFT_ADC_MIXER		0x15
46685e4215SJerry Wong #define M98090_REG_RIGHT_ADC_MIXER		0x16
47685e4215SJerry Wong #define M98090_REG_LEFT_ADC_LEVEL		0x17
48685e4215SJerry Wong #define M98090_REG_RIGHT_ADC_LEVEL		0x18
49685e4215SJerry Wong #define M98090_REG_ADC_BIQUAD_LEVEL		0x19
50685e4215SJerry Wong #define M98090_REG_ADC_SIDETONE			0x1A
51685e4215SJerry Wong #define M98090_REG_SYSTEM_CLOCK			0x1B
52685e4215SJerry Wong #define M98090_REG_CLOCK_MODE			0x1C
53685e4215SJerry Wong #define M98090_REG_CLOCK_RATIO_NI_MSB		0x1D
54685e4215SJerry Wong #define M98090_REG_CLOCK_RATIO_NI_LSB		0x1E
55685e4215SJerry Wong #define M98090_REG_CLOCK_RATIO_MI_MSB		0x1F
56685e4215SJerry Wong #define M98090_REG_CLOCK_RATIO_MI_LSB		0x20
57685e4215SJerry Wong #define M98090_REG_MASTER_MODE			0x21
58685e4215SJerry Wong #define M98090_REG_INTERFACE_FORMAT		0x22
59685e4215SJerry Wong #define M98090_REG_TDM_CONTROL			0x23
60685e4215SJerry Wong #define M98090_REG_TDM_FORMAT			0x24
61685e4215SJerry Wong #define M98090_REG_IO_CONFIGURATION		0x25
62685e4215SJerry Wong #define M98090_REG_FILTER_CONFIG		0x26
63685e4215SJerry Wong #define M98090_REG_DAI_PLAYBACK_LEVEL		0x27
64685e4215SJerry Wong #define M98090_REG_DAI_PLAYBACK_LEVEL_EQ	0x28
65685e4215SJerry Wong #define M98090_REG_LEFT_HP_MIXER		0x29
66685e4215SJerry Wong #define M98090_REG_RIGHT_HP_MIXER		0x2A
67685e4215SJerry Wong #define M98090_REG_HP_CONTROL			0x2B
68685e4215SJerry Wong #define M98090_REG_LEFT_HP_VOLUME		0x2C
69685e4215SJerry Wong #define M98090_REG_RIGHT_HP_VOLUME		0x2D
70685e4215SJerry Wong #define M98090_REG_LEFT_SPK_MIXER		0x2E
71685e4215SJerry Wong #define M98090_REG_RIGHT_SPK_MIXER		0x2F
72685e4215SJerry Wong #define M98090_REG_SPK_CONTROL			0x30
73685e4215SJerry Wong #define M98090_REG_LEFT_SPK_VOLUME		0x31
74685e4215SJerry Wong #define M98090_REG_RIGHT_SPK_VOLUME		0x32
75685e4215SJerry Wong #define M98090_REG_DRC_TIMING			0x33
76685e4215SJerry Wong #define M98090_REG_DRC_COMPRESSOR		0x34
77685e4215SJerry Wong #define M98090_REG_DRC_EXPANDER			0x35
78685e4215SJerry Wong #define M98090_REG_DRC_GAIN			0x36
79685e4215SJerry Wong #define M98090_REG_RCV_LOUTL_MIXER		0x37
80685e4215SJerry Wong #define M98090_REG_RCV_LOUTL_CONTROL		0x38
81685e4215SJerry Wong #define M98090_REG_RCV_LOUTL_VOLUME		0x39
82685e4215SJerry Wong #define M98090_REG_LOUTR_MIXER			0x3A
83685e4215SJerry Wong #define M98090_REG_LOUTR_CONTROL		0x3B
84685e4215SJerry Wong #define M98090_REG_LOUTR_VOLUME			0x3C
85685e4215SJerry Wong #define M98090_REG_JACK_DETECT			0x3D
86685e4215SJerry Wong #define M98090_REG_INPUT_ENABLE			0x3E
87685e4215SJerry Wong #define M98090_REG_OUTPUT_ENABLE		0x3F
88685e4215SJerry Wong #define M98090_REG_LEVEL_CONTROL		0x40
89685e4215SJerry Wong #define M98090_REG_DSP_FILTER_ENABLE		0x41
90685e4215SJerry Wong #define M98090_REG_BIAS_CONTROL			0x42
91685e4215SJerry Wong #define M98090_REG_DAC_CONTROL			0x43
92685e4215SJerry Wong #define M98090_REG_ADC_CONTROL			0x44
93685e4215SJerry Wong #define M98090_REG_DEVICE_SHUTDOWN		0x45
94685e4215SJerry Wong #define M98090_REG_EQUALIZER_BASE		0x46
95685e4215SJerry Wong #define M98090_REG_RECORD_BIQUAD_BASE		0xAF
96685e4215SJerry Wong #define M98090_REG_DMIC3_VOLUME			0xBE
97685e4215SJerry Wong #define M98090_REG_DMIC4_VOLUME			0xBF
98685e4215SJerry Wong #define M98090_REG_DMIC34_BQ_PREATTEN		0xC0
99685e4215SJerry Wong #define M98090_REG_RECORD_TDM_SLOT		0xC1
100685e4215SJerry Wong #define M98090_REG_SAMPLE_RATE			0xC2
101685e4215SJerry Wong #define M98090_REG_DMIC34_BIQUAD_BASE		0xC3
102685e4215SJerry Wong #define M98090_REG_REVISION_ID			0xFF
103685e4215SJerry Wong 
104685e4215SJerry Wong #define M98090_REG_CNT				(0xFF+1)
105685e4215SJerry Wong #define MAX98090_MAX_REGISTER			0xFF
106685e4215SJerry Wong 
107685e4215SJerry Wong /* MAX98090 Register Bit Fields */
108685e4215SJerry Wong 
109685e4215SJerry Wong /*
110685e4215SJerry Wong  * M98090_REG_SOFTWARE_RESET
111685e4215SJerry Wong  */
112685e4215SJerry Wong #define M98090_SWRESET_MASK		(1<<7)
113685e4215SJerry Wong #define M98090_SWRESET_SHIFT		7
114685e4215SJerry Wong #define M98090_SWRESET_WIDTH		1
115685e4215SJerry Wong 
116685e4215SJerry Wong /*
117685e4215SJerry Wong  * M98090_REG_DEVICE_STATUS
118685e4215SJerry Wong  */
119685e4215SJerry Wong #define M98090_CLD_MASK			(1<<7)
120685e4215SJerry Wong #define M98090_CLD_SHIFT		7
121685e4215SJerry Wong #define M98090_CLD_WIDTH		1
122685e4215SJerry Wong #define M98090_SLD_MASK			(1<<6)
123685e4215SJerry Wong #define M98090_SLD_SHIFT		6
124685e4215SJerry Wong #define M98090_SLD_WIDTH		1
125685e4215SJerry Wong #define M98090_ULK_MASK			(1<<5)
126685e4215SJerry Wong #define M98090_ULK_SHIFT		5
127685e4215SJerry Wong #define M98090_ULK_WIDTH		1
128685e4215SJerry Wong #define M98090_JDET_MASK		(1<<2)
129685e4215SJerry Wong #define M98090_JDET_SHIFT		2
130685e4215SJerry Wong #define M98090_JDET_WIDTH		1
131685e4215SJerry Wong #define M98090_DRCACT_MASK		(1<<1)
132685e4215SJerry Wong #define M98090_DRCACT_SHIFT		1
133685e4215SJerry Wong #define M98090_DRCACT_WIDTH		1
134685e4215SJerry Wong #define M98090_DRCCLP_MASK		(1<<0)
135685e4215SJerry Wong #define M98090_DRCCLP_SHIFT		0
136685e4215SJerry Wong #define M98090_DRCCLP_WIDTH		1
137685e4215SJerry Wong 
138685e4215SJerry Wong /*
139685e4215SJerry Wong  * M98090_REG_JACK_STATUS
140685e4215SJerry Wong  */
141685e4215SJerry Wong #define M98090_LSNS_MASK		(1<<2)
142685e4215SJerry Wong #define M98090_LSNS_SHIFT		2
143685e4215SJerry Wong #define M98090_LSNS_WIDTH		1
144685e4215SJerry Wong #define M98090_JKSNS_MASK		(1<<1)
145685e4215SJerry Wong #define M98090_JKSNS_SHIFT		1
146685e4215SJerry Wong #define M98090_JKSNS_WIDTH		1
147685e4215SJerry Wong 
148685e4215SJerry Wong /*
149685e4215SJerry Wong  * M98090_REG_INTERRUPT_S
150685e4215SJerry Wong  */
151685e4215SJerry Wong #define M98090_ICLD_MASK		(1<<7)
152685e4215SJerry Wong #define M98090_ICLD_SHIFT		7
153685e4215SJerry Wong #define M98090_ICLD_WIDTH		1
154685e4215SJerry Wong #define M98090_ISLD_MASK		(1<<6)
155685e4215SJerry Wong #define M98090_ISLD_SHIFT		6
156685e4215SJerry Wong #define M98090_ISLD_WIDTH		1
157685e4215SJerry Wong #define M98090_IULK_MASK		(1<<5)
158685e4215SJerry Wong #define M98090_IULK_SHIFT		5
159685e4215SJerry Wong #define M98090_IULK_WIDTH		1
160685e4215SJerry Wong #define M98090_IJDET_MASK		(1<<2)
161685e4215SJerry Wong #define M98090_IJDET_SHIFT		2
162685e4215SJerry Wong #define M98090_IJDET_WIDTH		1
163685e4215SJerry Wong #define M98090_IDRCACT_MASK		(1<<1)
164685e4215SJerry Wong #define M98090_IDRCACT_SHIFT		1
165685e4215SJerry Wong #define M98090_IDRCACT_WIDTH		1
166685e4215SJerry Wong #define M98090_IDRCCLP_MASK		(1<<0)
167685e4215SJerry Wong #define M98090_IDRCCLP_SHIFT		0
168685e4215SJerry Wong #define M98090_IDRCCLP_WIDTH		1
169685e4215SJerry Wong 
170685e4215SJerry Wong /*
171685e4215SJerry Wong  * M98090_REG_QUICK_SYSTEM_CLOCK
172685e4215SJerry Wong  */
173685e4215SJerry Wong #define M98090_26M_MASK			(1<<7)
174685e4215SJerry Wong #define M98090_26M_SHIFT		7
175685e4215SJerry Wong #define M98090_26M_WIDTH		1
176685e4215SJerry Wong #define M98090_19P2M_MASK		(1<<6)
177685e4215SJerry Wong #define M98090_19P2M_SHIFT		6
178685e4215SJerry Wong #define M98090_19P2M_WIDTH		1
179685e4215SJerry Wong #define M98090_13M_MASK			(1<<5)
180685e4215SJerry Wong #define M98090_13M_SHIFT		5
181685e4215SJerry Wong #define M98090_13M_WIDTH		1
182685e4215SJerry Wong #define M98090_12P288M_MASK		(1<<4)
183685e4215SJerry Wong #define M98090_12P288M_SHIFT		4
184685e4215SJerry Wong #define M98090_12P288M_WIDTH		1
185685e4215SJerry Wong #define M98090_12M_MASK			(1<<3)
186685e4215SJerry Wong #define M98090_12M_SHIFT		3
187685e4215SJerry Wong #define M98090_12M_WIDTH		1
188685e4215SJerry Wong #define M98090_11P2896M_MASK		(1<<2)
189685e4215SJerry Wong #define M98090_11P2896M_SHIFT		2
190685e4215SJerry Wong #define M98090_11P2896M_WIDTH		1
191685e4215SJerry Wong #define M98090_256FS_MASK		(1<<0)
192685e4215SJerry Wong #define M98090_256FS_SHIFT		0
193685e4215SJerry Wong #define M98090_256FS_WIDTH		1
194685e4215SJerry Wong #define M98090_CLK_ALL_SHIFT		0
195685e4215SJerry Wong #define M98090_CLK_ALL_WIDTH		8
196685e4215SJerry Wong #define M98090_CLK_ALL_NUM		(1<<M98090_CLK_ALL_WIDTH)
197685e4215SJerry Wong 
198685e4215SJerry Wong /*
199685e4215SJerry Wong  * M98090_REG_QUICK_SAMPLE_RATE
200685e4215SJerry Wong  */
201685e4215SJerry Wong #define M98090_SR_96K_MASK		(1<<5)
202685e4215SJerry Wong #define M98090_SR_96K_SHIFT		5
203685e4215SJerry Wong #define M98090_SR_96K_WIDTH		1
204685e4215SJerry Wong #define M98090_SR_32K_MASK		(1<<4)
205685e4215SJerry Wong #define M98090_SR_32K_SHIFT		4
206685e4215SJerry Wong #define M98090_SR_32K_WIDTH		1
207685e4215SJerry Wong #define M98090_SR_48K_MASK		(1<<3)
208685e4215SJerry Wong #define M98090_SR_48K_SHIFT		3
209685e4215SJerry Wong #define M98090_SR_48K_WIDTH		1
210685e4215SJerry Wong #define M98090_SR_44K1_MASK		(1<<2)
211685e4215SJerry Wong #define M98090_SR_44K1_SHIFT		2
212685e4215SJerry Wong #define M98090_SR_44K1_WIDTH		1
213685e4215SJerry Wong #define M98090_SR_16K_MASK		(1<<1)
214685e4215SJerry Wong #define M98090_SR_16K_SHIFT		1
215685e4215SJerry Wong #define M98090_SR_16K_WIDTH		1
216685e4215SJerry Wong #define M98090_SR_8K_MASK		(1<<0)
217685e4215SJerry Wong #define M98090_SR_8K_SHIFT		0
218685e4215SJerry Wong #define M98090_SR_8K_WIDTH		1
219685e4215SJerry Wong #define M98090_SR_MASK			0x3F
220685e4215SJerry Wong #define M98090_SR_ALL_SHIFT		0
221685e4215SJerry Wong #define M98090_SR_ALL_WIDTH		8
222685e4215SJerry Wong #define M98090_SR_ALL_NUM		(1<<M98090_SR_ALL_WIDTH)
223685e4215SJerry Wong 
224685e4215SJerry Wong /*
225685e4215SJerry Wong  * M98090_REG_DAI_INTERFACE
226685e4215SJerry Wong  */
227685e4215SJerry Wong #define M98090_RJ_M_MASK		(1<<5)
228685e4215SJerry Wong #define M98090_RJ_M_SHIFT		5
229685e4215SJerry Wong #define M98090_RJ_M_WIDTH		1
230685e4215SJerry Wong #define M98090_RJ_S_MASK		(1<<4)
231685e4215SJerry Wong #define M98090_RJ_S_SHIFT		4
232685e4215SJerry Wong #define M98090_RJ_S_WIDTH		1
233685e4215SJerry Wong #define M98090_LJ_M_MASK		(1<<3)
234685e4215SJerry Wong #define M98090_LJ_M_SHIFT		3
235685e4215SJerry Wong #define M98090_LJ_M_WIDTH		1
236685e4215SJerry Wong #define M98090_LJ_S_MASK		(1<<2)
237685e4215SJerry Wong #define M98090_LJ_S_SHIFT		2
238685e4215SJerry Wong #define M98090_LJ_S_WIDTH		1
239685e4215SJerry Wong #define M98090_I2S_M_MASK		(1<<1)
240685e4215SJerry Wong #define M98090_I2S_M_SHIFT		1
241685e4215SJerry Wong #define M98090_I2S_M_WIDTH		1
242685e4215SJerry Wong #define M98090_I2S_S_MASK		(1<<0)
243685e4215SJerry Wong #define M98090_I2S_S_SHIFT		0
244685e4215SJerry Wong #define M98090_I2S_S_WIDTH		1
245685e4215SJerry Wong #define M98090_DAI_ALL_SHIFT		0
246685e4215SJerry Wong #define M98090_DAI_ALL_WIDTH		8
247685e4215SJerry Wong #define M98090_DAI_ALL_NUM		(1<<M98090_DAI_ALL_WIDTH)
248685e4215SJerry Wong 
249685e4215SJerry Wong /*
250685e4215SJerry Wong  * M98090_REG_DAC_PATH
251685e4215SJerry Wong  */
252685e4215SJerry Wong #define M98090_DIG2_HP_MASK		(1<<7)
253685e4215SJerry Wong #define M98090_DIG2_HP_SHIFT		7
254685e4215SJerry Wong #define M98090_DIG2_HP_WIDTH		1
255685e4215SJerry Wong #define M98090_DIG2_EAR_MASK		(1<<6)
256685e4215SJerry Wong #define M98090_DIG2_EAR_SHIFT		6
257685e4215SJerry Wong #define M98090_DIG2_EAR_WIDTH		1
258685e4215SJerry Wong #define M98090_DIG2_SPK_MASK		(1<<5)
259685e4215SJerry Wong #define M98090_DIG2_SPK_SHIFT		5
260685e4215SJerry Wong #define M98090_DIG2_SPK_WIDTH		1
261685e4215SJerry Wong #define M98090_DIG2_LOUT_MASK		(1<<4)
262685e4215SJerry Wong #define M98090_DIG2_LOUT_SHIFT		4
263685e4215SJerry Wong #define M98090_DIG2_LOUT_WIDTH		1
264685e4215SJerry Wong #define M98090_DIG2_ALL_SHIFT		0
265685e4215SJerry Wong #define M98090_DIG2_ALL_WIDTH		8
266685e4215SJerry Wong #define M98090_DIG2_ALL_NUM		(1<<M98090_DIG2_ALL_WIDTH)
267685e4215SJerry Wong 
268685e4215SJerry Wong /*
269685e4215SJerry Wong  * M98090_REG_MIC_DIRECT_TO_ADC
270685e4215SJerry Wong  */
271685e4215SJerry Wong #define M98090_IN12_MIC1_MASK		(1<<7)
272685e4215SJerry Wong #define M98090_IN12_MIC1_SHIFT		7
273685e4215SJerry Wong #define M98090_IN12_MIC1_WIDTH		1
274685e4215SJerry Wong #define M98090_IN34_MIC2_MASK		(1<<6)
275685e4215SJerry Wong #define M98090_IN34_MIC2_SHIFT		6
276685e4215SJerry Wong #define M98090_IN34_MIC2_WIDTH		1
277685e4215SJerry Wong #define M98090_IN56_MIC1_MASK		(1<<5)
278685e4215SJerry Wong #define M98090_IN56_MIC1_SHIFT		5
279685e4215SJerry Wong #define M98090_IN56_MIC1_WIDTH		1
280685e4215SJerry Wong #define M98090_IN56_MIC2_MASK		(1<<4)
281685e4215SJerry Wong #define M98090_IN56_MIC2_SHIFT		4
282685e4215SJerry Wong #define M98090_IN56_MIC2_WIDTH		1
283685e4215SJerry Wong #define M98090_IN12_DADC_MASK		(1<<3)
284685e4215SJerry Wong #define M98090_IN12_DADC_SHIFT		3
285685e4215SJerry Wong #define M98090_IN12_DADC_WIDTH		1
286685e4215SJerry Wong #define M98090_IN34_DADC_MASK		(1<<2)
287685e4215SJerry Wong #define M98090_IN34_DADC_SHIFT		2
288685e4215SJerry Wong #define M98090_IN34_DADC_WIDTH		1
289685e4215SJerry Wong #define M98090_IN56_DADC_MASK		(1<<1)
290685e4215SJerry Wong #define M98090_IN56_DADC_SHIFT		1
291685e4215SJerry Wong #define M98090_IN56_DADC_WIDTH		1
292685e4215SJerry Wong #define M98090_MIC_ALL_SHIFT		0
293685e4215SJerry Wong #define M98090_MIC_ALL_WIDTH		8
294685e4215SJerry Wong #define M98090_MIC_ALL_NUM		(1<<M98090_MIC_ALL_WIDTH)
295685e4215SJerry Wong 
296685e4215SJerry Wong /*
297685e4215SJerry Wong  * M98090_REG_LINE_TO_ADC
298685e4215SJerry Wong  */
299685e4215SJerry Wong #define M98090_IN12S_AB_MASK		(1<<7)
300685e4215SJerry Wong #define M98090_IN12S_AB_SHIFT		7
301685e4215SJerry Wong #define M98090_IN12S_AB_WIDTH		1
302685e4215SJerry Wong #define M98090_IN34S_AB_MASK		(1<<6)
303685e4215SJerry Wong #define M98090_IN34S_AB_SHIFT		6
304685e4215SJerry Wong #define M98090_IN34S_AB_WIDTH		1
305685e4215SJerry Wong #define M98090_IN56S_AB_MASK		(1<<5)
306685e4215SJerry Wong #define M98090_IN56S_AB_SHIFT		5
307685e4215SJerry Wong #define M98090_IN56S_AB_WIDTH		1
308685e4215SJerry Wong #define M98090_IN34D_A_MASK		(1<<4)
309685e4215SJerry Wong #define M98090_IN34D_A_SHIFT		4
310685e4215SJerry Wong #define M98090_IN34D_A_WIDTH		1
311685e4215SJerry Wong #define M98090_IN56D_B_MASK		(1<<3)
312685e4215SJerry Wong #define M98090_IN56D_B_SHIFT		3
313685e4215SJerry Wong #define M98090_IN56D_B_WIDTH		1
314685e4215SJerry Wong #define M98090_LINE_ALL_SHIFT		0
315685e4215SJerry Wong #define M98090_LINE_ALL_WIDTH		8
316685e4215SJerry Wong #define M98090_LINE_ALL_NUM		(1<<M98090_LINE_ALL_WIDTH)
317685e4215SJerry Wong 
318685e4215SJerry Wong /*
319685e4215SJerry Wong  * M98090_REG_ANALOG_MIC_LOOP
320685e4215SJerry Wong  */
321685e4215SJerry Wong #define M98090_IN12_M1HPL_MASK		(1<<7)
322685e4215SJerry Wong #define M98090_IN12_M1HPL_SHIFT		7
323685e4215SJerry Wong #define M98090_IN12_M1HPL_WIDTH		1
324685e4215SJerry Wong #define M98090_IN12_M1SPKL_MASK		(1<<6)
325685e4215SJerry Wong #define M98090_IN12_M1SPKL_SHIFT	6
326685e4215SJerry Wong #define M98090_IN12_M1SPKL_WIDTH	1
327685e4215SJerry Wong #define M98090_IN12_M1EAR_MASK		(1<<5)
328685e4215SJerry Wong #define M98090_IN12_M1EAR_SHIFT		5
329685e4215SJerry Wong #define M98090_IN12_M1EAR_WIDTH		1
330685e4215SJerry Wong #define M98090_IN12_M1LOUTL_MASK	(1<<4)
331685e4215SJerry Wong #define M98090_IN12_M1LOUTL_SHIFT	4
332685e4215SJerry Wong #define M98090_IN12_M1LOUTL_WIDTH	1
333685e4215SJerry Wong #define M98090_IN34_M2HPR_MASK		(1<<3)
334685e4215SJerry Wong #define M98090_IN34_M2HPR_SHIFT		3
335685e4215SJerry Wong #define M98090_IN34_M2HPR_WIDTH		1
336685e4215SJerry Wong #define M98090_IN34_M2SPKR_MASK		(1<<2)
337685e4215SJerry Wong #define M98090_IN34_M2SPKR_SHIFT	2
338685e4215SJerry Wong #define M98090_IN34_M2SPKR_WIDTH	1
339685e4215SJerry Wong #define M98090_IN34_M2EAR_MASK		(1<<1)
340685e4215SJerry Wong #define M98090_IN34_M2EAR_SHIFT		1
341685e4215SJerry Wong #define M98090_IN34_M2EAR_WIDTH		1
342685e4215SJerry Wong #define M98090_IN34_M2LOUTR_MASK	(1<<0)
343685e4215SJerry Wong #define M98090_IN34_M2LOUTR_SHIFT	0
344685e4215SJerry Wong #define M98090_IN34_M2LOUTR_WIDTH	1
345685e4215SJerry Wong #define M98090_AMIC_ALL_SHIFT		0
346685e4215SJerry Wong #define M98090_AMIC_ALL_WIDTH		8
347685e4215SJerry Wong #define M98090_AMIC_ALL_NUM		(1<<M98090_AMIC_ALL_WIDTH)
348685e4215SJerry Wong 
349685e4215SJerry Wong /*
350685e4215SJerry Wong  * M98090_REG_ANALOG_LINE_LOOP
351685e4215SJerry Wong  */
352685e4215SJerry Wong #define M98090_IN12S_ABHP_MASK		(1<<7)
353685e4215SJerry Wong #define M98090_IN12S_ABHP_SHIFT		7
354685e4215SJerry Wong #define M98090_IN12S_ABHP_WIDTH		1
355685e4215SJerry Wong #define M98090_IN34D_ASPKL_MASK		(1<<6)
356685e4215SJerry Wong #define M98090_IN34D_ASPKL_SHIFT	6
357685e4215SJerry Wong #define M98090_IN34D_ASPKL_WIDTH	1
358685e4215SJerry Wong #define M98090_IN34D_AEAR_MASK		(1<<5)
359685e4215SJerry Wong #define M98090_IN34D_AEAR_SHIFT		5
360685e4215SJerry Wong #define M98090_IN34D_AEAR_WIDTH		1
361685e4215SJerry Wong #define M98090_IN12S_ABLOUT_MASK	(1<<4)
362685e4215SJerry Wong #define M98090_IN12S_ABLOUT_SHIFT	4
363685e4215SJerry Wong #define M98090_IN12S_ABLOUT_WIDTH	1
364685e4215SJerry Wong #define M98090_IN34S_ABHP_MASK		(1<<3)
365685e4215SJerry Wong #define M98090_IN34S_ABHP_SHIFT		3
366685e4215SJerry Wong #define M98090_IN34S_ABHP_WIDTH		1
367685e4215SJerry Wong #define M98090_IN56D_BSPKR_MASK		(1<<2)
368685e4215SJerry Wong #define M98090_IN56D_BSPKR_SHIFT	2
369685e4215SJerry Wong #define M98090_IN56D_BSPKR_WIDTH	1
370685e4215SJerry Wong #define M98090_IN56D_BEAR_MASK		(1<<1)
371685e4215SJerry Wong #define M98090_IN56D_BEAR_SHIFT		1
372685e4215SJerry Wong #define M98090_IN56D_BEAR_WIDTH		1
373685e4215SJerry Wong #define M98090_IN34S_ABLOUT_MASK	(1<<0)
374685e4215SJerry Wong #define M98090_IN34S_ABLOUT_SHIFT	0
375685e4215SJerry Wong #define M98090_IN34S_ABLOUT_WIDTH	1
376685e4215SJerry Wong #define M98090_ALIN_ALL_SHIFT		0
377685e4215SJerry Wong #define M98090_ALIN_ALL_WIDTH		8
378685e4215SJerry Wong #define M98090_ALIN_ALL_NUM		(1<<M98090_ALIN_ALL_WIDTH)
379685e4215SJerry Wong 
380685e4215SJerry Wong /*
381685e4215SJerry Wong  * M98090_REG_RESERVED
382685e4215SJerry Wong  */
383685e4215SJerry Wong 
384685e4215SJerry Wong /*
385685e4215SJerry Wong  * M98090_REG_LINE_INPUT_CONFIG
386685e4215SJerry Wong  */
387685e4215SJerry Wong #define M98090_IN34DIFF_MASK		(1<<7)
388685e4215SJerry Wong #define M98090_IN34DIFF_SHIFT		7
389685e4215SJerry Wong #define M98090_IN34DIFF_WIDTH		1
390685e4215SJerry Wong #define M98090_IN56DIFF_MASK		(1<<6)
391685e4215SJerry Wong #define M98090_IN56DIFF_SHIFT		6
392685e4215SJerry Wong #define M98090_IN56DIFF_WIDTH		1
393685e4215SJerry Wong #define M98090_IN1SEEN_MASK		(1<<5)
394685e4215SJerry Wong #define M98090_IN1SEEN_SHIFT		5
395685e4215SJerry Wong #define M98090_IN1SEEN_WIDTH		1
396685e4215SJerry Wong #define M98090_IN2SEEN_MASK		(1<<4)
397685e4215SJerry Wong #define M98090_IN2SEEN_SHIFT		4
398685e4215SJerry Wong #define M98090_IN2SEEN_WIDTH		1
399685e4215SJerry Wong #define M98090_IN3SEEN_MASK		(1<<3)
400685e4215SJerry Wong #define M98090_IN3SEEN_SHIFT		3
401685e4215SJerry Wong #define M98090_IN3SEEN_WIDTH		1
402685e4215SJerry Wong #define M98090_IN4SEEN_MASK		(1<<2)
403685e4215SJerry Wong #define M98090_IN4SEEN_SHIFT		2
404685e4215SJerry Wong #define M98090_IN4SEEN_WIDTH		1
405685e4215SJerry Wong #define M98090_IN5SEEN_MASK		(1<<1)
406685e4215SJerry Wong #define M98090_IN5SEEN_SHIFT		1
407685e4215SJerry Wong #define M98090_IN5SEEN_WIDTH		1
408685e4215SJerry Wong #define M98090_IN6SEEN_MASK		(1<<0)
409685e4215SJerry Wong #define M98090_IN6SEEN_SHIFT		0
410685e4215SJerry Wong #define M98090_IN6SEEN_WIDTH		1
411685e4215SJerry Wong 
412685e4215SJerry Wong /*
413685e4215SJerry Wong  * M98090_REG_LINE_INPUT_LEVEL
414685e4215SJerry Wong  */
415685e4215SJerry Wong #define M98090_MIXG135_MASK		(1<<7)
416685e4215SJerry Wong #define M98090_MIXG135_SHIFT		7
417685e4215SJerry Wong #define M98090_MIXG135_WIDTH		1
418685e4215SJerry Wong #define M98090_MIXG135_NUM		(1<<M98090_MIXG135_WIDTH)
419685e4215SJerry Wong #define M98090_MIXG246_MASK		(1<<6)
420685e4215SJerry Wong #define M98090_MIXG246_SHIFT		6
421685e4215SJerry Wong #define M98090_MIXG246_WIDTH		1
422685e4215SJerry Wong #define M98090_MIXG246_NUM		(1<<M98090_MIXG246_WIDTH)
423685e4215SJerry Wong #define M98090_LINAPGA_MASK		(7<<3)
424685e4215SJerry Wong #define M98090_LINAPGA_SHIFT		3
425685e4215SJerry Wong #define M98090_LINAPGA_WIDTH		3
426685e4215SJerry Wong #define M98090_LINAPGA_NUM		6
427685e4215SJerry Wong #define M98090_LINBPGA_MASK		(7<<0)
428685e4215SJerry Wong #define M98090_LINBPGA_SHIFT		0
429685e4215SJerry Wong #define M98090_LINBPGA_WIDTH		3
430685e4215SJerry Wong #define M98090_LINBPGA_NUM		6
431685e4215SJerry Wong 
432685e4215SJerry Wong /*
433685e4215SJerry Wong  * M98090_REG_INPUT_MODE
434685e4215SJerry Wong  */
435685e4215SJerry Wong #define M98090_EXTBUFA_MASK		(1<<7)
436685e4215SJerry Wong #define M98090_EXTBUFA_SHIFT		7
437685e4215SJerry Wong #define M98090_EXTBUFA_WIDTH		1
438685e4215SJerry Wong #define M98090_EXTBUFA_NUM		(1<<M98090_EXTBUFA_WIDTH)
439685e4215SJerry Wong #define M98090_EXTBUFB_MASK		(1<<6)
440685e4215SJerry Wong #define M98090_EXTBUFB_SHIFT		6
441685e4215SJerry Wong #define M98090_EXTBUFB_WIDTH		1
442685e4215SJerry Wong #define M98090_EXTBUFB_NUM		(1<<M98090_EXTBUFB_WIDTH)
443685e4215SJerry Wong #define M98090_EXTMIC_MASK		(3<<0)
444685e4215SJerry Wong #define M98090_EXTMIC_SHIFT		0
445685e4215SJerry Wong #define M98090_EXTMIC1_SHIFT		0
446685e4215SJerry Wong #define M98090_EXTMIC2_SHIFT		1
447685e4215SJerry Wong #define M98090_EXTMIC_WIDTH		2
448685e4215SJerry Wong #define M98090_EXTMIC_NONE		(0<<0)
449685e4215SJerry Wong #define M98090_EXTMIC_MIC1		(1<<0)
450685e4215SJerry Wong #define M98090_EXTMIC_MIC2		(2<<0)
451685e4215SJerry Wong 
452685e4215SJerry Wong /*
453685e4215SJerry Wong  * M98090_REG_MIC1_INPUT_LEVEL
454685e4215SJerry Wong  */
455685e4215SJerry Wong #define M98090_MIC_PA1EN_MASK		(3<<5)
456685e4215SJerry Wong #define M98090_MIC_PA1EN_SHIFT		5
457685e4215SJerry Wong #define M98090_MIC_PA1EN_WIDTH		2
458685e4215SJerry Wong #define M98090_MIC_PA1EN_NUM		3
459685e4215SJerry Wong #define M98090_MIC_PGAM1_MASK		(31<<0)
460685e4215SJerry Wong #define M98090_MIC_PGAM1_SHIFT		0
461685e4215SJerry Wong #define M98090_MIC_PGAM1_WIDTH		5
462685e4215SJerry Wong #define M98090_MIC_PGAM1_NUM		21
463685e4215SJerry Wong 
464685e4215SJerry Wong /*
465685e4215SJerry Wong  * M98090_REG_MIC2_INPUT_LEVEL
466685e4215SJerry Wong  */
467685e4215SJerry Wong #define M98090_MIC_PA2EN_MASK		(3<<5)
468685e4215SJerry Wong #define M98090_MIC_PA2EN_SHIFT		5
469685e4215SJerry Wong #define M98090_MIC_PA2EN_WIDTH		2
470685e4215SJerry Wong #define M98090_MIC_PA2EN_NUM		3
471685e4215SJerry Wong #define M98090_MIC_PGAM2_MASK		(31<<0)
472685e4215SJerry Wong #define M98090_MIC_PGAM2_SHIFT		0
473685e4215SJerry Wong #define M98090_MIC_PGAM2_WIDTH		5
474685e4215SJerry Wong #define M98090_MIC_PGAM2_NUM		21
475685e4215SJerry Wong 
476685e4215SJerry Wong /*
477685e4215SJerry Wong  * M98090_REG_MIC_BIAS_VOLTAGE
478685e4215SJerry Wong  */
479685e4215SJerry Wong #define M98090_MBVSEL_MASK		(3<<0)
480685e4215SJerry Wong #define M98090_MBVSEL_SHIFT		0
481685e4215SJerry Wong #define M98090_MBVSEL_WIDTH		2
482685e4215SJerry Wong #define M98090_MBVSEL_2V8		(3<<0)
483685e4215SJerry Wong #define M98090_MBVSEL_2V55		(2<<0)
484685e4215SJerry Wong #define M98090_MBVSEL_2V4		(1<<0)
485685e4215SJerry Wong #define M98090_MBVSEL_2V2		(0<<0)
486685e4215SJerry Wong 
487685e4215SJerry Wong /*
488685e4215SJerry Wong  * M98090_REG_DIGITAL_MIC_ENABLE
489685e4215SJerry Wong  */
490685e4215SJerry Wong #define M98090_MICCLK_MASK		(7<<4)
491685e4215SJerry Wong #define M98090_MICCLK_SHIFT		4
492685e4215SJerry Wong #define M98090_MICCLK_WIDTH		3
493685e4215SJerry Wong #define M98090_DIGMIC4_MASK		(1<<3)
494685e4215SJerry Wong #define M98090_DIGMIC4_SHIFT		3
495685e4215SJerry Wong #define M98090_DIGMIC4_WIDTH		1
496685e4215SJerry Wong #define M98090_DIGMIC4_NUM		(1<<M98090_DIGMIC4_WIDTH)
497685e4215SJerry Wong #define M98090_DIGMIC3_MASK		(1<<2)
498685e4215SJerry Wong #define M98090_DIGMIC3_SHIFT		2
499685e4215SJerry Wong #define M98090_DIGMIC3_WIDTH		1
500685e4215SJerry Wong #define M98090_DIGMIC3_NUM		(1<<M98090_DIGMIC3_WIDTH)
501685e4215SJerry Wong #define M98090_DIGMICR_MASK		(1<<1)
502685e4215SJerry Wong #define M98090_DIGMICR_SHIFT		1
503685e4215SJerry Wong #define M98090_DIGMICR_WIDTH		1
504685e4215SJerry Wong #define M98090_DIGMICR_NUM		(1<<M98090_DIGMICR_WIDTH)
505685e4215SJerry Wong #define M98090_DIGMICL_MASK		(1<<0)
506685e4215SJerry Wong #define M98090_DIGMICL_SHIFT		0
507685e4215SJerry Wong #define M98090_DIGMICL_WIDTH		1
508685e4215SJerry Wong #define M98090_DIGMICL_NUM		(1<<M98090_DIGMICL_WIDTH)
509685e4215SJerry Wong 
510685e4215SJerry Wong /*
511685e4215SJerry Wong  * M98090_REG_DIGITAL_MIC_CONFIG
512685e4215SJerry Wong  */
513685e4215SJerry Wong #define M98090_DMIC_COMP_MASK		(15<<4)
514685e4215SJerry Wong #define M98090_DMIC_COMP_SHIFT		4
515685e4215SJerry Wong #define M98090_DMIC_COMP_WIDTH		4
516685e4215SJerry Wong #define M98090_DMIC_COMP_NUM		(1<<M98090_DMIC_COMP_WIDTH)
517685e4215SJerry Wong #define M98090_DMIC_FREQ_MASK		(3<<0)
518685e4215SJerry Wong #define M98090_DMIC_FREQ_SHIFT		0
519685e4215SJerry Wong #define M98090_DMIC_FREQ_WIDTH		2
520685e4215SJerry Wong 
521685e4215SJerry Wong /*
522685e4215SJerry Wong  * M98090_REG_LEFT_ADC_MIXER
523685e4215SJerry Wong  */
524685e4215SJerry Wong #define M98090_MIXADL_MIC2_MASK		(1<<6)
525685e4215SJerry Wong #define M98090_MIXADL_MIC2_SHIFT	6
526685e4215SJerry Wong #define M98090_MIXADL_MIC2_WIDTH	1
527685e4215SJerry Wong #define M98090_MIXADL_MIC1_MASK		(1<<5)
528685e4215SJerry Wong #define M98090_MIXADL_MIC1_SHIFT	5
529685e4215SJerry Wong #define M98090_MIXADL_MIC1_WIDTH	1
530685e4215SJerry Wong #define M98090_MIXADL_LINEB_MASK	(1<<4)
531685e4215SJerry Wong #define M98090_MIXADL_LINEB_SHIFT	4
532685e4215SJerry Wong #define M98090_MIXADL_LINEB_WIDTH	1
533685e4215SJerry Wong #define M98090_MIXADL_LINEA_MASK	(1<<3)
534685e4215SJerry Wong #define M98090_MIXADL_LINEA_SHIFT	3
535685e4215SJerry Wong #define M98090_MIXADL_LINEA_WIDTH	1
536685e4215SJerry Wong #define M98090_MIXADL_IN65DIFF_MASK	(1<<2)
537685e4215SJerry Wong #define M98090_MIXADL_IN65DIFF_SHIFT	2
538685e4215SJerry Wong #define M98090_MIXADL_IN65DIFF_WIDTH	1
539685e4215SJerry Wong #define M98090_MIXADL_IN34DIFF_MASK	(1<<1)
540685e4215SJerry Wong #define M98090_MIXADL_IN34DIFF_SHIFT	1
541685e4215SJerry Wong #define M98090_MIXADL_IN34DIFF_WIDTH	1
542685e4215SJerry Wong #define M98090_MIXADL_IN12DIFF_MASK	(1<<0)
543685e4215SJerry Wong #define M98090_MIXADL_IN12DIFF_SHIFT	0
544685e4215SJerry Wong #define M98090_MIXADL_IN12DIFF_WIDTH	1
545685e4215SJerry Wong #define M98090_MIXADL_MASK		(255<<0)
546685e4215SJerry Wong #define M98090_MIXADL_SHIFT		0
547685e4215SJerry Wong #define M98090_MIXADL_WIDTH		8
548685e4215SJerry Wong 
549685e4215SJerry Wong /*
550685e4215SJerry Wong  * M98090_REG_RIGHT_ADC_MIXER
551685e4215SJerry Wong  */
552685e4215SJerry Wong #define M98090_MIXADR_MIC2_MASK		(1<<6)
553685e4215SJerry Wong #define M98090_MIXADR_MIC2_SHIFT	6
554685e4215SJerry Wong #define M98090_MIXADR_MIC2_WIDTH	1
555685e4215SJerry Wong #define M98090_MIXADR_MIC1_MASK		(1<<5)
556685e4215SJerry Wong #define M98090_MIXADR_MIC1_SHIFT	5
557685e4215SJerry Wong #define M98090_MIXADR_MIC1_WIDTH	1
558685e4215SJerry Wong #define M98090_MIXADR_LINEB_MASK	(1<<4)
559685e4215SJerry Wong #define M98090_MIXADR_LINEB_SHIFT	4
560685e4215SJerry Wong #define M98090_MIXADR_LINEB_WIDTH	1
561685e4215SJerry Wong #define M98090_MIXADR_LINEA_MASK	(1<<3)
562685e4215SJerry Wong #define M98090_MIXADR_LINEA_SHIFT	3
563685e4215SJerry Wong #define M98090_MIXADR_LINEA_WIDTH	1
564685e4215SJerry Wong #define M98090_MIXADR_IN65DIFF_MASK	(1<<2)
565685e4215SJerry Wong #define M98090_MIXADR_IN65DIFF_SHIFT	2
566685e4215SJerry Wong #define M98090_MIXADR_IN65DIFF_WIDTH	1
567685e4215SJerry Wong #define M98090_MIXADR_IN34DIFF_MASK	(1<<1)
568685e4215SJerry Wong #define M98090_MIXADR_IN34DIFF_SHIFT	1
569685e4215SJerry Wong #define M98090_MIXADR_IN34DIFF_WIDTH	1
570685e4215SJerry Wong #define M98090_MIXADR_IN12DIFF_MASK	(1<<0)
571685e4215SJerry Wong #define M98090_MIXADR_IN12DIFF_SHIFT	0
572685e4215SJerry Wong #define M98090_MIXADR_IN12DIFF_WIDTH	1
573685e4215SJerry Wong #define M98090_MIXADR_MASK		(255<<0)
574685e4215SJerry Wong #define M98090_MIXADR_SHIFT		0
575685e4215SJerry Wong #define M98090_MIXADR_WIDTH		8
576685e4215SJerry Wong 
577685e4215SJerry Wong /*
578685e4215SJerry Wong  * M98090_REG_LEFT_ADC_LEVEL
579685e4215SJerry Wong  */
580685e4215SJerry Wong #define M98090_AVLG_MASK		(7<<4)
581685e4215SJerry Wong #define M98090_AVLG_SHIFT		4
582685e4215SJerry Wong #define M98090_AVLG_WIDTH		3
583685e4215SJerry Wong #define M98090_AVLG_NUM			(1<<M98090_AVLG_WIDTH)
584685e4215SJerry Wong #define M98090_AVL_MASK			(15<<0)
585685e4215SJerry Wong #define M98090_AVL_SHIFT		0
586685e4215SJerry Wong #define M98090_AVL_WIDTH		4
587685e4215SJerry Wong #define M98090_AVL_NUM			(1<<M98090_AVL_WIDTH)
588685e4215SJerry Wong 
589685e4215SJerry Wong /*
590685e4215SJerry Wong  * M98090_REG_RIGHT_ADC_LEVEL
591685e4215SJerry Wong  */
592685e4215SJerry Wong #define M98090_AVRG_MASK		(7<<4)
593685e4215SJerry Wong #define M98090_AVRG_SHIFT		4
594685e4215SJerry Wong #define M98090_AVRG_WIDTH		3
595685e4215SJerry Wong #define M98090_AVRG_NUM			(1<<M98090_AVRG_WIDTH)
596685e4215SJerry Wong #define M98090_AVR_MASK			(15<<0)
597685e4215SJerry Wong #define M98090_AVR_SHIFT		0
598685e4215SJerry Wong #define M98090_AVR_WIDTH		4
599685e4215SJerry Wong #define M98090_AVR_NUM			(1<<M98090_AVR_WIDTH)
600685e4215SJerry Wong 
601685e4215SJerry Wong /*
602685e4215SJerry Wong  * M98090_REG_ADC_BIQUAD_LEVEL
603685e4215SJerry Wong  */
604685e4215SJerry Wong #define M98090_AVBQ_MASK		(15<<0)
605685e4215SJerry Wong #define M98090_AVBQ_SHIFT		0
606685e4215SJerry Wong #define M98090_AVBQ_WIDTH		4
607685e4215SJerry Wong #define M98090_AVBQ_NUM			(1<<M98090_AVBQ_WIDTH)
608685e4215SJerry Wong 
609685e4215SJerry Wong /*
610685e4215SJerry Wong  * M98090_REG_ADC_SIDETONE
611685e4215SJerry Wong  */
612685e4215SJerry Wong #define M98090_DSTSR_MASK		(1<<7)
613685e4215SJerry Wong #define M98090_DSTSR_SHIFT		7
614685e4215SJerry Wong #define M98090_DSTSR_WIDTH		1
615685e4215SJerry Wong #define M98090_DSTSL_MASK		(1<<6)
616685e4215SJerry Wong #define M98090_DSTSL_SHIFT		6
617685e4215SJerry Wong #define M98090_DSTSL_WIDTH		1
618685e4215SJerry Wong #define M98090_DVST_MASK		(31<<0)
619685e4215SJerry Wong #define M98090_DVST_SHIFT		0
620685e4215SJerry Wong #define M98090_DVST_WIDTH		5
621685e4215SJerry Wong #define M98090_DVST_NUM			31
622685e4215SJerry Wong 
623685e4215SJerry Wong /*
624685e4215SJerry Wong  * M98090_REG_SYSTEM_CLOCK
625685e4215SJerry Wong  */
626685e4215SJerry Wong #define M98090_PSCLK_MASK		(3<<4)
627685e4215SJerry Wong #define M98090_PSCLK_SHIFT		4
628685e4215SJerry Wong #define M98090_PSCLK_WIDTH		2
629685e4215SJerry Wong #define M98090_PSCLK_DISABLED		(0<<4)
630685e4215SJerry Wong #define M98090_PSCLK_DIV1		(1<<4)
631685e4215SJerry Wong #define M98090_PSCLK_DIV2		(2<<4)
632685e4215SJerry Wong #define M98090_PSCLK_DIV4		(3<<4)
633685e4215SJerry Wong 
634685e4215SJerry Wong /*
635685e4215SJerry Wong  * M98090_REG_CLOCK_MODE
636685e4215SJerry Wong  */
637685e4215SJerry Wong #define M98090_FREQ_MASK		(15<<4)
638685e4215SJerry Wong #define M98090_FREQ_SHIFT		4
639685e4215SJerry Wong #define M98090_FREQ_WIDTH		4
640685e4215SJerry Wong #define M98090_USE_M1_MASK		(1<<0)
641685e4215SJerry Wong #define M98090_USE_M1_SHIFT		0
642685e4215SJerry Wong #define M98090_USE_M1_WIDTH		1
643685e4215SJerry Wong #define M98090_USE_M1_NUM		(1<<M98090_USE_M1_WIDTH)
644685e4215SJerry Wong 
645685e4215SJerry Wong /*
646685e4215SJerry Wong  * M98090_REG_CLOCK_RATIO_NI_MSB
647685e4215SJerry Wong  */
648685e4215SJerry Wong #define M98090_NI_HI_MASK		(127<<0)
649685e4215SJerry Wong #define M98090_NI_HI_SHIFT		0
650685e4215SJerry Wong #define M98090_NI_HI_WIDTH		7
651685e4215SJerry Wong #define M98090_NI_HI_NUM		(1<<M98090_NI_HI_WIDTH)
652685e4215SJerry Wong 
653685e4215SJerry Wong /*
654685e4215SJerry Wong  * M98090_REG_CLOCK_RATIO_NI_LSB
655685e4215SJerry Wong  */
656685e4215SJerry Wong #define M98090_NI_LO_MASK		(255<<0)
657685e4215SJerry Wong #define M98090_NI_LO_SHIFT		0
658685e4215SJerry Wong #define M98090_NI_LO_WIDTH		8
659685e4215SJerry Wong #define M98090_NI_LO_NUM		(1<<M98090_NI_LO_WIDTH)
660685e4215SJerry Wong 
661685e4215SJerry Wong /*
662685e4215SJerry Wong  * M98090_REG_CLOCK_RATIO_MI_MSB
663685e4215SJerry Wong  */
664685e4215SJerry Wong #define M98090_MI_HI_MASK		(255<<0)
665685e4215SJerry Wong #define M98090_MI_HI_SHIFT		0
666685e4215SJerry Wong #define M98090_MI_HI_WIDTH		8
667685e4215SJerry Wong #define M98090_MI_HI_NUM		(1<<M98090_MI_HI_WIDTH)
668685e4215SJerry Wong 
669685e4215SJerry Wong /*
670685e4215SJerry Wong  * M98090_REG_CLOCK_RATIO_MI_LSB
671685e4215SJerry Wong  */
672685e4215SJerry Wong #define M98090_MI_LO_MASK		(255<<0)
673685e4215SJerry Wong #define M98090_MI_LO_SHIFT		0
674685e4215SJerry Wong #define M98090_MI_LO_WIDTH		8
675685e4215SJerry Wong #define M98090_MI_LO_NUM		(1<<M98090_MI_LO_WIDTH)
676685e4215SJerry Wong 
677685e4215SJerry Wong /*
678685e4215SJerry Wong  * M98090_REG_MASTER_MODE
679685e4215SJerry Wong  */
680685e4215SJerry Wong #define M98090_MAS_MASK			(1<<7)
681685e4215SJerry Wong #define M98090_MAS_SHIFT		7
682685e4215SJerry Wong #define M98090_MAS_WIDTH		1
683685e4215SJerry Wong #define M98090_BSEL_MASK		(1<<0)
684685e4215SJerry Wong #define M98090_BSEL_SHIFT		0
685685e4215SJerry Wong #define M98090_BSEL_WIDTH		1
686685e4215SJerry Wong #define M98090_BSEL_32			(1<<0)
687685e4215SJerry Wong #define M98090_BSEL_48			(2<<0)
688685e4215SJerry Wong #define M98090_BSEL_64			(3<<0)
689685e4215SJerry Wong 
690685e4215SJerry Wong /*
691685e4215SJerry Wong  * M98090_REG_INTERFACE_FORMAT
692685e4215SJerry Wong  */
693685e4215SJerry Wong #define M98090_RJ_MASK			(1<<5)
694685e4215SJerry Wong #define M98090_RJ_SHIFT			5
695685e4215SJerry Wong #define M98090_RJ_WIDTH			1
696685e4215SJerry Wong #define M98090_WCI_MASK			(1<<4)
697685e4215SJerry Wong #define M98090_WCI_SHIFT		4
698685e4215SJerry Wong #define M98090_WCI_WIDTH		1
699685e4215SJerry Wong #define M98090_BCI_MASK			(1<<3)
700685e4215SJerry Wong #define M98090_BCI_SHIFT		3
701685e4215SJerry Wong #define M98090_BCI_WIDTH		1
702685e4215SJerry Wong #define M98090_DLY_MASK			(1<<2)
703685e4215SJerry Wong #define M98090_DLY_SHIFT		2
704685e4215SJerry Wong #define M98090_DLY_WIDTH		1
705685e4215SJerry Wong #define M98090_WS_MASK			(3<<0)
706685e4215SJerry Wong #define M98090_WS_SHIFT			0
707685e4215SJerry Wong #define M98090_WS_WIDTH			2
708685e4215SJerry Wong #define M98090_WS_NUM			(1<<M98090_WS_WIDTH)
709685e4215SJerry Wong 
710685e4215SJerry Wong /*
711685e4215SJerry Wong  * M98090_REG_TDM_CONTROL
712685e4215SJerry Wong  */
713685e4215SJerry Wong #define M98090_FSW_MASK			(1<<1)
714685e4215SJerry Wong #define M98090_FSW_SHIFT		1
715685e4215SJerry Wong #define M98090_FSW_WIDTH		1
716685e4215SJerry Wong #define M98090_TDM_MASK			(1<<0)
717685e4215SJerry Wong #define M98090_TDM_SHIFT		0
718685e4215SJerry Wong #define M98090_TDM_WIDTH		1
719685e4215SJerry Wong #define M98090_TDM_NUM			(1<<M98090_TDM_WIDTH)
720685e4215SJerry Wong 
721685e4215SJerry Wong /*
722685e4215SJerry Wong  * M98090_REG_TDM_FORMAT
723685e4215SJerry Wong  */
724685e4215SJerry Wong #define M98090_TDM_SLOTL_MASK		(3<<6)
725685e4215SJerry Wong #define M98090_TDM_SLOTL_SHIFT		6
726685e4215SJerry Wong #define M98090_TDM_SLOTL_WIDTH		2
727685e4215SJerry Wong #define M98090_TDM_SLOTL_NUM		(1<<M98090_TDM_SLOTL_WIDTH)
728685e4215SJerry Wong #define M98090_TDM_SLOTR_MASK		(3<<4)
729685e4215SJerry Wong #define M98090_TDM_SLOTR_SHIFT		4
730685e4215SJerry Wong #define M98090_TDM_SLOTR_WIDTH		2
731685e4215SJerry Wong #define M98090_TDM_SLOTR_NUM		(1<<M98090_TDM_SLOTR_WIDTH)
732685e4215SJerry Wong #define M98090_TDM_SLOTDLY_MASK		(15<<0)
733685e4215SJerry Wong #define M98090_TDM_SLOTDLY_SHIFT	0
734685e4215SJerry Wong #define M98090_TDM_SLOTDLY_WIDTH	4
735685e4215SJerry Wong #define M98090_TDM_SLOTDLY_NUM		(1<<M98090_TDM_SLOTDLY_WIDTH)
736685e4215SJerry Wong 
737685e4215SJerry Wong /*
738685e4215SJerry Wong  * M98090_REG_IO_CONFIGURATION
739685e4215SJerry Wong  */
740685e4215SJerry Wong #define M98090_LTEN_MASK		(1<<5)
741685e4215SJerry Wong #define M98090_LTEN_SHIFT		5
742685e4215SJerry Wong #define M98090_LTEN_WIDTH		1
743685e4215SJerry Wong #define M98090_LTEN_NUM			(1<<M98090_LTEN_WIDTH)
744685e4215SJerry Wong #define M98090_LBEN_MASK		(1<<4)
745685e4215SJerry Wong #define M98090_LBEN_SHIFT		4
746685e4215SJerry Wong #define M98090_LBEN_WIDTH		1
747685e4215SJerry Wong #define M98090_LBEN_NUM			(1<<M98090_LBEN_WIDTH)
748685e4215SJerry Wong #define M98090_DMONO_MASK		(1<<3)
749685e4215SJerry Wong #define M98090_DMONO_SHIFT		3
750685e4215SJerry Wong #define M98090_DMONO_WIDTH		1
751685e4215SJerry Wong #define M98090_DMONO_NUM		(1<<M98090_DMONO_WIDTH)
752685e4215SJerry Wong #define M98090_HIZOFF_MASK		(1<<2)
753685e4215SJerry Wong #define M98090_HIZOFF_SHIFT		2
754685e4215SJerry Wong #define M98090_HIZOFF_WIDTH		1
755685e4215SJerry Wong #define M98090_HIZOFF_NUM		(1<<M98090_HIZOFF_WIDTH)
756685e4215SJerry Wong #define M98090_SDOEN_MASK		(1<<1)
757685e4215SJerry Wong #define M98090_SDOEN_SHIFT		1
758685e4215SJerry Wong #define M98090_SDOEN_WIDTH		1
759685e4215SJerry Wong #define M98090_SDOEN_NUM		(1<<M98090_SDOEN_WIDTH)
760685e4215SJerry Wong #define M98090_SDIEN_MASK		(1<<0)
761685e4215SJerry Wong #define M98090_SDIEN_SHIFT		0
762685e4215SJerry Wong #define M98090_SDIEN_WIDTH		1
763685e4215SJerry Wong #define M98090_SDIEN_NUM		(1<<M98090_SDIEN_WIDTH)
764685e4215SJerry Wong 
765685e4215SJerry Wong /*
766685e4215SJerry Wong  * M98090_REG_FILTER_CONFIG
767685e4215SJerry Wong  */
768685e4215SJerry Wong #define M98090_MODE_MASK		(1<<7)
769685e4215SJerry Wong #define M98090_MODE_SHIFT		7
770685e4215SJerry Wong #define M98090_MODE_WIDTH		1
771685e4215SJerry Wong #define M98090_AHPF_MASK		(1<<6)
772685e4215SJerry Wong #define M98090_AHPF_SHIFT		6
773685e4215SJerry Wong #define M98090_AHPF_WIDTH		1
774685e4215SJerry Wong #define M98090_AHPF_NUM			(1<<M98090_AHPF_WIDTH)
775685e4215SJerry Wong #define M98090_DHPF_MASK		(1<<5)
776685e4215SJerry Wong #define M98090_DHPF_SHIFT		5
777685e4215SJerry Wong #define M98090_DHPF_WIDTH		1
778685e4215SJerry Wong #define M98090_DHPF_NUM			(1<<M98090_DHPF_WIDTH)
779685e4215SJerry Wong #define M98090_DHF_MASK			(1<<4)
780685e4215SJerry Wong #define M98090_DHF_SHIFT		4
781685e4215SJerry Wong #define M98090_DHF_WIDTH		1
782685e4215SJerry Wong #define M98090_FLT_DMIC34MODE_MASK	(1<<3)
783685e4215SJerry Wong #define M98090_FLT_DMIC34MODE_SHIFT	3
784685e4215SJerry Wong #define M98090_FLT_DMIC34MODE_WIDTH	1
785685e4215SJerry Wong #define M98090_FLT_DMIC34HPF_MASK	(1<<2)
786685e4215SJerry Wong #define M98090_FLT_DMIC34HPF_SHIFT	2
787685e4215SJerry Wong #define M98090_FLT_DMIC34HPF_WIDTH	1
788685e4215SJerry Wong #define M98090_FLT_DMIC34HPF_NUM	(1<<M98090_FLT_DMIC34HPF_WIDTH)
789685e4215SJerry Wong 
790685e4215SJerry Wong /*
791685e4215SJerry Wong  * M98090_REG_DAI_PLAYBACK_LEVEL
792685e4215SJerry Wong  */
793685e4215SJerry Wong #define M98090_DVM_MASK			(1<<7)
794685e4215SJerry Wong #define M98090_DVM_SHIFT		7
795685e4215SJerry Wong #define M98090_DVM_WIDTH		1
796685e4215SJerry Wong #define M98090_DVG_MASK			(3<<4)
797685e4215SJerry Wong #define M98090_DVG_SHIFT		4
798685e4215SJerry Wong #define M98090_DVG_WIDTH		2
799685e4215SJerry Wong #define M98090_DVG_NUM			(1<<M98090_DVG_WIDTH)
800685e4215SJerry Wong #define M98090_DV_MASK			(15<<0)
801685e4215SJerry Wong #define M98090_DV_SHIFT			0
802685e4215SJerry Wong #define M98090_DV_WIDTH			4
803685e4215SJerry Wong #define M98090_DV_NUM			(1<<M98090_DV_WIDTH)
804685e4215SJerry Wong 
805685e4215SJerry Wong /*
806685e4215SJerry Wong  * M98090_REG_DAI_PLAYBACK_LEVEL_EQ
807685e4215SJerry Wong  */
808685e4215SJerry Wong #define M98090_EQCLPN_MASK		(1<<4)
809685e4215SJerry Wong #define M98090_EQCLPN_SHIFT		4
810685e4215SJerry Wong #define M98090_EQCLPN_WIDTH		1
811685e4215SJerry Wong #define M98090_EQCLPN_NUM		(1<<M98090_EQCLPN_WIDTH)
812685e4215SJerry Wong #define M98090_DVEQ_MASK		(15<<0)
813685e4215SJerry Wong #define M98090_DVEQ_SHIFT		0
814685e4215SJerry Wong #define M98090_DVEQ_WIDTH		4
815685e4215SJerry Wong #define M98090_DVEQ_NUM			(1<<M98090_DVEQ_WIDTH)
816685e4215SJerry Wong 
817685e4215SJerry Wong /*
818685e4215SJerry Wong  * M98090_REG_LEFT_HP_MIXER
819685e4215SJerry Wong  */
820685e4215SJerry Wong #define M98090_MIXHPL_MIC2_MASK		(1<<5)
821685e4215SJerry Wong #define M98090_MIXHPL_MIC2_SHIFT	5
822685e4215SJerry Wong #define M98090_MIXHPL_MIC2_WIDTH	1
823685e4215SJerry Wong #define M98090_MIXHPL_MIC1_MASK		(1<<4)
824685e4215SJerry Wong #define M98090_MIXHPL_MIC1_SHIFT	4
825685e4215SJerry Wong #define M98090_MIXHPL_MIC1_WIDTH	1
826685e4215SJerry Wong #define M98090_MIXHPL_LINEB_MASK	(1<<3)
827685e4215SJerry Wong #define M98090_MIXHPL_LINEB_SHIFT	3
828685e4215SJerry Wong #define M98090_MIXHPL_LINEB_WIDTH	1
829685e4215SJerry Wong #define M98090_MIXHPL_LINEA_MASK	(1<<2)
830685e4215SJerry Wong #define M98090_MIXHPL_LINEA_SHIFT	2
831685e4215SJerry Wong #define M98090_MIXHPL_LINEA_WIDTH	1
832685e4215SJerry Wong #define M98090_MIXHPL_DACR_MASK		(1<<1)
833685e4215SJerry Wong #define M98090_MIXHPL_DACR_SHIFT	1
834685e4215SJerry Wong #define M98090_MIXHPL_DACR_WIDTH	1
835685e4215SJerry Wong #define M98090_MIXHPL_DACL_MASK		(1<<0)
836685e4215SJerry Wong #define M98090_MIXHPL_DACL_SHIFT	0
837685e4215SJerry Wong #define M98090_MIXHPL_DACL_WIDTH	1
838685e4215SJerry Wong #define M98090_MIXHPL_MASK		(63<<0)
839685e4215SJerry Wong #define M98090_MIXHPL_SHIFT		0
840685e4215SJerry Wong #define M98090_MIXHPL_WIDTH		6
841685e4215SJerry Wong 
842685e4215SJerry Wong /*
843685e4215SJerry Wong  * M98090_REG_RIGHT_HP_MIXER
844685e4215SJerry Wong  */
845685e4215SJerry Wong #define M98090_MIXHPR_MIC2_MASK		(1<<5)
846685e4215SJerry Wong #define M98090_MIXHPR_MIC2_SHIFT	5
847685e4215SJerry Wong #define M98090_MIXHPR_MIC2_WIDTH	1
848685e4215SJerry Wong #define M98090_MIXHPR_MIC1_MASK		(1<<4)
849685e4215SJerry Wong #define M98090_MIXHPR_MIC1_SHIFT	4
850685e4215SJerry Wong #define M98090_MIXHPR_MIC1_WIDTH	1
851685e4215SJerry Wong #define M98090_MIXHPR_LINEB_MASK	(1<<3)
852685e4215SJerry Wong #define M98090_MIXHPR_LINEB_SHIFT	3
853685e4215SJerry Wong #define M98090_MIXHPR_LINEB_WIDTH	1
854685e4215SJerry Wong #define M98090_MIXHPR_LINEA_MASK	(1<<2)
855685e4215SJerry Wong #define M98090_MIXHPR_LINEA_SHIFT	2
856685e4215SJerry Wong #define M98090_MIXHPR_LINEA_WIDTH	1
857685e4215SJerry Wong #define M98090_MIXHPR_DACR_MASK		(1<<1)
858685e4215SJerry Wong #define M98090_MIXHPR_DACR_SHIFT	1
859685e4215SJerry Wong #define M98090_MIXHPR_DACR_WIDTH	1
860685e4215SJerry Wong #define M98090_MIXHPR_DACL_MASK		(1<<0)
861685e4215SJerry Wong #define M98090_MIXHPR_DACL_SHIFT	0
862685e4215SJerry Wong #define M98090_MIXHPR_DACL_WIDTH	1
863685e4215SJerry Wong #define M98090_MIXHPR_MASK		(63<<0)
864685e4215SJerry Wong #define M98090_MIXHPR_SHIFT		0
865685e4215SJerry Wong #define M98090_MIXHPR_WIDTH		6
866685e4215SJerry Wong 
867685e4215SJerry Wong /*
868685e4215SJerry Wong  * M98090_REG_HP_CONTROL
869685e4215SJerry Wong  */
870685e4215SJerry Wong #define M98090_MIXHPRSEL_MASK		(1<<5)
871685e4215SJerry Wong #define M98090_MIXHPRSEL_SHIFT		5
872685e4215SJerry Wong #define M98090_MIXHPRSEL_WIDTH		1
873685e4215SJerry Wong #define M98090_MIXHPLSEL_MASK		(1<<4)
874685e4215SJerry Wong #define M98090_MIXHPLSEL_SHIFT		4
875685e4215SJerry Wong #define M98090_MIXHPLSEL_WIDTH		1
876685e4215SJerry Wong #define M98090_MIXHPRG_MASK		(3<<2)
877685e4215SJerry Wong #define M98090_MIXHPRG_SHIFT		2
878685e4215SJerry Wong #define M98090_MIXHPRG_WIDTH		2
879685e4215SJerry Wong #define M98090_MIXHPRG_NUM		(1<<M98090_MIXHPRG_WIDTH)
880685e4215SJerry Wong #define M98090_MIXHPLG_MASK		(3<<0)
881685e4215SJerry Wong #define M98090_MIXHPLG_SHIFT		0
882685e4215SJerry Wong #define M98090_MIXHPLG_WIDTH		2
883685e4215SJerry Wong #define M98090_MIXHPLG_NUM		(1<<M98090_MIXHPLG_WIDTH)
884685e4215SJerry Wong 
885685e4215SJerry Wong /*
886685e4215SJerry Wong  * M98090_REG_LEFT_HP_VOLUME
887685e4215SJerry Wong  */
888685e4215SJerry Wong #define M98090_HPLM_MASK		(1<<7)
889685e4215SJerry Wong #define M98090_HPLM_SHIFT		7
890685e4215SJerry Wong #define M98090_HPLM_WIDTH		1
891685e4215SJerry Wong #define M98090_HPVOLL_MASK		(31<<0)
892685e4215SJerry Wong #define M98090_HPVOLL_SHIFT		0
893685e4215SJerry Wong #define M98090_HPVOLL_WIDTH		5
894685e4215SJerry Wong #define M98090_HPVOLL_NUM		(1<<M98090_HPVOLL_WIDTH)
895685e4215SJerry Wong 
896685e4215SJerry Wong /*
897685e4215SJerry Wong  * M98090_REG_RIGHT_HP_VOLUME
898685e4215SJerry Wong  */
899685e4215SJerry Wong #define M98090_HPRM_MASK		(1<<7)
900685e4215SJerry Wong #define M98090_HPRM_SHIFT		7
901685e4215SJerry Wong #define M98090_HPRM_WIDTH		1
902685e4215SJerry Wong #define M98090_HPVOLR_MASK		(31<<0)
903685e4215SJerry Wong #define M98090_HPVOLR_SHIFT		0
904685e4215SJerry Wong #define M98090_HPVOLR_WIDTH		5
905685e4215SJerry Wong #define M98090_HPVOLR_NUM		(1<<M98090_HPVOLR_WIDTH)
906685e4215SJerry Wong 
907685e4215SJerry Wong /*
908685e4215SJerry Wong  * M98090_REG_LEFT_SPK_MIXER
909685e4215SJerry Wong  */
910685e4215SJerry Wong #define M98090_MIXSPL_MIC2_MASK		(1<<5)
911685e4215SJerry Wong #define M98090_MIXSPL_MIC2_SHIFT	5
912685e4215SJerry Wong #define M98090_MIXSPL_MIC2_WIDTH	1
913685e4215SJerry Wong #define M98090_MIXSPL_MIC1_MASK		(1<<4)
914685e4215SJerry Wong #define M98090_MIXSPL_MIC1_SHIFT	4
915685e4215SJerry Wong #define M98090_MIXSPL_MIC1_WIDTH	1
916685e4215SJerry Wong #define M98090_MIXSPL_LINEB_MASK	(1<<3)
917685e4215SJerry Wong #define M98090_MIXSPL_LINEB_SHIFT	3
918685e4215SJerry Wong #define M98090_MIXSPL_LINEB_WIDTH	1
919685e4215SJerry Wong #define M98090_MIXSPL_LINEA_MASK	(1<<2)
920685e4215SJerry Wong #define M98090_MIXSPL_LINEA_SHIFT	2
921685e4215SJerry Wong #define M98090_MIXSPL_LINEA_WIDTH	1
922685e4215SJerry Wong #define M98090_MIXSPL_DACR_MASK		(1<<1)
923685e4215SJerry Wong #define M98090_MIXSPL_DACR_SHIFT	1
924685e4215SJerry Wong #define M98090_MIXSPL_DACR_WIDTH	1
925685e4215SJerry Wong #define M98090_MIXSPL_DACL_MASK		(1<<0)
926685e4215SJerry Wong #define M98090_MIXSPL_DACL_SHIFT	0
927685e4215SJerry Wong #define M98090_MIXSPL_DACL_WIDTH	1
928685e4215SJerry Wong #define M98090_MIXSPL_MASK		(63<<0)
929685e4215SJerry Wong #define M98090_MIXSPL_SHIFT		0
930685e4215SJerry Wong #define M98090_MIXSPL_WIDTH		6
931685e4215SJerry Wong #define M98090_MIXSPR_DACR_MASK		(1<<1)
932685e4215SJerry Wong #define M98090_MIXSPR_DACR_SHIFT	1
933685e4215SJerry Wong #define M98090_MIXSPR_DACR_WIDTH	1
934685e4215SJerry Wong 
935685e4215SJerry Wong 
936685e4215SJerry Wong /*
937685e4215SJerry Wong  * M98090_REG_RIGHT_SPK_MIXER
938685e4215SJerry Wong  */
939685e4215SJerry Wong #define M98090_SPK_SLAVE_MASK		(1<<6)
940685e4215SJerry Wong #define M98090_SPK_SLAVE_SHIFT		6
941685e4215SJerry Wong #define M98090_SPK_SLAVE_WIDTH		1
942685e4215SJerry Wong #define M98090_MIXSPR_MIC2_MASK		(1<<5)
943685e4215SJerry Wong #define M98090_MIXSPR_MIC2_SHIFT	5
944685e4215SJerry Wong #define M98090_MIXSPR_MIC2_WIDTH	1
945685e4215SJerry Wong #define M98090_MIXSPR_MIC1_MASK		(1<<4)
946685e4215SJerry Wong #define M98090_MIXSPR_MIC1_SHIFT	4
947685e4215SJerry Wong #define M98090_MIXSPR_MIC1_WIDTH	1
948685e4215SJerry Wong #define M98090_MIXSPR_LINEB_MASK	(1<<3)
949685e4215SJerry Wong #define M98090_MIXSPR_LINEB_SHIFT	3
950685e4215SJerry Wong #define M98090_MIXSPR_LINEB_WIDTH	1
951685e4215SJerry Wong #define M98090_MIXSPR_LINEA_MASK	(1<<2)
952685e4215SJerry Wong #define M98090_MIXSPR_LINEA_SHIFT	2
953685e4215SJerry Wong #define M98090_MIXSPR_LINEA_WIDTH	1
954685e4215SJerry Wong #define M98090_MIXSPR_DACR_MASK		(1<<1)
955685e4215SJerry Wong #define M98090_MIXSPR_DACR_SHIFT	1
956685e4215SJerry Wong #define M98090_MIXSPR_DACR_WIDTH	1
957685e4215SJerry Wong #define M98090_MIXSPR_DACL_MASK		(1<<0)
958685e4215SJerry Wong #define M98090_MIXSPR_DACL_SHIFT	0
959685e4215SJerry Wong #define M98090_MIXSPR_DACL_WIDTH	1
960685e4215SJerry Wong #define M98090_MIXSPR_MASK		(63<<0)
961685e4215SJerry Wong #define M98090_MIXSPR_SHIFT		0
962685e4215SJerry Wong #define M98090_MIXSPR_WIDTH		6
963685e4215SJerry Wong 
964685e4215SJerry Wong /*
965685e4215SJerry Wong  * M98090_REG_SPK_CONTROL
966685e4215SJerry Wong  */
967685e4215SJerry Wong #define M98090_MIXSPRG_MASK		(3<<2)
968685e4215SJerry Wong #define M98090_MIXSPRG_SHIFT		2
969685e4215SJerry Wong #define M98090_MIXSPRG_WIDTH		2
970685e4215SJerry Wong #define M98090_MIXSPRG_NUM		(1<<M98090_MIXSPRG_WIDTH)
971685e4215SJerry Wong #define M98090_MIXSPLG_MASK		(3<<0)
972685e4215SJerry Wong #define M98090_MIXSPLG_SHIFT		0
973685e4215SJerry Wong #define M98090_MIXSPLG_WIDTH		2
974685e4215SJerry Wong #define M98090_MIXSPLG_NUM		(1<<M98090_MIXSPLG_WIDTH)
975685e4215SJerry Wong 
976685e4215SJerry Wong /*
977685e4215SJerry Wong  * M98090_REG_LEFT_SPK_VOLUME
978685e4215SJerry Wong  */
979685e4215SJerry Wong #define M98090_SPLM_MASK		(1<<7)
980685e4215SJerry Wong #define M98090_SPLM_SHIFT		7
981685e4215SJerry Wong #define M98090_SPLM_WIDTH		1
982685e4215SJerry Wong #define M98090_SPVOLL_MASK		(63<<0)
983685e4215SJerry Wong #define M98090_SPVOLL_SHIFT		0
984685e4215SJerry Wong #define M98090_SPVOLL_WIDTH		6
985685e4215SJerry Wong #define M98090_SPVOLL_NUM		40
986685e4215SJerry Wong 
987685e4215SJerry Wong /*
988685e4215SJerry Wong  * M98090_REG_RIGHT_SPK_VOLUME
989685e4215SJerry Wong  */
990685e4215SJerry Wong #define M98090_SPRM_MASK		(1<<7)
991685e4215SJerry Wong #define M98090_SPRM_SHIFT		7
992685e4215SJerry Wong #define M98090_SPRM_WIDTH		1
993685e4215SJerry Wong #define M98090_SPVOLR_MASK		(63<<0)
994685e4215SJerry Wong #define M98090_SPVOLR_SHIFT		0
995685e4215SJerry Wong #define M98090_SPVOLR_WIDTH		6
996685e4215SJerry Wong #define M98090_SPVOLR_NUM		40
997685e4215SJerry Wong 
998685e4215SJerry Wong /*
999685e4215SJerry Wong  * M98090_REG_DRC_TIMING
1000685e4215SJerry Wong  */
1001685e4215SJerry Wong #define M98090_DRCEN_MASK		(1<<7)
1002685e4215SJerry Wong #define M98090_DRCEN_SHIFT		7
1003685e4215SJerry Wong #define M98090_DRCEN_WIDTH		1
1004685e4215SJerry Wong #define M98090_DRCEN_NUM		(1<<M98090_DRCEN_WIDTH)
1005685e4215SJerry Wong #define M98090_DRCRLS_MASK		(7<<4)
1006685e4215SJerry Wong #define M98090_DRCRLS_SHIFT		4
1007685e4215SJerry Wong #define M98090_DRCRLS_WIDTH		3
1008685e4215SJerry Wong #define M98090_DRCATK_MASK		(7<<0)
1009685e4215SJerry Wong #define M98090_DRCATK_SHIFT		0
1010685e4215SJerry Wong #define M98090_DRCATK_WIDTH		3
1011685e4215SJerry Wong 
1012685e4215SJerry Wong /*
1013685e4215SJerry Wong  * M98090_REG_DRC_COMPRESSOR
1014685e4215SJerry Wong  */
1015685e4215SJerry Wong #define M98090_DRCCMP_MASK		(7<<5)
1016685e4215SJerry Wong #define M98090_DRCCMP_SHIFT		5
1017685e4215SJerry Wong #define M98090_DRCCMP_WIDTH		3
1018685e4215SJerry Wong #define M98090_DRCTHC_MASK		(31<<0)
1019685e4215SJerry Wong #define M98090_DRCTHC_SHIFT		0
1020685e4215SJerry Wong #define M98090_DRCTHC_WIDTH		5
1021685e4215SJerry Wong #define M98090_DRCTHC_NUM		(1<<M98090_DRCTHC_WIDTH)
1022685e4215SJerry Wong 
1023685e4215SJerry Wong /*
1024685e4215SJerry Wong  * M98090_REG_DRC_EXPANDER
1025685e4215SJerry Wong  */
1026685e4215SJerry Wong #define M98090_DRCEXP_MASK		(7<<5)
1027685e4215SJerry Wong #define M98090_DRCEXP_SHIFT		5
1028685e4215SJerry Wong #define M98090_DRCEXP_WIDTH		3
1029685e4215SJerry Wong #define M98090_DRCTHE_MASK		(31<<0)
1030685e4215SJerry Wong #define M98090_DRCTHE_SHIFT		0
1031685e4215SJerry Wong #define M98090_DRCTHE_WIDTH		5
1032685e4215SJerry Wong #define M98090_DRCTHE_NUM		(1<<M98090_DRCTHE_WIDTH)
1033685e4215SJerry Wong 
1034685e4215SJerry Wong /*
1035685e4215SJerry Wong  * M98090_REG_DRC_GAIN
1036685e4215SJerry Wong  */
1037685e4215SJerry Wong #define M98090_DRCG_MASK		(31<<0)
1038685e4215SJerry Wong #define M98090_DRCG_SHIFT		0
1039685e4215SJerry Wong #define M98090_DRCG_WIDTH		5
1040685e4215SJerry Wong #define M98090_DRCG_NUM			13
1041685e4215SJerry Wong 
1042685e4215SJerry Wong /*
1043685e4215SJerry Wong  * M98090_REG_RCV_LOUTL_MIXER
1044685e4215SJerry Wong  */
1045685e4215SJerry Wong #define M98090_MIXRCVL_MIC2_MASK	(1<<5)
1046685e4215SJerry Wong #define M98090_MIXRCVL_MIC2_SHIFT	5
1047685e4215SJerry Wong #define M98090_MIXRCVL_MIC2_WIDTH	1
1048685e4215SJerry Wong #define M98090_MIXRCVL_MIC1_MASK	(1<<4)
1049685e4215SJerry Wong #define M98090_MIXRCVL_MIC1_SHIFT	4
1050685e4215SJerry Wong #define M98090_MIXRCVL_MIC1_WIDTH	1
1051685e4215SJerry Wong #define M98090_MIXRCVL_LINEB_MASK	(1<<3)
1052685e4215SJerry Wong #define M98090_MIXRCVL_LINEB_SHIFT	3
1053685e4215SJerry Wong #define M98090_MIXRCVL_LINEB_WIDTH	1
1054685e4215SJerry Wong #define M98090_MIXRCVL_LINEA_MASK	(1<<2)
1055685e4215SJerry Wong #define M98090_MIXRCVL_LINEA_SHIFT	2
1056685e4215SJerry Wong #define M98090_MIXRCVL_LINEA_WIDTH	1
1057685e4215SJerry Wong #define M98090_MIXRCVL_DACR_MASK	(1<<1)
1058685e4215SJerry Wong #define M98090_MIXRCVL_DACR_SHIFT	1
1059685e4215SJerry Wong #define M98090_MIXRCVL_DACR_WIDTH	1
1060685e4215SJerry Wong #define M98090_MIXRCVL_DACL_MASK	(1<<0)
1061685e4215SJerry Wong #define M98090_MIXRCVL_DACL_SHIFT	0
1062685e4215SJerry Wong #define M98090_MIXRCVL_DACL_WIDTH	1
1063685e4215SJerry Wong #define M98090_MIXRCVL_MASK		(63<<0)
1064685e4215SJerry Wong #define M98090_MIXRCVL_SHIFT		0
1065685e4215SJerry Wong #define M98090_MIXRCVL_WIDTH		6
1066685e4215SJerry Wong 
1067685e4215SJerry Wong /*
1068685e4215SJerry Wong  * M98090_REG_RCV_LOUTL_CONTROL
1069685e4215SJerry Wong  */
1070685e4215SJerry Wong #define M98090_MIXRCVLG_MASK		(3<<0)
1071685e4215SJerry Wong #define M98090_MIXRCVLG_SHIFT		0
1072685e4215SJerry Wong #define M98090_MIXRCVLG_WIDTH		2
1073685e4215SJerry Wong #define M98090_MIXRCVLG_NUM		(1<<M98090_MIXRCVLG_WIDTH)
1074685e4215SJerry Wong 
1075685e4215SJerry Wong /*
1076685e4215SJerry Wong  * M98090_REG_RCV_LOUTL_VOLUME
1077685e4215SJerry Wong  */
1078685e4215SJerry Wong #define M98090_RCVLM_MASK		(1<<7)
1079685e4215SJerry Wong #define M98090_RCVLM_SHIFT		7
1080685e4215SJerry Wong #define M98090_RCVLM_WIDTH		1
1081685e4215SJerry Wong #define M98090_RCVLVOL_MASK		(31<<0)
1082685e4215SJerry Wong #define M98090_RCVLVOL_SHIFT		0
1083685e4215SJerry Wong #define M98090_RCVLVOL_WIDTH		5
1084685e4215SJerry Wong #define M98090_RCVLVOL_NUM		(1<<M98090_RCVLVOL_WIDTH)
1085685e4215SJerry Wong 
1086685e4215SJerry Wong /*
1087685e4215SJerry Wong  * M98090_REG_LOUTR_MIXER
1088685e4215SJerry Wong  */
1089685e4215SJerry Wong #define M98090_LINMOD_MASK		(1<<7)
1090685e4215SJerry Wong #define M98090_LINMOD_SHIFT		7
1091685e4215SJerry Wong #define M98090_LINMOD_WIDTH		1
1092685e4215SJerry Wong #define M98090_MIXRCVR_MIC2_MASK	(1<<5)
1093685e4215SJerry Wong #define M98090_MIXRCVR_MIC2_SHIFT	5
1094685e4215SJerry Wong #define M98090_MIXRCVR_MIC2_WIDTH	1
1095685e4215SJerry Wong #define M98090_MIXRCVR_MIC1_MASK	(1<<4)
1096685e4215SJerry Wong #define M98090_MIXRCVR_MIC1_SHIFT	4
1097685e4215SJerry Wong #define M98090_MIXRCVR_MIC1_WIDTH	1
1098685e4215SJerry Wong #define M98090_MIXRCVR_LINEB_MASK	(1<<3)
1099685e4215SJerry Wong #define M98090_MIXRCVR_LINEB_SHIFT	3
1100685e4215SJerry Wong #define M98090_MIXRCVR_LINEB_WIDTH	1
1101685e4215SJerry Wong #define M98090_MIXRCVR_LINEA_MASK	(1<<2)
1102685e4215SJerry Wong #define M98090_MIXRCVR_LINEA_SHIFT	2
1103685e4215SJerry Wong #define M98090_MIXRCVR_LINEA_WIDTH	1
1104685e4215SJerry Wong #define M98090_MIXRCVR_DACR_MASK	(1<<1)
1105685e4215SJerry Wong #define M98090_MIXRCVR_DACR_SHIFT	1
1106685e4215SJerry Wong #define M98090_MIXRCVR_DACR_WIDTH	1
1107685e4215SJerry Wong #define M98090_MIXRCVR_DACL_MASK	(1<<0)
1108685e4215SJerry Wong #define M98090_MIXRCVR_DACL_SHIFT	0
1109685e4215SJerry Wong #define M98090_MIXRCVR_DACL_WIDTH	1
1110685e4215SJerry Wong #define M98090_MIXRCVR_MASK		(63<<0)
1111685e4215SJerry Wong #define M98090_MIXRCVR_SHIFT		0
1112685e4215SJerry Wong #define M98090_MIXRCVR_WIDTH		6
1113685e4215SJerry Wong 
1114685e4215SJerry Wong /*
1115685e4215SJerry Wong  * M98090_REG_LOUTR_CONTROL
1116685e4215SJerry Wong  */
1117685e4215SJerry Wong #define M98090_MIXRCVRG_MASK		(3<<0)
1118685e4215SJerry Wong #define M98090_MIXRCVRG_SHIFT		0
1119685e4215SJerry Wong #define M98090_MIXRCVRG_WIDTH		2
1120685e4215SJerry Wong #define M98090_MIXRCVRG_NUM		(1<<M98090_MIXRCVRG_WIDTH)
1121685e4215SJerry Wong 
1122685e4215SJerry Wong /*
1123685e4215SJerry Wong  * M98090_REG_LOUTR_VOLUME
1124685e4215SJerry Wong  */
1125685e4215SJerry Wong #define M98090_RCVRM_MASK		(1<<7)
1126685e4215SJerry Wong #define M98090_RCVRM_SHIFT		7
1127685e4215SJerry Wong #define M98090_RCVRM_WIDTH		1
1128685e4215SJerry Wong #define M98090_RCVRVOL_MASK		(31<<0)
1129685e4215SJerry Wong #define M98090_RCVRVOL_SHIFT		0
1130685e4215SJerry Wong #define M98090_RCVRVOL_WIDTH		5
1131685e4215SJerry Wong #define M98090_RCVRVOL_NUM		(1<<M98090_RCVRVOL_WIDTH)
1132685e4215SJerry Wong 
1133685e4215SJerry Wong /*
1134685e4215SJerry Wong  * M98090_REG_JACK_DETECT
1135685e4215SJerry Wong  */
1136685e4215SJerry Wong #define M98090_JDETEN_MASK		(1<<7)
1137685e4215SJerry Wong #define M98090_JDETEN_SHIFT		7
1138685e4215SJerry Wong #define M98090_JDETEN_WIDTH		1
1139685e4215SJerry Wong #define M98090_JDWK_MASK		(1<<6)
1140685e4215SJerry Wong #define M98090_JDWK_SHIFT		6
1141685e4215SJerry Wong #define M98090_JDWK_WIDTH		1
1142685e4215SJerry Wong #define M98090_JDEB_MASK		(3<<0)
1143685e4215SJerry Wong #define M98090_JDEB_SHIFT		0
1144685e4215SJerry Wong #define M98090_JDEB_WIDTH		2
1145685e4215SJerry Wong #define M98090_JDEB_25MS		(0<<0)
1146685e4215SJerry Wong #define M98090_JDEB_50MS		(1<<0)
1147685e4215SJerry Wong #define M98090_JDEB_100MS		(2<<0)
1148685e4215SJerry Wong #define M98090_JDEB_200MS		(3<<0)
1149685e4215SJerry Wong 
1150685e4215SJerry Wong /*
1151685e4215SJerry Wong  * M98090_REG_INPUT_ENABLE
1152685e4215SJerry Wong  */
1153685e4215SJerry Wong #define M98090_MBEN_MASK		(1<<4)
1154685e4215SJerry Wong #define M98090_MBEN_SHIFT		4
1155685e4215SJerry Wong #define M98090_MBEN_WIDTH		1
1156685e4215SJerry Wong #define M98090_LINEAEN_MASK		(1<<3)
1157685e4215SJerry Wong #define M98090_LINEAEN_SHIFT		3
1158685e4215SJerry Wong #define M98090_LINEAEN_WIDTH		1
1159685e4215SJerry Wong #define M98090_LINEBEN_MASK		(1<<2)
1160685e4215SJerry Wong #define M98090_LINEBEN_SHIFT		2
1161685e4215SJerry Wong #define M98090_LINEBEN_WIDTH		1
1162685e4215SJerry Wong #define M98090_ADREN_MASK		(1<<1)
1163685e4215SJerry Wong #define M98090_ADREN_SHIFT		1
1164685e4215SJerry Wong #define M98090_ADREN_WIDTH		1
1165685e4215SJerry Wong #define M98090_ADLEN_MASK		(1<<0)
1166685e4215SJerry Wong #define M98090_ADLEN_SHIFT		0
1167685e4215SJerry Wong #define M98090_ADLEN_WIDTH		1
1168685e4215SJerry Wong 
1169685e4215SJerry Wong /*
1170685e4215SJerry Wong  * M98090_REG_OUTPUT_ENABLE
1171685e4215SJerry Wong  */
1172685e4215SJerry Wong #define M98090_HPREN_MASK		(1<<7)
1173685e4215SJerry Wong #define M98090_HPREN_SHIFT		7
1174685e4215SJerry Wong #define M98090_HPREN_WIDTH		1
1175685e4215SJerry Wong #define M98090_HPLEN_MASK		(1<<6)
1176685e4215SJerry Wong #define M98090_HPLEN_SHIFT		6
1177685e4215SJerry Wong #define M98090_HPLEN_WIDTH		1
1178685e4215SJerry Wong #define M98090_SPREN_MASK		(1<<5)
1179685e4215SJerry Wong #define M98090_SPREN_SHIFT		5
1180685e4215SJerry Wong #define M98090_SPREN_WIDTH		1
1181685e4215SJerry Wong #define M98090_SPLEN_MASK		(1<<4)
1182685e4215SJerry Wong #define M98090_SPLEN_SHIFT		4
1183685e4215SJerry Wong #define M98090_SPLEN_WIDTH		1
1184685e4215SJerry Wong #define M98090_RCVLEN_MASK		(1<<3)
1185685e4215SJerry Wong #define M98090_RCVLEN_SHIFT		3
1186685e4215SJerry Wong #define M98090_RCVLEN_WIDTH		1
1187685e4215SJerry Wong #define M98090_RCVREN_MASK		(1<<2)
1188685e4215SJerry Wong #define M98090_RCVREN_SHIFT		2
1189685e4215SJerry Wong #define M98090_RCVREN_WIDTH		1
1190685e4215SJerry Wong #define M98090_DAREN_MASK		(1<<1)
1191685e4215SJerry Wong #define M98090_DAREN_SHIFT		1
1192685e4215SJerry Wong #define M98090_DAREN_WIDTH		1
1193685e4215SJerry Wong #define M98090_DALEN_MASK		(1<<0)
1194685e4215SJerry Wong #define M98090_DALEN_SHIFT		0
1195685e4215SJerry Wong #define M98090_DALEN_WIDTH		1
1196685e4215SJerry Wong 
1197685e4215SJerry Wong /*
1198685e4215SJerry Wong  * M98090_REG_LEVEL_CONTROL
1199685e4215SJerry Wong  */
1200685e4215SJerry Wong #define M98090_ZDENN_MASK		(1<<2)
1201685e4215SJerry Wong #define M98090_ZDENN_SHIFT		2
1202685e4215SJerry Wong #define M98090_ZDENN_WIDTH		1
1203685e4215SJerry Wong #define M98090_ZDENN_NUM		(1<<M98090_ZDENN_WIDTH)
1204685e4215SJerry Wong #define M98090_VS2ENN_MASK		(1<<1)
1205685e4215SJerry Wong #define M98090_VS2ENN_SHIFT		1
1206685e4215SJerry Wong #define M98090_VS2ENN_WIDTH		1
1207685e4215SJerry Wong #define M98090_VS2ENN_NUM		(1<<M98090_VS2ENN_WIDTH)
1208685e4215SJerry Wong #define M98090_VSENN_MASK		(1<<0)
1209685e4215SJerry Wong #define M98090_VSENN_SHIFT		0
1210685e4215SJerry Wong #define M98090_VSENN_WIDTH		1
1211685e4215SJerry Wong #define M98090_VSENN_NUM		(1<<M98090_VSENN_WIDTH)
1212685e4215SJerry Wong 
1213685e4215SJerry Wong /*
1214685e4215SJerry Wong  * M98090_REG_DSP_FILTER_ENABLE
1215685e4215SJerry Wong  */
1216685e4215SJerry Wong #define M98090_DMIC34BQEN_MASK		(1<<4)
1217685e4215SJerry Wong #define M98090_DMIC34BQEN_SHIFT		4
1218685e4215SJerry Wong #define M98090_DMIC34BQEN_WIDTH		1
1219685e4215SJerry Wong #define M98090_DMIC34BQEN_NUM		(1<<M98090_DMIC34BQEN_WIDTH)
1220685e4215SJerry Wong #define M98090_ADCBQEN_MASK		(1<<3)
1221685e4215SJerry Wong #define M98090_ADCBQEN_SHIFT		3
1222685e4215SJerry Wong #define M98090_ADCBQEN_WIDTH		1
1223685e4215SJerry Wong #define M98090_ADCBQEN_NUM		(1<<M98090_ADCBQEN_WIDTH)
1224685e4215SJerry Wong #define M98090_EQ3BANDEN_MASK		(1<<2)
1225685e4215SJerry Wong #define M98090_EQ3BANDEN_SHIFT		2
1226685e4215SJerry Wong #define M98090_EQ3BANDEN_WIDTH		1
1227685e4215SJerry Wong #define M98090_EQ3BANDEN_NUM		(1<<M98090_EQ3BANDEN_WIDTH)
1228685e4215SJerry Wong #define M98090_EQ5BANDEN_MASK		(1<<1)
1229685e4215SJerry Wong #define M98090_EQ5BANDEN_SHIFT		1
1230685e4215SJerry Wong #define M98090_EQ5BANDEN_WIDTH		1
1231685e4215SJerry Wong #define M98090_EQ5BANDEN_NUM		(1<<M98090_EQ5BANDEN_WIDTH)
1232685e4215SJerry Wong #define M98090_EQ7BANDEN_MASK		(1<<0)
1233685e4215SJerry Wong #define M98090_EQ7BANDEN_SHIFT		0
1234685e4215SJerry Wong #define M98090_EQ7BANDEN_WIDTH		1
1235685e4215SJerry Wong #define M98090_EQ7BANDEN_NUM		(1<<M98090_EQ7BANDEN_WIDTH)
1236685e4215SJerry Wong 
1237685e4215SJerry Wong /*
1238685e4215SJerry Wong  * M98090_REG_BIAS_CONTROL
1239685e4215SJerry Wong  */
1240685e4215SJerry Wong #define M98090_VCM_MODE_MASK		(1<<0)
1241685e4215SJerry Wong #define M98090_VCM_MODE_SHIFT		0
1242685e4215SJerry Wong #define M98090_VCM_MODE_WIDTH		1
1243685e4215SJerry Wong #define M98090_VCM_MODE_NUM		(1<<M98090_VCM_MODE_WIDTH)
1244685e4215SJerry Wong 
1245685e4215SJerry Wong /*
1246685e4215SJerry Wong  * M98090_REG_DAC_CONTROL
1247685e4215SJerry Wong  */
1248685e4215SJerry Wong #define M98090_PERFMODE_MASK		(1<<1)
1249685e4215SJerry Wong #define M98090_PERFMODE_SHIFT		1
1250685e4215SJerry Wong #define M98090_PERFMODE_WIDTH		1
1251685e4215SJerry Wong #define M98090_PERFMODE_NUM		(1<<M98090_PERFMODE_WIDTH)
1252685e4215SJerry Wong #define M98090_DACHP_MASK		(1<<0)
1253685e4215SJerry Wong #define M98090_DACHP_SHIFT		0
1254685e4215SJerry Wong #define M98090_DACHP_WIDTH		1
1255685e4215SJerry Wong #define M98090_DACHP_NUM		(1<<M98090_DACHP_WIDTH)
1256685e4215SJerry Wong 
1257685e4215SJerry Wong /*
1258685e4215SJerry Wong  * M98090_REG_ADC_CONTROL
1259685e4215SJerry Wong  */
1260685e4215SJerry Wong #define M98090_OSR128_MASK		(1<<2)
1261685e4215SJerry Wong #define M98090_OSR128_SHIFT		2
1262685e4215SJerry Wong #define M98090_OSR128_WIDTH		1
1263685e4215SJerry Wong #define M98090_ADCDITHER_MASK		(1<<1)
1264685e4215SJerry Wong #define M98090_ADCDITHER_SHIFT		1
1265685e4215SJerry Wong #define M98090_ADCDITHER_WIDTH		1
1266685e4215SJerry Wong #define M98090_ADCDITHER_NUM		(1<<M98090_ADCDITHER_WIDTH)
1267685e4215SJerry Wong #define M98090_ADCHP_MASK		(1<<0)
1268685e4215SJerry Wong #define M98090_ADCHP_SHIFT		0
1269685e4215SJerry Wong #define M98090_ADCHP_WIDTH		1
1270685e4215SJerry Wong #define M98090_ADCHP_NUM		(1<<M98090_ADCHP_WIDTH)
1271685e4215SJerry Wong 
1272685e4215SJerry Wong /*
1273685e4215SJerry Wong  * M98090_REG_DEVICE_SHUTDOWN
1274685e4215SJerry Wong  */
1275685e4215SJerry Wong #define M98090_SHDNN_MASK		(1<<7)
1276685e4215SJerry Wong #define M98090_SHDNN_SHIFT		7
1277685e4215SJerry Wong #define M98090_SHDNN_WIDTH		1
1278685e4215SJerry Wong 
1279685e4215SJerry Wong /*
1280685e4215SJerry Wong  * M98090_REG_EQUALIZER_BASE
1281685e4215SJerry Wong  */
1282685e4215SJerry Wong #define M98090_B0_1_HI_MASK		(255<<0)
1283685e4215SJerry Wong #define M98090_B0_1_HI_SHIFT		0
1284685e4215SJerry Wong #define M98090_B0_1_HI_WIDTH		8
1285685e4215SJerry Wong #define M98090_B0_1_MID_MASK		(255<<0)
1286685e4215SJerry Wong #define M98090_B0_1_MID_SHIFT		0
1287685e4215SJerry Wong #define M98090_B0_1_MID_WIDTH		8
1288685e4215SJerry Wong #define M98090_B0_1_LO_MASK		(255<<0)
1289685e4215SJerry Wong #define M98090_B0_1_LO_SHIFT		0
1290685e4215SJerry Wong #define M98090_B0_1_LO_WIDTH		8
1291685e4215SJerry Wong #define M98090_B1_1_HI_MASK		(255<<0)
1292685e4215SJerry Wong #define M98090_B1_1_HI_SHIFT		0
1293685e4215SJerry Wong #define M98090_B1_1_HI_WIDTH		8
1294685e4215SJerry Wong #define M98090_B1_1_MID_MASK		(255<<0)
1295685e4215SJerry Wong #define M98090_B1_1_MID_SHIFT		0
1296685e4215SJerry Wong #define M98090_B1_1_MID_WIDTH		8
1297685e4215SJerry Wong #define M98090_B1_1_LO_MASK		(255<<0)
1298685e4215SJerry Wong #define M98090_B1_1_LO_SHIFT		0
1299685e4215SJerry Wong #define M98090_B1_1_LO_WIDTH		8
1300685e4215SJerry Wong #define M98090_B2_1_HI_MASK		(255<<0)
1301685e4215SJerry Wong #define M98090_B2_1_HI_SHIFT		0
1302685e4215SJerry Wong #define M98090_B2_1_HI_WIDTH		8
1303685e4215SJerry Wong #define M98090_B2_1_MID_MASK		(255<<0)
1304685e4215SJerry Wong #define M98090_B2_1_MID_SHIFT		0
1305685e4215SJerry Wong #define M98090_B2_1_MID_WIDTH		8
1306685e4215SJerry Wong #define M98090_B2_1_LO_MASK		(255<<0)
1307685e4215SJerry Wong #define M98090_B2_1_LO_SHIFT		0
1308685e4215SJerry Wong #define M98090_B2_1_LO_WIDTH		8
1309685e4215SJerry Wong #define M98090_A1_1_HI_MASK		(255<<0)
1310685e4215SJerry Wong #define M98090_A1_1_HI_SHIFT		0
1311685e4215SJerry Wong #define M98090_A1_1_HI_WIDTH		8
1312685e4215SJerry Wong #define M98090_A1_1_MID_MASK		(255<<0)
1313685e4215SJerry Wong #define M98090_A1_1_MID_SHIFT		0
1314685e4215SJerry Wong #define M98090_A1_1_MID_WIDTH		8
1315685e4215SJerry Wong #define M98090_A1_1_LO_MASK		(255<<0)
1316685e4215SJerry Wong #define M98090_A1_1_LO_SHIFT		0
1317685e4215SJerry Wong #define M98090_A1_1_LO_WIDTH		8
1318685e4215SJerry Wong #define M98090_A2_1_HI_MASK		(255<<0)
1319685e4215SJerry Wong #define M98090_A2_1_HI_SHIFT		0
1320685e4215SJerry Wong #define M98090_A2_1_HI_WIDTH		8
1321685e4215SJerry Wong #define M98090_A2_1_MID_MASK		(255<<0)
1322685e4215SJerry Wong #define M98090_A2_1_MID_SHIFT		0
1323685e4215SJerry Wong #define M98090_A2_1_MID_WIDTH		8
1324685e4215SJerry Wong #define M98090_A2_1_LO_MASK		(255<<0)
1325685e4215SJerry Wong #define M98090_A2_1_LO_SHIFT		0
1326685e4215SJerry Wong #define M98090_A2_1_LO_WIDTH		8
1327685e4215SJerry Wong 
1328685e4215SJerry Wong #define M98090_COEFS_PER_BAND		5
1329685e4215SJerry Wong #define M98090_COEFS_BLK_SZ		(M98090_COEFS_PER_BAND * 3)
1330685e4215SJerry Wong #define M98090_COEFS_MAX_SZ		(M98090_COEFS_BLK_SZ * 7)
1331685e4215SJerry Wong 
1332685e4215SJerry Wong /*
1333685e4215SJerry Wong  * M98090_REG_RECORD_BIQUAD_BASE
1334685e4215SJerry Wong  */
1335685e4215SJerry Wong #define M98090_REC_B0_HI_MASK		(255<<0)
1336685e4215SJerry Wong #define M98090_REC_B0_HI_SHIFT		0
1337685e4215SJerry Wong #define M98090_REC_B0_HI_WIDTH		8
1338685e4215SJerry Wong #define M98090_REC_B0_MID_MASK		(255<<0)
1339685e4215SJerry Wong #define M98090_REC_B0_MID_SHIFT		0
1340685e4215SJerry Wong #define M98090_REC_B0_MID_WIDTH		8
1341685e4215SJerry Wong #define M98090_REC_B0_LO_MASK		(255<<0)
1342685e4215SJerry Wong #define M98090_REC_B0_LO_SHIFT		0
1343685e4215SJerry Wong #define M98090_REC_B0_LO_WIDTH		8
1344685e4215SJerry Wong #define M98090_REC_B1_HI_MASK		(255<<0)
1345685e4215SJerry Wong #define M98090_REC_B1_HI_SHIFT		0
1346685e4215SJerry Wong #define M98090_REC_B1_HI_WIDTH		8
1347685e4215SJerry Wong #define M98090_REC_B1_MID_MASK		(255<<0)
1348685e4215SJerry Wong #define M98090_REC_B1_MID_SHIFT		0
1349685e4215SJerry Wong #define M98090_REC_B1_MID_WIDTH		8
1350685e4215SJerry Wong #define M98090_REC_B1_LO_MASK		(255<<0)
1351685e4215SJerry Wong #define M98090_REC_B1_LO_SHIFT		0
1352685e4215SJerry Wong #define M98090_REC_B1_LO_WIDTH		8
1353685e4215SJerry Wong #define M98090_REC_B2_HI_MASK		(255<<0)
1354685e4215SJerry Wong #define M98090_REC_B2_HI_SHIFT		0
1355685e4215SJerry Wong #define M98090_REC_B2_HI_WIDTH		8
1356685e4215SJerry Wong #define M98090_REC_B2_MID_MASK		(255<<0)
1357685e4215SJerry Wong #define M98090_REC_B2_MID_SHIFT		0
1358685e4215SJerry Wong #define M98090_REC_B2_MID_WIDTH		8
1359685e4215SJerry Wong #define M98090_REC_B2_LO_MASK		(255<<0)
1360685e4215SJerry Wong #define M98090_REC_B2_LO_SHIFT		0
1361685e4215SJerry Wong #define M98090_REC_B2_LO_WIDTH		8
1362685e4215SJerry Wong #define M98090_REC_A1_HI_MASK		(255<<0)
1363685e4215SJerry Wong #define M98090_REC_A1_HI_SHIFT		0
1364685e4215SJerry Wong #define M98090_REC_A1_HI_WIDTH		8
1365685e4215SJerry Wong #define M98090_REC_A1_MID_MASK		(255<<0)
1366685e4215SJerry Wong #define M98090_REC_A1_MID_SHIFT		0
1367685e4215SJerry Wong #define M98090_REC_A1_MID_WIDTH		8
1368685e4215SJerry Wong #define M98090_REC_A1_LO_MASK		(255<<0)
1369685e4215SJerry Wong #define M98090_REC_A1_LO_SHIFT		0
1370685e4215SJerry Wong #define M98090_REC_A1_LO_WIDTH		8
1371685e4215SJerry Wong #define M98090_REC_A2_HI_MASK		(255<<0)
1372685e4215SJerry Wong #define M98090_REC_A2_HI_SHIFT		0
1373685e4215SJerry Wong #define M98090_REC_A2_HI_WIDTH		8
1374685e4215SJerry Wong #define M98090_REC_A2_MID_MASK		(255<<0)
1375685e4215SJerry Wong #define M98090_REC_A2_MID_SHIFT		0
1376685e4215SJerry Wong #define M98090_REC_A2_MID_WIDTH		8
1377685e4215SJerry Wong #define M98090_REC_A2_LO_MASK		(255<<0)
1378685e4215SJerry Wong #define M98090_REC_A2_LO_SHIFT		0
1379685e4215SJerry Wong #define M98090_REC_A2_LO_WIDTH		8
1380685e4215SJerry Wong 
1381685e4215SJerry Wong /*
1382685e4215SJerry Wong  * M98090_REG_DMIC3_VOLUME
1383685e4215SJerry Wong  */
1384685e4215SJerry Wong #define M98090_DMIC_AV3G_MASK		(7<<4)
1385685e4215SJerry Wong #define M98090_DMIC_AV3G_SHIFT		4
1386685e4215SJerry Wong #define M98090_DMIC_AV3G_WIDTH		3
1387685e4215SJerry Wong #define M98090_DMIC_AV3G_NUM		(1<<M98090_DMIC_AV3G_WIDTH)
1388685e4215SJerry Wong #define M98090_DMIC_AV3_MASK		(15<<0)
1389685e4215SJerry Wong #define M98090_DMIC_AV3_SHIFT		0
1390685e4215SJerry Wong #define M98090_DMIC_AV3_WIDTH		4
1391685e4215SJerry Wong #define M98090_DMIC_AV3_NUM		(1<<M98090_DMIC_AV3_WIDTH)
1392685e4215SJerry Wong 
1393685e4215SJerry Wong /*
1394685e4215SJerry Wong  * M98090_REG_DMIC4_VOLUME
1395685e4215SJerry Wong  */
1396685e4215SJerry Wong #define M98090_DMIC_AV4G_MASK		(7<<4)
1397685e4215SJerry Wong #define M98090_DMIC_AV4G_SHIFT		4
1398685e4215SJerry Wong #define M98090_DMIC_AV4G_WIDTH		3
1399685e4215SJerry Wong #define M98090_DMIC_AV4G_NUM		(1<<M98090_DMIC_AV4G_WIDTH)
1400685e4215SJerry Wong #define M98090_DMIC_AV4_MASK		(15<<0)
1401685e4215SJerry Wong #define M98090_DMIC_AV4_SHIFT		0
1402685e4215SJerry Wong #define M98090_DMIC_AV4_WIDTH		4
1403685e4215SJerry Wong #define M98090_DMIC_AV4_NUM		(1<<M98090_DMIC_AV4_WIDTH)
1404685e4215SJerry Wong 
1405685e4215SJerry Wong /*
1406685e4215SJerry Wong  * M98090_REG_DMIC34_BQ_PREATTEN
1407685e4215SJerry Wong  */
1408685e4215SJerry Wong #define M98090_AV34BQ_MASK		(15<<0)
1409685e4215SJerry Wong #define M98090_AV34BQ_SHIFT		0
1410685e4215SJerry Wong #define M98090_AV34BQ_WIDTH		4
1411685e4215SJerry Wong #define M98090_AV34BQ_NUM		(1<<M98090_AV34BQ_WIDTH)
1412685e4215SJerry Wong 
1413685e4215SJerry Wong /*
1414685e4215SJerry Wong  * M98090_REG_RECORD_TDM_SLOT
1415685e4215SJerry Wong  */
1416685e4215SJerry Wong #define M98090_TDM_SLOTADCL_MASK	(3<<6)
1417685e4215SJerry Wong #define M98090_TDM_SLOTADCL_SHIFT	6
1418685e4215SJerry Wong #define M98090_TDM_SLOTADCL_WIDTH	2
1419685e4215SJerry Wong #define M98090_TDM_SLOTADCL_NUM		(1<<M98090_TDM_SLOTADCL_WIDTH)
1420685e4215SJerry Wong #define M98090_TDM_SLOTADCR_MASK	(3<<4)
1421685e4215SJerry Wong #define M98090_TDM_SLOTADCR_SHIFT	4
1422685e4215SJerry Wong #define M98090_TDM_SLOTADCR_WIDTH	2
1423685e4215SJerry Wong #define M98090_TDM_SLOTADCR_NUM		(1<<M98090_TDM_SLOTADCR_WIDTH)
1424685e4215SJerry Wong #define M98090_TDM_SLOTDMIC3_MASK	(3<<2)
1425685e4215SJerry Wong #define M98090_TDM_SLOTDMIC3_SHIFT	2
1426685e4215SJerry Wong #define M98090_TDM_SLOTDMIC3_WIDTH	2
1427685e4215SJerry Wong #define M98090_TDM_SLOTDMIC3_NUM	(1<<M98090_TDM_SLOTDMIC3_WIDTH)
1428685e4215SJerry Wong #define M98090_TDM_SLOTDMIC4_MASK	(3<<0)
1429685e4215SJerry Wong #define M98090_TDM_SLOTDMIC4_SHIFT	0
1430685e4215SJerry Wong #define M98090_TDM_SLOTDMIC4_WIDTH	2
1431685e4215SJerry Wong #define M98090_TDM_SLOTDMIC4_NUM	(1<<M98090_TDM_SLOTDMIC4_WIDTH)
1432685e4215SJerry Wong 
1433685e4215SJerry Wong /*
1434685e4215SJerry Wong  * M98090_REG_SAMPLE_RATE
1435685e4215SJerry Wong  */
1436685e4215SJerry Wong #define M98090_DMIC34_ZEROPAD_MASK	(1<<4)
1437685e4215SJerry Wong #define M98090_DMIC34_ZEROPAD_SHIFT	4
1438685e4215SJerry Wong #define M98090_DMIC34_ZEROPAD_WIDTH	1
1439685e4215SJerry Wong #define M98090_DMIC34_ZEROPAD_NUM	(1<<M98090_DIGMIC4_WIDTH)
1440685e4215SJerry Wong #define M98090_DMIC34_SRDIV_MASK	(7<<0)
1441685e4215SJerry Wong #define M98090_DMIC34_SRDIV_SHIFT	0
1442685e4215SJerry Wong #define M98090_DMIC34_SRDIV_WIDTH	3
1443685e4215SJerry Wong 
1444685e4215SJerry Wong /*
1445685e4215SJerry Wong  * M98090_REG_DMIC34_BIQUAD_BASE
1446685e4215SJerry Wong  */
1447685e4215SJerry Wong #define M98090_DMIC34_B0_HI_MASK	(255<<0)
1448685e4215SJerry Wong #define M98090_DMIC34_B0_HI_SHIFT	0
1449685e4215SJerry Wong #define M98090_DMIC34_B0_HI_WIDTH	8
1450685e4215SJerry Wong #define M98090_DMIC34_B0_MID_MASK	(255<<0)
1451685e4215SJerry Wong #define M98090_DMIC34_B0_MID_SHIFT	0
1452685e4215SJerry Wong #define M98090_DMIC34_B0_MID_WIDTH	8
1453685e4215SJerry Wong #define M98090_DMIC34_B0_LO_MASK	(255<<0)
1454685e4215SJerry Wong #define M98090_DMIC34_B0_LO_SHIFT	0
1455685e4215SJerry Wong #define M98090_DMIC34_B0_LO_WIDTH	8
1456685e4215SJerry Wong #define M98090_DMIC34_B1_HI_MASK	(255<<0)
1457685e4215SJerry Wong #define M98090_DMIC34_B1_HI_SHIFT	0
1458685e4215SJerry Wong #define M98090_DMIC34_B1_HI_WIDTH	8
1459685e4215SJerry Wong #define M98090_DMIC34_B1_MID_MASK	(255<<0)
1460685e4215SJerry Wong #define M98090_DMIC34_B1_MID_SHIFT	0
1461685e4215SJerry Wong #define M98090_DMIC34_B1_MID_WIDTH	8
1462685e4215SJerry Wong #define M98090_DMIC34_B1_LO_MASK	(255<<0)
1463685e4215SJerry Wong #define M98090_DMIC34_B1_LO_SHIFT	0
1464685e4215SJerry Wong #define M98090_DMIC34_B1_LO_WIDTH	8
1465685e4215SJerry Wong #define M98090_DMIC34_B2_HI_MASK	(255<<0)
1466685e4215SJerry Wong #define M98090_DMIC34_B2_HI_SHIFT	0
1467685e4215SJerry Wong #define M98090_DMIC34_B2_HI_WIDTH	8
1468685e4215SJerry Wong #define M98090_DMIC34_B2_MID_MASK	(255<<0)
1469685e4215SJerry Wong #define M98090_DMIC34_B2_MID_SHIFT	0
1470685e4215SJerry Wong #define M98090_DMIC34_B2_MID_WIDTH	8
1471685e4215SJerry Wong #define M98090_DMIC34_B2_LO_MASK	(255<<0)
1472685e4215SJerry Wong #define M98090_DMIC34_B2_LO_SHIFT	0
1473685e4215SJerry Wong #define M98090_DMIC34_B2_LO_WIDTH	8
1474685e4215SJerry Wong #define M98090_DMIC34_A1_HI_MASK	(255<<0)
1475685e4215SJerry Wong #define M98090_DMIC34_A1_HI_SHIFT	0
1476685e4215SJerry Wong #define M98090_DMIC34_A1_HI_WIDTH	8
1477685e4215SJerry Wong #define M98090_DMIC34_A1_MID_MASK	(255<<0)
1478685e4215SJerry Wong #define M98090_DMIC34_A1_MID_SHIFT	0
1479685e4215SJerry Wong #define M98090_DMIC34_A1_MID_WIDTH	8
1480685e4215SJerry Wong #define M98090_DMIC34_A1_LO_MASK	(255<<0)
1481685e4215SJerry Wong #define M98090_DMIC34_A1_LO_SHIFT	0
1482685e4215SJerry Wong #define M98090_DMIC34_A1_LO_WIDTH	8
1483685e4215SJerry Wong #define M98090_DMIC34_A2_HI_MASK	(255<<0)
1484685e4215SJerry Wong #define M98090_DMIC34_A2_HI_SHIFT	0
1485685e4215SJerry Wong #define M98090_DMIC34_A2_HI_WIDTH	8
1486685e4215SJerry Wong #define M98090_DMIC34_A2_MID_MASK	(255<<0)
1487685e4215SJerry Wong #define M98090_DMIC34_A2_MID_SHIFT	0
1488685e4215SJerry Wong #define M98090_DMIC34_A2_MID_WIDTH	8
1489685e4215SJerry Wong #define M98090_DMIC34_A2_LO_MASK	(255<<0)
1490685e4215SJerry Wong #define M98090_DMIC34_A2_LO_SHIFT	0
1491685e4215SJerry Wong #define M98090_DMIC34_A2_LO_WIDTH	8
1492685e4215SJerry Wong 
1493685e4215SJerry Wong #define M98090_JACK_STATE_NO_HEADSET	0
1494685e4215SJerry Wong #define M98090_JACK_STATE_NO_HEADSET_2	1
1495685e4215SJerry Wong #define M98090_JACK_STATE_HEADPHONE	2
1496685e4215SJerry Wong #define M98090_JACK_STATE_HEADSET	3
1497685e4215SJerry Wong 
1498685e4215SJerry Wong /*
1499685e4215SJerry Wong  * M98090_REG_REVISION_ID
1500685e4215SJerry Wong  */
1501685e4215SJerry Wong #define M98090_REVID_MASK		(255<<0)
1502685e4215SJerry Wong #define M98090_REVID_SHIFT		0
1503685e4215SJerry Wong #define M98090_REVID_WIDTH		8
1504685e4215SJerry Wong #define M98090_REVID_NUM		(1<<M98090_REVID_WIDTH)
1505685e4215SJerry Wong 
1506685e4215SJerry Wong /* Silicon revision number */
1507685e4215SJerry Wong #define M98090_REVA			0x40
1508685e4215SJerry Wong #define M98091_REVA			0x50
1509685e4215SJerry Wong 
1510685e4215SJerry Wong enum max98090_type {
1511685e4215SJerry Wong 	MAX98090,
1512685e4215SJerry Wong 	MAX98091,
1513685e4215SJerry Wong };
1514685e4215SJerry Wong 
1515685e4215SJerry Wong struct max98090_cdata {
1516685e4215SJerry Wong 	unsigned int rate;
1517685e4215SJerry Wong 	unsigned int fmt;
1518685e4215SJerry Wong };
1519685e4215SJerry Wong 
1520685e4215SJerry Wong struct max98090_priv {
1521685e4215SJerry Wong 	struct regmap *regmap;
1522685e4215SJerry Wong 	struct snd_soc_codec *codec;
1523685e4215SJerry Wong 	enum max98090_type devtype;
1524685e4215SJerry Wong 	struct max98090_pdata *pdata;
1525b10ab7b8STushar Behera 	struct clk *mclk;
1526685e4215SJerry Wong 	unsigned int sysclk;
1527*defcd98bSDylan Reid 	unsigned int pclk;
1528685e4215SJerry Wong 	unsigned int bclk;
1529685e4215SJerry Wong 	unsigned int lrclk;
1530*defcd98bSDylan Reid 	u32 dmic_freq;
1531685e4215SJerry Wong 	struct max98090_cdata dai[1];
1532685e4215SJerry Wong 	int jack_state;
1533685e4215SJerry Wong 	struct delayed_work jack_work;
1534b8a3ee82SJarkko Nikula 	struct delayed_work pll_det_enable_work;
1535b8a3ee82SJarkko Nikula 	struct work_struct pll_det_disable_work;
1536b8a3ee82SJarkko Nikula 	struct work_struct pll_work;
1537685e4215SJerry Wong 	struct snd_soc_jack *jack;
1538685e4215SJerry Wong 	unsigned int dai_fmt;
1539685e4215SJerry Wong 	int tdm_slots;
1540685e4215SJerry Wong 	int tdm_width;
1541685e4215SJerry Wong 	u8 lin_state;
1542685e4215SJerry Wong 	unsigned int pa1en;
1543685e4215SJerry Wong 	unsigned int pa2en;
1544685e4215SJerry Wong 	unsigned int sidetone;
1545541423ddSLiam Girdwood 	bool master;
1546685e4215SJerry Wong };
1547685e4215SJerry Wong 
1548685e4215SJerry Wong int max98090_mic_detect(struct snd_soc_codec *codec,
1549685e4215SJerry Wong 	struct snd_soc_jack *jack);
1550685e4215SJerry Wong 
1551685e4215SJerry Wong #endif
1552