xref: /linux/sound/soc/codecs/da7213.h (revision 1e62c52ddc2d23a02ac2308cc1bb6ff18f0cf3cd)
1ef5c2ebaSAdam Thomson /*
2ef5c2ebaSAdam Thomson  * da7213.h - DA7213 ASoC Codec Driver
3ef5c2ebaSAdam Thomson  *
4ef5c2ebaSAdam Thomson  * Copyright (c) 2013 Dialog Semiconductor
5ef5c2ebaSAdam Thomson  *
6ef5c2ebaSAdam Thomson  * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
7ef5c2ebaSAdam Thomson  *
8ef5c2ebaSAdam Thomson  * This program is free software; you can redistribute it and/or modify
9ef5c2ebaSAdam Thomson  * it under the terms of the GNU General Public License version 2 as
10ef5c2ebaSAdam Thomson  * published by the Free Software Foundation.
11ef5c2ebaSAdam Thomson  */
12ef5c2ebaSAdam Thomson 
13ef5c2ebaSAdam Thomson #ifndef _DA7213_H
14ef5c2ebaSAdam Thomson #define _DA7213_H
15ef5c2ebaSAdam Thomson 
166e7c4443SAdam Thomson #include <linux/clk.h>
17ef5c2ebaSAdam Thomson #include <linux/regmap.h>
18ef5c2ebaSAdam Thomson #include <sound/da7213.h>
19ef5c2ebaSAdam Thomson 
20ef5c2ebaSAdam Thomson /*
21ef5c2ebaSAdam Thomson  * Registers
22ef5c2ebaSAdam Thomson  */
23ef5c2ebaSAdam Thomson 
24ef5c2ebaSAdam Thomson /* Status Registers */
25ef5c2ebaSAdam Thomson #define DA7213_STATUS1			0x02
26ef5c2ebaSAdam Thomson #define DA7213_PLL_STATUS		0x03
27ef5c2ebaSAdam Thomson #define DA7213_AUX_L_GAIN_STATUS	0x04
28ef5c2ebaSAdam Thomson #define DA7213_AUX_R_GAIN_STATUS	0x05
29ef5c2ebaSAdam Thomson #define DA7213_MIC_1_GAIN_STATUS	0x06
30ef5c2ebaSAdam Thomson #define DA7213_MIC_2_GAIN_STATUS	0x07
31ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_GAIN_STATUS	0x08
32ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_GAIN_STATUS	0x09
33ef5c2ebaSAdam Thomson #define DA7213_ADC_L_GAIN_STATUS	0x0A
34ef5c2ebaSAdam Thomson #define DA7213_ADC_R_GAIN_STATUS	0x0B
35ef5c2ebaSAdam Thomson #define DA7213_DAC_L_GAIN_STATUS	0x0C
36ef5c2ebaSAdam Thomson #define DA7213_DAC_R_GAIN_STATUS	0x0D
37ef5c2ebaSAdam Thomson #define DA7213_HP_L_GAIN_STATUS		0x0E
38ef5c2ebaSAdam Thomson #define DA7213_HP_R_GAIN_STATUS		0x0F
39ef5c2ebaSAdam Thomson #define DA7213_LINE_GAIN_STATUS		0x10
40ef5c2ebaSAdam Thomson 
41ef5c2ebaSAdam Thomson /* System Initialisation Registers */
42ef5c2ebaSAdam Thomson #define DA7213_DIG_ROUTING_DAI		0x21
43ef5c2ebaSAdam Thomson #define DA7213_SR			0x22
44ef5c2ebaSAdam Thomson #define DA7213_REFERENCES		0x23
45ef5c2ebaSAdam Thomson #define DA7213_PLL_FRAC_TOP		0x24
46ef5c2ebaSAdam Thomson #define DA7213_PLL_FRAC_BOT		0x25
47ef5c2ebaSAdam Thomson #define DA7213_PLL_INTEGER		0x26
48ef5c2ebaSAdam Thomson #define DA7213_PLL_CTRL			0x27
49ef5c2ebaSAdam Thomson #define DA7213_DAI_CLK_MODE		0x28
50ef5c2ebaSAdam Thomson #define DA7213_DAI_CTRL			0x29
51ef5c2ebaSAdam Thomson #define DA7213_DIG_ROUTING_DAC		0x2A
52ef5c2ebaSAdam Thomson #define DA7213_ALC_CTRL1		0x2B
53ef5c2ebaSAdam Thomson 
54ef5c2ebaSAdam Thomson /* Input - Gain, Select and Filter Registers */
55ef5c2ebaSAdam Thomson #define DA7213_AUX_L_GAIN		0x30
56ef5c2ebaSAdam Thomson #define DA7213_AUX_R_GAIN		0x31
57ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_SELECT		0x32
58ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_SELECT		0x33
59ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_GAIN		0x34
60ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_GAIN		0x35
61ef5c2ebaSAdam Thomson #define DA7213_ADC_L_GAIN		0x36
62ef5c2ebaSAdam Thomson #define DA7213_ADC_R_GAIN		0x37
63ef5c2ebaSAdam Thomson #define DA7213_ADC_FILTERS1		0x38
64ef5c2ebaSAdam Thomson #define DA7213_MIC_1_GAIN		0x39
65ef5c2ebaSAdam Thomson #define DA7213_MIC_2_GAIN		0x3A
66ef5c2ebaSAdam Thomson 
67ef5c2ebaSAdam Thomson /* Output - Gain, Select and Filter Registers */
68ef5c2ebaSAdam Thomson #define DA7213_DAC_FILTERS5		0x40
69ef5c2ebaSAdam Thomson #define DA7213_DAC_FILTERS2		0x41
70ef5c2ebaSAdam Thomson #define DA7213_DAC_FILTERS3		0x42
71ef5c2ebaSAdam Thomson #define DA7213_DAC_FILTERS4		0x43
72ef5c2ebaSAdam Thomson #define DA7213_DAC_FILTERS1		0x44
73ef5c2ebaSAdam Thomson #define DA7213_DAC_L_GAIN		0x45
74ef5c2ebaSAdam Thomson #define DA7213_DAC_R_GAIN		0x46
75ef5c2ebaSAdam Thomson #define DA7213_CP_CTRL			0x47
76ef5c2ebaSAdam Thomson #define DA7213_HP_L_GAIN		0x48
77ef5c2ebaSAdam Thomson #define DA7213_HP_R_GAIN		0x49
78ef5c2ebaSAdam Thomson #define DA7213_LINE_GAIN		0x4A
79ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_SELECT		0x4B
80ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_SELECT		0x4C
81ef5c2ebaSAdam Thomson 
82ef5c2ebaSAdam Thomson /* System Controller Registers */
83ef5c2ebaSAdam Thomson #define DA7213_SYSTEM_MODES_INPUT	0x50
84ef5c2ebaSAdam Thomson #define DA7213_SYSTEM_MODES_OUTPUT	0x51
85ef5c2ebaSAdam Thomson 
86ef5c2ebaSAdam Thomson /* Control Registers */
87ef5c2ebaSAdam Thomson #define DA7213_AUX_L_CTRL		0x60
88ef5c2ebaSAdam Thomson #define DA7213_AUX_R_CTRL		0x61
89ef5c2ebaSAdam Thomson #define DA7213_MICBIAS_CTRL		0x62
90ef5c2ebaSAdam Thomson #define DA7213_MIC_1_CTRL		0x63
91ef5c2ebaSAdam Thomson #define DA7213_MIC_2_CTRL		0x64
92ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_CTRL		0x65
93ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_CTRL		0x66
94ef5c2ebaSAdam Thomson #define DA7213_ADC_L_CTRL		0x67
95ef5c2ebaSAdam Thomson #define DA7213_ADC_R_CTRL		0x68
96ef5c2ebaSAdam Thomson #define DA7213_DAC_L_CTRL		0x69
97ef5c2ebaSAdam Thomson #define DA7213_DAC_R_CTRL		0x6A
98ef5c2ebaSAdam Thomson #define DA7213_HP_L_CTRL		0x6B
99ef5c2ebaSAdam Thomson #define DA7213_HP_R_CTRL		0x6C
100ef5c2ebaSAdam Thomson #define DA7213_LINE_CTRL		0x6D
101ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_CTRL		0x6E
102ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_CTRL		0x6F
103ef5c2ebaSAdam Thomson 
104ef5c2ebaSAdam Thomson /* Configuration Registers */
105ef5c2ebaSAdam Thomson #define DA7213_LDO_CTRL			0x90
106ef5c2ebaSAdam Thomson #define DA7213_IO_CTRL			0x91
107ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_CTRL		0x92
108ef5c2ebaSAdam Thomson #define DA7213_MIC_CONFIG		0x93
109ef5c2ebaSAdam Thomson #define DA7213_PC_COUNT			0x94
110ef5c2ebaSAdam Thomson #define DA7213_CP_VOL_THRESHOLD1	0x95
111ef5c2ebaSAdam Thomson #define DA7213_CP_DELAY			0x96
112ef5c2ebaSAdam Thomson #define DA7213_CP_DETECTOR		0x97
113ef5c2ebaSAdam Thomson #define DA7213_DAI_OFFSET		0x98
114ef5c2ebaSAdam Thomson #define DA7213_DIG_CTRL			0x99
115ef5c2ebaSAdam Thomson #define DA7213_ALC_CTRL2		0x9A
116ef5c2ebaSAdam Thomson #define DA7213_ALC_CTRL3		0x9B
117ef5c2ebaSAdam Thomson #define DA7213_ALC_NOISE		0x9C
118ef5c2ebaSAdam Thomson #define DA7213_ALC_TARGET_MIN		0x9D
119ef5c2ebaSAdam Thomson #define DA7213_ALC_TARGET_MAX		0x9E
120ef5c2ebaSAdam Thomson #define DA7213_ALC_GAIN_LIMITS		0x9F
121ef5c2ebaSAdam Thomson #define DA7213_ALC_ANA_GAIN_LIMITS	0xA0
122ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_CTRL	0xA1
123ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_LEVEL	0xA2
124ef5c2ebaSAdam Thomson 
125ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_AUTO_M_L	0xA3
126ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_AUTO_U_L	0xA4
127ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_MAN_M_L	0xA6
128ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_MAN_U_L	0xA7
129ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_AUTO_M_R	0xA8
130ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_AUTO_U_R	0xA9
131ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_MAN_M_R	0xAB
132ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_MAN_U_R	0xAC
133ef5c2ebaSAdam Thomson #define DA7213_ALC_CIC_OP_LVL_CTRL	0xAD
134ef5c2ebaSAdam Thomson #define DA7213_ALC_CIC_OP_LVL_DATA	0xAE
135ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_SETUP_TIME	0xAF
136ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_OFF_THRESHOLD	0xB0
137ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_ON_THRESHOLD	0xB1
138ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_CTRL		0xB2
139ef5c2ebaSAdam Thomson 
140ef5c2ebaSAdam Thomson 
141ef5c2ebaSAdam Thomson /*
142ef5c2ebaSAdam Thomson  * Bit fields
143ef5c2ebaSAdam Thomson  */
144ef5c2ebaSAdam Thomson 
145d575b0b0SAdam Thomson /* DA7213_PLL_STATUS = 0x03 */
146d575b0b0SAdam Thomson #define DA7219_PLL_SRM_LOCK					(0x1 << 1)
147d575b0b0SAdam Thomson 
148ef5c2ebaSAdam Thomson /* DA7213_SR = 0x22 */
149ef5c2ebaSAdam Thomson #define DA7213_SR_8000						(0x1 << 0)
150ef5c2ebaSAdam Thomson #define DA7213_SR_11025						(0x2 << 0)
151ef5c2ebaSAdam Thomson #define DA7213_SR_12000						(0x3 << 0)
152ef5c2ebaSAdam Thomson #define DA7213_SR_16000						(0x5 << 0)
153ef5c2ebaSAdam Thomson #define DA7213_SR_22050						(0x6 << 0)
154ef5c2ebaSAdam Thomson #define DA7213_SR_24000						(0x7 << 0)
155ef5c2ebaSAdam Thomson #define DA7213_SR_32000						(0x9 << 0)
156ef5c2ebaSAdam Thomson #define DA7213_SR_44100						(0xA << 0)
157ef5c2ebaSAdam Thomson #define DA7213_SR_48000						(0xB << 0)
158ef5c2ebaSAdam Thomson #define DA7213_SR_88200						(0xE << 0)
159ef5c2ebaSAdam Thomson #define DA7213_SR_96000						(0xF << 0)
160ef5c2ebaSAdam Thomson 
161ef5c2ebaSAdam Thomson /* DA7213_REFERENCES = 0x23 */
162ef5c2ebaSAdam Thomson #define DA7213_BIAS_EN						(0x1 << 3)
163ef5c2ebaSAdam Thomson #define DA7213_VMID_EN						(0x1 << 7)
164ef5c2ebaSAdam Thomson 
165ef5c2ebaSAdam Thomson /* DA7213_PLL_CTRL = 0x27 */
166*1e62c52dSAdam Thomson #define DA7213_PLL_INDIV_5_TO_9_MHZ				(0x0 << 2)
167*1e62c52dSAdam Thomson #define DA7213_PLL_INDIV_9_TO_18_MHZ				(0x1 << 2)
168*1e62c52dSAdam Thomson #define DA7213_PLL_INDIV_18_TO_36_MHZ				(0x2 << 2)
169*1e62c52dSAdam Thomson #define DA7213_PLL_INDIV_36_TO_54_MHZ				(0x3 << 2)
170ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_MASK					(0x3 << 2)
171ef5c2ebaSAdam Thomson #define DA7213_PLL_MCLK_SQR_EN					(0x1 << 4)
172ef5c2ebaSAdam Thomson #define DA7213_PLL_32K_MODE					(0x1 << 5)
173ef5c2ebaSAdam Thomson #define DA7213_PLL_SRM_EN					(0x1 << 6)
174ef5c2ebaSAdam Thomson #define DA7213_PLL_EN						(0x1 << 7)
175ef5c2ebaSAdam Thomson 
176ef5c2ebaSAdam Thomson /* DA7213_DAI_CLK_MODE = 0x28 */
177ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_32				(0x0 << 0)
178ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_64				(0x1 << 0)
179ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_128				(0x2 << 0)
180ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_256				(0x3 << 0)
181ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_MASK				(0x3 << 0)
182ef5c2ebaSAdam Thomson #define DA7213_DAI_CLK_POL_INV					(0x1 << 2)
183ef5c2ebaSAdam Thomson #define DA7213_DAI_WCLK_POL_INV					(0x1 << 3)
184ef5c2ebaSAdam Thomson #define DA7213_DAI_CLK_EN_MASK					(0x1 << 7)
185ef5c2ebaSAdam Thomson 
186ef5c2ebaSAdam Thomson /* DA7213_DAI_CTRL = 0x29 */
187ef5c2ebaSAdam Thomson #define DA7213_DAI_FORMAT_I2S_MODE				(0x0 << 0)
188ef5c2ebaSAdam Thomson #define DA7213_DAI_FORMAT_LEFT_J				(0x1 << 0)
189ef5c2ebaSAdam Thomson #define DA7213_DAI_FORMAT_RIGHT_J				(0x2 << 0)
190ef5c2ebaSAdam Thomson #define DA7213_DAI_FORMAT_MASK					(0x3 << 0)
191ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_S16_LE				(0x0 << 2)
192ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_S20_LE				(0x1 << 2)
193ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_S24_LE				(0x2 << 2)
194ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_S32_LE				(0x3 << 2)
195ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_MASK				(0x3 << 2)
196ef5c2ebaSAdam Thomson #define DA7213_DAI_EN_SHIFT					7
197ef5c2ebaSAdam Thomson 
198ef5c2ebaSAdam Thomson /* DA7213_DIG_ROUTING_DAI = 0x21 */
199ef5c2ebaSAdam Thomson #define DA7213_DAI_L_SRC_SHIFT					0
200ef5c2ebaSAdam Thomson #define DA7213_DAI_R_SRC_SHIFT					4
201ef5c2ebaSAdam Thomson #define DA7213_DAI_SRC_MAX					4
202ef5c2ebaSAdam Thomson 
203ef5c2ebaSAdam Thomson /* DA7213_DIG_ROUTING_DAC = 0x2A */
204ef5c2ebaSAdam Thomson #define DA7213_DAC_L_SRC_SHIFT					0
205ef5c2ebaSAdam Thomson #define DA7213_DAC_L_MONO_SHIFT					3
206ef5c2ebaSAdam Thomson #define DA7213_DAC_R_SRC_SHIFT					4
207ef5c2ebaSAdam Thomson #define DA7213_DAC_R_MONO_SHIFT					7
208ef5c2ebaSAdam Thomson #define DA7213_DAC_SRC_MAX					4
209ef5c2ebaSAdam Thomson #define DA7213_DAC_MONO_MAX					0x1
210ef5c2ebaSAdam Thomson 
211ef5c2ebaSAdam Thomson /* DA7213_ALC_CTRL1 = 0x2B */
212ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_EN_SHIFT				0
213ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_EN_MAX				0x1
214ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_EN					(0x1 << 0)
215ef5c2ebaSAdam Thomson #define DA7213_ALC_SYNC_MODE					(0x1 << 1)
216ef5c2ebaSAdam Thomson #define DA7213_ALC_CALIB_MODE_MAN				(0x1 << 2)
217ef5c2ebaSAdam Thomson #define DA7213_ALC_L_EN_SHIFT					3
218ef5c2ebaSAdam Thomson #define DA7213_ALC_AUTO_CALIB_EN				(0x1 << 4)
219ef5c2ebaSAdam Thomson #define DA7213_ALC_CALIB_OVERFLOW				(0x1 << 5)
220ef5c2ebaSAdam Thomson #define DA7213_ALC_R_EN_SHIFT					7
221ef5c2ebaSAdam Thomson #define DA7213_ALC_EN_MAX					0x1
222ef5c2ebaSAdam Thomson 
223ef5c2ebaSAdam Thomson /* DA7213_AUX_L/R_GAIN = 0x30/0x31 */
224ef5c2ebaSAdam Thomson #define DA7213_AUX_AMP_GAIN_SHIFT				0
225ef5c2ebaSAdam Thomson #define DA7213_AUX_AMP_GAIN_MAX					0x3F
226ef5c2ebaSAdam Thomson 
227ef5c2ebaSAdam Thomson /* DA7213_MIXIN_L/R_SELECT = 0x32/0x33 */
228ef5c2ebaSAdam Thomson #define DA7213_DMIC_EN_SHIFT					7
229ef5c2ebaSAdam Thomson #define DA7213_DMIC_EN_MAX					0x1
230ef5c2ebaSAdam Thomson 
231ef5c2ebaSAdam Thomson /* DA7213_MIXIN_L_SELECT = 0x32 */
232ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_AUX_L_SHIFT			0
233ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIC_1_SHIFT			1
234ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIC_1				(0x1 << 1)
235ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIC_2_SHIFT			2
236ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIC_2				(0x1 << 2)
237ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIXIN_R_SHIFT			3
238ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MAX				0x1
239ef5c2ebaSAdam Thomson 
240ef5c2ebaSAdam Thomson /* DA7213_MIXIN_R_SELECT =  0x33 */
241ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_AUX_R_SHIFT			0
242ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIC_2_SHIFT			1
243ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIC_2				(0x1 << 1)
244ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIC_1_SHIFT			2
245ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIC_1				(0x1 << 2)
246ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIXIN_L_SHIFT			3
247ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MAX				0x1
248ef5c2ebaSAdam Thomson #define DA7213_MIC_BIAS_OUTPUT_SELECT_2				(0x1 << 6)
249ef5c2ebaSAdam Thomson 
250ef5c2ebaSAdam Thomson /* DA7213_MIXIN_L/R_GAIN = 0x34/0x35 */
251ef5c2ebaSAdam Thomson #define DA7213_MIXIN_AMP_GAIN_SHIFT				0
252ef5c2ebaSAdam Thomson #define DA7213_MIXIN_AMP_GAIN_MAX				0xF
253ef5c2ebaSAdam Thomson 
254ef5c2ebaSAdam Thomson /* DA7213_ADC_L/R_GAIN = 0x36/0x37 */
255ef5c2ebaSAdam Thomson #define DA7213_ADC_AMP_GAIN_SHIFT				0
256ef5c2ebaSAdam Thomson #define DA7213_ADC_AMP_GAIN_MAX					0x7F
257ef5c2ebaSAdam Thomson 
258ef5c2ebaSAdam Thomson /* DA7213_ADC/DAC_FILTERS1 = 0x38/0x44 */
259ef5c2ebaSAdam Thomson #define DA7213_VOICE_HPF_CORNER_SHIFT				0
260ef5c2ebaSAdam Thomson #define DA7213_VOICE_HPF_CORNER_MAX				8
261ef5c2ebaSAdam Thomson #define DA7213_VOICE_EN_SHIFT					3
262ef5c2ebaSAdam Thomson #define DA7213_VOICE_EN_MAX					0x1
263ef5c2ebaSAdam Thomson #define DA7213_AUDIO_HPF_CORNER_SHIFT				4
264ef5c2ebaSAdam Thomson #define DA7213_AUDIO_HPF_CORNER_MAX				4
265ef5c2ebaSAdam Thomson #define DA7213_HPF_EN_SHIFT					7
266ef5c2ebaSAdam Thomson #define DA7213_HPF_EN_MAX					0x1
267ef5c2ebaSAdam Thomson 
268ef5c2ebaSAdam Thomson /* DA7213_MIC_1/2_GAIN = 0x39/0x3A */
269ef5c2ebaSAdam Thomson #define DA7213_MIC_AMP_GAIN_SHIFT				0
270ef5c2ebaSAdam Thomson #define DA7213_MIC_AMP_GAIN_MAX					0x7
271ef5c2ebaSAdam Thomson 
272ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS5 = 0x40 */
273ef5c2ebaSAdam Thomson #define DA7213_DAC_SOFTMUTE_EN_SHIFT				7
274ef5c2ebaSAdam Thomson #define DA7213_DAC_SOFTMUTE_EN_MAX				0x1
275ef5c2ebaSAdam Thomson #define DA7213_DAC_SOFTMUTE_RATE_SHIFT				4
276ef5c2ebaSAdam Thomson #define DA7213_DAC_SOFTMUTE_RATE_MAX				7
277ef5c2ebaSAdam Thomson 
278ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS2/3/4 = 0x41/0x42/0x43 */
279ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND_MAX					0xF
280ef5c2ebaSAdam Thomson 
281ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS2 = 0x41 */
282ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND1_SHIFT				0
283ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND2_SHIFT				4
284ef5c2ebaSAdam Thomson 
285ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS2 = 0x42 */
286ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND3_SHIFT				0
287ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND4_SHIFT				4
288ef5c2ebaSAdam Thomson 
289ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS4 = 0x43 */
290ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND5_SHIFT				0
291ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_EN_SHIFT					7
292ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_EN_MAX					0x1
293ef5c2ebaSAdam Thomson 
294ef5c2ebaSAdam Thomson /* DA7213_DAC_L/R_GAIN = 0x45/0x46 */
295ef5c2ebaSAdam Thomson #define DA7213_DAC_AMP_GAIN_SHIFT				0
296ef5c2ebaSAdam Thomson #define DA7213_DAC_AMP_GAIN_MAX					0x7F
297ef5c2ebaSAdam Thomson 
298ef5c2ebaSAdam Thomson /* DA7213_HP_L/R_GAIN = 0x45/0x46 */
299ef5c2ebaSAdam Thomson #define DA7213_HP_AMP_GAIN_SHIFT				0
300ef5c2ebaSAdam Thomson #define DA7213_HP_AMP_GAIN_MAX					0x3F
301ef5c2ebaSAdam Thomson 
302ef5c2ebaSAdam Thomson /* DA7213_CP_CTRL = 0x47 */
303ef5c2ebaSAdam Thomson #define DA7213_CP_EN_SHIFT					7
304ef5c2ebaSAdam Thomson 
305ef5c2ebaSAdam Thomson /* DA7213_LINE_GAIN = 0x4A */
306ef5c2ebaSAdam Thomson #define DA7213_LINE_AMP_GAIN_SHIFT				0
307ef5c2ebaSAdam Thomson #define DA7213_LINE_AMP_GAIN_MAX				0x3F
308ef5c2ebaSAdam Thomson 
309ef5c2ebaSAdam Thomson /* DA7213_MIXOUT_L_SELECT = 0x4B */
310ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_AUX_L_SHIFT			0
311ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MIXIN_L_SHIFT		1
312ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MIXIN_R_SHIFT		2
313ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_DAC_L_SHIFT			3
314ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_AUX_L_INVERTED_SHIFT		4
315ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MIXIN_L_INVERTED_SHIFT	5
316ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MIXIN_R_INVERTED_SHIFT	6
317ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MAX				0x1
318ef5c2ebaSAdam Thomson 
319ef5c2ebaSAdam Thomson /* DA7213_MIXOUT_R_SELECT = 0x4C */
320ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_AUX_R_SHIFT			0
321ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MIXIN_R_SHIFT		1
322ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MIXIN_L_SHIFT		2
323ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_DAC_R_SHIFT			3
324ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_AUX_R_INVERTED_SHIFT		4
325ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MIXIN_R_INVERTED_SHIFT	5
326ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MIXIN_L_INVERTED_SHIFT	6
327ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MAX				0x1
328ef5c2ebaSAdam Thomson 
329ef5c2ebaSAdam Thomson /*
330ef5c2ebaSAdam Thomson  * DA7213_AUX_L/R_CTRL = 0x60/0x61,
331ef5c2ebaSAdam Thomson  * DA7213_MIC_1/2_CTRL = 0x63/0x64,
332ef5c2ebaSAdam Thomson  * DA7213_MIXIN_L/R_CTRL = 0x65/0x66,
333ef5c2ebaSAdam Thomson  * DA7213_ADC_L/R_CTRL = 0x65/0x66,
334ef5c2ebaSAdam Thomson  * DA7213_DAC_L/R_CTRL = 0x69/0x6A,
335ef5c2ebaSAdam Thomson  * DA7213_HP_L/R_CTRL = 0x6B/0x6C,
336ef5c2ebaSAdam Thomson  * DA7213_LINE_CTRL = 0x6D
337ef5c2ebaSAdam Thomson  */
338ef5c2ebaSAdam Thomson #define DA7213_MUTE_EN_SHIFT					6
339ef5c2ebaSAdam Thomson #define DA7213_MUTE_EN_MAX					0x1
340ef5c2ebaSAdam Thomson #define DA7213_MUTE_EN						(0x1 << 6)
341ef5c2ebaSAdam Thomson 
342ef5c2ebaSAdam Thomson /*
343ef5c2ebaSAdam Thomson  * DA7213_AUX_L/R_CTRL = 0x60/0x61,
344ef5c2ebaSAdam Thomson  * DA7213_MIXIN_L/R_CTRL = 0x65/0x66,
345ef5c2ebaSAdam Thomson  * DA7213_ADC_L/R_CTRL = 0x65/0x66,
346ef5c2ebaSAdam Thomson  * DA7213_DAC_L/R_CTRL = 0x69/0x6A,
347ef5c2ebaSAdam Thomson  * DA7213_HP_L/R_CTRL = 0x6B/0x6C,
348ef5c2ebaSAdam Thomson  * DA7213_LINE_CTRL = 0x6D
349ef5c2ebaSAdam Thomson  */
350ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_EN_SHIFT				5
351ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_EN_MAX					0x1
352ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_EN					(0x1 << 5)
353ef5c2ebaSAdam Thomson 
354ef5c2ebaSAdam Thomson /*
355ef5c2ebaSAdam Thomson  * DA7213_AUX_L/R_CTRL = 0x60/0x61,
356ef5c2ebaSAdam Thomson  * DA7213_MIXIN_L/R_CTRL = 0x65/0x66,
357ef5c2ebaSAdam Thomson  * DA7213_HP_L/R_CTRL = 0x6B/0x6C,
358ef5c2ebaSAdam Thomson  * DA7213_LINE_CTRL = 0x6D
359ef5c2ebaSAdam Thomson  */
360ef5c2ebaSAdam Thomson #define DA7213_ZC_EN_SHIFT					4
361ef5c2ebaSAdam Thomson #define DA7213_ZC_EN_MAX					0x1
362ef5c2ebaSAdam Thomson 
363ef5c2ebaSAdam Thomson /*
364ef5c2ebaSAdam Thomson  * DA7213_AUX_L/R_CTRL = 0x60/0x61,
365ef5c2ebaSAdam Thomson  * DA7213_MIC_1/2_CTRL = 0x63/0x64,
366ef5c2ebaSAdam Thomson  * DA7213_MIXIN_L/R_CTRL = 0x65/0x66,
367ef5c2ebaSAdam Thomson  * DA7213_HP_L/R_CTRL = 0x6B/0x6C,
368ef5c2ebaSAdam Thomson  * DA7213_MIXOUT_L/R_CTRL = 0x6E/0x6F,
369ef5c2ebaSAdam Thomson  * DA7213_LINE_CTRL = 0x6D
370ef5c2ebaSAdam Thomson  */
371ef5c2ebaSAdam Thomson #define DA7213_AMP_EN_SHIFT					7
372ef5c2ebaSAdam Thomson 
373ef5c2ebaSAdam Thomson /* DA7213_MIC_1/2_CTRL = 0x63/0x64 */
374ef5c2ebaSAdam Thomson #define DA7213_MIC_AMP_IN_SEL_SHIFT				2
375ef5c2ebaSAdam Thomson #define DA7213_MIC_AMP_IN_SEL_MAX				3
376ef5c2ebaSAdam Thomson 
377ef5c2ebaSAdam Thomson /* DA7213_MICBIAS_CTRL = 0x62 */
378ef5c2ebaSAdam Thomson #define DA7213_MICBIAS1_LEVEL_SHIFT				0
379ef5c2ebaSAdam Thomson #define DA7213_MICBIAS1_LEVEL_MASK				(0x3 << 0)
380ef5c2ebaSAdam Thomson #define DA7213_MICBIAS1_EN_SHIFT				3
381ef5c2ebaSAdam Thomson #define DA7213_MICBIAS2_LEVEL_SHIFT				4
382ef5c2ebaSAdam Thomson #define DA7213_MICBIAS2_LEVEL_MASK				(0x3 << 4)
383ef5c2ebaSAdam Thomson #define DA7213_MICBIAS2_EN_SHIFT				7
384ef5c2ebaSAdam Thomson 
385ef5c2ebaSAdam Thomson /* DA7213_MIXIN_L/R_CTRL = 0x65/0x66 */
386ef5c2ebaSAdam Thomson #define DA7213_MIXIN_MIX_EN					(0x1 << 3)
387ef5c2ebaSAdam Thomson 
388ef5c2ebaSAdam Thomson /* DA7213_ADC_L/R_CTRL = 0x67/0x68 */
389ef5c2ebaSAdam Thomson #define DA7213_ADC_EN_SHIFT					7
390ef5c2ebaSAdam Thomson #define DA7213_ADC_EN						(0x1 << 7)
391ef5c2ebaSAdam Thomson 
392ef5c2ebaSAdam Thomson /* DA7213_DAC_L/R_CTRL =  0x69/0x6A*/
393ef5c2ebaSAdam Thomson #define DA7213_DAC_EN_SHIFT					7
394ef5c2ebaSAdam Thomson 
395ef5c2ebaSAdam Thomson /* DA7213_HP_L/R_CTRL = 0x6B/0x6C */
396ef5c2ebaSAdam Thomson #define DA7213_HP_AMP_OE					(0x1 << 3)
397ef5c2ebaSAdam Thomson 
398ef5c2ebaSAdam Thomson /* DA7213_LINE_CTRL = 0x6D */
399ef5c2ebaSAdam Thomson #define DA7213_LINE_AMP_OE					(0x1 << 3)
400ef5c2ebaSAdam Thomson 
401ef5c2ebaSAdam Thomson /* DA7213_MIXOUT_L/R_CTRL = 0x6E/0x6F */
402ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_MIX_EN					(0x1 << 3)
403ef5c2ebaSAdam Thomson 
404ef5c2ebaSAdam Thomson /* DA7213_GAIN_RAMP_CTRL = 0x92 */
405ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_RATE_SHIFT				0
406ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_RATE_MAX				4
407ef5c2ebaSAdam Thomson 
408ef5c2ebaSAdam Thomson /* DA7213_MIC_CONFIG = 0x93 */
409ef5c2ebaSAdam Thomson #define DA7213_DMIC_DATA_SEL_SHIFT				0
410ef5c2ebaSAdam Thomson #define DA7213_DMIC_DATA_SEL_MASK				(0x1 << 0)
411ef5c2ebaSAdam Thomson #define DA7213_DMIC_SAMPLEPHASE_SHIFT				1
412ef5c2ebaSAdam Thomson #define DA7213_DMIC_SAMPLEPHASE_MASK				(0x1 << 1)
413ef5c2ebaSAdam Thomson #define DA7213_DMIC_CLK_RATE_SHIFT				2
414ef5c2ebaSAdam Thomson #define DA7213_DMIC_CLK_RATE_MASK				(0x1 << 2)
415ef5c2ebaSAdam Thomson 
4167e28fd46SAdam Thomson /* DA7213_PC_COUNT = 0x94 */
4177e28fd46SAdam Thomson #define DA7213_PC_FREERUN_MASK					(0x1 << 0)
4187e28fd46SAdam Thomson 
419ef5c2ebaSAdam Thomson /* DA7213_DIG_CTRL = 0x99 */
420ef5c2ebaSAdam Thomson #define DA7213_DAC_L_INV_SHIFT					3
421ef5c2ebaSAdam Thomson #define DA7213_DAC_R_INV_SHIFT					7
422ef5c2ebaSAdam Thomson #define DA7213_DAC_INV_MAX					0x1
423ef5c2ebaSAdam Thomson 
424ef5c2ebaSAdam Thomson /* DA7213_ALC_CTRL2 = 0x9A */
425ef5c2ebaSAdam Thomson #define DA7213_ALC_ATTACK_SHIFT					0
426ef5c2ebaSAdam Thomson #define DA7213_ALC_ATTACK_MAX					13
427ef5c2ebaSAdam Thomson #define DA7213_ALC_RELEASE_SHIFT				4
428ef5c2ebaSAdam Thomson #define DA7213_ALC_RELEASE_MAX					11
429ef5c2ebaSAdam Thomson 
430ef5c2ebaSAdam Thomson /* DA7213_ALC_CTRL3 = 0x9B */
431ef5c2ebaSAdam Thomson #define DA7213_ALC_HOLD_SHIFT					0
432ef5c2ebaSAdam Thomson #define DA7213_ALC_HOLD_MAX					16
433ef5c2ebaSAdam Thomson #define DA7213_ALC_INTEG_ATTACK_SHIFT				4
434ef5c2ebaSAdam Thomson #define DA7213_ALC_INTEG_RELEASE_SHIFT				6
435ef5c2ebaSAdam Thomson #define DA7213_ALC_INTEG_MAX					4
436ef5c2ebaSAdam Thomson 
437ef5c2ebaSAdam Thomson /*
438ef5c2ebaSAdam Thomson  * DA7213_ALC_NOISE = 0x9C,
439ef5c2ebaSAdam Thomson  * DA7213_ALC_TARGET_MIN/MAX = 0x9D/0x9E
440ef5c2ebaSAdam Thomson  */
441ef5c2ebaSAdam Thomson #define DA7213_ALC_THRESHOLD_SHIFT				0
442ef5c2ebaSAdam Thomson #define DA7213_ALC_THRESHOLD_MAX				0x3F
443ef5c2ebaSAdam Thomson 
444ef5c2ebaSAdam Thomson /* DA7213_ALC_GAIN_LIMITS = 0x9F */
445ef5c2ebaSAdam Thomson #define DA7213_ALC_ATTEN_MAX_SHIFT				0
446ef5c2ebaSAdam Thomson #define DA7213_ALC_GAIN_MAX_SHIFT				4
447ef5c2ebaSAdam Thomson #define DA7213_ALC_ATTEN_GAIN_MAX_MAX				0xF
448ef5c2ebaSAdam Thomson 
449ef5c2ebaSAdam Thomson /* DA7213_ALC_ANA_GAIN_LIMITS = 0xA0 */
450ef5c2ebaSAdam Thomson #define DA7213_ALC_ANA_GAIN_MIN_SHIFT				0
451ef5c2ebaSAdam Thomson #define DA7213_ALC_ANA_GAIN_MAX_SHIFT				4
452ef5c2ebaSAdam Thomson #define DA7213_ALC_ANA_GAIN_MAX					0x7
453ef5c2ebaSAdam Thomson 
454ef5c2ebaSAdam Thomson /* DA7213_ALC_ANTICLIP_CTRL = 0xA1 */
455ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_EN_SHIFT				7
456ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_EN_MAX				0x1
457ef5c2ebaSAdam Thomson 
458ef5c2ebaSAdam Thomson /* DA7213_ALC_ANTICLIP_LEVEL = 0xA2 */
459ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_LEVEL_SHIFT				0
460ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_LEVEL_MAX				0x7F
461ef5c2ebaSAdam Thomson 
462ef5c2ebaSAdam Thomson /* DA7213_ALC_CIC_OP_LVL_CTRL = 0xAD */
463ef5c2ebaSAdam Thomson #define DA7213_ALC_DATA_MIDDLE					(0x2 << 0)
464ef5c2ebaSAdam Thomson #define DA7213_ALC_DATA_TOP					(0x3 << 0)
465ef5c2ebaSAdam Thomson #define DA7213_ALC_CIC_OP_CHANNEL_LEFT				(0x0 << 7)
466ef5c2ebaSAdam Thomson #define DA7213_ALC_CIC_OP_CHANNEL_RIGHT				(0x1 << 7)
467ef5c2ebaSAdam Thomson 
468ef5c2ebaSAdam Thomson /* DA7213_DAC_NG_SETUP_TIME = 0xAF */
469ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_SETUP_TIME_SHIFT				0
470ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_SETUP_TIME_MAX				4
471ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_RAMPUP_RATE_SHIFT				2
472ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_RAMPDN_RATE_SHIFT				3
473ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_RAMP_RATE_MAX				2
474ef5c2ebaSAdam Thomson 
475ef5c2ebaSAdam Thomson /* DA7213_DAC_NG_OFF/ON_THRESH = 0xB0/0xB1 */
476ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_THRESHOLD_SHIFT				0
477ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_THRESHOLD_MAX				0x7
478ef5c2ebaSAdam Thomson 
479ef5c2ebaSAdam Thomson /* DA7213_DAC_NG_CTRL = 0xB2 */
480ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_EN_SHIFT					7
481ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_EN_MAX					0x1
482ef5c2ebaSAdam Thomson 
483ef5c2ebaSAdam Thomson 
484ef5c2ebaSAdam Thomson /*
485ef5c2ebaSAdam Thomson  * General defines
486ef5c2ebaSAdam Thomson  */
487ef5c2ebaSAdam Thomson 
488ef5c2ebaSAdam Thomson /* Register inversion */
489ef5c2ebaSAdam Thomson #define DA7213_NO_INVERT		0
490ef5c2ebaSAdam Thomson #define DA7213_INVERT			1
491ef5c2ebaSAdam Thomson 
492ef5c2ebaSAdam Thomson /* Byte related defines */
493ef5c2ebaSAdam Thomson #define DA7213_BYTE_SHIFT		8
494ef5c2ebaSAdam Thomson #define DA7213_BYTE_MASK		0xFF
495ef5c2ebaSAdam Thomson 
496ef5c2ebaSAdam Thomson /* ALC related */
497ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_15_8		0x00FF00
498ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_19_16		0x0F0000
499ef5c2ebaSAdam Thomson #define DA7213_ALC_AVG_ITERATIONS	5
500ef5c2ebaSAdam Thomson 
501ef5c2ebaSAdam Thomson /* PLL related */
502ef5c2ebaSAdam Thomson #define DA7213_SYSCLK_MCLK			0
503ef5c2ebaSAdam Thomson #define DA7213_SYSCLK_PLL			1
504ef5c2ebaSAdam Thomson #define DA7213_PLL_FREQ_OUT_90316800		90316800
505ef5c2ebaSAdam Thomson #define DA7213_PLL_FREQ_OUT_98304000		98304000
506ef5c2ebaSAdam Thomson #define DA7213_PLL_FREQ_OUT_94310400		94310400
507*1e62c52dSAdam Thomson #define DA7213_PLL_INDIV_5_TO_9_MHZ_VAL		2
508*1e62c52dSAdam Thomson #define DA7213_PLL_INDIV_9_TO_18_MHZ_VAL	4
509*1e62c52dSAdam Thomson #define DA7213_PLL_INDIV_18_TO_36_MHZ_VAL	8
510*1e62c52dSAdam Thomson #define DA7213_PLL_INDIV_36_TO_54_MHZ_VAL	16
511d575b0b0SAdam Thomson #define DA7213_SRM_CHECK_RETRIES		8
512ef5c2ebaSAdam Thomson 
5136e7c4443SAdam Thomson enum da7213_clk_src {
5146e7c4443SAdam Thomson 	DA7213_CLKSRC_MCLK = 0,
5156e7c4443SAdam Thomson 	DA7213_CLKSRC_MCLK_SQR,
516ef5c2ebaSAdam Thomson };
517ef5c2ebaSAdam Thomson 
518ef5c2ebaSAdam Thomson /* Codec private data */
519ef5c2ebaSAdam Thomson struct da7213_priv {
520ef5c2ebaSAdam Thomson 	struct regmap *regmap;
5216e7c4443SAdam Thomson 	struct clk *mclk;
522ef5c2ebaSAdam Thomson 	unsigned int mclk_rate;
5236e7c4443SAdam Thomson 	int clk_src;
524ef5c2ebaSAdam Thomson 	bool master;
525ef5c2ebaSAdam Thomson 	bool mclk_squarer_en;
526ef5c2ebaSAdam Thomson 	bool srm_en;
527ef5c2ebaSAdam Thomson 	bool alc_calib_auto;
528ef5c2ebaSAdam Thomson 	bool alc_en;
529ef5c2ebaSAdam Thomson 	struct da7213_platform_data *pdata;
530ef5c2ebaSAdam Thomson };
531ef5c2ebaSAdam Thomson 
532ef5c2ebaSAdam Thomson #endif /* _DA7213_H */
533