blob: 364670e12999520fc43d4ed946817d9a4e3dd59e [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13#include <linux/module.h>
14#include <linux/delay.h>
15#include <linux/err.h>
16#include <linux/platform_device.h>
17#include <linux/mfd/msm-adie-codec.h>
18#include <linux/mfd/marimba.h>
19#include <linux/mfd/timpani-audio.h>
20#include <linux/debugfs.h>
21#include <linux/uaccess.h>
22#include <linux/string.h>
23
24/* Timpani codec driver is activated through Marimba core driver */
25
26#define MAX_MDELAY_US 20000
27
28#define TIMPANI_PATH_MASK(x) (1 << (x))
29
30#define TIMPANI_CODEC_AUXPGA_GAIN_RANGE (0x0F)
31
32#define TIMPANI_RX1_ST_MASK (TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_L_M |\
33 TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_R_M)
34#define TIMPANI_RX1_ST_ENABLE ((1 << TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_L_S) |\
35 (1 << TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_R_S))
36#define TIMPANI_CDC_ST_MIXING_TX1_MASK (TIMPANI_CDC_ST_MIXING_TX1_L_M |\
37 TIMPANI_CDC_ST_MIXING_TX1_R_M)
38#define TIMPANI_CDC_ST_MIXING_TX1_ENABLE ((1 << TIMPANI_CDC_ST_MIXING_TX1_L_S)\
39 | (1 << TIMPANI_CDC_ST_MIXING_TX1_R_S))
40#define TIMPANI_CDC_ST_MIXING_TX2_MASK (TIMPANI_CDC_ST_MIXING_TX2_L_M |\
41 TIMPANI_CDC_ST_MIXING_TX2_R_M)
42#define TIMPANI_CDC_ST_MIXING_TX2_ENABLE ((1 << TIMPANI_CDC_ST_MIXING_TX2_L_S)\
43 | (1 << TIMPANI_CDC_ST_MIXING_TX2_R_S))
44
45enum refcnt {
46 DEC = 0,
47 INC = 1,
48 IGNORE = 2,
49};
50#define TIMPANI_ARRAY_SIZE (TIMPANI_A_CDC_COMP_HALT + 1)
51
52static u8 timpani_shadow[TIMPANI_ARRAY_SIZE];
53
54struct adie_codec_path {
55 struct adie_codec_dev_profile *profile;
56 struct adie_codec_register_image img;
57 u32 hwsetting_idx;
58 u32 stage_idx;
59 u32 curr_stage;
60 u32 reg_owner;
61};
62
63enum /* regaccess blk id */
64{
65 RA_BLOCK_RX1 = 0,
66 RA_BLOCK_RX2,
67 RA_BLOCK_TX1,
68 RA_BLOCK_TX2,
69 RA_BLOCK_LB,
70 RA_BLOCK_SHARED_RX_LB,
71 RA_BLOCK_SHARED_TX,
72 RA_BLOCK_TXFE1,
73 RA_BLOCK_TXFE2,
74 RA_BLOCK_PA_COMMON,
75 RA_BLOCK_PA_EAR,
76 RA_BLOCK_PA_HPH,
77 RA_BLOCK_PA_LINE,
78 RA_BLOCK_PA_AUX,
79 RA_BLOCK_ADC,
80 RA_BLOCK_DMIC,
81 RA_BLOCK_TX_I2S,
82 RA_BLOCK_DRV,
83 RA_BLOCK_TEST,
84 RA_BLOCK_RESERVED,
85 RA_BLOCK_NUM,
86};
87
88enum /* regaccess onwer ID */
89{
90 RA_OWNER_NONE = 0,
91 RA_OWNER_PATH_RX1,
92 RA_OWNER_PATH_RX2,
93 RA_OWNER_PATH_TX1,
94 RA_OWNER_PATH_TX2,
95 RA_OWNER_PATH_LB,
96 RA_OWNER_DRV,
97 RA_OWNER_NUM,
98};
99
100struct reg_acc_blk_cfg {
101 u8 valid_owners[RA_OWNER_NUM];
102};
103
104struct reg_ref_cnt {
105 u8 mask;
106 u8 path_mask;
107};
108
109#define TIMPANI_MAX_FIELDS 5
110
111struct timpani_regaccess {
112 u8 reg_addr;
113 u8 blk_mask[RA_BLOCK_NUM];
114 u8 reg_mask;
115 u8 reg_default;
116 struct reg_ref_cnt fld_ref_cnt[TIMPANI_MAX_FIELDS];
117};
118
119struct timpani_regaccess timpani_regset[] = {
120 {
121 TIMPANI_A_MREF,
122 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
123 0x0, 0x0, 0x0, 0x0, 0x0, 0xFC, 0x0, 0x3},
124 TIMPANI_MREF_M,
125 TIMPANI_MREF_POR,
126 {
127 { .mask = 0xFC, .path_mask = 0},
128 { .mask = 0x03, .path_mask = 0},
129 { .mask = 0x00, .path_mask = 0},
130 { .mask = 0x00, .path_mask = 0},
131 { .mask = 0x00, .path_mask = 0},
132 }
133 },
134 {
135 TIMPANI_A_CDAC_IDAC_REF_CUR,
136 {0xFC, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
137 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
138 TIMPANI_CDAC_IDAC_REF_CUR_M,
139 TIMPANI_CDAC_IDAC_REF_CUR_POR,
140 {
141 { .mask = 0xFC, .path_mask = 0},
142 { .mask = 0x03, .path_mask = 0},
143 { .mask = 0x00, .path_mask = 0},
144 { .mask = 0x00, .path_mask = 0},
145 { .mask = 0x00, .path_mask = 0},
146 }
147 },
148 {
149 TIMPANI_A_TXADC12_REF_CURR,
150 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
151 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
152 TIMPANI_TXADC12_REF_CURR_M,
153 TIMPANI_TXADC12_REF_CURR_POR,
154 {
155 { .mask = 0xFF, .path_mask = 0},
156 { .mask = 0x00, .path_mask = 0},
157 { .mask = 0x00, .path_mask = 0},
158 { .mask = 0x00, .path_mask = 0},
159 { .mask = 0x00, .path_mask = 0},
160 }
161 },
162 {
163 TIMPANI_A_TXADC3_EN,
164 { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0,
165 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
166 TIMPANI_TXADC3_EN_M,
167 TIMPANI_TXADC3_EN_POR,
168 {
169 { .mask = 0xFE, .path_mask = 0},
170 { .mask = 0x01, .path_mask = 0},
171 { .mask = 0x00, .path_mask = 0},
172 { .mask = 0x00, .path_mask = 0},
173 { .mask = 0x00, .path_mask = 0},
174 }
175 },
176 {
177 TIMPANI_A_TXADC4_EN,
178 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0,
179 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
180 TIMPANI_TXADC4_EN_M,
181 TIMPANI_TXADC4_EN_POR,
182 {
183 { .mask = 0xFE, .path_mask = 0},
184 { .mask = 0x01, .path_mask = 0},
185 { .mask = 0x00, .path_mask = 0},
186 { .mask = 0x00, .path_mask = 0},
187 { .mask = 0x00, .path_mask = 0},
188 }
189 },
190 {
191 TIMPANI_A_CODEC_TXADC_STATUS_REGISTER_1,
192 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0, 0x30, 0x0, 0x0, 0x0,
193 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF},
194 TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_M,
195 TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_POR,
196 {
197 { .mask = 0xC0, .path_mask = 0},
198 { .mask = 0x30, .path_mask = 0},
199 { .mask = 0x0F, .path_mask = 0},
200 { .mask = 0x00, .path_mask = 0},
201 { .mask = 0x00, .path_mask = 0},
202 }
203 },
204 {
205 TIMPANI_A_TXFE1,
206 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0,
207 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
208 TIMPANI_TXFE1_M,
209 TIMPANI_TXFE1_POR,
210 {
211 { .mask = 0xFF, .path_mask = 0},
212 { .mask = 0x00, .path_mask = 0},
213 { .mask = 0x00, .path_mask = 0},
214 { .mask = 0x00, .path_mask = 0},
215 { .mask = 0x00, .path_mask = 0},
216 }
217 },
218 {
219 TIMPANI_A_TXFE2,
220 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0,
221 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
222 TIMPANI_TXFE2_M,
223 TIMPANI_TXFE2_POR,
224 {
225 { .mask = 0xFF, .path_mask = 0},
226 { .mask = 0x00, .path_mask = 0},
227 { .mask = 0x00, .path_mask = 0},
228 { .mask = 0x00, .path_mask = 0},
229 { .mask = 0x00, .path_mask = 0},
230 }
231 },
232 {
233 TIMPANI_A_TXFE12_ATEST,
234 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0,
235 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
236 TIMPANI_TXFE12_ATEST_M,
237 TIMPANI_TXFE12_ATEST_POR,
238 {
239 { .mask = 0xFF, .path_mask = 0},
240 { .mask = 0x00, .path_mask = 0},
241 { .mask = 0x00, .path_mask = 0},
242 { .mask = 0x00, .path_mask = 0},
243 { .mask = 0x00, .path_mask = 0},
244 }
245 },
246 {
247 TIMPANI_A_TXFE_CLT,
248 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF8, 0x0, 0x0, 0x0, 0x0,
249 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7},
250 TIMPANI_TXFE_CLT_M,
251 TIMPANI_TXFE_CLT_POR,
252 {
253 { .mask = 0xF8, .path_mask = 0},
254 { .mask = 0x07, .path_mask = 0},
255 { .mask = 0x00, .path_mask = 0},
256 { .mask = 0x00, .path_mask = 0},
257 { .mask = 0x00, .path_mask = 0},
258 }
259 },
260 {
261 TIMPANI_A_TXADC1_EN,
262 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x0,
263 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
264 TIMPANI_TXADC1_EN_M,
265 TIMPANI_TXADC1_EN_POR,
266 {
267 { .mask = 0xFE, .path_mask = 0},
268 { .mask = 0x01, .path_mask = 0},
269 { .mask = 0x00, .path_mask = 0},
270 { .mask = 0x00, .path_mask = 0},
271 { .mask = 0x00, .path_mask = 0},
272 }
273 },
274 {
275 TIMPANI_A_TXADC2_EN,
276 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x0,
277 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
278 TIMPANI_TXADC2_EN_M,
279 TIMPANI_TXADC2_EN_POR,
280 {
281 { .mask = 0xFE, .path_mask = 0},
282 { .mask = 0x01, .path_mask = 0},
283 { .mask = 0x00, .path_mask = 0},
284 { .mask = 0x00, .path_mask = 0},
285 { .mask = 0x00, .path_mask = 0},
286 }
287 },
288 {
289 TIMPANI_A_TXADC_CTL,
290 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
291 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0},
292 TIMPANI_TXADC_CTL_M,
293 TIMPANI_TXADC_CTL_POR,
294 {
295 { .mask = 0xFF, .path_mask = 0},
296 { .mask = 0x00, .path_mask = 0},
297 { .mask = 0x00, .path_mask = 0},
298 { .mask = 0x00, .path_mask = 0},
299 { .mask = 0x00, .path_mask = 0},
300 }
301 },
302 {
303 TIMPANI_A_TXADC_CTL2,
304 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
305 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0},
306 TIMPANI_TXADC_CTL2_M,
307 TIMPANI_TXADC_CTL2_POR,
308 {
309 { .mask = 0xFF, .path_mask = 0},
310 { .mask = 0x00, .path_mask = 0},
311 { .mask = 0x00, .path_mask = 0},
312 { .mask = 0x00, .path_mask = 0},
313 { .mask = 0x00, .path_mask = 0},
314 }
315 },
316 {
317 TIMPANI_A_TXADC_CTL3,
318 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
319 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x1},
320 TIMPANI_TXADC_CTL3_M,
321 TIMPANI_TXADC_CTL3_POR,
322 {
323 { .mask = 0xFE, .path_mask = 0},
324 { .mask = 0x01, .path_mask = 0},
325 { .mask = 0x00, .path_mask = 0},
326 { .mask = 0x00, .path_mask = 0},
327 { .mask = 0x00, .path_mask = 0},
328 }
329 },
330 {
331 TIMPANI_A_TXADC_CHOP_CTL,
332 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
333 0x0, 0x0, 0xFC, 0x0, 0x0, 0x0, 0x0, 0x3},
334 TIMPANI_TXADC_CHOP_CTL_M,
335 TIMPANI_TXADC_CHOP_CTL_POR,
336 {
337 { .mask = 0xFC, .path_mask = 0},
338 { .mask = 0x03, .path_mask = 0},
339 { .mask = 0x00, .path_mask = 0},
340 { .mask = 0x00, .path_mask = 0},
341 { .mask = 0x00, .path_mask = 0},
342 }
343 },
344 {
345 TIMPANI_A_TXFE3,
346 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE2, 0x0, 0x0, 0x0,
347 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1D},
348 TIMPANI_TXFE3_M,
349 TIMPANI_TXFE3_POR,
350 {
351 { .mask = 0xE2, .path_mask = 0},
352 { .mask = 0x1D, .path_mask = 0},
353 { .mask = 0x00, .path_mask = 0},
354 { .mask = 0x00, .path_mask = 0},
355 { .mask = 0x00, .path_mask = 0},
356 }
357 },
358 {
359 TIMPANI_A_TXFE4,
360 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE2, 0x0, 0x0, 0x0,
361 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1D},
362 TIMPANI_TXFE4_M,
363 TIMPANI_TXFE4_POR,
364 {
365 { .mask = 0xE2, .path_mask = 0},
366 { .mask = 0x1D, .path_mask = 0},
367 { .mask = 0x00, .path_mask = 0},
368 { .mask = 0x00, .path_mask = 0},
369 { .mask = 0x00, .path_mask = 0},
370 }
371 },
372 {
373 TIMPANI_A_TXFE3_ATEST,
374 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0,
375 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
376 TIMPANI_TXFE3_ATEST_M,
377 TIMPANI_TXFE3_ATEST_POR,
378 {
379 { .mask = 0xFF, .path_mask = 0},
380 { .mask = 0x00, .path_mask = 0},
381 { .mask = 0x00, .path_mask = 0},
382 { .mask = 0x00, .path_mask = 0},
383 { .mask = 0x00, .path_mask = 0},
384 }
385 },
386 {
387 TIMPANI_A_TXFE_DIFF_SE,
388 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xC, 0x0, 0x0, 0x0,
389 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
390 TIMPANI_TXFE_DIFF_SE_M,
391 TIMPANI_TXFE_DIFF_SE_POR,
392 {
393 { .mask = 0x03, .path_mask = 0},
394 { .mask = 0x0C, .path_mask = 0},
395 { .mask = 0xF0, .path_mask = 0},
396 { .mask = 0x00, .path_mask = 0},
397 { .mask = 0x00, .path_mask = 0},
398 }
399 },
400 {
401 TIMPANI_A_CDAC_RX_CLK_CTL,
402 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
403 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
404 TIMPANI_CDAC_RX_CLK_CTL_M,
405 TIMPANI_CDAC_RX_CLK_CTL_POR,
406 {
407 { .mask = 0xFF, .path_mask = 0},
408 { .mask = 0x00, .path_mask = 0},
409 { .mask = 0x00, .path_mask = 0},
410 { .mask = 0x00, .path_mask = 0},
411 { .mask = 0x00, .path_mask = 0},
412 }
413 },
414 {
415 TIMPANI_A_CDAC_BUFF_CTL,
416 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
417 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
418 TIMPANI_CDAC_BUFF_CTL_M,
419 TIMPANI_CDAC_BUFF_CTL_POR,
420 {
421 { .mask = 0xFF, .path_mask = 0},
422 { .mask = 0x00, .path_mask = 0},
423 { .mask = 0x00, .path_mask = 0},
424 { .mask = 0x00, .path_mask = 0},
425 { .mask = 0x00, .path_mask = 0},
426 }
427 },
428 {
429 TIMPANI_A_CDAC_REF_CTL1,
430 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
431 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
432 TIMPANI_CDAC_REF_CTL1_M,
433 TIMPANI_CDAC_REF_CTL1_POR,
434 {
435 { .mask = 0xFF, .path_mask = 0},
436 { .mask = 0x00, .path_mask = 0},
437 { .mask = 0x00, .path_mask = 0},
438 { .mask = 0x00, .path_mask = 0},
439 { .mask = 0x00, .path_mask = 0},
440 }
441 },
442 {
443 TIMPANI_A_IDAC_DWA_FIR_CTL,
444 {0xF8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
445 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7},
446 TIMPANI_IDAC_DWA_FIR_CTL_M,
447 TIMPANI_IDAC_DWA_FIR_CTL_POR,
448 {
449 { .mask = 0xF8, .path_mask = 0},
450 { .mask = 0x07, .path_mask = 0},
451 { .mask = 0x00, .path_mask = 0},
452 { .mask = 0x00, .path_mask = 0},
453 { .mask = 0x00, .path_mask = 0},
454 }
455 },
456 {
457 TIMPANI_A_CDAC_REF_CTL2,
458 {0x6F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
459 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x90},
460 TIMPANI_CDAC_REF_CTL2_M,
461 TIMPANI_CDAC_REF_CTL2_POR,
462 {
463 { .mask = 0x6F, .path_mask = 0},
464 { .mask = 0x90, .path_mask = 0},
465 { .mask = 0x00, .path_mask = 0},
466 { .mask = 0x00, .path_mask = 0},
467 { .mask = 0x00, .path_mask = 0},
468 }
469 },
470 {
471 TIMPANI_A_CDAC_CTL1,
472 {0x7F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
473 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80},
474 TIMPANI_CDAC_CTL1_M,
475 TIMPANI_CDAC_CTL1_POR,
476 {
477 { .mask = 0x7F, .path_mask = 0},
478 { .mask = 0x80, .path_mask = 0},
479 { .mask = 0x00, .path_mask = 0},
480 { .mask = 0x00, .path_mask = 0},
481 { .mask = 0x00, .path_mask = 0},
482 }
483 },
484 {
485 TIMPANI_A_CDAC_CTL2,
486 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
487 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
488 TIMPANI_CDAC_CTL2_M,
489 TIMPANI_CDAC_CTL2_POR,
490 {
491 { .mask = 0xFF, .path_mask = 0},
492 { .mask = 0x00, .path_mask = 0},
493 { .mask = 0x00, .path_mask = 0},
494 { .mask = 0x00, .path_mask = 0},
495 { .mask = 0x00, .path_mask = 0},
496 }
497 },
498 {
499 TIMPANI_A_IDAC_L_CTL,
500 {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
501 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
502 TIMPANI_IDAC_L_CTL_M,
503 TIMPANI_IDAC_L_CTL_POR,
504 {
505 { .mask = 0xFF, .path_mask = 0},
506 { .mask = 0x00, .path_mask = 0},
507 { .mask = 0x00, .path_mask = 0},
508 { .mask = 0x00, .path_mask = 0},
509 { .mask = 0x00, .path_mask = 0},
510 }
511 },
512 {
513 TIMPANI_A_IDAC_R_CTL,
514 {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
515 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
516 TIMPANI_IDAC_R_CTL_M,
517 TIMPANI_IDAC_R_CTL_POR,
518 {
519 { .mask = 0xFF, .path_mask = 0},
520 { .mask = 0x00, .path_mask = 0},
521 { .mask = 0x00, .path_mask = 0},
522 { .mask = 0x00, .path_mask = 0},
523 { .mask = 0x00, .path_mask = 0},
524 }
525 },
526 {
527 TIMPANI_A_PA_MASTER_BIAS,
528 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F,
529 0xE0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
530 TIMPANI_PA_MASTER_BIAS_M,
531 TIMPANI_PA_MASTER_BIAS_POR,
532 {
533 { .mask = 0x1F, .path_mask = 0},
534 { .mask = 0xE0, .path_mask = 0},
535 { .mask = 0x00, .path_mask = 0},
536 { .mask = 0x00, .path_mask = 0},
537 { .mask = 0x00, .path_mask = 0},
538 }
539 },
540 {
541 TIMPANI_A_PA_CLASSD_BIAS,
542 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
543 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
544 TIMPANI_PA_CLASSD_BIAS_M,
545 TIMPANI_PA_CLASSD_BIAS_POR,
546 {
547 { .mask = 0xFF, .path_mask = 0},
548 { .mask = 0x00, .path_mask = 0},
549 { .mask = 0x00, .path_mask = 0},
550 { .mask = 0x00, .path_mask = 0},
551 { .mask = 0x00, .path_mask = 0},
552 }
553 },
554 {
555 TIMPANI_A_AUXPGA_CUR,
556 {0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
557 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
558 TIMPANI_AUXPGA_CUR_M,
559 TIMPANI_AUXPGA_CUR_POR,
560 {
561 { .mask = 0xFF, .path_mask = 0},
562 { .mask = 0x00, .path_mask = 0},
563 { .mask = 0x00, .path_mask = 0},
564 { .mask = 0x00, .path_mask = 0},
565 { .mask = 0x00, .path_mask = 0},
566 }
567 },
568 {
569 TIMPANI_A_AUXPGA_CM,
570 {0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
571 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
572 TIMPANI_AUXPGA_CM_M,
573 TIMPANI_AUXPGA_CM_POR,
574 {
575 { .mask = 0xFF, .path_mask = 0},
576 { .mask = 0x00, .path_mask = 0},
577 { .mask = 0x00, .path_mask = 0},
578 { .mask = 0x00, .path_mask = 0},
579 { .mask = 0x00, .path_mask = 0},
580 }
581 },
582 {
583 TIMPANI_A_PA_HPH_EARPA_MSTB_EN,
584 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x2, 0xFC,
585 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
586 TIMPANI_PA_HPH_EARPA_MSTB_EN_M,
587 TIMPANI_PA_HPH_EARPA_MSTB_EN_POR,
588 {
589 { .mask = 0x01, .path_mask = 0},
590 { .mask = 0x02, .path_mask = 0},
591 { .mask = 0xFC, .path_mask = 0},
592 { .mask = 0x00, .path_mask = 0},
593 { .mask = 0x00, .path_mask = 0},
594 }
595 },
596 {
597 TIMPANI_A_PA_LINE_AUXO_EN,
598 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
599 0xF8, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
600 TIMPANI_PA_LINE_AUXO_EN_M,
601 TIMPANI_PA_LINE_AUXO_EN_POR,
602 {
603 { .mask = 0xF8, .path_mask = 0},
604 { .mask = 0x07, .path_mask = 0},
605 { .mask = 0x00, .path_mask = 0},
606 { .mask = 0x00, .path_mask = 0},
607 { .mask = 0x00, .path_mask = 0},
608 }
609 },
610 {
611 TIMPANI_A_PA_CLASSD_AUXPGA_EN,
612 {0x0, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF,
613 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
614 TIMPANI_PA_CLASSD_AUXPGA_EN_M,
615 TIMPANI_PA_CLASSD_AUXPGA_EN_POR,
616 {
617 { .mask = 0x30, .path_mask = 0},
618 { .mask = 0x0F, .path_mask = 0},
619 { .mask = 0xC0, .path_mask = 0},
620 { .mask = 0x00, .path_mask = 0},
621 { .mask = 0x00, .path_mask = 0},
622 }
623 },
624 {
625 TIMPANI_A_PA_LINE_L_GAIN,
626 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
627 0x0, 0x0, 0x0, 0x0, 0x0, 0xFC, 0x0, 0x3},
628 TIMPANI_PA_LINE_L_GAIN_M,
629 TIMPANI_PA_LINE_L_GAIN_POR,
630 {
631 { .mask = 0xFC, .path_mask = 0},
632 { .mask = 0x03, .path_mask = 0},
633 { .mask = 0x00, .path_mask = 0},
634 { .mask = 0x00, .path_mask = 0},
635 { .mask = 0x00, .path_mask = 0},
636 }
637 },
638 {
639 TIMPANI_A_PA_LINE_R_GAIN,
640 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
641 0x0, 0x0, 0x0, 0x0, 0x0, 0xFC, 0x0, 0x3},
642 TIMPANI_PA_LINE_R_GAIN_M,
643 TIMPANI_PA_LINE_R_GAIN_POR,
644 {
645 { .mask = 0xFC, .path_mask = 0},
646 { .mask = 0x03, .path_mask = 0},
647 { .mask = 0x00, .path_mask = 0},
648 { .mask = 0x00, .path_mask = 0},
649 { .mask = 0x00, .path_mask = 0},
650 }
651 },
652 {
653 TIMPANI_A_PA_HPH_L_GAIN,
654 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
655 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x1},
656 TIMPANI_PA_HPH_L_GAIN_M,
657 TIMPANI_PA_HPH_L_GAIN_POR,
658 {
659 { .mask = 0xFE, .path_mask = 0},
660 { .mask = 0x01, .path_mask = 0},
661 { .mask = 0x00, .path_mask = 0},
662 { .mask = 0x00, .path_mask = 0},
663 { .mask = 0x00, .path_mask = 0},
664 }
665 },
666 {
667 TIMPANI_A_PA_HPH_R_GAIN,
668 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
669 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x1},
670 TIMPANI_PA_HPH_R_GAIN_M,
671 TIMPANI_PA_HPH_R_GAIN_POR,
672 {
673 { .mask = 0xFE, .path_mask = 0},
674 { .mask = 0x01, .path_mask = 0},
675 { .mask = 0x00, .path_mask = 0},
676 { .mask = 0x00, .path_mask = 0},
677 { .mask = 0x00, .path_mask = 0},
678 }
679 },
680 {
681 TIMPANI_A_AUXPGA_LR_GAIN,
682 {0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
683 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
684 TIMPANI_AUXPGA_LR_GAIN_M,
685 TIMPANI_AUXPGA_LR_GAIN_POR,
686 {
687 { .mask = 0xFF, .path_mask = 0},
688 { .mask = 0x00, .path_mask = 0},
689 { .mask = 0x00, .path_mask = 0},
690 { .mask = 0x00, .path_mask = 0},
691 { .mask = 0x00, .path_mask = 0},
692 }
693 },
694 {
695 TIMPANI_A_PA_AUXO_EARPA_CONN,
696 {0x21, 0x42, 0x0, 0x0, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
697 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18},
698 TIMPANI_PA_AUXO_EARPA_CONN_M,
699 TIMPANI_PA_AUXO_EARPA_CONN_POR,
700 {
701 { .mask = 0x21, .path_mask = 0},
702 { .mask = 0x42, .path_mask = 0},
703 { .mask = 0x84, .path_mask = 0},
704 { .mask = 0x18, .path_mask = 0},
705 { .mask = 0x00, .path_mask = 0},
706 }
707 },
708 {
709 TIMPANI_A_PA_LINE_ST_CONN,
710 {0x24, 0x48, 0x0, 0x0, 0x93, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
711 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
712 TIMPANI_PA_LINE_ST_CONN_M,
713 TIMPANI_PA_LINE_ST_CONN_POR,
714 {
715 { .mask = 0x24, .path_mask = 0},
716 { .mask = 0x48, .path_mask = 0},
717 { .mask = 0x93, .path_mask = 0},
718 { .mask = 0x00, .path_mask = 0},
719 { .mask = 0x00, .path_mask = 0},
720 }
721 },
722 {
723 TIMPANI_A_PA_LINE_MONO_CONN,
724 {0x24, 0x48, 0x0, 0x0, 0x93, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
725 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
726 TIMPANI_PA_LINE_MONO_CONN_M,
727 TIMPANI_PA_LINE_MONO_CONN_POR,
728 {
729 { .mask = 0x24, .path_mask = 0},
730 { .mask = 0x48, .path_mask = 0},
731 { .mask = 0x93, .path_mask = 0},
732 { .mask = 0x00, .path_mask = 0},
733 { .mask = 0x00, .path_mask = 0},
734 }
735 },
736 {
737 TIMPANI_A_PA_HPH_ST_CONN,
738 {0x24, 0x48, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3,
739 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
740 TIMPANI_PA_HPH_ST_CONN_M,
741 TIMPANI_PA_HPH_ST_CONN_POR,
742 {
743 { .mask = 0x24, .path_mask = 0},
744 { .mask = 0x48, .path_mask = 0},
745 { .mask = 0x90, .path_mask = 0},
746 { .mask = 0x03, .path_mask = 0},
747 { .mask = 0x00, .path_mask = 0},
748 }
749 },
750 {
751 TIMPANI_A_PA_HPH_MONO_CONN,
752 {0x24, 0x48, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
753 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3},
754 TIMPANI_PA_HPH_MONO_CONN_M,
755 TIMPANI_PA_HPH_MONO_CONN_POR,
756 {
757 { .mask = 0x24, .path_mask = 0},
758 { .mask = 0x48, .path_mask = 0},
759 { .mask = 0x90, .path_mask = 0},
760 { .mask = 0x03, .path_mask = 0},
761 { .mask = 0x00, .path_mask = 0},
762 }
763 },
764 {
765 TIMPANI_A_PA_CLASSD_CONN,
766 {0x80, 0x40, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10,
767 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF},
768 TIMPANI_PA_CLASSD_CONN_M,
769 TIMPANI_PA_CLASSD_CONN_POR,
770 {
771 { .mask = 0x80, .path_mask = 0},
772 { .mask = 0x40, .path_mask = 0},
773 { .mask = 0x20, .path_mask = 0},
774 { .mask = 0x10, .path_mask = 0},
775 { .mask = 0x0F, .path_mask = 0},
776 }
777 },
778 {
779 TIMPANI_A_PA_CNP_CTL,
780 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xCF,
781 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30},
782 TIMPANI_PA_CNP_CTL_M,
783 TIMPANI_PA_CNP_CTL_POR,
784 {
785 { .mask = 0xCF, .path_mask = 0},
786 { .mask = 0x30, .path_mask = 0},
787 { .mask = 0x00, .path_mask = 0},
788 { .mask = 0x00, .path_mask = 0},
789 { .mask = 0x00, .path_mask = 0},
790 }
791 },
792 {
793 TIMPANI_A_PA_CLASSD_L_CTL,
794 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F,
795 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
796 TIMPANI_PA_CLASSD_L_CTL_M,
797 TIMPANI_PA_CLASSD_L_CTL_POR,
798 {
799 { .mask = 0x3F, .path_mask = 0},
800 { .mask = 0xC0, .path_mask = 0},
801 { .mask = 0x00, .path_mask = 0},
802 { .mask = 0x00, .path_mask = 0},
803 { .mask = 0x00, .path_mask = 0},
804 }
805 },
806 {
807 TIMPANI_A_PA_CLASSD_R_CTL,
808 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F,
809 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
810 TIMPANI_PA_CLASSD_R_CTL_M,
811 TIMPANI_PA_CLASSD_R_CTL_POR,
812 {
813 { .mask = 0x3F, .path_mask = 0},
814 { .mask = 0xC0, .path_mask = 0},
815 { .mask = 0x00, .path_mask = 0},
816 { .mask = 0x00, .path_mask = 0},
817 { .mask = 0x00, .path_mask = 0},
818 }
819 },
820 {
821 TIMPANI_A_PA_CLASSD_INT2_CTL,
822 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
823 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
824 TIMPANI_PA_CLASSD_INT2_CTL_M,
825 TIMPANI_PA_CLASSD_INT2_CTL_POR,
826 {
827 { .mask = 0xFF, .path_mask = 0},
828 { .mask = 0x00, .path_mask = 0},
829 { .mask = 0x00, .path_mask = 0},
830 { .mask = 0x00, .path_mask = 0},
831 { .mask = 0x00, .path_mask = 0},
832 }
833 },
834 {
835 TIMPANI_A_PA_HPH_L_OCP_CLK_CTL,
836 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
837 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
838 TIMPANI_PA_HPH_L_OCP_CLK_CTL_M,
839 TIMPANI_PA_HPH_L_OCP_CLK_CTL_POR,
840 {
841 { .mask = 0xFF, .path_mask = 0},
842 { .mask = 0x00, .path_mask = 0},
843 { .mask = 0x00, .path_mask = 0},
844 { .mask = 0x00, .path_mask = 0},
845 { .mask = 0x00, .path_mask = 0},
846 }
847 },
848 {
849 TIMPANI_A_PA_CLASSD_L_SW_CTL,
850 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF7,
851 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8},
852 TIMPANI_PA_CLASSD_L_SW_CTL_M,
853 TIMPANI_PA_CLASSD_L_SW_CTL_POR,
854 {
855 { .mask = 0xF7, .path_mask = 0},
856 { .mask = 0x08, .path_mask = 0},
857 { .mask = 0x00, .path_mask = 0},
858 { .mask = 0x00, .path_mask = 0},
859 { .mask = 0x00, .path_mask = 0},
860 }
861 },
862 {
863 TIMPANI_A_PA_CLASSD_L_OCP1,
864 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
865 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
866 TIMPANI_PA_CLASSD_L_OCP1_M,
867 TIMPANI_PA_CLASSD_L_OCP1_POR,
868 {
869 { .mask = 0xFF, .path_mask = 0},
870 { .mask = 0x00, .path_mask = 0},
871 { .mask = 0x00, .path_mask = 0},
872 { .mask = 0x00, .path_mask = 0},
873 { .mask = 0x00, .path_mask = 0},
874 }
875 },
876 {
877 TIMPANI_A_PA_CLASSD_L_OCP2,
878 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
879 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
880 TIMPANI_PA_CLASSD_L_OCP2_M,
881 TIMPANI_PA_CLASSD_L_OCP2_POR,
882 {
883 { .mask = 0xFF, .path_mask = 0},
884 { .mask = 0x00, .path_mask = 0},
885 { .mask = 0x00, .path_mask = 0},
886 { .mask = 0x00, .path_mask = 0},
887 { .mask = 0x00, .path_mask = 0},
888 }
889 },
890 {
891 TIMPANI_A_PA_HPH_R_OCP_CLK_CTL,
892 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
893 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
894 TIMPANI_PA_HPH_R_OCP_CLK_CTL_M,
895 TIMPANI_PA_HPH_R_OCP_CLK_CTL_POR,
896 {
897 { .mask = 0xFF, .path_mask = 0},
898 { .mask = 0x00, .path_mask = 0},
899 { .mask = 0x00, .path_mask = 0},
900 { .mask = 0x00, .path_mask = 0},
901 { .mask = 0x00, .path_mask = 0},
902 }
903 },
904 {
905 TIMPANI_A_PA_CLASSD_R_SW_CTL,
906 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF7,
907 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8},
908 TIMPANI_PA_CLASSD_R_SW_CTL_M,
909 TIMPANI_PA_CLASSD_R_SW_CTL_POR,
910 {
911 { .mask = 0xF7, .path_mask = 0},
912 { .mask = 0x08, .path_mask = 0},
913 { .mask = 0x00, .path_mask = 0},
914 { .mask = 0x00, .path_mask = 0},
915 { .mask = 0x00, .path_mask = 0},
916 }
917 },
918 {
919 TIMPANI_A_PA_CLASSD_R_OCP1,
920 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
921 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
922 TIMPANI_PA_CLASSD_R_OCP1_M,
923 TIMPANI_PA_CLASSD_R_OCP1_POR,
924 {
925 { .mask = 0xFF, .path_mask = 0},
926 { .mask = 0x00, .path_mask = 0},
927 { .mask = 0x00, .path_mask = 0},
928 { .mask = 0x00, .path_mask = 0},
929 { .mask = 0x00, .path_mask = 0},
930 }
931 },
932 {
933 TIMPANI_A_PA_CLASSD_R_OCP2,
934 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF,
935 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
936 TIMPANI_PA_CLASSD_R_OCP2_M,
937 TIMPANI_PA_CLASSD_R_OCP2_POR,
938 {
939 { .mask = 0xFF, .path_mask = 0},
940 { .mask = 0x00, .path_mask = 0},
941 { .mask = 0x00, .path_mask = 0},
942 { .mask = 0x00, .path_mask = 0},
943 { .mask = 0x00, .path_mask = 0},
944 }
945 },
946 {
947 TIMPANI_A_PA_HPH_CTL1,
948 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
949 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
950 TIMPANI_PA_HPH_CTL1_M,
951 TIMPANI_PA_HPH_CTL1_POR,
952 {
953 { .mask = 0xFF, .path_mask = 0},
954 { .mask = 0x00, .path_mask = 0},
955 { .mask = 0x00, .path_mask = 0},
956 { .mask = 0x00, .path_mask = 0},
957 { .mask = 0x00, .path_mask = 0},
958 }
959 },
960 {
961 TIMPANI_A_PA_HPH_CTL2,
962 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE,
963 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
964 TIMPANI_PA_HPH_CTL2_M,
965 TIMPANI_PA_HPH_CTL2_POR,
966 {
967 { .mask = 0xFE, .path_mask = 0},
968 { .mask = 0x01, .path_mask = 0},
969 { .mask = 0x00, .path_mask = 0},
970 { .mask = 0x00, .path_mask = 0},
971 { .mask = 0x00, .path_mask = 0},
972 }
973 },
974 {
975 TIMPANI_A_PA_LINE_AUXO_CTL,
976 {0x0, 0x0, 0x0, 0x0, 0x0, 0xC3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
977 0x3C, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
978 TIMPANI_PA_LINE_AUXO_CTL_M,
979 TIMPANI_PA_LINE_AUXO_CTL_POR,
980 {
981 { .mask = 0xC3, .path_mask = 0},
982 { .mask = 0x3C, .path_mask = 0},
983 { .mask = 0x00, .path_mask = 0},
984 { .mask = 0x00, .path_mask = 0},
985 { .mask = 0x00, .path_mask = 0},
986 }
987 },
988 {
989 TIMPANI_A_PA_AUXO_EARPA_CTL,
990 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0,
991 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
992 TIMPANI_PA_AUXO_EARPA_CTL_M,
993 TIMPANI_PA_AUXO_EARPA_CTL_POR,
994 {
995 { .mask = 0x07, .path_mask = 0},
996 { .mask = 0x38, .path_mask = 0},
997 { .mask = 0xC0, .path_mask = 0},
998 { .mask = 0x00, .path_mask = 0},
999 { .mask = 0x00, .path_mask = 0},
1000 }
1001 },
1002 {
1003 TIMPANI_A_PA_EARO_CTL,
1004 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0,
1005 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1006 TIMPANI_PA_EARO_CTL_M,
1007 TIMPANI_PA_EARO_CTL_POR,
1008 {
1009 { .mask = 0xFF, .path_mask = 0},
1010 { .mask = 0x00, .path_mask = 0},
1011 { .mask = 0x00, .path_mask = 0},
1012 { .mask = 0x00, .path_mask = 0},
1013 { .mask = 0x00, .path_mask = 0},
1014 }
1015 },
1016 {
1017 TIMPANI_A_PA_MASTER_BIAS_CUR,
1018 {0x0, 0x0, 0x0, 0x0, 0x60, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x18,
1019 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
1020 TIMPANI_PA_MASTER_BIAS_CUR_M,
1021 TIMPANI_PA_MASTER_BIAS_CUR_POR,
1022 {
1023 { .mask = 0x60, .path_mask = 0},
1024 { .mask = 0x80, .path_mask = 0},
1025 { .mask = 0x18, .path_mask = 0},
1026 { .mask = 0x06, .path_mask = 0},
1027 { .mask = 0x01, .path_mask = 0},
1028 }
1029 },
1030 {
1031 TIMPANI_A_PA_CLASSD_SC_STATUS,
1032 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xCC,
1033 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33},
1034 TIMPANI_PA_CLASSD_SC_STATUS_M,
1035 TIMPANI_PA_CLASSD_SC_STATUS_POR,
1036 {
1037 { .mask = 0xCC, .path_mask = 0},
1038 { .mask = 0x33, .path_mask = 0},
1039 { .mask = 0x00, .path_mask = 0},
1040 { .mask = 0x00, .path_mask = 0},
1041 { .mask = 0x00, .path_mask = 0},
1042 }
1043 },
1044 {
1045 TIMPANI_A_PA_HPH_SC_STATUS,
1046 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x88,
1047 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x77},
1048 TIMPANI_PA_HPH_SC_STATUS_M,
1049 TIMPANI_PA_HPH_SC_STATUS_POR,
1050 {
1051 { .mask = 0x88, .path_mask = 0},
1052 { .mask = 0x77, .path_mask = 0},
1053 { .mask = 0x00, .path_mask = 0},
1054 { .mask = 0x00, .path_mask = 0},
1055 { .mask = 0x00, .path_mask = 0},
1056 }
1057 },
1058 {
1059 TIMPANI_A_ATEST_EN,
1060 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1061 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x7F},
1062 TIMPANI_ATEST_EN_M,
1063 TIMPANI_ATEST_EN_POR,
1064 {
1065 { .mask = 0x80, .path_mask = 0},
1066 { .mask = 0x7F, .path_mask = 0},
1067 { .mask = 0x00, .path_mask = 0},
1068 { .mask = 0x00, .path_mask = 0},
1069 { .mask = 0x00, .path_mask = 0},
1070 }
1071 },
1072 {
1073 TIMPANI_A_ATEST_TSHKADC,
1074 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1075 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0xF0},
1076 TIMPANI_ATEST_TSHKADC_M,
1077 TIMPANI_ATEST_TSHKADC_POR,
1078 {
1079 { .mask = 0x0F, .path_mask = 0},
1080 { .mask = 0xF0, .path_mask = 0},
1081 { .mask = 0x00, .path_mask = 0},
1082 { .mask = 0x00, .path_mask = 0},
1083 { .mask = 0x00, .path_mask = 0},
1084 }
1085 },
1086 {
1087 TIMPANI_A_ATEST_TXADC13,
1088 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1089 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7F, 0x80},
1090 TIMPANI_ATEST_TXADC13_M,
1091 TIMPANI_ATEST_TXADC13_POR,
1092 {
1093 { .mask = 0x7F, .path_mask = 0},
1094 { .mask = 0x80, .path_mask = 0},
1095 { .mask = 0x00, .path_mask = 0},
1096 { .mask = 0x00, .path_mask = 0},
1097 { .mask = 0x00, .path_mask = 0},
1098 }
1099 },
1100 {
1101 TIMPANI_A_ATEST_TXADC24,
1102 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1103 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7F, 0x80},
1104 TIMPANI_ATEST_TXADC24_M,
1105 TIMPANI_ATEST_TXADC24_POR,
1106 {
1107 { .mask = 0x7F, .path_mask = 0},
1108 { .mask = 0x80, .path_mask = 0},
1109 { .mask = 0x00, .path_mask = 0},
1110 { .mask = 0x00, .path_mask = 0},
1111 { .mask = 0x00, .path_mask = 0},
1112 }
1113 },
1114 {
1115 TIMPANI_A_ATEST_AUXPGA,
1116 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1117 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF8, 0x7},
1118 TIMPANI_ATEST_AUXPGA_M,
1119 TIMPANI_ATEST_AUXPGA_POR,
1120 {
1121 { .mask = 0xF8, .path_mask = 0},
1122 { .mask = 0x07, .path_mask = 0},
1123 { .mask = 0x00, .path_mask = 0},
1124 { .mask = 0x00, .path_mask = 0},
1125 { .mask = 0x00, .path_mask = 0},
1126 }
1127 },
1128 {
1129 TIMPANI_A_ATEST_CDAC,
1130 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1131 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
1132 TIMPANI_ATEST_CDAC_M,
1133 TIMPANI_ATEST_CDAC_POR,
1134 {
1135 { .mask = 0xFF, .path_mask = 0},
1136 { .mask = 0x00, .path_mask = 0},
1137 { .mask = 0x00, .path_mask = 0},
1138 { .mask = 0x00, .path_mask = 0},
1139 { .mask = 0x00, .path_mask = 0},
1140 }
1141 },
1142 {
1143 TIMPANI_A_ATEST_IDAC,
1144 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1145 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
1146 TIMPANI_ATEST_IDAC_M,
1147 TIMPANI_ATEST_IDAC_POR,
1148 {
1149 { .mask = 0xFF, .path_mask = 0},
1150 { .mask = 0x00, .path_mask = 0},
1151 { .mask = 0x00, .path_mask = 0},
1152 { .mask = 0x00, .path_mask = 0},
1153 { .mask = 0x00, .path_mask = 0},
1154 }
1155 },
1156 {
1157 TIMPANI_A_ATEST_PA1,
1158 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1159 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
1160 TIMPANI_ATEST_PA1_M,
1161 TIMPANI_ATEST_PA1_POR,
1162 {
1163 { .mask = 0xFF, .path_mask = 0},
1164 { .mask = 0x00, .path_mask = 0},
1165 { .mask = 0x00, .path_mask = 0},
1166 { .mask = 0x00, .path_mask = 0},
1167 { .mask = 0x00, .path_mask = 0},
1168 }
1169 },
1170 {
1171 TIMPANI_A_ATEST_CLASSD,
1172 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1173 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
1174 TIMPANI_ATEST_CLASSD_M,
1175 TIMPANI_ATEST_CLASSD_POR,
1176 {
1177 { .mask = 0xFF, .path_mask = 0},
1178 { .mask = 0x00, .path_mask = 0},
1179 { .mask = 0x00, .path_mask = 0},
1180 { .mask = 0x00, .path_mask = 0},
1181 { .mask = 0x00, .path_mask = 0},
1182 }
1183 },
1184 {
1185 TIMPANI_A_ATEST_LINEO_AUXO,
1186 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1187 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
1188 TIMPANI_ATEST_LINEO_AUXO_M,
1189 TIMPANI_ATEST_LINEO_AUXO_POR,
1190 {
1191 { .mask = 0xFF, .path_mask = 0},
1192 { .mask = 0x00, .path_mask = 0},
1193 { .mask = 0x00, .path_mask = 0},
1194 { .mask = 0x00, .path_mask = 0},
1195 { .mask = 0x00, .path_mask = 0},
1196 }
1197 },
1198 {
1199 TIMPANI_A_CDC_RESET_CTL,
1200 {0x2, 0x8, 0x5, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1201 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
1202 TIMPANI_CDC_RESET_CTL_M,
1203 TIMPANI_CDC_RESET_CTL_POR,
1204 {
1205 { .mask = 0x02, .path_mask = 0},
1206 { .mask = 0x08, .path_mask = 0},
1207 { .mask = 0x05, .path_mask = 0},
1208 { .mask = 0x30, .path_mask = 0},
1209 { .mask = 0xC0, .path_mask = 0},
1210 }
1211 },
1212 {
1213 TIMPANI_A_CDC_RX1_CTL,
1214 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1215 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1216 TIMPANI_CDC_RX1_CTL_M,
1217 TIMPANI_CDC_RX1_CTL_POR,
1218 {
1219 { .mask = 0xFF, .path_mask = 0},
1220 { .mask = 0x00, .path_mask = 0},
1221 { .mask = 0x00, .path_mask = 0},
1222 { .mask = 0x00, .path_mask = 0},
1223 { .mask = 0x00, .path_mask = 0},
1224 }
1225 },
1226 {
1227 TIMPANI_A_CDC_TX_I2S_CTL,
1228 {0x0, 0x0, 0x10, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1229 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0x0, 0xC0},
1230 TIMPANI_CDC_TX_I2S_CTL_M,
1231 TIMPANI_CDC_TX_I2S_CTL_POR,
1232 {
1233 { .mask = 0x10, .path_mask = 0},
1234 { .mask = 0x20, .path_mask = 0},
1235 { .mask = 0x0F, .path_mask = 0},
1236 { .mask = 0xC0, .path_mask = 0},
1237 { .mask = 0x00, .path_mask = 0},
1238 }
1239 },
1240 {
1241 TIMPANI_A_CDC_CH_CTL,
1242 {0x3, 0x30, 0xC, 0xC0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1243 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1244 TIMPANI_CDC_CH_CTL_M,
1245 TIMPANI_CDC_CH_CTL_POR,
1246 {
1247 { .mask = 0x03, .path_mask = 0},
1248 { .mask = 0x30, .path_mask = 0},
1249 { .mask = 0x0C, .path_mask = 0},
1250 { .mask = 0xC0, .path_mask = 0},
1251 { .mask = 0x00, .path_mask = 0},
1252 }
1253 },
1254 {
1255 TIMPANI_A_CDC_RX1LG,
1256 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1257 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1258 TIMPANI_CDC_RX1LG_M,
1259 TIMPANI_CDC_RX1LG_POR,
1260 {
1261 { .mask = 0xFF, .path_mask = 0},
1262 { .mask = 0x00, .path_mask = 0},
1263 { .mask = 0x00, .path_mask = 0},
1264 { .mask = 0x00, .path_mask = 0},
1265 { .mask = 0x00, .path_mask = 0},
1266 }
1267 },
1268 {
1269 TIMPANI_A_CDC_RX1RG,
1270 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1271 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1272 TIMPANI_CDC_RX1RG_M,
1273 TIMPANI_CDC_RX1RG_POR,
1274 {
1275 { .mask = 0xFF, .path_mask = 0},
1276 { .mask = 0x00, .path_mask = 0},
1277 { .mask = 0x00, .path_mask = 0},
1278 { .mask = 0x00, .path_mask = 0},
1279 { .mask = 0x00, .path_mask = 0},
1280 }
1281 },
1282 {
1283 TIMPANI_A_CDC_TX1LG,
1284 {0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1285 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1286 TIMPANI_CDC_TX1LG_M,
1287 TIMPANI_CDC_TX1LG_POR,
1288 {
1289 { .mask = 0xFF, .path_mask = 0},
1290 { .mask = 0x00, .path_mask = 0},
1291 { .mask = 0x00, .path_mask = 0},
1292 { .mask = 0x00, .path_mask = 0},
1293 { .mask = 0x00, .path_mask = 0},
1294 }
1295 },
1296 {
1297 TIMPANI_A_CDC_TX1RG,
1298 {0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1299 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1300 TIMPANI_CDC_TX1RG_M,
1301 TIMPANI_CDC_TX1RG_POR,
1302 {
1303 { .mask = 0xFF, .path_mask = 0},
1304 { .mask = 0x00, .path_mask = 0},
1305 { .mask = 0x00, .path_mask = 0},
1306 { .mask = 0x00, .path_mask = 0},
1307 { .mask = 0x00, .path_mask = 0},
1308 }
1309 },
1310 {
1311 TIMPANI_A_CDC_RX_PGA_TIMER,
1312 {0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1313 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1314 TIMPANI_CDC_RX_PGA_TIMER_M,
1315 TIMPANI_CDC_RX_PGA_TIMER_POR,
1316 {
1317 { .mask = 0xFF, .path_mask = 0},
1318 { .mask = 0x00, .path_mask = 0},
1319 { .mask = 0x00, .path_mask = 0},
1320 { .mask = 0x00, .path_mask = 0},
1321 { .mask = 0x00, .path_mask = 0},
1322 }
1323 },
1324 {
1325 TIMPANI_A_CDC_TX_PGA_TIMER,
1326 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0,
1327 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1328 TIMPANI_CDC_TX_PGA_TIMER_M,
1329 TIMPANI_CDC_TX_PGA_TIMER_POR,
1330 {
1331 { .mask = 0xFF, .path_mask = 0},
1332 { .mask = 0x00, .path_mask = 0},
1333 { .mask = 0x00, .path_mask = 0},
1334 { .mask = 0x00, .path_mask = 0},
1335 { .mask = 0x00, .path_mask = 0},
1336 }
1337 },
1338 {
1339 TIMPANI_A_CDC_GCTL1,
1340 {0xF, 0x0, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1341 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1342 TIMPANI_CDC_GCTL1_M,
1343 TIMPANI_CDC_GCTL1_POR,
1344 {
1345 { .mask = 0x0F, .path_mask = 0},
1346 { .mask = 0xF0, .path_mask = 0},
1347 { .mask = 0x00, .path_mask = 0},
1348 { .mask = 0x00, .path_mask = 0},
1349 { .mask = 0x00, .path_mask = 0},
1350 }
1351 },
1352 {
1353 TIMPANI_A_CDC_TX1L_STG,
1354 {0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1355 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1356 TIMPANI_CDC_TX1L_STG_M,
1357 TIMPANI_CDC_TX1L_STG_POR,
1358 {
1359 { .mask = 0xFF, .path_mask = 0},
1360 { .mask = 0x00, .path_mask = 0},
1361 { .mask = 0x00, .path_mask = 0},
1362 { .mask = 0x00, .path_mask = 0},
1363 { .mask = 0x00, .path_mask = 0},
1364 }
1365 },
1366 {
1367 TIMPANI_A_CDC_ST_CTL,
1368 {0x0, 0xF, 0x0, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1369 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1370 TIMPANI_CDC_ST_CTL_M,
1371 TIMPANI_CDC_ST_CTL_POR,
1372 {
1373 { .mask = 0x0F, .path_mask = 0},
1374 { .mask = 0xF0, .path_mask = 0},
1375 { .mask = 0x00, .path_mask = 0},
1376 { .mask = 0x00, .path_mask = 0},
1377 { .mask = 0x00, .path_mask = 0},
1378 }
1379 },
1380 {
1381 TIMPANI_A_CDC_RX1L_DCOFFSET,
1382 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1383 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1384 TIMPANI_CDC_RX1L_DCOFFSET_M,
1385 TIMPANI_CDC_RX1L_DCOFFSET_POR,
1386 {
1387 { .mask = 0xFF, .path_mask = 0},
1388 { .mask = 0x00, .path_mask = 0},
1389 { .mask = 0x00, .path_mask = 0},
1390 { .mask = 0x00, .path_mask = 0},
1391 { .mask = 0x00, .path_mask = 0},
1392 }
1393 },
1394 {
1395 TIMPANI_A_CDC_RX1R_DCOFFSET,
1396 {0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1397 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1398 TIMPANI_CDC_RX1R_DCOFFSET_M,
1399 TIMPANI_CDC_RX1R_DCOFFSET_POR,
1400 {
1401 { .mask = 0xFF, .path_mask = 0},
1402 { .mask = 0x00, .path_mask = 0},
1403 { .mask = 0x00, .path_mask = 0},
1404 { .mask = 0x00, .path_mask = 0},
1405 { .mask = 0x00, .path_mask = 0},
1406 }
1407 },
1408 {
1409 TIMPANI_A_CDC_BYPASS_CTL1,
1410 {0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1411 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
1412 TIMPANI_CDC_BYPASS_CTL1_M,
1413 TIMPANI_CDC_BYPASS_CTL1_POR,
1414 {
1415 { .mask = 0x0F, .path_mask = 0},
1416 { .mask = 0xF0, .path_mask = 0},
1417 { .mask = 0x00, .path_mask = 0},
1418 { .mask = 0x00, .path_mask = 0},
1419 { .mask = 0x00, .path_mask = 0},
1420 }
1421 },
1422 {
1423 TIMPANI_A_CDC_PDM_CONFIG,
1424 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1425 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0xF0},
1426 TIMPANI_CDC_PDM_CONFIG_M,
1427 TIMPANI_CDC_PDM_CONFIG_POR,
1428 {
1429 { .mask = 0x0F, .path_mask = 0},
1430 { .mask = 0xF0, .path_mask = 0},
1431 { .mask = 0x00, .path_mask = 0},
1432 { .mask = 0x00, .path_mask = 0},
1433 { .mask = 0x00, .path_mask = 0},
1434 }
1435 },
1436 {
1437 TIMPANI_A_CDC_TESTMODE1,
1438 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1439 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0xC0},
1440 TIMPANI_CDC_TESTMODE1_M,
1441 TIMPANI_CDC_TESTMODE1_POR,
1442 {
1443 { .mask = 0x3F, .path_mask = 0},
1444 { .mask = 0xC0, .path_mask = 0},
1445 { .mask = 0x00, .path_mask = 0},
1446 { .mask = 0x00, .path_mask = 0},
1447 { .mask = 0x00, .path_mask = 0},
1448 }
1449 },
1450 {
1451 TIMPANI_A_CDC_DMIC_CLK_CTL,
1452 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1453 0x0, 0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0xC0},
1454 TIMPANI_CDC_DMIC_CLK_CTL_M,
1455 TIMPANI_CDC_DMIC_CLK_CTL_POR,
1456 {
1457 { .mask = 0x3F, .path_mask = 0},
1458 { .mask = 0xC0, .path_mask = 0},
1459 { .mask = 0x00, .path_mask = 0},
1460 { .mask = 0x00, .path_mask = 0},
1461 { .mask = 0x00, .path_mask = 0},
1462 }
1463 },
1464 {
1465 TIMPANI_A_CDC_ADC12_CLK_CTL,
1466 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0,
1467 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1468 TIMPANI_CDC_ADC12_CLK_CTL_M,
1469 TIMPANI_CDC_ADC12_CLK_CTL_POR,
1470 {
1471 { .mask = 0xFF, .path_mask = 0},
1472 { .mask = 0x00, .path_mask = 0},
1473 { .mask = 0x00, .path_mask = 0},
1474 { .mask = 0x00, .path_mask = 0},
1475 { .mask = 0x00, .path_mask = 0},
1476 }
1477 },
1478 {
1479 TIMPANI_A_CDC_TX1_CTL,
1480 {0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1481 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
1482 TIMPANI_CDC_TX1_CTL_M,
1483 TIMPANI_CDC_TX1_CTL_POR,
1484 {
1485 { .mask = 0x3F, .path_mask = 0},
1486 { .mask = 0xC0, .path_mask = 0},
1487 { .mask = 0x00, .path_mask = 0},
1488 { .mask = 0x00, .path_mask = 0},
1489 { .mask = 0x00, .path_mask = 0},
1490 }
1491 },
1492 {
1493 TIMPANI_A_CDC_ADC34_CLK_CTL,
1494 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0,
1495 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1496 TIMPANI_CDC_ADC34_CLK_CTL_M,
1497 TIMPANI_CDC_ADC34_CLK_CTL_POR,
1498 {
1499 { .mask = 0xFF, .path_mask = 0},
1500 { .mask = 0x00, .path_mask = 0},
1501 { .mask = 0x00, .path_mask = 0},
1502 { .mask = 0x00, .path_mask = 0},
1503 { .mask = 0x00, .path_mask = 0},
1504 }
1505 },
1506 {
1507 TIMPANI_A_CDC_TX2_CTL,
1508 {0x0, 0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1509 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
1510 TIMPANI_CDC_TX2_CTL_M,
1511 TIMPANI_CDC_TX2_CTL_POR,
1512 {
1513 { .mask = 0x3F, .path_mask = 0},
1514 { .mask = 0xC0, .path_mask = 0},
1515 { .mask = 0x00, .path_mask = 0},
1516 { .mask = 0x00, .path_mask = 0},
1517 { .mask = 0x00, .path_mask = 0},
1518 }
1519 },
1520 {
1521 TIMPANI_A_CDC_RX1_CLK_CTL,
1522 {0x1F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1523 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE0},
1524 TIMPANI_CDC_RX1_CLK_CTL_M,
1525 TIMPANI_CDC_RX1_CLK_CTL_POR,
1526 {
1527 { .mask = 0x1F, .path_mask = 0},
1528 { .mask = 0xE0, .path_mask = 0},
1529 { .mask = 0x00, .path_mask = 0},
1530 { .mask = 0x00, .path_mask = 0},
1531 { .mask = 0x00, .path_mask = 0},
1532 }
1533 },
1534 {
1535 TIMPANI_A_CDC_RX2_CLK_CTL,
1536 {0x1F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1537 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE0},
1538 TIMPANI_CDC_RX2_CLK_CTL_M,
1539 TIMPANI_CDC_RX2_CLK_CTL_POR,
1540 {
1541 { .mask = 0x1F, .path_mask = 0},
1542 { .mask = 0xE0, .path_mask = 0},
1543 { .mask = 0x00, .path_mask = 0},
1544 { .mask = 0x00, .path_mask = 0},
1545 { .mask = 0x00, .path_mask = 0},
1546 }
1547 },
1548 {
1549 TIMPANI_A_CDC_DEC_ADC_SEL,
1550 {0x0, 0x0, 0xF, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1551 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1552 TIMPANI_CDC_DEC_ADC_SEL_M,
1553 TIMPANI_CDC_DEC_ADC_SEL_POR,
1554 {
1555 { .mask = 0x0F, .path_mask = 0},
1556 { .mask = 0xF0, .path_mask = 0},
1557 { .mask = 0x00, .path_mask = 0},
1558 { .mask = 0x00, .path_mask = 0},
1559 { .mask = 0x00, .path_mask = 0},
1560 }
1561 },
1562 {
1563 TIMPANI_A_CDC_ANC_INPUT_MUX,
1564 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1565 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0x0, 0xC0},
1566 TIMPANI_CDC_ANC_INPUT_MUX_M,
1567 TIMPANI_CDC_ANC_INPUT_MUX_POR,
1568 {
1569 { .mask = 0x3F, .path_mask = 0},
1570 { .mask = 0xC0, .path_mask = 0},
1571 { .mask = 0x00, .path_mask = 0},
1572 { .mask = 0x00, .path_mask = 0},
1573 { .mask = 0x00, .path_mask = 0},
1574 }
1575 },
1576 {
1577 TIMPANI_A_CDC_ANC_RX_CLK_NS_SEL,
1578 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1579 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0xFE},
1580 TIMPANI_CDC_ANC_RX_CLK_NS_SEL_M,
1581 TIMPANI_CDC_ANC_RX_CLK_NS_SEL_POR,
1582 {
1583 { .mask = 0x01, .path_mask = 0},
1584 { .mask = 0xFE, .path_mask = 0},
1585 { .mask = 0x00, .path_mask = 0},
1586 { .mask = 0x00, .path_mask = 0},
1587 { .mask = 0x00, .path_mask = 0},
1588 }
1589 },
1590 {
1591 TIMPANI_A_CDC_ANC_FB_TUNE_SEL,
1592 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1593 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
1594 TIMPANI_CDC_ANC_FB_TUNE_SEL_M,
1595 TIMPANI_CDC_ANC_FB_TUNE_SEL_POR,
1596 {
1597 { .mask = 0xFF, .path_mask = 0},
1598 { .mask = 0x00, .path_mask = 0},
1599 { .mask = 0x00, .path_mask = 0},
1600 { .mask = 0x00, .path_mask = 0},
1601 { .mask = 0x00, .path_mask = 0},
1602 }
1603 },
1604 {
1605 TIMPANI_A_CLK_DIV_SYNC_CTL,
1606 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1607 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
1608 TIMPANI_CLK_DIV_SYNC_CTL_M,
1609 TIMPANI_CLK_DIV_SYNC_CTL_POR,
1610 {
1611 { .mask = 0x03, .path_mask = 0},
1612 { .mask = 0xFC, .path_mask = 0},
1613 { .mask = 0x00, .path_mask = 0},
1614 { .mask = 0x00, .path_mask = 0},
1615 { .mask = 0x00, .path_mask = 0},
1616 }
1617 },
1618 {
1619 TIMPANI_A_CDC_ADC_CLK_EN,
1620 {0x0, 0x0, 0x3, 0xC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1621 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
1622 TIMPANI_CDC_ADC_CLK_EN_M,
1623 TIMPANI_CDC_ADC_CLK_EN_POR,
1624 {
1625 { .mask = 0x03, .path_mask = 0},
1626 { .mask = 0x0C, .path_mask = 0},
1627 { .mask = 0xF0, .path_mask = 0},
1628 { .mask = 0x00, .path_mask = 0},
1629 { .mask = 0x00, .path_mask = 0},
1630 }
1631 },
1632 {
1633 TIMPANI_A_CDC_ST_MIXING,
1634 {0x0, 0x0, 0x3, 0xC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1635 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
1636 TIMPANI_CDC_ST_MIXING_M,
1637 TIMPANI_CDC_ST_MIXING_POR,
1638 {
1639 { .mask = 0x03, .path_mask = 0},
1640 { .mask = 0x0C, .path_mask = 0},
1641 { .mask = 0xF0, .path_mask = 0},
1642 { .mask = 0x00, .path_mask = 0},
1643 { .mask = 0x00, .path_mask = 0},
1644 }
1645 },
1646 {
1647 TIMPANI_A_CDC_RX2_CTL,
1648 {0x0, 0x7F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1649 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80},
1650 TIMPANI_CDC_RX2_CTL_M,
1651 TIMPANI_CDC_RX2_CTL_POR,
1652 {
1653 { .mask = 0x7F, .path_mask = 0},
1654 { .mask = 0x80, .path_mask = 0},
1655 { .mask = 0x00, .path_mask = 0},
1656 { .mask = 0x00, .path_mask = 0},
1657 { .mask = 0x00, .path_mask = 0},
1658 }
1659 },
1660 {
1661 TIMPANI_A_CDC_ARB_CLK_EN,
1662 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1663 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
1664 TIMPANI_CDC_ARB_CLK_EN_M,
1665 TIMPANI_CDC_ARB_CLK_EN_POR,
1666 {
1667 { .mask = 0xFF, .path_mask = 0},
1668 { .mask = 0x00, .path_mask = 0},
1669 { .mask = 0x00, .path_mask = 0},
1670 { .mask = 0x00, .path_mask = 0},
1671 { .mask = 0x00, .path_mask = 0},
1672 }
1673 },
1674 {
1675 TIMPANI_A_CDC_I2S_CTL2,
1676 {0x2, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1677 0x0, 0x0, 0x0, 0x0, 0x39, 0x0, 0x0, 0xC0},
1678 TIMPANI_CDC_I2S_CTL2_M,
1679 TIMPANI_CDC_I2S_CTL2_POR,
1680 {
1681 { .mask = 0x02, .path_mask = 0},
1682 { .mask = 0x04, .path_mask = 0},
1683 { .mask = 0x39, .path_mask = 0},
1684 { .mask = 0xC0, .path_mask = 0},
1685 { .mask = 0x00, .path_mask = 0},
1686 }
1687 },
1688 {
1689 TIMPANI_A_CDC_RX2LG,
1690 {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1691 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1692 TIMPANI_CDC_RX2LG_M,
1693 TIMPANI_CDC_RX2LG_POR,
1694 {
1695 { .mask = 0xFF, .path_mask = 0},
1696 { .mask = 0x00, .path_mask = 0},
1697 { .mask = 0x00, .path_mask = 0},
1698 { .mask = 0x00, .path_mask = 0},
1699 { .mask = 0x00, .path_mask = 0},
1700 }
1701 },
1702 {
1703 TIMPANI_A_CDC_RX2RG,
1704 {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1705 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1706 TIMPANI_CDC_RX2RG_M,
1707 TIMPANI_CDC_RX2RG_POR,
1708 {
1709 { .mask = 0xFF, .path_mask = 0},
1710 { .mask = 0x00, .path_mask = 0},
1711 { .mask = 0x00, .path_mask = 0},
1712 { .mask = 0x00, .path_mask = 0},
1713 { .mask = 0x00, .path_mask = 0},
1714 }
1715 },
1716 {
1717 TIMPANI_A_CDC_TX2LG,
1718 {0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1719 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1720 TIMPANI_CDC_TX2LG_M,
1721 TIMPANI_CDC_TX2LG_POR,
1722 {
1723 { .mask = 0xFF, .path_mask = 0},
1724 { .mask = 0x00, .path_mask = 0},
1725 { .mask = 0x00, .path_mask = 0},
1726 { .mask = 0x00, .path_mask = 0},
1727 { .mask = 0x00, .path_mask = 0},
1728 }
1729 },
1730 {
1731 TIMPANI_A_CDC_TX2RG,
1732 {0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1733 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1734 TIMPANI_CDC_TX2RG_M,
1735 TIMPANI_CDC_TX2RG_POR,
1736 {
1737 { .mask = 0xFF, .path_mask = 0},
1738 { .mask = 0x00, .path_mask = 0},
1739 { .mask = 0x00, .path_mask = 0},
1740 { .mask = 0x00, .path_mask = 0},
1741 { .mask = 0x00, .path_mask = 0},
1742 }
1743 },
1744 {
1745 TIMPANI_A_CDC_DMIC_MUX,
1746 {0x0, 0x0, 0xF, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1747 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1748 TIMPANI_CDC_DMIC_MUX_M,
1749 TIMPANI_CDC_DMIC_MUX_POR,
1750 {
1751 { .mask = 0x0F, .path_mask = 0},
1752 { .mask = 0xF0, .path_mask = 0},
1753 { .mask = 0x00, .path_mask = 0},
1754 { .mask = 0x00, .path_mask = 0},
1755 { .mask = 0x00, .path_mask = 0},
1756 }
1757 },
1758 {
1759 TIMPANI_A_CDC_ARB_CLK_CTL,
1760 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1761 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
1762 TIMPANI_CDC_ARB_CLK_CTL_M,
1763 TIMPANI_CDC_ARB_CLK_CTL_POR,
1764 {
1765 { .mask = 0x03, .path_mask = 0},
1766 { .mask = 0xFC, .path_mask = 0},
1767 { .mask = 0x00, .path_mask = 0},
1768 { .mask = 0x00, .path_mask = 0},
1769 { .mask = 0x00, .path_mask = 0},
1770 }
1771 },
1772 {
1773 TIMPANI_A_CDC_GCTL2,
1774 {0x0, 0xF, 0x0, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1775 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1776 TIMPANI_CDC_GCTL2_M,
1777 TIMPANI_CDC_GCTL2_POR,
1778 {
1779 { .mask = 0x0F, .path_mask = 0},
1780 { .mask = 0xF0, .path_mask = 0},
1781 { .mask = 0x00, .path_mask = 0},
1782 { .mask = 0x00, .path_mask = 0},
1783 { .mask = 0x00, .path_mask = 0},
1784 }
1785 },
1786 {
1787 TIMPANI_A_CDC_BYPASS_CTL2,
1788 {0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1789 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
1790 TIMPANI_CDC_BYPASS_CTL2_M,
1791 TIMPANI_CDC_BYPASS_CTL2_POR,
1792 {
1793 { .mask = 0x3F, .path_mask = 0},
1794 { .mask = 0xC0, .path_mask = 0},
1795 { .mask = 0x00, .path_mask = 0},
1796 { .mask = 0x00, .path_mask = 0},
1797 { .mask = 0x00, .path_mask = 0},
1798 }
1799 },
1800 {
1801 TIMPANI_A_CDC_BYPASS_CTL3,
1802 {0x0, 0x0, 0x0, 0x3F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1803 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC0},
1804 TIMPANI_CDC_BYPASS_CTL3_M,
1805 TIMPANI_CDC_BYPASS_CTL3_POR,
1806 {
1807 { .mask = 0x3F, .path_mask = 0},
1808 { .mask = 0xC0, .path_mask = 0},
1809 { .mask = 0x00, .path_mask = 0},
1810 { .mask = 0x00, .path_mask = 0},
1811 { .mask = 0x00, .path_mask = 0},
1812 }
1813 },
1814 {
1815 TIMPANI_A_CDC_BYPASS_CTL4,
1816 {0x0, 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1817 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xF0},
1818 TIMPANI_CDC_BYPASS_CTL4_M,
1819 TIMPANI_CDC_BYPASS_CTL4_POR,
1820 {
1821 { .mask = 0x0F, .path_mask = 0},
1822 { .mask = 0xF0, .path_mask = 0},
1823 { .mask = 0x00, .path_mask = 0},
1824 { .mask = 0x00, .path_mask = 0},
1825 { .mask = 0x00, .path_mask = 0},
1826 }
1827 },
1828 {
1829 TIMPANI_A_CDC_RX2L_DCOFFSET,
1830 {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1831 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1832 TIMPANI_CDC_RX2L_DCOFFSET_M,
1833 TIMPANI_CDC_RX2L_DCOFFSET_POR,
1834 {
1835 { .mask = 0xFF, .path_mask = 0},
1836 { .mask = 0x00, .path_mask = 0},
1837 { .mask = 0x00, .path_mask = 0},
1838 { .mask = 0x00, .path_mask = 0},
1839 { .mask = 0x00, .path_mask = 0},
1840 }
1841 },
1842 {
1843 TIMPANI_A_CDC_RX2R_DCOFFSET,
1844 {0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1845 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1846 TIMPANI_CDC_RX2R_DCOFFSET_M,
1847 TIMPANI_CDC_RX2R_DCOFFSET_POR,
1848 {
1849 { .mask = 0xFF, .path_mask = 0},
1850 { .mask = 0x00, .path_mask = 0},
1851 { .mask = 0x00, .path_mask = 0},
1852 { .mask = 0x00, .path_mask = 0},
1853 { .mask = 0x00, .path_mask = 0},
1854 }
1855 },
1856 {
1857 TIMPANI_A_CDC_RX_MIX_CTL,
1858 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1859 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
1860 TIMPANI_CDC_RX_MIX_CTL_M,
1861 TIMPANI_CDC_RX_MIX_CTL_POR,
1862 {
1863 { .mask = 0x03, .path_mask = 0},
1864 { .mask = 0xFC, .path_mask = 0},
1865 { .mask = 0x00, .path_mask = 0},
1866 { .mask = 0x00, .path_mask = 0},
1867 { .mask = 0x00, .path_mask = 0},
1868 }
1869 },
1870 {
1871 TIMPANI_A_CDC_SPARE_CTL,
1872 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1873 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xFE},
1874 TIMPANI_CDC_SPARE_CTL_M,
1875 TIMPANI_CDC_SPARE_CTL_POR,
1876 {
1877 { .mask = 0x01, .path_mask = 0},
1878 { .mask = 0xFE, .path_mask = 0},
1879 { .mask = 0x00, .path_mask = 0},
1880 { .mask = 0x00, .path_mask = 0},
1881 { .mask = 0x00, .path_mask = 0},
1882 }
1883 },
1884 {
1885 TIMPANI_A_CDC_TESTMODE2,
1886 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1887 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0xE0},
1888 TIMPANI_CDC_TESTMODE2_M,
1889 TIMPANI_CDC_TESTMODE2_POR,
1890 {
1891 { .mask = 0x1F, .path_mask = 0},
1892 { .mask = 0xE0, .path_mask = 0},
1893 { .mask = 0x00, .path_mask = 0},
1894 { .mask = 0x00, .path_mask = 0},
1895 { .mask = 0x00, .path_mask = 0},
1896 }
1897 },
1898 {
1899 TIMPANI_A_CDC_PDM_OE,
1900 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1901 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0},
1902 TIMPANI_CDC_PDM_OE_M,
1903 TIMPANI_CDC_PDM_OE_POR,
1904 {
1905 { .mask = 0xFF, .path_mask = 0},
1906 { .mask = 0x00, .path_mask = 0},
1907 { .mask = 0x00, .path_mask = 0},
1908 { .mask = 0x00, .path_mask = 0},
1909 { .mask = 0x00, .path_mask = 0},
1910 }
1911 },
1912 {
1913 TIMPANI_A_CDC_TX1R_STG,
1914 {0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1915 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1916 TIMPANI_CDC_TX1R_STG_M,
1917 TIMPANI_CDC_TX1R_STG_POR,
1918 {
1919 { .mask = 0xFF, .path_mask = 0},
1920 { .mask = 0x00, .path_mask = 0},
1921 { .mask = 0x00, .path_mask = 0},
1922 { .mask = 0x00, .path_mask = 0},
1923 { .mask = 0x00, .path_mask = 0},
1924 }
1925 },
1926 {
1927 TIMPANI_A_CDC_TX2L_STG,
1928 {0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1929 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1930 TIMPANI_CDC_TX2L_STG_M,
1931 TIMPANI_CDC_TX2L_STG_POR,
1932 {
1933 { .mask = 0xFF, .path_mask = 0},
1934 { .mask = 0x00, .path_mask = 0},
1935 { .mask = 0x00, .path_mask = 0},
1936 { .mask = 0x00, .path_mask = 0},
1937 { .mask = 0x00, .path_mask = 0},
1938 }
1939 },
1940 {
1941 TIMPANI_A_CDC_TX2R_STG,
1942 {0x0, 0x0, 0x0, 0xFF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1943 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
1944 TIMPANI_CDC_TX2R_STG_M,
1945 TIMPANI_CDC_TX2R_STG_POR,
1946 {
1947 { .mask = 0xFF, .path_mask = 0},
1948 { .mask = 0x00, .path_mask = 0},
1949 { .mask = 0x00, .path_mask = 0},
1950 { .mask = 0x00, .path_mask = 0},
1951 { .mask = 0x00, .path_mask = 0},
1952 }
1953 },
1954 {
1955 TIMPANI_A_CDC_ARB_BYPASS_CTL,
1956 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1957 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
1958 TIMPANI_CDC_ARB_BYPASS_CTL_M,
1959 TIMPANI_CDC_ARB_BYPASS_CTL_POR,
1960 {
1961 { .mask = 0xFF, .path_mask = 0},
1962 { .mask = 0x00, .path_mask = 0},
1963 { .mask = 0x00, .path_mask = 0},
1964 { .mask = 0x00, .path_mask = 0},
1965 { .mask = 0x00, .path_mask = 0},
1966 }
1967 },
1968 {
1969 TIMPANI_A_CDC_ANC1_CTL1,
1970 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1971 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x0, 0xE0},
1972 TIMPANI_CDC_ANC1_CTL1_M,
1973 TIMPANI_CDC_ANC1_CTL1_POR,
1974 {
1975 { .mask = 0x1F, .path_mask = 0},
1976 { .mask = 0xE0, .path_mask = 0},
1977 { .mask = 0x00, .path_mask = 0},
1978 { .mask = 0x00, .path_mask = 0},
1979 { .mask = 0x00, .path_mask = 0},
1980 }
1981 },
1982 {
1983 TIMPANI_A_CDC_ANC1_CTL2,
1984 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1985 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0x0, 0xC0},
1986 TIMPANI_CDC_ANC1_CTL2_M,
1987 TIMPANI_CDC_ANC1_CTL2_POR,
1988 {
1989 { .mask = 0x3F, .path_mask = 0},
1990 { .mask = 0xC0, .path_mask = 0},
1991 { .mask = 0x00, .path_mask = 0},
1992 { .mask = 0x00, .path_mask = 0},
1993 { .mask = 0x00, .path_mask = 0},
1994 }
1995 },
1996 {
1997 TIMPANI_A_CDC_ANC1_FF_FB_SHIFT,
1998 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1999 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2000 TIMPANI_CDC_ANC1_FF_FB_SHIFT_M,
2001 TIMPANI_CDC_ANC1_FF_FB_SHIFT_POR,
2002 {
2003 { .mask = 0xFF, .path_mask = 0},
2004 { .mask = 0x00, .path_mask = 0},
2005 { .mask = 0x00, .path_mask = 0},
2006 { .mask = 0x00, .path_mask = 0},
2007 { .mask = 0x00, .path_mask = 0},
2008 }
2009 },
2010 {
2011 TIMPANI_A_CDC_ANC1_RX_NS,
2012 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2013 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0xF8},
2014 TIMPANI_CDC_ANC1_RX_NS_M,
2015 TIMPANI_CDC_ANC1_RX_NS_POR,
2016 {
2017 { .mask = 0x07, .path_mask = 0},
2018 { .mask = 0xF8, .path_mask = 0},
2019 { .mask = 0x00, .path_mask = 0},
2020 { .mask = 0x00, .path_mask = 0},
2021 { .mask = 0x00, .path_mask = 0},
2022 }
2023 },
2024 {
2025 TIMPANI_A_CDC_ANC1_SPARE,
2026 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2027 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2028 TIMPANI_CDC_ANC1_SPARE_M,
2029 TIMPANI_CDC_ANC1_SPARE_POR,
2030 {
2031 { .mask = 0xFF, .path_mask = 0},
2032 { .mask = 0x00, .path_mask = 0},
2033 { .mask = 0x00, .path_mask = 0},
2034 { .mask = 0x00, .path_mask = 0},
2035 { .mask = 0x00, .path_mask = 0},
2036 }
2037 },
2038 {
2039 TIMPANI_A_CDC_ANC1_IIR_COEFF_PTR,
2040 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2041 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x0, 0xE0},
2042 TIMPANI_CDC_ANC1_IIR_COEFF_PTR_M,
2043 TIMPANI_CDC_ANC1_IIR_COEFF_PTR_POR,
2044 {
2045 { .mask = 0x1F, .path_mask = 0},
2046 { .mask = 0xE0, .path_mask = 0},
2047 { .mask = 0x00, .path_mask = 0},
2048 { .mask = 0x00, .path_mask = 0},
2049 { .mask = 0x00, .path_mask = 0},
2050 }
2051 },
2052 {
2053 TIMPANI_A_CDC_ANC1_IIR_COEFF_MSB,
2054 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2055 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0xFE},
2056 TIMPANI_CDC_ANC1_IIR_COEFF_MSB_M,
2057 TIMPANI_CDC_ANC1_IIR_COEFF_MSB_POR,
2058 {
2059 { .mask = 0x01, .path_mask = 0},
2060 { .mask = 0xFE, .path_mask = 0},
2061 { .mask = 0x00, .path_mask = 0},
2062 { .mask = 0x00, .path_mask = 0},
2063 { .mask = 0x00, .path_mask = 0},
2064 }
2065 },
2066 {
2067 TIMPANI_A_CDC_ANC1_IIR_COEFF_LSB,
2068 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2069 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2070 TIMPANI_CDC_ANC1_IIR_COEFF_LSB_M,
2071 TIMPANI_CDC_ANC1_IIR_COEFF_LSB_POR,
2072 {
2073 { .mask = 0xFF, .path_mask = 0},
2074 { .mask = 0x00, .path_mask = 0},
2075 { .mask = 0x00, .path_mask = 0},
2076 { .mask = 0x00, .path_mask = 0},
2077 { .mask = 0x00, .path_mask = 0},
2078 }
2079 },
2080 {
2081 TIMPANI_A_CDC_ANC1_IIR_COEFF_CTL,
2082 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2083 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
2084 TIMPANI_CDC_ANC1_IIR_COEFF_CTL_M,
2085 TIMPANI_CDC_ANC1_IIR_COEFF_CTL_POR,
2086 {
2087 { .mask = 0x03, .path_mask = 0},
2088 { .mask = 0xFC, .path_mask = 0},
2089 { .mask = 0x00, .path_mask = 0},
2090 { .mask = 0x00, .path_mask = 0},
2091 { .mask = 0x00, .path_mask = 0},
2092 }
2093 },
2094 {
2095 TIMPANI_A_CDC_ANC1_LPF_COEFF_PTR,
2096 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2097 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2098 TIMPANI_CDC_ANC1_LPF_COEFF_PTR_M,
2099 TIMPANI_CDC_ANC1_LPF_COEFF_PTR_POR,
2100 {
2101 { .mask = 0x0F, .path_mask = 0},
2102 { .mask = 0xF0, .path_mask = 0},
2103 { .mask = 0x00, .path_mask = 0},
2104 { .mask = 0x00, .path_mask = 0},
2105 { .mask = 0x00, .path_mask = 0},
2106 }
2107 },
2108 {
2109 TIMPANI_A_CDC_ANC1_LPF_COEFF_MSB,
2110 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2111 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2112 TIMPANI_CDC_ANC1_LPF_COEFF_MSB_M,
2113 TIMPANI_CDC_ANC1_LPF_COEFF_MSB_POR,
2114 {
2115 { .mask = 0x0F, .path_mask = 0},
2116 { .mask = 0xF0, .path_mask = 0},
2117 { .mask = 0x00, .path_mask = 0},
2118 { .mask = 0x00, .path_mask = 0},
2119 { .mask = 0x00, .path_mask = 0},
2120 }
2121 },
2122 {
2123 TIMPANI_A_CDC_ANC1_LPF_COEFF_LSB,
2124 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2125 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2126 TIMPANI_CDC_ANC1_LPF_COEFF_LSB_M,
2127 TIMPANI_CDC_ANC1_LPF_COEFF_LSB_POR,
2128 {
2129 { .mask = 0xFF, .path_mask = 0},
2130 { .mask = 0x00, .path_mask = 0},
2131 { .mask = 0x00, .path_mask = 0},
2132 { .mask = 0x00, .path_mask = 0},
2133 { .mask = 0x00, .path_mask = 0},
2134 }
2135 },
2136 {
2137 TIMPANI_A_CDC_ANC1_SCALE_PTR,
2138 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2139 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2140 TIMPANI_CDC_ANC1_SCALE_PTR_M,
2141 TIMPANI_CDC_ANC1_SCALE_PTR_POR,
2142 {
2143 { .mask = 0xFF, .path_mask = 0},
2144 { .mask = 0x00, .path_mask = 0},
2145 { .mask = 0x00, .path_mask = 0},
2146 { .mask = 0x00, .path_mask = 0},
2147 { .mask = 0x00, .path_mask = 0},
2148 }
2149 },
2150 {
2151 TIMPANI_A_CDC_ANC1_SCALE,
2152 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2153 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2154 TIMPANI_CDC_ANC1_SCALE_M,
2155 TIMPANI_CDC_ANC1_SCALE_POR,
2156 {
2157 { .mask = 0xFF, .path_mask = 0},
2158 { .mask = 0x00, .path_mask = 0},
2159 { .mask = 0x00, .path_mask = 0},
2160 { .mask = 0x00, .path_mask = 0},
2161 { .mask = 0x00, .path_mask = 0},
2162 }
2163 },
2164 {
2165 TIMPANI_A_CDC_ANC1_DEBUG,
2166 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2167 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2168 TIMPANI_CDC_ANC1_DEBUG_M,
2169 TIMPANI_CDC_ANC1_DEBUG_POR,
2170 {
2171 { .mask = 0x0F, .path_mask = 0},
2172 { .mask = 0xF0, .path_mask = 0},
2173 { .mask = 0x00, .path_mask = 0},
2174 { .mask = 0x00, .path_mask = 0},
2175 { .mask = 0x00, .path_mask = 0},
2176 }
2177 },
2178 {
2179 TIMPANI_A_CDC_ANC2_CTL1,
2180 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2181 0x0, 0x0, 0x0, 0x0, 0x0, 0x1F, 0x0, 0xE0},
2182 TIMPANI_CDC_ANC2_CTL1_M,
2183 TIMPANI_CDC_ANC2_CTL1_POR,
2184 {
2185 { .mask = 0x1F, .path_mask = 0},
2186 { .mask = 0xE0, .path_mask = 0},
2187 { .mask = 0x00, .path_mask = 0},
2188 { .mask = 0x00, .path_mask = 0},
2189 { .mask = 0x00, .path_mask = 0},
2190 }
2191 },
2192 {
2193 TIMPANI_A_CDC_ANC2_CTL2,
2194 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2195 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0x0, 0xC0},
2196 TIMPANI_CDC_ANC2_CTL2_M,
2197 TIMPANI_CDC_ANC2_CTL2_POR,
2198 {
2199 { .mask = 0x3F, .path_mask = 0},
2200 { .mask = 0xC0, .path_mask = 0},
2201 { .mask = 0x00, .path_mask = 0},
2202 { .mask = 0x00, .path_mask = 0},
2203 { .mask = 0x00, .path_mask = 0},
2204 }
2205 },
2206 {
2207 TIMPANI_A_CDC_ANC2_FF_FB_SHIFT,
2208 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2209 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2210 TIMPANI_CDC_ANC2_FF_FB_SHIFT_M,
2211 TIMPANI_CDC_ANC2_FF_FB_SHIFT_POR,
2212 {
2213 { .mask = 0xFF, .path_mask = 0},
2214 { .mask = 0x00, .path_mask = 0},
2215 { .mask = 0x00, .path_mask = 0},
2216 { .mask = 0x00, .path_mask = 0},
2217 { .mask = 0x00, .path_mask = 0},
2218 }
2219 },
2220 {
2221 TIMPANI_A_CDC_ANC2_RX_NS,
2222 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2223 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0xF8},
2224 TIMPANI_CDC_ANC2_RX_NS_M,
2225 TIMPANI_CDC_ANC2_RX_NS_POR,
2226 {
2227 { .mask = 0x07, .path_mask = 0},
2228 { .mask = 0xF8, .path_mask = 0},
2229 { .mask = 0x00, .path_mask = 0},
2230 { .mask = 0x00, .path_mask = 0},
2231 { .mask = 0x00, .path_mask = 0},
2232 }
2233 },
2234 {
2235 TIMPANI_A_CDC_ANC2_SPARE,
2236 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2237 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2238 TIMPANI_CDC_ANC2_SPARE_M,
2239 TIMPANI_CDC_ANC2_SPARE_POR,
2240 {
2241 { .mask = 0xFF, .path_mask = 0},
2242 { .mask = 0x00, .path_mask = 0},
2243 { .mask = 0x00, .path_mask = 0},
2244 { .mask = 0x00, .path_mask = 0},
2245 { .mask = 0x00, .path_mask = 0},
2246 }
2247 },
2248 {
2249 TIMPANI_A_CDC_ANC2_IIR_COEFF_PTR,
2250 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2251 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2252 TIMPANI_CDC_ANC2_IIR_COEFF_PTR_M,
2253 TIMPANI_CDC_ANC2_IIR_COEFF_PTR_POR,
2254 {
2255 { .mask = 0x0F, .path_mask = 0},
2256 { .mask = 0xF0, .path_mask = 0},
2257 { .mask = 0x00, .path_mask = 0},
2258 { .mask = 0x00, .path_mask = 0},
2259 { .mask = 0x00, .path_mask = 0},
2260 }
2261 },
2262 {
2263 TIMPANI_A_CDC_ANC2_IIR_COEFF_MSB,
2264 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2265 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0xFE},
2266 TIMPANI_CDC_ANC2_IIR_COEFF_MSB_M,
2267 TIMPANI_CDC_ANC2_IIR_COEFF_MSB_POR,
2268 {
2269 { .mask = 0x01, .path_mask = 0},
2270 { .mask = 0xFE, .path_mask = 0},
2271 { .mask = 0x00, .path_mask = 0},
2272 { .mask = 0x00, .path_mask = 0},
2273 { .mask = 0x00, .path_mask = 0},
2274 }
2275 },
2276 {
2277 TIMPANI_A_CDC_ANC2_IIR_COEFF_LSB,
2278 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2279 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2280 TIMPANI_CDC_ANC2_IIR_COEFF_LSB_M,
2281 TIMPANI_CDC_ANC2_IIR_COEFF_LSB_POR,
2282 {
2283 { .mask = 0xFF, .path_mask = 0},
2284 { .mask = 0x00, .path_mask = 0},
2285 { .mask = 0x00, .path_mask = 0},
2286 { .mask = 0x00, .path_mask = 0},
2287 { .mask = 0x00, .path_mask = 0},
2288 }
2289 },
2290 {
2291 TIMPANI_A_CDC_ANC2_IIR_COEFF_CTL,
2292 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2293 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0xFC},
2294 TIMPANI_CDC_ANC2_IIR_COEFF_CTL_M,
2295 TIMPANI_CDC_ANC2_IIR_COEFF_CTL_POR,
2296 {
2297 { .mask = 0x03, .path_mask = 0},
2298 { .mask = 0xFC, .path_mask = 0},
2299 { .mask = 0x00, .path_mask = 0},
2300 { .mask = 0x00, .path_mask = 0},
2301 { .mask = 0x00, .path_mask = 0},
2302 }
2303 },
2304 {
2305 TIMPANI_A_CDC_ANC2_LPF_COEFF_PTR,
2306 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2307 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2308 TIMPANI_CDC_ANC2_LPF_COEFF_PTR_M,
2309 TIMPANI_CDC_ANC2_LPF_COEFF_PTR_POR,
2310 {
2311 { .mask = 0x0F, .path_mask = 0},
2312 { .mask = 0xF0, .path_mask = 0},
2313 { .mask = 0x00, .path_mask = 0},
2314 { .mask = 0x00, .path_mask = 0},
2315 { .mask = 0x00, .path_mask = 0},
2316 }
2317 },
2318 {
2319 TIMPANI_A_CDC_ANC2_LPF_COEFF_MSB,
2320 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2321 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2322 TIMPANI_CDC_ANC2_LPF_COEFF_MSB_M,
2323 TIMPANI_CDC_ANC2_LPF_COEFF_MSB_POR,
2324 {
2325 { .mask = 0x0F, .path_mask = 0},
2326 { .mask = 0xF0, .path_mask = 0},
2327 { .mask = 0x00, .path_mask = 0},
2328 { .mask = 0x00, .path_mask = 0},
2329 { .mask = 0x00, .path_mask = 0},
2330 }
2331 },
2332 {
2333 TIMPANI_A_CDC_ANC2_LPF_COEFF_LSB,
2334 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2335 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2336 TIMPANI_CDC_ANC2_LPF_COEFF_LSB_M,
2337 TIMPANI_CDC_ANC2_LPF_COEFF_LSB_POR,
2338 {
2339 { .mask = 0xFF, .path_mask = 0},
2340 { .mask = 0x00, .path_mask = 0},
2341 { .mask = 0x00, .path_mask = 0},
2342 { .mask = 0x00, .path_mask = 0},
2343 { .mask = 0x00, .path_mask = 0},
2344 }
2345 },
2346 {
2347 TIMPANI_A_CDC_ANC2_SCALE_PTR,
2348 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2349 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2350 TIMPANI_CDC_ANC2_SCALE_PTR_M,
2351 TIMPANI_CDC_ANC2_SCALE_PTR_POR,
2352 {
2353 { .mask = 0xFF, .path_mask = 0},
2354 { .mask = 0x00, .path_mask = 0},
2355 { .mask = 0x00, .path_mask = 0},
2356 { .mask = 0x00, .path_mask = 0},
2357 { .mask = 0x00, .path_mask = 0},
2358 }
2359 },
2360 {
2361 TIMPANI_A_CDC_ANC2_SCALE,
2362 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2363 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2364 TIMPANI_CDC_ANC2_SCALE_M,
2365 TIMPANI_CDC_ANC2_SCALE_POR,
2366 {
2367 { .mask = 0xFF, .path_mask = 0},
2368 { .mask = 0x00, .path_mask = 0},
2369 { .mask = 0x00, .path_mask = 0},
2370 { .mask = 0x00, .path_mask = 0},
2371 { .mask = 0x00, .path_mask = 0},
2372 }
2373 },
2374 {
2375 TIMPANI_A_CDC_ANC2_DEBUG,
2376 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2377 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2378 TIMPANI_CDC_ANC2_DEBUG_M,
2379 TIMPANI_CDC_ANC2_DEBUG_POR,
2380 {
2381 { .mask = 0x0F, .path_mask = 0},
2382 { .mask = 0xF0, .path_mask = 0},
2383 { .mask = 0x00, .path_mask = 0},
2384 { .mask = 0x00, .path_mask = 0},
2385 { .mask = 0x00, .path_mask = 0},
2386 }
2387 },
2388 {
2389 TIMPANI_A_CDC_LINE_L_AVOL,
2390 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2391 0xFC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3},
2392 TIMPANI_CDC_LINE_L_AVOL_M,
2393 TIMPANI_CDC_LINE_L_AVOL_POR,
2394 {
2395 { .mask = 0xFC, .path_mask = 0},
2396 { .mask = 0x03, .path_mask = 0},
2397 { .mask = 0x00, .path_mask = 0},
2398 { .mask = 0x00, .path_mask = 0},
2399 { .mask = 0x00, .path_mask = 0},
2400 }
2401 },
2402 {
2403 TIMPANI_A_CDC_LINE_R_AVOL,
2404 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2405 0xFC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3},
2406 TIMPANI_CDC_LINE_R_AVOL_M,
2407 TIMPANI_CDC_LINE_R_AVOL_POR,
2408 {
2409 { .mask = 0xFC, .path_mask = 0},
2410 { .mask = 0x03, .path_mask = 0},
2411 { .mask = 0x00, .path_mask = 0},
2412 { .mask = 0x00, .path_mask = 0},
2413 { .mask = 0x00, .path_mask = 0},
2414 }
2415 },
2416 {
2417 TIMPANI_A_CDC_HPH_L_AVOL,
2418 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE,
2419 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
2420 TIMPANI_CDC_HPH_L_AVOL_M,
2421 TIMPANI_CDC_HPH_L_AVOL_POR,
2422 {
2423 { .mask = 0xFE, .path_mask = 0},
2424 { .mask = 0x01, .path_mask = 0},
2425 { .mask = 0x00, .path_mask = 0},
2426 { .mask = 0x00, .path_mask = 0},
2427 { .mask = 0x00, .path_mask = 0},
2428 }
2429 },
2430 {
2431 TIMPANI_A_CDC_HPH_R_AVOL,
2432 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE,
2433 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1},
2434 TIMPANI_CDC_HPH_R_AVOL_M,
2435 TIMPANI_CDC_HPH_R_AVOL_POR,
2436 {
2437 { .mask = 0xFE, .path_mask = 0},
2438 { .mask = 0x01, .path_mask = 0},
2439 { .mask = 0x00, .path_mask = 0},
2440 { .mask = 0x00, .path_mask = 0},
2441 { .mask = 0x00, .path_mask = 0},
2442 }
2443 },
2444 {
2445 TIMPANI_A_CDC_COMP_CTL1,
2446 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2447 0x0, 0x0, 0x0, 0x0, 0x0, 0x3F, 0x0, 0xC0},
2448 TIMPANI_CDC_COMP_CTL1_M,
2449 TIMPANI_CDC_COMP_CTL1_POR,
2450 {
2451 { .mask = 0x3F, .path_mask = 0},
2452 { .mask = 0xC0, .path_mask = 0},
2453 { .mask = 0x00, .path_mask = 0},
2454 { .mask = 0x00, .path_mask = 0},
2455 { .mask = 0x00, .path_mask = 0},
2456 }
2457 },
2458 {
2459 TIMPANI_A_CDC_COMP_CTL2,
2460 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2461 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2462 TIMPANI_CDC_COMP_CTL2_M,
2463 TIMPANI_CDC_COMP_CTL2_POR,
2464 {
2465 { .mask = 0x0F, .path_mask = 0},
2466 { .mask = 0xF0, .path_mask = 0},
2467 { .mask = 0x00, .path_mask = 0},
2468 { .mask = 0x00, .path_mask = 0},
2469 { .mask = 0x00, .path_mask = 0},
2470 }
2471 },
2472 {
2473 TIMPANI_A_CDC_COMP_PEAK_METER,
2474 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2475 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2476 TIMPANI_CDC_COMP_PEAK_METER_M,
2477 TIMPANI_CDC_COMP_PEAK_METER_POR,
2478 {
2479 { .mask = 0x0F, .path_mask = 0},
2480 { .mask = 0xF0, .path_mask = 0},
2481 { .mask = 0x00, .path_mask = 0},
2482 { .mask = 0x00, .path_mask = 0},
2483 { .mask = 0x00, .path_mask = 0},
2484 }
2485 },
2486 {
2487 TIMPANI_A_CDC_COMP_LEVEL_METER_CTL1,
2488 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2489 0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0x0, 0xF0},
2490 TIMPANI_CDC_COMP_LEVEL_METER_CTL1_M,
2491 TIMPANI_CDC_COMP_LEVEL_METER_CTL1_POR,
2492 {
2493 { .mask = 0x0F, .path_mask = 0},
2494 { .mask = 0xF0, .path_mask = 0},
2495 { .mask = 0x00, .path_mask = 0},
2496 { .mask = 0x00, .path_mask = 0},
2497 { .mask = 0x00, .path_mask = 0},
2498 }
2499 },
2500 {
2501 TIMPANI_A_CDC_COMP_LEVEL_METER_CTL2,
2502 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2503 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2504 TIMPANI_CDC_COMP_LEVEL_METER_CTL2_M,
2505 TIMPANI_CDC_COMP_LEVEL_METER_CTL2_POR,
2506 {
2507 { .mask = 0xFF, .path_mask = 0},
2508 { .mask = 0x00, .path_mask = 0},
2509 { .mask = 0x00, .path_mask = 0},
2510 { .mask = 0x00, .path_mask = 0},
2511 { .mask = 0x00, .path_mask = 0},
2512 }
2513 },
2514 {
2515 TIMPANI_A_CDC_COMP_ZONE_SELECT,
2516 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2517 0x0, 0x0, 0x0, 0x0, 0x0, 0x7F, 0x0, 0x80},
2518 TIMPANI_CDC_COMP_ZONE_SELECT_M,
2519 TIMPANI_CDC_COMP_ZONE_SELECT_POR,
2520 {
2521 { .mask = 0x7F, .path_mask = 0},
2522 { .mask = 0x80, .path_mask = 0},
2523 { .mask = 0x00, .path_mask = 0},
2524 { .mask = 0x00, .path_mask = 0},
2525 { .mask = 0x00, .path_mask = 0},
2526 }
2527 },
2528 {
2529 TIMPANI_A_CDC_COMP_ZC_MSB,
2530 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2531 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2532 TIMPANI_CDC_COMP_ZC_MSB_M,
2533 TIMPANI_CDC_COMP_ZC_MSB_POR,
2534 {
2535 { .mask = 0xFF, .path_mask = 0},
2536 { .mask = 0x00, .path_mask = 0},
2537 { .mask = 0x00, .path_mask = 0},
2538 { .mask = 0x00, .path_mask = 0},
2539 { .mask = 0x00, .path_mask = 0},
2540 }
2541 },
2542 {
2543 TIMPANI_A_CDC_COMP_ZC_LSB,
2544 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2545 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF, 0x0, 0x0},
2546 TIMPANI_CDC_COMP_ZC_LSB_M,
2547 TIMPANI_CDC_COMP_ZC_LSB_POR,
2548 {
2549 { .mask = 0xFF, .path_mask = 0},
2550 { .mask = 0x00, .path_mask = 0},
2551 { .mask = 0x00, .path_mask = 0},
2552 { .mask = 0x00, .path_mask = 0},
2553 { .mask = 0x00, .path_mask = 0},
2554 }
2555 },
2556 {
2557 TIMPANI_A_CDC_COMP_SHUT_DOWN,
2558 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2559 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
2560 TIMPANI_CDC_COMP_SHUT_DOWN_M,
2561 TIMPANI_CDC_COMP_SHUT_DOWN_POR,
2562 {
2563 { .mask = 0xFF, .path_mask = 0},
2564 { .mask = 0x00, .path_mask = 0},
2565 { .mask = 0x00, .path_mask = 0},
2566 { .mask = 0x00, .path_mask = 0},
2567 { .mask = 0x00, .path_mask = 0},
2568 }
2569 },
2570 {
2571 TIMPANI_A_CDC_COMP_SHUT_DOWN_STATUS,
2572 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2573 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
2574 TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_M,
2575 TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_POR,
2576 {
2577 { .mask = 0xFF, .path_mask = 0},
2578 { .mask = 0x00, .path_mask = 0},
2579 { .mask = 0x00, .path_mask = 0},
2580 { .mask = 0x00, .path_mask = 0},
2581 { .mask = 0x00, .path_mask = 0},
2582 }
2583 },
2584 {
2585 TIMPANI_A_CDC_COMP_HALT,
2586 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2587 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFF},
2588 TIMPANI_CDC_COMP_HALT_M,
2589 TIMPANI_CDC_COMP_HALT_POR,
2590 {
2591 { .mask = 0xFF, .path_mask = 0},
2592 { .mask = 0x00, .path_mask = 0},
2593 { .mask = 0x00, .path_mask = 0},
2594 { .mask = 0x00, .path_mask = 0},
2595 { .mask = 0x00, .path_mask = 0},
2596 }
2597 }
2598};
2599
2600struct reg_acc_blk_cfg timpani_blkcfg[RA_BLOCK_NUM] = {
2601 {
2602 .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
2603 0, 0, 0, 0, RA_OWNER_DRV}
2604 },
2605 /* RA_BLOCK_RX1 */
2606 {
2607 .valid_owners = {RA_OWNER_NONE, 0, RA_OWNER_PATH_RX2,
2608 0, 0, 0, RA_OWNER_DRV}
2609 },
2610 /* RA_BLOCK_RX2 */
2611 {
2612 .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
2613 0, 0, RA_OWNER_DRV}
2614 },
2615 /* RA_BLOCK_TX1 */
2616 {
2617 .valid_owners = {RA_OWNER_NONE, 0, 0, 0, RA_OWNER_PATH_TX2,
2618 0, RA_OWNER_DRV}
2619 },
2620 /* RA_BLOCK_TX2 */
2621 {
2622 .valid_owners = {RA_OWNER_NONE, 0, 0, 0, 0,
2623 RA_OWNER_PATH_LB, RA_OWNER_DRV}
2624 },
2625 /* RA_BLOCK_LB */
2626 {
2627 .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
2628 RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
2629 },
2630 /* RA_BLOCK_SHARED_RX_LB */
2631 {
2632 .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
2633 RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
2634 },
2635 /* RA_BLOCK_SHARED_TX */
2636 {
2637 .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
2638 RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
2639 },
2640 /* RA_BLOCK_TXFE1 */
2641 {
2642 .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
2643 RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
2644 },
2645 /* RA_BLOCK_TXFE2 */
2646 {
2647 .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
2648 RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
2649 },
2650 /* RA_BLOCK_PA_COMMON */
2651 {
2652 .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
2653 RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
2654 },
2655 /* RA_BLOCK_PA_EAR */
2656 {
2657 .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
2658 RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
2659 },
2660 /* RA_BLOCK_PA_HPH */
2661 {
2662 .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
2663 RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
2664 },
2665 /* RA_BLOCK_PA_LINE */
2666 {
2667 .valid_owners = {RA_OWNER_NONE, RA_OWNER_PATH_RX1,
2668 RA_OWNER_PATH_RX2, 0, 0, RA_OWNER_PATH_LB, RA_OWNER_DRV}
2669 },
2670 /* RA_BLOCK_PA_AUX */
2671 {
2672 .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
2673 RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
2674 },
2675 /* RA_BLOCK_ADC */
2676 {
2677 .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
2678 RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
2679 },
2680 /* RA_BLOCK_DMIC */
2681 {
2682 .valid_owners = {RA_OWNER_NONE, 0, 0, RA_OWNER_PATH_TX1,
2683 RA_OWNER_PATH_TX2, 0, RA_OWNER_DRV}
2684 },
2685 /* RA_BLOCK_TX_I2S */
2686 {
2687 .valid_owners = {RA_OWNER_NONE, 0, 0, 0, 0, 0, RA_OWNER_DRV}
2688 },
2689 /*RA_BLOCK_DRV */
2690 {
2691 .valid_owners = {RA_OWNER_NONE, 0, 0, 0, 0, 0, RA_OWNER_DRV}
2692 },
2693 /* RA_BLOCK_TEST */
2694 {
2695 .valid_owners = {RA_OWNER_NONE, 0, 0, 0, 0, 0, RA_OWNER_DRV}
2696 },
2697 /* RA_BLOCK_RESERVED */
2698};
2699
2700struct adie_codec_state {
2701 struct adie_codec_path path[ADIE_CODEC_MAX];
2702 u32 ref_cnt;
2703 struct marimba *pdrv_ptr;
2704 struct marimba_codec_platform_data *codec_pdata;
2705 struct mutex lock;
2706};
2707
2708static struct adie_codec_state adie_codec;
2709
2710/* A cacheable register is one that if the register's current value is being
2711 * written to it again, then it is permissable to skip that register write
2712 * because it does not actually change the value of the hardware register.
2713 *
2714 * Some registers are uncacheable, meaning that even they are being written
2715 * again with their current value, the write has another purpose and must go
2716 * through.
2717 *
2718 * Knowing the codec's uncacheable registers allows the driver to avoid
2719 * unnecessary codec register writes while making sure important register writes
2720 * are not skipped.
2721 */
2722
2723static bool timpani_register_is_cacheable(u8 reg)
2724{
2725 switch (reg) {
2726 case TIMPANI_A_PA_LINE_L_GAIN:
2727 case TIMPANI_A_PA_LINE_R_GAIN:
2728 case TIMPANI_A_PA_HPH_L_GAIN:
2729 case TIMPANI_A_PA_HPH_R_GAIN:
2730 case TIMPANI_A_CDC_GCTL1:
2731 case TIMPANI_A_CDC_ST_CTL:
2732 case TIMPANI_A_CDC_GCTL2:
2733 case TIMPANI_A_CDC_ARB_BYPASS_CTL:
2734 case TIMPANI_A_CDC_CH_CTL:
2735 case TIMPANI_A_CDC_ANC1_IIR_COEFF_PTR:
2736 case TIMPANI_A_CDC_ANC1_IIR_COEFF_MSB:
2737 case TIMPANI_A_CDC_ANC1_IIR_COEFF_LSB:
2738 case TIMPANI_A_CDC_ANC1_LPF_COEFF_PTR:
2739 case TIMPANI_A_CDC_ANC1_LPF_COEFF_MSB:
2740 case TIMPANI_A_CDC_ANC1_LPF_COEFF_LSB:
2741 case TIMPANI_A_CDC_ANC1_SCALE_PTR:
2742 case TIMPANI_A_CDC_ANC1_SCALE:
2743 case TIMPANI_A_CDC_ANC2_IIR_COEFF_PTR:
2744 case TIMPANI_A_CDC_ANC2_IIR_COEFF_MSB:
2745 case TIMPANI_A_CDC_ANC2_IIR_COEFF_LSB:
2746 case TIMPANI_A_CDC_ANC2_LPF_COEFF_PTR:
2747 case TIMPANI_A_CDC_ANC2_LPF_COEFF_MSB:
2748 case TIMPANI_A_CDC_ANC2_LPF_COEFF_LSB:
2749 case TIMPANI_A_CDC_ANC2_SCALE_PTR:
2750 case TIMPANI_A_CDC_ANC2_SCALE:
2751 case TIMPANI_A_CDC_ANC1_CTL1:
2752 case TIMPANI_A_CDC_ANC1_CTL2:
2753 case TIMPANI_A_CDC_ANC1_FF_FB_SHIFT:
2754 case TIMPANI_A_CDC_ANC2_CTL1:
2755 case TIMPANI_A_CDC_ANC2_CTL2:
2756 case TIMPANI_A_CDC_ANC2_FF_FB_SHIFT:
2757 return false;
2758 default:
2759 return true;
2760 }
2761}
2762
2763static int adie_codec_write(u8 reg, u8 mask, u8 val)
2764{
2765 int rc = 0;
2766 u8 new_val;
2767
2768 new_val = (val & mask) | (timpani_shadow[reg] & ~mask);
2769 if (!(timpani_register_is_cacheable(reg) &&
2770 (new_val == timpani_shadow[reg]))) {
2771
2772 rc = marimba_write_bit_mask(adie_codec.pdrv_ptr, reg, &new_val,
2773 1, 0xFF);
2774 if (IS_ERR_VALUE(rc)) {
2775 pr_err("%s: fail to write reg %x\n", __func__, reg);
2776 rc = -EIO;
2777 goto error;
2778 }
2779 timpani_shadow[reg] = new_val;
2780 pr_debug("%s: write reg %x val %x new value %x\n", __func__,
2781 reg, val, new_val);
2782 }
2783
2784error:
2785 return rc;
2786}
2787
2788
2789static int reg_in_use(u8 reg_ref, u8 path_type)
2790{
2791 if ((reg_ref & ~path_type) == 0)
2792 return 0;
2793 else
2794 return 1;
2795}
2796
2797static int adie_codec_refcnt_write(u8 reg, u8 mask, u8 val, enum refcnt cnt,
2798 u8 path_type)
2799{
2800 u8 i;
2801 int j;
2802 u8 fld_mask;
2803 u8 path_mask;
2804 u8 reg_mask = 0;
2805 int rc = 0;
2806
2807 for (i = 0; i < 0xEF; i++) {
2808 if (timpani_regset[i].reg_addr == reg) {
2809 for (j = 0; j < TIMPANI_MAX_FIELDS; j++) {
2810 fld_mask = timpani_regset[i].fld_ref_cnt[j].mask
2811 & mask;
2812 path_mask = timpani_regset[i].fld_ref_cnt[j]
2813 .path_mask;
2814 if (fld_mask) {
2815 if (!reg_in_use(path_mask, path_type))
2816 reg_mask |= fld_mask;
2817 if (cnt == INC)
2818 timpani_regset[i].fld_ref_cnt[j]
2819 .path_mask |= path_type;
2820 else if (cnt == DEC)
2821 timpani_regset[i].fld_ref_cnt[j]
2822 .path_mask &=
2823 ~path_type;
2824 }
2825 }
2826
2827 if (reg_mask)
2828 rc = adie_codec_write(reg, reg_mask, val);
2829 reg_mask = 0;
2830 break;
2831 }
2832 }
2833
2834 return rc;
2835}
2836
2837static int adie_codec_read(u8 reg, u8 *val)
2838{
2839 return marimba_read(adie_codec.pdrv_ptr, reg, val, 1);
2840}
2841
2842static int timpani_adie_codec_setpath(struct adie_codec_path *path_ptr,
2843 u32 freq_plan, u32 osr)
2844{
2845 int rc = 0;
2846 u32 i, freq_idx = 0, freq = 0;
2847
2848 if (path_ptr == NULL)
2849 return -EINVAL;
2850
2851 if (path_ptr->curr_stage != ADIE_CODEC_DIGITAL_OFF) {
2852 rc = -EBUSY;
2853 goto error;
2854 }
2855
2856 for (i = 0; i < path_ptr->profile->setting_sz; i++) {
2857 if (path_ptr->profile->settings[i].osr == osr) {
2858 if (path_ptr->profile->settings[i].freq_plan >=
2859 freq_plan) {
2860 if (freq == 0) {
2861 freq = path_ptr->profile->settings[i].
2862 freq_plan;
2863 freq_idx = i;
2864 } else if (path_ptr->profile->settings[i].
2865 freq_plan < freq) {
2866 freq = path_ptr->profile->settings[i].
2867 freq_plan;
2868 freq_idx = i;
2869 }
2870 }
2871 }
2872 }
2873
2874 if (freq_idx >= path_ptr->profile->setting_sz)
2875 rc = -ENODEV;
2876 else {
2877 path_ptr->hwsetting_idx = freq_idx;
2878 path_ptr->stage_idx = 0;
2879 }
2880
2881error:
2882 return rc;
2883}
2884
2885static u32 timpani_adie_codec_freq_supported(
2886 struct adie_codec_dev_profile *profile,
2887 u32 requested_freq)
2888{
2889 u32 i, rc = -EINVAL;
2890
2891 for (i = 0; i < profile->setting_sz; i++) {
2892 if (profile->settings[i].freq_plan >= requested_freq) {
2893 rc = 0;
2894 break;
2895 }
2896 }
2897 return rc;
2898}
2899int timpani_adie_codec_enable_sidetone(struct adie_codec_path *rx_path_ptr,
2900 u32 enable)
2901{
2902 int rc = 0;
2903
2904 pr_debug("%s()\n", __func__);
2905
2906 mutex_lock(&adie_codec.lock);
2907
2908 if (!rx_path_ptr || &adie_codec.path[ADIE_CODEC_RX] != rx_path_ptr) {
2909 pr_err("%s: invalid path pointer\n", __func__);
2910 rc = -EINVAL;
2911 goto error;
2912 } else if (rx_path_ptr->curr_stage !=
2913 ADIE_CODEC_DIGITAL_ANALOG_READY) {
2914 pr_err("%s: bad state\n", __func__);
2915 rc = -EPERM;
2916 goto error;
2917 }
2918
2919 if (enable) {
2920 rc = adie_codec_write(TIMPANI_A_CDC_RX1_CTL,
2921 TIMPANI_RX1_ST_MASK, TIMPANI_RX1_ST_ENABLE);
2922
2923 if (rx_path_ptr->reg_owner == RA_OWNER_PATH_RX1)
2924 adie_codec_write(TIMPANI_A_CDC_ST_MIXING,
2925 TIMPANI_CDC_ST_MIXING_TX1_MASK,
2926 TIMPANI_CDC_ST_MIXING_TX1_ENABLE);
2927 else if (rx_path_ptr->reg_owner == RA_OWNER_PATH_RX2)
2928 adie_codec_write(TIMPANI_A_CDC_ST_MIXING,
2929 TIMPANI_CDC_ST_MIXING_TX2_MASK,
2930 TIMPANI_CDC_ST_MIXING_TX2_ENABLE);
2931 } else {
2932 rc = adie_codec_write(TIMPANI_A_CDC_RX1_CTL,
2933 TIMPANI_RX1_ST_MASK, 0);
2934
2935 if (rx_path_ptr->reg_owner == RA_OWNER_PATH_RX1)
2936 adie_codec_write(TIMPANI_A_CDC_ST_MIXING,
2937 TIMPANI_CDC_ST_MIXING_TX1_MASK, 0);
2938 else if (rx_path_ptr->reg_owner == RA_OWNER_PATH_RX2)
2939 adie_codec_write(TIMPANI_A_CDC_ST_MIXING,
2940 TIMPANI_CDC_ST_MIXING_TX2_MASK, 0);
2941 }
2942
2943error:
2944 mutex_unlock(&adie_codec.lock);
2945 return rc;
2946}
2947static int timpani_adie_codec_enable_anc(struct adie_codec_path *rx_path_ptr,
2948 u32 enable, struct adie_codec_anc_data *calibration_writes)
2949{
2950 int index = 0;
2951 int rc = 0;
2952 u8 reg, mask, val;
2953 pr_debug("%s: enable = %d\n", __func__, enable);
2954
2955 mutex_lock(&adie_codec.lock);
2956
2957 if (!rx_path_ptr || &adie_codec.path[ADIE_CODEC_RX] != rx_path_ptr) {
2958 pr_err("%s: invalid path pointer\n", __func__);
2959 rc = -EINVAL;
2960 goto error;
2961 } else if (rx_path_ptr->curr_stage !=
2962 ADIE_CODEC_DIGITAL_ANALOG_READY) {
2963 pr_err("%s: bad state\n", __func__);
2964 rc = -EPERM;
2965 goto error;
2966 }
2967 if (enable) {
2968 if (!calibration_writes || !calibration_writes->writes) {
2969 pr_err("%s: No ANC calibration data\n", __func__);
2970 rc = -EPERM;
2971 goto error;
2972 }
2973 while (index < calibration_writes->size) {
2974 ADIE_CODEC_UNPACK_ENTRY(calibration_writes->
2975 writes[index], reg, mask, val);
2976 adie_codec_write(reg, mask, val);
2977 index++;
2978 }
2979 } else {
2980 adie_codec_write(TIMPANI_A_CDC_ANC1_CTL1,
2981 TIMPANI_CDC_ANC1_CTL1_ANC1_EN_M,
2982 TIMPANI_CDC_ANC1_CTL1_ANC1_EN_ANC_DIS <<
2983 TIMPANI_CDC_ANC1_CTL1_ANC1_EN_S);
2984
2985 adie_codec_write(TIMPANI_A_CDC_ANC2_CTL1,
2986 TIMPANI_CDC_ANC2_CTL1_ANC2_EN_M,
2987 TIMPANI_CDC_ANC2_CTL1_ANC2_EN_ANC_DIS <<
2988 TIMPANI_CDC_ANC2_CTL1_ANC2_EN_S);
2989 }
2990
2991error:
2992 mutex_unlock(&adie_codec.lock);
2993 return rc;
2994}
2995
2996static void adie_codec_restore_regdefault(u8 path_mask, u32 blk)
2997{
2998 u32 ireg;
2999 u32 regset_sz =
3000 (sizeof(timpani_regset)/sizeof(struct timpani_regaccess));
3001
3002 for (ireg = 0; ireg < regset_sz; ireg++) {
3003 if (timpani_regset[ireg].blk_mask[blk]) {
3004 /* only process register belong to the block */
3005 u8 reg = timpani_regset[ireg].reg_addr;
3006 u8 mask = timpani_regset[ireg].blk_mask[blk];
3007 u8 val = timpani_regset[ireg].reg_default;
3008 adie_codec_refcnt_write(reg, mask, val, IGNORE,
3009 path_mask);
3010 }
3011 }
3012}
3013
3014static void adie_codec_reach_stage_action(struct adie_codec_path *path_ptr,
3015 u32 stage)
3016{
3017 u32 iblk, iowner; /* iterators */
3018 u8 path_mask;
3019
3020 if (path_ptr == NULL)
3021 return;
3022
3023 path_mask = TIMPANI_PATH_MASK(path_ptr->reg_owner);
3024
3025 if (stage != ADIE_CODEC_DIGITAL_OFF)
3026 return;
3027
3028 for (iblk = 0 ; iblk <= RA_BLOCK_RESERVED ; iblk++) {
3029 for (iowner = 0; iowner < RA_OWNER_NUM; iowner++) {
3030 if (timpani_blkcfg[iblk].valid_owners[iowner] ==
3031 path_ptr->reg_owner) {
3032 adie_codec_restore_regdefault(path_mask, iblk);
3033 break; /* This path owns this block */
3034 }
3035 }
3036 }
3037}
3038
3039static int timpani_adie_codec_proceed_stage(struct adie_codec_path *path_ptr,
3040 u32 state)
3041{
3042 int rc = 0, loop_exit = 0;
3043 struct adie_codec_action_unit *curr_action;
3044 struct adie_codec_hwsetting_entry *setting;
3045 u8 reg, mask, val;
3046 u8 path_mask;
3047
3048 if (path_ptr == NULL)
3049 return -EINVAL;
3050
3051 path_mask = TIMPANI_PATH_MASK(path_ptr->reg_owner);
3052
3053 mutex_lock(&adie_codec.lock);
3054 setting = &path_ptr->profile->settings[path_ptr->hwsetting_idx];
3055 while (!loop_exit) {
3056
3057 curr_action = &setting->actions[path_ptr->stage_idx];
3058
3059 switch (curr_action->type) {
3060 case ADIE_CODEC_ACTION_ENTRY:
3061 ADIE_CODEC_UNPACK_ENTRY(curr_action->action,
3062 reg, mask, val);
3063 if (state == ADIE_CODEC_DIGITAL_OFF)
3064 adie_codec_refcnt_write(reg, mask, val, DEC,
3065 path_mask);
3066 else
3067 adie_codec_refcnt_write(reg, mask, val, INC,
3068 path_mask);
3069 break;
3070 case ADIE_CODEC_ACTION_DELAY_WAIT:
3071 if (curr_action->action > MAX_MDELAY_US)
3072 msleep(curr_action->action/1000);
3073 else
3074 usleep_range(curr_action->action,
3075 curr_action->action);
3076 break;
3077 case ADIE_CODEC_ACTION_STAGE_REACHED:
3078 adie_codec_reach_stage_action(path_ptr,
3079 curr_action->action);
3080 if (curr_action->action == state) {
3081 path_ptr->curr_stage = state;
3082 loop_exit = 1;
3083 }
3084 break;
3085 default:
3086 BUG();
3087 }
3088
3089 path_ptr->stage_idx++;
3090 if (path_ptr->stage_idx == setting->action_sz)
3091 path_ptr->stage_idx = 0;
3092 }
3093 mutex_unlock(&adie_codec.lock);
3094
3095 return rc;
3096}
3097
3098static void timpani_codec_bring_up(void)
3099{
3100 /* Codec power up sequence */
3101 adie_codec_write(0xFF, 0xFF, 0x08);
3102 adie_codec_write(0xFF, 0xFF, 0x0A);
3103 adie_codec_write(0xFF, 0xFF, 0x0E);
3104 adie_codec_write(0xFF, 0xFF, 0x07);
3105 adie_codec_write(0xFF, 0xFF, 0x17);
3106 adie_codec_write(TIMPANI_A_MREF, 0xFF, 0xF2);
3107 msleep(15);
3108 adie_codec_write(TIMPANI_A_MREF, 0xFF, 0x22);
3109
3110 /* Bypass TX HPFs to prevent pops */
3111 adie_codec_write(TIMPANI_A_CDC_BYPASS_CTL2, TIMPANI_CDC_BYPASS_CTL2_M,
3112 TIMPANI_CDC_BYPASS_CTL2_POR);
3113 adie_codec_write(TIMPANI_A_CDC_BYPASS_CTL3, TIMPANI_CDC_BYPASS_CTL3_M,
3114 TIMPANI_CDC_BYPASS_CTL3_POR);
3115}
3116
3117static void timpani_codec_bring_down(void)
3118{
3119 adie_codec_write(TIMPANI_A_MREF, 0xFF, TIMPANI_MREF_POR);
3120 adie_codec_write(0xFF, 0xFF, 0x07);
3121 adie_codec_write(0xFF, 0xFF, 0x06);
3122 adie_codec_write(0xFF, 0xFF, 0x0E);
3123 adie_codec_write(0xFF, 0xFF, 0x08);
3124}
3125
3126static int timpani_adie_codec_open(struct adie_codec_dev_profile *profile,
3127 struct adie_codec_path **path_pptr)
3128{
3129 int rc = 0;
3130
3131 mutex_lock(&adie_codec.lock);
3132
3133 if (!profile || !path_pptr) {
3134 rc = -EINVAL;
3135 goto error;
3136 }
3137
3138 if (adie_codec.path[profile->path_type].profile) {
3139 rc = -EBUSY;
3140 goto error;
3141 }
3142
3143 if (!adie_codec.ref_cnt) {
3144
3145 if (adie_codec.codec_pdata &&
3146 adie_codec.codec_pdata->marimba_codec_power) {
3147
3148 rc = adie_codec.codec_pdata->marimba_codec_power(1);
3149 if (rc) {
3150 pr_err("%s: could not power up timpani "
3151 "codec\n", __func__);
3152 goto error;
3153 }
3154 timpani_codec_bring_up();
3155 } else {
3156 pr_err("%s: couldn't detect timpani codec\n", __func__);
3157 rc = -ENODEV;
3158 goto error;
3159 }
3160
3161 }
3162
3163 adie_codec.path[profile->path_type].profile = profile;
3164 *path_pptr = (void *) &adie_codec.path[profile->path_type];
3165 adie_codec.ref_cnt++;
3166 adie_codec.path[profile->path_type].hwsetting_idx = 0;
3167 adie_codec.path[profile->path_type].curr_stage = ADIE_CODEC_DIGITAL_OFF;
3168 adie_codec.path[profile->path_type].stage_idx = 0;
3169
3170
3171error:
3172 mutex_unlock(&adie_codec.lock);
3173 return rc;
3174}
3175
3176static int timpani_adie_codec_close(struct adie_codec_path *path_ptr)
3177{
3178 int rc = 0;
3179
3180 mutex_lock(&adie_codec.lock);
3181
3182 if (!path_ptr) {
3183 rc = -EINVAL;
3184 goto error;
3185 }
3186 if (path_ptr->curr_stage != ADIE_CODEC_DIGITAL_OFF)
3187 adie_codec_proceed_stage(path_ptr, ADIE_CODEC_DIGITAL_OFF);
3188
3189 BUG_ON(!adie_codec.ref_cnt);
3190
3191 path_ptr->profile = NULL;
3192 adie_codec.ref_cnt--;
3193
3194 if (!adie_codec.ref_cnt) {
3195 /* Timpani CDC power down sequence */
3196 timpani_codec_bring_down();
3197
3198 if (adie_codec.codec_pdata &&
3199 adie_codec.codec_pdata->marimba_codec_power) {
3200
3201 rc = adie_codec.codec_pdata->marimba_codec_power(0);
3202 if (rc) {
3203 pr_err("%s: could not power down timpani "
3204 "codec\n", __func__);
3205 goto error;
3206 }
3207 }
3208 }
3209
3210error:
3211 mutex_unlock(&adie_codec.lock);
3212 return rc;
3213}
3214
3215static int timpani_adie_codec_set_master_mode(struct adie_codec_path *path_ptr,
3216 u8 master)
3217{
3218 u8 val = master ? 1 : 0;
3219
3220 if (!path_ptr)
3221 return -EINVAL;
3222
3223 if (path_ptr->reg_owner == RA_OWNER_PATH_RX1)
3224 adie_codec_write(TIMPANI_A_CDC_RX1_CTL, 0x01, val);
3225 else if (path_ptr->reg_owner == RA_OWNER_PATH_TX1)
3226 adie_codec_write(TIMPANI_A_CDC_TX_I2S_CTL, 0x01, val);
3227 else
3228 return -EINVAL;
3229
3230 return 0;
3231}
3232
3233int timpani_adie_codec_set_device_analog_volume(
3234 struct adie_codec_path *path_ptr,
3235 u32 num_channels, u32 volume)
3236{
3237 u8 val;
3238 u8 curr_val;
3239 u8 i;
3240
3241 adie_codec_read(TIMPANI_A_AUXPGA_LR_GAIN, &curr_val);
3242
3243 /* Volume is expressed as a percentage. */
3244 /* The upper nibble is the left channel, lower right channel. */
3245 val = (u8)((volume * TIMPANI_CODEC_AUXPGA_GAIN_RANGE) / 100);
3246 val |= val << 4;
3247
3248 if ((curr_val & 0x0F) < (val & 0x0F)) {
3249 for (i = curr_val; i < val; i += 0x11)
3250 adie_codec_write(TIMPANI_A_AUXPGA_LR_GAIN, 0xFF, i);
3251 } else if ((curr_val & 0x0F) > (val & 0x0F)) {
3252 for (i = curr_val; i > val; i -= 0x11)
3253 adie_codec_write(TIMPANI_A_AUXPGA_LR_GAIN, 0xFF, i);
3254 }
3255
3256 return 0;
3257}
3258
3259enum adie_vol_type {
3260 ADIE_CODEC_RX_DIG_VOL,
3261 ADIE_CODEC_TX_DIG_VOL,
3262 ADIE_CODEC_VOL_TYPE_MAX
3263};
3264
3265#define CDC_RX1LG 0x84
3266#define CDC_RX1RG 0x85
3267#define CDC_TX1LG 0x86
3268#define CDC_TX1RG 0x87
3269#define DIG_VOL_MASK 0xFF
3270
3271#define CDC_GCTL1 0x8A
3272#define RX1_PGA_UPDATE_L 0x04
3273#define RX1_PGA_UPDATE_R 0x08
3274#define TX1_PGA_UPDATE_L 0x40
3275#define TX1_PGA_UPDATE_R 0x80
3276#define CDC_GCTL1_RX_MASK 0x0F
3277#define CDC_GCTL1_TX_MASK 0xF0
3278
3279enum {
3280 TIMPANI_MIN_DIG_VOL = -84, /* in DB*/
3281 TIMPANI_MAX_DIG_VOL = 16, /* in DB*/
3282 TIMPANI_DIG_VOL_STEP = 3 /* in DB*/
3283};
3284
3285static int timpani_adie_codec_set_dig_vol(enum adie_vol_type vol_type,
3286 u32 num_chan, u32 vol_per)
3287{
3288 u8 reg_left, reg_right;
3289 u8 gain_reg_val, gain_reg_mask;
3290 s8 new_reg_val, cur_reg_val;
3291 s8 step_size;
3292
3293 adie_codec_read(CDC_GCTL1, &gain_reg_val);
3294
3295 if (vol_type == ADIE_CODEC_RX_DIG_VOL) {
3296
3297 pr_debug("%s : RX DIG VOL. num_chan = %u\n", __func__,
3298 num_chan);
3299 reg_left = CDC_RX1LG;
3300 reg_right = CDC_RX1RG;
3301
3302 if (num_chan == 1)
3303 gain_reg_val |= RX1_PGA_UPDATE_L;
3304 else
3305 gain_reg_val |= (RX1_PGA_UPDATE_L | RX1_PGA_UPDATE_R);
3306
3307 gain_reg_mask = CDC_GCTL1_RX_MASK;
3308 } else {
3309
3310 pr_debug("%s : TX DIG VOL. num_chan = %u\n", __func__,
3311 num_chan);
3312 reg_left = CDC_TX1LG;
3313 reg_right = CDC_TX1RG;
3314
3315 if (num_chan == 1)
3316 gain_reg_val |= TX1_PGA_UPDATE_L;
3317 else
3318 gain_reg_val |= (TX1_PGA_UPDATE_L | TX1_PGA_UPDATE_R);
3319
3320 gain_reg_mask = CDC_GCTL1_TX_MASK;
3321 }
3322
3323 adie_codec_read(reg_left, &cur_reg_val);
3324
3325 pr_debug("%s: vol_per = %d cur_reg_val = %d 0x%x\n", __func__, vol_per,
3326 cur_reg_val, cur_reg_val);
3327
3328 new_reg_val = TIMPANI_MIN_DIG_VOL +
3329 (((TIMPANI_MAX_DIG_VOL - TIMPANI_MIN_DIG_VOL) * vol_per) / 100);
3330
3331 pr_debug("new_reg_val = %d 0x%x\n", new_reg_val, new_reg_val);
3332
3333 if (new_reg_val > cur_reg_val) {
3334 step_size = TIMPANI_DIG_VOL_STEP;
3335 } else if (new_reg_val < cur_reg_val) {
3336 step_size = -TIMPANI_DIG_VOL_STEP;
3337 } else {
3338 pr_debug("new_reg_val and cur_reg_val are same 0x%x\n",
3339 new_reg_val);
3340 return 0;
3341 }
3342
3343 while (cur_reg_val != new_reg_val) {
3344
3345 if (((new_reg_val > cur_reg_val) &&
3346 ((new_reg_val - cur_reg_val) < TIMPANI_DIG_VOL_STEP)) ||
3347 ((cur_reg_val > new_reg_val) &&
3348 ((cur_reg_val - new_reg_val)
3349 < TIMPANI_DIG_VOL_STEP))) {
3350
3351 cur_reg_val = new_reg_val;
3352
3353 pr_debug("diff less than step. write new_reg_val = %d"
3354 " 0x%x\n", new_reg_val, new_reg_val);
3355
3356 } else {
3357 cur_reg_val = cur_reg_val + step_size;
3358
3359 pr_debug("cur_reg_val = %d 0x%x\n",
3360 cur_reg_val, cur_reg_val);
3361 }
3362
3363 adie_codec_write(reg_left, DIG_VOL_MASK, cur_reg_val);
3364
3365 if (num_chan == 2)
3366 adie_codec_write(reg_right, DIG_VOL_MASK, cur_reg_val);
3367
3368 adie_codec_write(CDC_GCTL1, gain_reg_mask, gain_reg_val);
3369 }
3370 return 0;
3371}
3372
3373static int timpani_adie_codec_set_device_digital_volume(
3374 struct adie_codec_path *path_ptr,
3375 u32 num_channels, u32 vol_percentage /* in percentage */)
3376{
3377 enum adie_vol_type vol_type;
3378
3379 if (!path_ptr || (path_ptr->curr_stage !=
3380 ADIE_CODEC_DIGITAL_ANALOG_READY)) {
3381 pr_info("%s: timpani codec not ready for volume control\n",
3382 __func__);
3383 return -EPERM;
3384 }
3385
3386 if (num_channels > 2) {
3387 pr_err("%s: timpani odec only supports max two channels\n",
3388 __func__);
3389 return -EINVAL;
3390 }
3391
3392 if (path_ptr->profile->path_type == ADIE_CODEC_RX) {
3393 vol_type = ADIE_CODEC_RX_DIG_VOL;
3394 } else if (path_ptr->profile->path_type == ADIE_CODEC_TX) {
3395 vol_type = ADIE_CODEC_TX_DIG_VOL;
3396 } else {
3397 pr_err("%s: invalid device data neither RX nor TX\n",
3398 __func__);
3399 return -EINVAL;
3400 }
3401
3402 timpani_adie_codec_set_dig_vol(vol_type, num_channels, vol_percentage);
3403
3404 return 0;
3405}
3406
3407static const struct adie_codec_operations timpani_adie_ops = {
3408 .codec_id = TIMPANI_ID,
3409 .codec_open = timpani_adie_codec_open,
3410 .codec_close = timpani_adie_codec_close,
3411 .codec_setpath = timpani_adie_codec_setpath,
3412 .codec_proceed_stage = timpani_adie_codec_proceed_stage,
3413 .codec_freq_supported = timpani_adie_codec_freq_supported,
3414 .codec_enable_sidetone = timpani_adie_codec_enable_sidetone,
3415 .codec_set_master_mode = timpani_adie_codec_set_master_mode,
3416 .codec_enable_anc = timpani_adie_codec_enable_anc,
3417 .codec_set_device_analog_volume =
3418 timpani_adie_codec_set_device_analog_volume,
3419 .codec_set_device_digital_volume =
3420 timpani_adie_codec_set_device_digital_volume,
3421};
3422
3423static void timpani_codec_populate_shadow_registers(void)
3424{
3425 int i;
3426
3427 for (i = 0; i < ARRAY_SIZE(timpani_regset); i++) {
3428 if (timpani_regset[i].reg_addr < TIMPANI_ARRAY_SIZE) {
3429 timpani_shadow[timpani_regset[i].reg_addr] =
3430 timpani_regset[i].reg_default;
3431 }
3432 }
3433}
3434
3435#ifdef CONFIG_DEBUG_FS
3436static struct dentry *debugfs_timpani_dent;
3437static struct dentry *debugfs_peek;
3438static struct dentry *debugfs_poke;
3439static struct dentry *debugfs_power;
3440static struct dentry *debugfs_dump;
3441
3442static unsigned char read_data;
3443
3444static int codec_debug_open(struct inode *inode, struct file *file)
3445{
3446 file->private_data = inode->i_private;
3447 return 0;
3448}
3449
3450static int get_parameters(char *buf, long int *param1, int num_of_par)
3451{
3452 char *token;
3453 int base, cnt;
3454
3455 token = strsep(&buf, " ");
3456
3457 for (cnt = 0; cnt < num_of_par; cnt++) {
3458 if (token != NULL) {
3459 if ((token[1] == 'x') || (token[1] == 'X'))
3460 base = 16;
3461 else
3462 base = 10;
3463
3464 if (strict_strtoul(token, base, &param1[cnt]) != 0)
3465 return -EINVAL;
3466
3467 token = strsep(&buf, " ");
3468 }
3469 else
3470 return -EINVAL;
3471 }
3472 return 0;
3473}
3474
3475static ssize_t codec_debug_read(struct file *file, char __user *ubuf,
3476 size_t count, loff_t *ppos)
3477{
3478 char lbuf[8];
3479
3480 snprintf(lbuf, sizeof(lbuf), "0x%x\n", read_data);
3481 return simple_read_from_buffer(ubuf, count, ppos, lbuf, strlen(lbuf));
3482}
3483
3484static ssize_t codec_debug_write(struct file *filp,
3485 const char __user *ubuf, size_t cnt, loff_t *ppos)
3486{
3487 char *access_str = filp->private_data;
3488 char lbuf[32];
3489 int rc;
3490 int i;
3491 int read_result;
3492 u8 reg_val;
3493 long int param[5];
3494
3495 if (cnt > sizeof(lbuf) - 1)
3496 return -EINVAL;
3497
3498 rc = copy_from_user(lbuf, ubuf, cnt);
3499 if (rc)
3500 return -EFAULT;
3501
3502 lbuf[cnt] = '\0';
3503
3504 if (!strcmp(access_str, "power")) {
3505 if (get_parameters(lbuf, param, 1) == 0) {
3506 switch (param[0]) {
3507 case 1:
3508 adie_codec.codec_pdata->marimba_codec_power(1);
3509 timpani_codec_bring_up();
3510 break;
3511 case 0:
3512 timpani_codec_bring_down();
3513 adie_codec.codec_pdata->marimba_codec_power(0);
3514 break;
3515 default:
3516 rc = -EINVAL;
3517 break;
3518 }
3519 } else
3520 rc = -EINVAL;
3521 } else if (!strcmp(access_str, "poke")) {
3522 /* write */
3523 rc = get_parameters(lbuf, param, 2);
3524 if ((param[0] <= 0xFF) && (param[1] <= 0xFF) &&
3525 (rc == 0))
3526 adie_codec_write(param[0], 0xFF, param[1]);
3527 else
3528 rc = -EINVAL;
3529 } else if (!strcmp(access_str, "peek")) {
3530 /* read */
3531 rc = get_parameters(lbuf, param, 1);
3532 if ((param[0] <= 0xFF) && (rc == 0))
3533 adie_codec_read(param[0], &read_data);
3534 else
3535 rc = -EINVAL;
3536 } else if (!strcmp(access_str, "dump")) {
3537 pr_info("************** timpani regs *************\n");
3538 for (i = 0; i < 0xFF; i++) {
3539 read_result = adie_codec_read(i, &reg_val);
3540 if (read_result < 0) {
3541 pr_info("failed to read codec register\n");
3542 break;
3543 } else
3544 pr_info("reg 0x%02X val 0x%02X\n", i, reg_val);
3545 }
3546 pr_info("*****************************************\n");
3547 }
3548
3549 if (rc == 0)
3550 rc = cnt;
3551 else
3552 pr_err("%s: rc = %d\n", __func__, rc);
3553
3554 return rc;
3555}
3556
3557static const struct file_operations codec_debug_ops = {
3558 .open = codec_debug_open,
3559 .write = codec_debug_write,
3560 .read = codec_debug_read
3561};
3562#endif
3563
3564static int timpani_codec_probe(struct platform_device *pdev)
3565{
3566 int rc;
3567
3568 adie_codec.pdrv_ptr = platform_get_drvdata(pdev);
3569 adie_codec.codec_pdata = pdev->dev.platform_data;
3570
3571 if (adie_codec.codec_pdata->snddev_profile_init)
3572 adie_codec.codec_pdata->snddev_profile_init();
3573
3574 timpani_codec_populate_shadow_registers();
3575
3576 /* Register the timpani ADIE operations */
3577 rc = adie_codec_register_codec_operations(&timpani_adie_ops);
3578
3579#ifdef CONFIG_DEBUG_FS
3580 debugfs_timpani_dent = debugfs_create_dir("msm_adie_codec", 0);
3581 if (!IS_ERR(debugfs_timpani_dent)) {
3582 debugfs_peek = debugfs_create_file("peek",
3583 S_IFREG | S_IRUGO, debugfs_timpani_dent,
3584 (void *) "peek", &codec_debug_ops);
3585
3586 debugfs_poke = debugfs_create_file("poke",
3587 S_IFREG | S_IRUGO, debugfs_timpani_dent,
3588 (void *) "poke", &codec_debug_ops);
3589
3590 debugfs_power = debugfs_create_file("power",
3591 S_IFREG | S_IRUGO, debugfs_timpani_dent,
3592 (void *) "power", &codec_debug_ops);
3593
3594 debugfs_dump = debugfs_create_file("dump",
3595 S_IFREG | S_IRUGO, debugfs_timpani_dent,
3596 (void *) "dump", &codec_debug_ops);
3597
3598 }
3599#endif
3600
3601 return rc;
3602}
3603
3604static struct platform_driver timpani_codec_driver = {
3605 .probe = timpani_codec_probe,
3606 .driver = {
3607 .name = "timpani_codec",
3608 .owner = THIS_MODULE,
3609 },
3610};
3611
3612static int __init timpani_codec_init(void)
3613{
3614 s32 rc;
3615
3616 rc = platform_driver_register(&timpani_codec_driver);
3617 if (IS_ERR_VALUE(rc))
3618 goto error;
3619
3620 adie_codec.path[ADIE_CODEC_TX].reg_owner = RA_OWNER_PATH_TX1;
3621 adie_codec.path[ADIE_CODEC_RX].reg_owner = RA_OWNER_PATH_RX1;
3622 adie_codec.path[ADIE_CODEC_LB].reg_owner = RA_OWNER_PATH_LB;
3623 mutex_init(&adie_codec.lock);
3624error:
3625 return rc;
3626}
3627
3628static void __exit timpani_codec_exit(void)
3629{
3630#ifdef CONFIG_DEBUG_FS
3631 debugfs_remove(debugfs_peek);
3632 debugfs_remove(debugfs_poke);
3633 debugfs_remove(debugfs_power);
3634 debugfs_remove(debugfs_dump);
3635 debugfs_remove(debugfs_timpani_dent);
3636#endif
3637 platform_driver_unregister(&timpani_codec_driver);
3638}
3639
3640module_init(timpani_codec_init);
3641module_exit(timpani_codec_exit);
3642
3643MODULE_DESCRIPTION("Timpani codec driver");
3644MODULE_VERSION("1.0");
3645MODULE_LICENSE("GPL v2");