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