xref: /linux/sound/soc/codecs/da7213.h (revision 6e7c444318699496e6e6f30c875cf67534aeccc6)
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 
16*6e7c4443SAdam 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 
145ef5c2ebaSAdam Thomson /* DA7213_SR = 0x22 */
146ef5c2ebaSAdam Thomson #define DA7213_SR_8000						(0x1 << 0)
147ef5c2ebaSAdam Thomson #define DA7213_SR_11025						(0x2 << 0)
148ef5c2ebaSAdam Thomson #define DA7213_SR_12000						(0x3 << 0)
149ef5c2ebaSAdam Thomson #define DA7213_SR_16000						(0x5 << 0)
150ef5c2ebaSAdam Thomson #define DA7213_SR_22050						(0x6 << 0)
151ef5c2ebaSAdam Thomson #define DA7213_SR_24000						(0x7 << 0)
152ef5c2ebaSAdam Thomson #define DA7213_SR_32000						(0x9 << 0)
153ef5c2ebaSAdam Thomson #define DA7213_SR_44100						(0xA << 0)
154ef5c2ebaSAdam Thomson #define DA7213_SR_48000						(0xB << 0)
155ef5c2ebaSAdam Thomson #define DA7213_SR_88200						(0xE << 0)
156ef5c2ebaSAdam Thomson #define DA7213_SR_96000						(0xF << 0)
157ef5c2ebaSAdam Thomson 
158ef5c2ebaSAdam Thomson /* DA7213_REFERENCES = 0x23 */
159ef5c2ebaSAdam Thomson #define DA7213_BIAS_EN						(0x1 << 3)
160ef5c2ebaSAdam Thomson #define DA7213_VMID_EN						(0x1 << 7)
161ef5c2ebaSAdam Thomson 
162ef5c2ebaSAdam Thomson /* DA7213_PLL_CTRL = 0x27 */
163ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_5_10_MHZ				(0x0 << 2)
164ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_10_20_MHZ				(0x1 << 2)
165ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_20_40_MHZ				(0x2 << 2)
166ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_40_54_MHZ				(0x3 << 2)
167ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_MASK					(0x3 << 2)
168ef5c2ebaSAdam Thomson #define DA7213_PLL_MCLK_SQR_EN					(0x1 << 4)
169ef5c2ebaSAdam Thomson #define DA7213_PLL_32K_MODE					(0x1 << 5)
170ef5c2ebaSAdam Thomson #define DA7213_PLL_SRM_EN					(0x1 << 6)
171ef5c2ebaSAdam Thomson #define DA7213_PLL_EN						(0x1 << 7)
172ef5c2ebaSAdam Thomson 
173ef5c2ebaSAdam Thomson /* DA7213_DAI_CLK_MODE = 0x28 */
174ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_32				(0x0 << 0)
175ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_64				(0x1 << 0)
176ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_128				(0x2 << 0)
177ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_256				(0x3 << 0)
178ef5c2ebaSAdam Thomson #define DA7213_DAI_BCLKS_PER_WCLK_MASK				(0x3 << 0)
179ef5c2ebaSAdam Thomson #define DA7213_DAI_CLK_POL_INV					(0x1 << 2)
180ef5c2ebaSAdam Thomson #define DA7213_DAI_WCLK_POL_INV					(0x1 << 3)
181ef5c2ebaSAdam Thomson #define DA7213_DAI_CLK_EN_SLAVE_MODE				(0x0 << 7)
182ef5c2ebaSAdam Thomson #define DA7213_DAI_CLK_EN_MASTER_MODE				(0x1 << 7)
183ef5c2ebaSAdam Thomson #define DA7213_DAI_CLK_EN_MASK					(0x1 << 7)
184ef5c2ebaSAdam Thomson 
185ef5c2ebaSAdam Thomson /* DA7213_DAI_CTRL = 0x29 */
186ef5c2ebaSAdam Thomson #define DA7213_DAI_FORMAT_I2S_MODE				(0x0 << 0)
187ef5c2ebaSAdam Thomson #define DA7213_DAI_FORMAT_LEFT_J				(0x1 << 0)
188ef5c2ebaSAdam Thomson #define DA7213_DAI_FORMAT_RIGHT_J				(0x2 << 0)
189ef5c2ebaSAdam Thomson #define DA7213_DAI_FORMAT_MASK					(0x3 << 0)
190ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_S16_LE				(0x0 << 2)
191ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_S20_LE				(0x1 << 2)
192ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_S24_LE				(0x2 << 2)
193ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_S32_LE				(0x3 << 2)
194ef5c2ebaSAdam Thomson #define DA7213_DAI_WORD_LENGTH_MASK				(0x3 << 2)
195ef5c2ebaSAdam Thomson #define DA7213_DAI_EN_SHIFT					7
196ef5c2ebaSAdam Thomson 
197ef5c2ebaSAdam Thomson /* DA7213_DIG_ROUTING_DAI = 0x21 */
198ef5c2ebaSAdam Thomson #define DA7213_DAI_L_SRC_SHIFT					0
199ef5c2ebaSAdam Thomson #define DA7213_DAI_R_SRC_SHIFT					4
200ef5c2ebaSAdam Thomson #define DA7213_DAI_SRC_MAX					4
201ef5c2ebaSAdam Thomson 
202ef5c2ebaSAdam Thomson /* DA7213_DIG_ROUTING_DAC = 0x2A */
203ef5c2ebaSAdam Thomson #define DA7213_DAC_L_SRC_SHIFT					0
204ef5c2ebaSAdam Thomson #define DA7213_DAC_L_MONO_SHIFT					3
205ef5c2ebaSAdam Thomson #define DA7213_DAC_R_SRC_SHIFT					4
206ef5c2ebaSAdam Thomson #define DA7213_DAC_R_MONO_SHIFT					7
207ef5c2ebaSAdam Thomson #define DA7213_DAC_SRC_MAX					4
208ef5c2ebaSAdam Thomson #define DA7213_DAC_MONO_MAX					0x1
209ef5c2ebaSAdam Thomson 
210ef5c2ebaSAdam Thomson /* DA7213_ALC_CTRL1 = 0x2B */
211ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_EN_SHIFT				0
212ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_EN_MAX				0x1
213ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_EN					(0x1 << 0)
214ef5c2ebaSAdam Thomson #define DA7213_ALC_SYNC_MODE					(0x1 << 1)
215ef5c2ebaSAdam Thomson #define DA7213_ALC_CALIB_MODE_MAN				(0x1 << 2)
216ef5c2ebaSAdam Thomson #define DA7213_ALC_L_EN_SHIFT					3
217ef5c2ebaSAdam Thomson #define DA7213_ALC_AUTO_CALIB_EN				(0x1 << 4)
218ef5c2ebaSAdam Thomson #define DA7213_ALC_CALIB_OVERFLOW				(0x1 << 5)
219ef5c2ebaSAdam Thomson #define DA7213_ALC_R_EN_SHIFT					7
220ef5c2ebaSAdam Thomson #define DA7213_ALC_EN_MAX					0x1
221ef5c2ebaSAdam Thomson 
222ef5c2ebaSAdam Thomson /* DA7213_AUX_L/R_GAIN = 0x30/0x31 */
223ef5c2ebaSAdam Thomson #define DA7213_AUX_AMP_GAIN_SHIFT				0
224ef5c2ebaSAdam Thomson #define DA7213_AUX_AMP_GAIN_MAX					0x3F
225ef5c2ebaSAdam Thomson 
226ef5c2ebaSAdam Thomson /* DA7213_MIXIN_L/R_SELECT = 0x32/0x33 */
227ef5c2ebaSAdam Thomson #define DA7213_DMIC_EN_SHIFT					7
228ef5c2ebaSAdam Thomson #define DA7213_DMIC_EN_MAX					0x1
229ef5c2ebaSAdam Thomson 
230ef5c2ebaSAdam Thomson /* DA7213_MIXIN_L_SELECT = 0x32 */
231ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_AUX_L_SHIFT			0
232ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIC_1_SHIFT			1
233ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIC_1				(0x1 << 1)
234ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIC_2_SHIFT			2
235ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIC_2				(0x1 << 2)
236ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MIXIN_R_SHIFT			3
237ef5c2ebaSAdam Thomson #define DA7213_MIXIN_L_MIX_SELECT_MAX				0x1
238ef5c2ebaSAdam Thomson 
239ef5c2ebaSAdam Thomson /* DA7213_MIXIN_R_SELECT =  0x33 */
240ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_AUX_R_SHIFT			0
241ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIC_2_SHIFT			1
242ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIC_2				(0x1 << 1)
243ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIC_1_SHIFT			2
244ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIC_1				(0x1 << 2)
245ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MIXIN_L_SHIFT			3
246ef5c2ebaSAdam Thomson #define DA7213_MIXIN_R_MIX_SELECT_MAX				0x1
247ef5c2ebaSAdam Thomson #define DA7213_MIC_BIAS_OUTPUT_SELECT_2				(0x1 << 6)
248ef5c2ebaSAdam Thomson 
249ef5c2ebaSAdam Thomson /* DA7213_MIXIN_L/R_GAIN = 0x34/0x35 */
250ef5c2ebaSAdam Thomson #define DA7213_MIXIN_AMP_GAIN_SHIFT				0
251ef5c2ebaSAdam Thomson #define DA7213_MIXIN_AMP_GAIN_MAX				0xF
252ef5c2ebaSAdam Thomson 
253ef5c2ebaSAdam Thomson /* DA7213_ADC_L/R_GAIN = 0x36/0x37 */
254ef5c2ebaSAdam Thomson #define DA7213_ADC_AMP_GAIN_SHIFT				0
255ef5c2ebaSAdam Thomson #define DA7213_ADC_AMP_GAIN_MAX					0x7F
256ef5c2ebaSAdam Thomson 
257ef5c2ebaSAdam Thomson /* DA7213_ADC/DAC_FILTERS1 = 0x38/0x44 */
258ef5c2ebaSAdam Thomson #define DA7213_VOICE_HPF_CORNER_SHIFT				0
259ef5c2ebaSAdam Thomson #define DA7213_VOICE_HPF_CORNER_MAX				8
260ef5c2ebaSAdam Thomson #define DA7213_VOICE_EN_SHIFT					3
261ef5c2ebaSAdam Thomson #define DA7213_VOICE_EN_MAX					0x1
262ef5c2ebaSAdam Thomson #define DA7213_AUDIO_HPF_CORNER_SHIFT				4
263ef5c2ebaSAdam Thomson #define DA7213_AUDIO_HPF_CORNER_MAX				4
264ef5c2ebaSAdam Thomson #define DA7213_HPF_EN_SHIFT					7
265ef5c2ebaSAdam Thomson #define DA7213_HPF_EN_MAX					0x1
266ef5c2ebaSAdam Thomson 
267ef5c2ebaSAdam Thomson /* DA7213_MIC_1/2_GAIN = 0x39/0x3A */
268ef5c2ebaSAdam Thomson #define DA7213_MIC_AMP_GAIN_SHIFT				0
269ef5c2ebaSAdam Thomson #define DA7213_MIC_AMP_GAIN_MAX					0x7
270ef5c2ebaSAdam Thomson 
271ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS5 = 0x40 */
272ef5c2ebaSAdam Thomson #define DA7213_DAC_SOFTMUTE_EN_SHIFT				7
273ef5c2ebaSAdam Thomson #define DA7213_DAC_SOFTMUTE_EN_MAX				0x1
274ef5c2ebaSAdam Thomson #define DA7213_DAC_SOFTMUTE_RATE_SHIFT				4
275ef5c2ebaSAdam Thomson #define DA7213_DAC_SOFTMUTE_RATE_MAX				7
276ef5c2ebaSAdam Thomson 
277ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS2/3/4 = 0x41/0x42/0x43 */
278ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND_MAX					0xF
279ef5c2ebaSAdam Thomson 
280ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS2 = 0x41 */
281ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND1_SHIFT				0
282ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND2_SHIFT				4
283ef5c2ebaSAdam Thomson 
284ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS2 = 0x42 */
285ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND3_SHIFT				0
286ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND4_SHIFT				4
287ef5c2ebaSAdam Thomson 
288ef5c2ebaSAdam Thomson /* DA7213_DAC_FILTERS4 = 0x43 */
289ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_BAND5_SHIFT				0
290ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_EN_SHIFT					7
291ef5c2ebaSAdam Thomson #define DA7213_DAC_EQ_EN_MAX					0x1
292ef5c2ebaSAdam Thomson 
293ef5c2ebaSAdam Thomson /* DA7213_DAC_L/R_GAIN = 0x45/0x46 */
294ef5c2ebaSAdam Thomson #define DA7213_DAC_AMP_GAIN_SHIFT				0
295ef5c2ebaSAdam Thomson #define DA7213_DAC_AMP_GAIN_MAX					0x7F
296ef5c2ebaSAdam Thomson 
297ef5c2ebaSAdam Thomson /* DA7213_HP_L/R_GAIN = 0x45/0x46 */
298ef5c2ebaSAdam Thomson #define DA7213_HP_AMP_GAIN_SHIFT				0
299ef5c2ebaSAdam Thomson #define DA7213_HP_AMP_GAIN_MAX					0x3F
300ef5c2ebaSAdam Thomson 
301ef5c2ebaSAdam Thomson /* DA7213_CP_CTRL = 0x47 */
302ef5c2ebaSAdam Thomson #define DA7213_CP_EN_SHIFT					7
303ef5c2ebaSAdam Thomson 
304ef5c2ebaSAdam Thomson /* DA7213_LINE_GAIN = 0x4A */
305ef5c2ebaSAdam Thomson #define DA7213_LINE_AMP_GAIN_SHIFT				0
306ef5c2ebaSAdam Thomson #define DA7213_LINE_AMP_GAIN_MAX				0x3F
307ef5c2ebaSAdam Thomson 
308ef5c2ebaSAdam Thomson /* DA7213_MIXOUT_L_SELECT = 0x4B */
309ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_AUX_L_SHIFT			0
310ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MIXIN_L_SHIFT		1
311ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MIXIN_R_SHIFT		2
312ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_DAC_L_SHIFT			3
313ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_AUX_L_INVERTED_SHIFT		4
314ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MIXIN_L_INVERTED_SHIFT	5
315ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MIXIN_R_INVERTED_SHIFT	6
316ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_L_MIX_SELECT_MAX				0x1
317ef5c2ebaSAdam Thomson 
318ef5c2ebaSAdam Thomson /* DA7213_MIXOUT_R_SELECT = 0x4C */
319ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_AUX_R_SHIFT			0
320ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MIXIN_R_SHIFT		1
321ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MIXIN_L_SHIFT		2
322ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_DAC_R_SHIFT			3
323ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_AUX_R_INVERTED_SHIFT		4
324ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MIXIN_R_INVERTED_SHIFT	5
325ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MIXIN_L_INVERTED_SHIFT	6
326ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_R_MIX_SELECT_MAX				0x1
327ef5c2ebaSAdam Thomson 
328ef5c2ebaSAdam Thomson /*
329ef5c2ebaSAdam Thomson  * DA7213_AUX_L/R_CTRL = 0x60/0x61,
330ef5c2ebaSAdam Thomson  * DA7213_MIC_1/2_CTRL = 0x63/0x64,
331ef5c2ebaSAdam Thomson  * DA7213_MIXIN_L/R_CTRL = 0x65/0x66,
332ef5c2ebaSAdam Thomson  * DA7213_ADC_L/R_CTRL = 0x65/0x66,
333ef5c2ebaSAdam Thomson  * DA7213_DAC_L/R_CTRL = 0x69/0x6A,
334ef5c2ebaSAdam Thomson  * DA7213_HP_L/R_CTRL = 0x6B/0x6C,
335ef5c2ebaSAdam Thomson  * DA7213_LINE_CTRL = 0x6D
336ef5c2ebaSAdam Thomson  */
337ef5c2ebaSAdam Thomson #define DA7213_MUTE_EN_SHIFT					6
338ef5c2ebaSAdam Thomson #define DA7213_MUTE_EN_MAX					0x1
339ef5c2ebaSAdam Thomson #define DA7213_MUTE_EN						(0x1 << 6)
340ef5c2ebaSAdam Thomson 
341ef5c2ebaSAdam Thomson /*
342ef5c2ebaSAdam Thomson  * DA7213_AUX_L/R_CTRL = 0x60/0x61,
343ef5c2ebaSAdam Thomson  * DA7213_MIXIN_L/R_CTRL = 0x65/0x66,
344ef5c2ebaSAdam Thomson  * DA7213_ADC_L/R_CTRL = 0x65/0x66,
345ef5c2ebaSAdam Thomson  * DA7213_DAC_L/R_CTRL = 0x69/0x6A,
346ef5c2ebaSAdam Thomson  * DA7213_HP_L/R_CTRL = 0x6B/0x6C,
347ef5c2ebaSAdam Thomson  * DA7213_LINE_CTRL = 0x6D
348ef5c2ebaSAdam Thomson  */
349ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_EN_SHIFT				5
350ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_EN_MAX					0x1
351ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_EN					(0x1 << 5)
352ef5c2ebaSAdam Thomson 
353ef5c2ebaSAdam Thomson /*
354ef5c2ebaSAdam Thomson  * DA7213_AUX_L/R_CTRL = 0x60/0x61,
355ef5c2ebaSAdam Thomson  * DA7213_MIXIN_L/R_CTRL = 0x65/0x66,
356ef5c2ebaSAdam Thomson  * DA7213_HP_L/R_CTRL = 0x6B/0x6C,
357ef5c2ebaSAdam Thomson  * DA7213_LINE_CTRL = 0x6D
358ef5c2ebaSAdam Thomson  */
359ef5c2ebaSAdam Thomson #define DA7213_ZC_EN_SHIFT					4
360ef5c2ebaSAdam Thomson #define DA7213_ZC_EN_MAX					0x1
361ef5c2ebaSAdam Thomson 
362ef5c2ebaSAdam Thomson /*
363ef5c2ebaSAdam Thomson  * DA7213_AUX_L/R_CTRL = 0x60/0x61,
364ef5c2ebaSAdam Thomson  * DA7213_MIC_1/2_CTRL = 0x63/0x64,
365ef5c2ebaSAdam Thomson  * DA7213_MIXIN_L/R_CTRL = 0x65/0x66,
366ef5c2ebaSAdam Thomson  * DA7213_HP_L/R_CTRL = 0x6B/0x6C,
367ef5c2ebaSAdam Thomson  * DA7213_MIXOUT_L/R_CTRL = 0x6E/0x6F,
368ef5c2ebaSAdam Thomson  * DA7213_LINE_CTRL = 0x6D
369ef5c2ebaSAdam Thomson  */
370ef5c2ebaSAdam Thomson #define DA7213_AMP_EN_SHIFT					7
371ef5c2ebaSAdam Thomson 
372ef5c2ebaSAdam Thomson /* DA7213_MIC_1/2_CTRL = 0x63/0x64 */
373ef5c2ebaSAdam Thomson #define DA7213_MIC_AMP_IN_SEL_SHIFT				2
374ef5c2ebaSAdam Thomson #define DA7213_MIC_AMP_IN_SEL_MAX				3
375ef5c2ebaSAdam Thomson 
376ef5c2ebaSAdam Thomson /* DA7213_MICBIAS_CTRL = 0x62 */
377ef5c2ebaSAdam Thomson #define DA7213_MICBIAS1_LEVEL_SHIFT				0
378ef5c2ebaSAdam Thomson #define DA7213_MICBIAS1_LEVEL_MASK				(0x3 << 0)
379ef5c2ebaSAdam Thomson #define DA7213_MICBIAS1_EN_SHIFT				3
380ef5c2ebaSAdam Thomson #define DA7213_MICBIAS2_LEVEL_SHIFT				4
381ef5c2ebaSAdam Thomson #define DA7213_MICBIAS2_LEVEL_MASK				(0x3 << 4)
382ef5c2ebaSAdam Thomson #define DA7213_MICBIAS2_EN_SHIFT				7
383ef5c2ebaSAdam Thomson 
384ef5c2ebaSAdam Thomson /* DA7213_MIXIN_L/R_CTRL = 0x65/0x66 */
385ef5c2ebaSAdam Thomson #define DA7213_MIXIN_MIX_EN					(0x1 << 3)
386ef5c2ebaSAdam Thomson 
387ef5c2ebaSAdam Thomson /* DA7213_ADC_L/R_CTRL = 0x67/0x68 */
388ef5c2ebaSAdam Thomson #define DA7213_ADC_EN_SHIFT					7
389ef5c2ebaSAdam Thomson #define DA7213_ADC_EN						(0x1 << 7)
390ef5c2ebaSAdam Thomson 
391ef5c2ebaSAdam Thomson /* DA7213_DAC_L/R_CTRL =  0x69/0x6A*/
392ef5c2ebaSAdam Thomson #define DA7213_DAC_EN_SHIFT					7
393ef5c2ebaSAdam Thomson 
394ef5c2ebaSAdam Thomson /* DA7213_HP_L/R_CTRL = 0x6B/0x6C */
395ef5c2ebaSAdam Thomson #define DA7213_HP_AMP_OE					(0x1 << 3)
396ef5c2ebaSAdam Thomson 
397ef5c2ebaSAdam Thomson /* DA7213_LINE_CTRL = 0x6D */
398ef5c2ebaSAdam Thomson #define DA7213_LINE_AMP_OE					(0x1 << 3)
399ef5c2ebaSAdam Thomson 
400ef5c2ebaSAdam Thomson /* DA7213_MIXOUT_L/R_CTRL = 0x6E/0x6F */
401ef5c2ebaSAdam Thomson #define DA7213_MIXOUT_MIX_EN					(0x1 << 3)
402ef5c2ebaSAdam Thomson 
403ef5c2ebaSAdam Thomson /* DA7213_GAIN_RAMP_CTRL = 0x92 */
404ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_RATE_SHIFT				0
405ef5c2ebaSAdam Thomson #define DA7213_GAIN_RAMP_RATE_MAX				4
406ef5c2ebaSAdam Thomson 
407ef5c2ebaSAdam Thomson /* DA7213_MIC_CONFIG = 0x93 */
408ef5c2ebaSAdam Thomson #define DA7213_DMIC_DATA_SEL_SHIFT				0
409ef5c2ebaSAdam Thomson #define DA7213_DMIC_DATA_SEL_MASK				(0x1 << 0)
410ef5c2ebaSAdam Thomson #define DA7213_DMIC_SAMPLEPHASE_SHIFT				1
411ef5c2ebaSAdam Thomson #define DA7213_DMIC_SAMPLEPHASE_MASK				(0x1 << 1)
412ef5c2ebaSAdam Thomson #define DA7213_DMIC_CLK_RATE_SHIFT				2
413ef5c2ebaSAdam Thomson #define DA7213_DMIC_CLK_RATE_MASK				(0x1 << 2)
414ef5c2ebaSAdam Thomson 
415ef5c2ebaSAdam Thomson /* DA7213_DIG_CTRL = 0x99 */
416ef5c2ebaSAdam Thomson #define DA7213_DAC_L_INV_SHIFT					3
417ef5c2ebaSAdam Thomson #define DA7213_DAC_R_INV_SHIFT					7
418ef5c2ebaSAdam Thomson #define DA7213_DAC_INV_MAX					0x1
419ef5c2ebaSAdam Thomson 
420ef5c2ebaSAdam Thomson /* DA7213_ALC_CTRL2 = 0x9A */
421ef5c2ebaSAdam Thomson #define DA7213_ALC_ATTACK_SHIFT					0
422ef5c2ebaSAdam Thomson #define DA7213_ALC_ATTACK_MAX					13
423ef5c2ebaSAdam Thomson #define DA7213_ALC_RELEASE_SHIFT				4
424ef5c2ebaSAdam Thomson #define DA7213_ALC_RELEASE_MAX					11
425ef5c2ebaSAdam Thomson 
426ef5c2ebaSAdam Thomson /* DA7213_ALC_CTRL3 = 0x9B */
427ef5c2ebaSAdam Thomson #define DA7213_ALC_HOLD_SHIFT					0
428ef5c2ebaSAdam Thomson #define DA7213_ALC_HOLD_MAX					16
429ef5c2ebaSAdam Thomson #define DA7213_ALC_INTEG_ATTACK_SHIFT				4
430ef5c2ebaSAdam Thomson #define DA7213_ALC_INTEG_RELEASE_SHIFT				6
431ef5c2ebaSAdam Thomson #define DA7213_ALC_INTEG_MAX					4
432ef5c2ebaSAdam Thomson 
433ef5c2ebaSAdam Thomson /*
434ef5c2ebaSAdam Thomson  * DA7213_ALC_NOISE = 0x9C,
435ef5c2ebaSAdam Thomson  * DA7213_ALC_TARGET_MIN/MAX = 0x9D/0x9E
436ef5c2ebaSAdam Thomson  */
437ef5c2ebaSAdam Thomson #define DA7213_ALC_THRESHOLD_SHIFT				0
438ef5c2ebaSAdam Thomson #define DA7213_ALC_THRESHOLD_MAX				0x3F
439ef5c2ebaSAdam Thomson 
440ef5c2ebaSAdam Thomson /* DA7213_ALC_GAIN_LIMITS = 0x9F */
441ef5c2ebaSAdam Thomson #define DA7213_ALC_ATTEN_MAX_SHIFT				0
442ef5c2ebaSAdam Thomson #define DA7213_ALC_GAIN_MAX_SHIFT				4
443ef5c2ebaSAdam Thomson #define DA7213_ALC_ATTEN_GAIN_MAX_MAX				0xF
444ef5c2ebaSAdam Thomson 
445ef5c2ebaSAdam Thomson /* DA7213_ALC_ANA_GAIN_LIMITS = 0xA0 */
446ef5c2ebaSAdam Thomson #define DA7213_ALC_ANA_GAIN_MIN_SHIFT				0
447ef5c2ebaSAdam Thomson #define DA7213_ALC_ANA_GAIN_MAX_SHIFT				4
448ef5c2ebaSAdam Thomson #define DA7213_ALC_ANA_GAIN_MAX					0x7
449ef5c2ebaSAdam Thomson 
450ef5c2ebaSAdam Thomson /* DA7213_ALC_ANTICLIP_CTRL = 0xA1 */
451ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_EN_SHIFT				7
452ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_EN_MAX				0x1
453ef5c2ebaSAdam Thomson 
454ef5c2ebaSAdam Thomson /* DA7213_ALC_ANTICLIP_LEVEL = 0xA2 */
455ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_LEVEL_SHIFT				0
456ef5c2ebaSAdam Thomson #define DA7213_ALC_ANTICLIP_LEVEL_MAX				0x7F
457ef5c2ebaSAdam Thomson 
458ef5c2ebaSAdam Thomson /* DA7213_ALC_CIC_OP_LVL_CTRL = 0xAD */
459ef5c2ebaSAdam Thomson #define DA7213_ALC_DATA_MIDDLE					(0x2 << 0)
460ef5c2ebaSAdam Thomson #define DA7213_ALC_DATA_TOP					(0x3 << 0)
461ef5c2ebaSAdam Thomson #define DA7213_ALC_CIC_OP_CHANNEL_LEFT				(0x0 << 7)
462ef5c2ebaSAdam Thomson #define DA7213_ALC_CIC_OP_CHANNEL_RIGHT				(0x1 << 7)
463ef5c2ebaSAdam Thomson 
464ef5c2ebaSAdam Thomson /* DA7213_DAC_NG_SETUP_TIME = 0xAF */
465ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_SETUP_TIME_SHIFT				0
466ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_SETUP_TIME_MAX				4
467ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_RAMPUP_RATE_SHIFT				2
468ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_RAMPDN_RATE_SHIFT				3
469ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_RAMP_RATE_MAX				2
470ef5c2ebaSAdam Thomson 
471ef5c2ebaSAdam Thomson /* DA7213_DAC_NG_OFF/ON_THRESH = 0xB0/0xB1 */
472ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_THRESHOLD_SHIFT				0
473ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_THRESHOLD_MAX				0x7
474ef5c2ebaSAdam Thomson 
475ef5c2ebaSAdam Thomson /* DA7213_DAC_NG_CTRL = 0xB2 */
476ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_EN_SHIFT					7
477ef5c2ebaSAdam Thomson #define DA7213_DAC_NG_EN_MAX					0x1
478ef5c2ebaSAdam Thomson 
479ef5c2ebaSAdam Thomson 
480ef5c2ebaSAdam Thomson /*
481ef5c2ebaSAdam Thomson  * General defines
482ef5c2ebaSAdam Thomson  */
483ef5c2ebaSAdam Thomson 
484ef5c2ebaSAdam Thomson /* Register inversion */
485ef5c2ebaSAdam Thomson #define DA7213_NO_INVERT		0
486ef5c2ebaSAdam Thomson #define DA7213_INVERT			1
487ef5c2ebaSAdam Thomson 
488ef5c2ebaSAdam Thomson /* Byte related defines */
489ef5c2ebaSAdam Thomson #define DA7213_BYTE_SHIFT		8
490ef5c2ebaSAdam Thomson #define DA7213_BYTE_MASK		0xFF
491ef5c2ebaSAdam Thomson 
492ef5c2ebaSAdam Thomson /* ALC related */
493ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_15_8		0x00FF00
494ef5c2ebaSAdam Thomson #define DA7213_ALC_OFFSET_19_16		0x0F0000
495ef5c2ebaSAdam Thomson #define DA7213_ALC_AVG_ITERATIONS	5
496ef5c2ebaSAdam Thomson 
497ef5c2ebaSAdam Thomson /* PLL related */
498ef5c2ebaSAdam Thomson #define DA7213_SYSCLK_MCLK		0
499ef5c2ebaSAdam Thomson #define DA7213_SYSCLK_PLL		1
500ef5c2ebaSAdam Thomson #define DA7213_PLL_FREQ_OUT_90316800	90316800
501ef5c2ebaSAdam Thomson #define DA7213_PLL_FREQ_OUT_98304000	98304000
502ef5c2ebaSAdam Thomson #define DA7213_PLL_FREQ_OUT_94310400	94310400
503ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_5_10_MHZ_VAL	2
504ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_10_20_MHZ_VAL	4
505ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_20_40_MHZ_VAL	8
506ef5c2ebaSAdam Thomson #define DA7213_PLL_INDIV_40_54_MHZ_VAL	16
507ef5c2ebaSAdam Thomson 
508*6e7c4443SAdam Thomson enum da7213_clk_src {
509*6e7c4443SAdam Thomson 	DA7213_CLKSRC_MCLK = 0,
510*6e7c4443SAdam Thomson 	DA7213_CLKSRC_MCLK_SQR,
511ef5c2ebaSAdam Thomson };
512ef5c2ebaSAdam Thomson 
513ef5c2ebaSAdam Thomson /* Codec private data */
514ef5c2ebaSAdam Thomson struct da7213_priv {
515ef5c2ebaSAdam Thomson 	struct regmap *regmap;
516*6e7c4443SAdam Thomson 	struct clk *mclk;
517ef5c2ebaSAdam Thomson 	unsigned int mclk_rate;
518*6e7c4443SAdam Thomson 	int clk_src;
519ef5c2ebaSAdam Thomson 	bool master;
520ef5c2ebaSAdam Thomson 	bool mclk_squarer_en;
521ef5c2ebaSAdam Thomson 	bool srm_en;
522ef5c2ebaSAdam Thomson 	bool alc_calib_auto;
523ef5c2ebaSAdam Thomson 	bool alc_en;
524ef5c2ebaSAdam Thomson 	struct da7213_platform_data *pdata;
525ef5c2ebaSAdam Thomson };
526ef5c2ebaSAdam Thomson 
527ef5c2ebaSAdam Thomson #endif /* _DA7213_H */
528