xref: /linux/sound/soc/mediatek/mt8365/mt8365-reg.h (revision 9a029545bb36825f65b1ba182739eaf2809db2c7)
1 /* SPDX-License-Identifier: GPL-2.0
2  *
3  * MediaTek 8365 audio driver reg definition
4  *
5  * Copyright (c) 2024 MediaTek Inc.
6  * Authors: Jia Zeng <jia.zeng@mediatek.com>
7  *          Alexandre Mergnat <amergnat@baylibre.com>
8  */
9 
10 #ifndef _MT8365_REG_H_
11 #define _MT8365_REG_H_
12 
13 #define AUDIO_TOP_CON0			(0x0000)
14 #define AUDIO_TOP_CON1			(0x0004)
15 #define AUDIO_TOP_CON2			(0x0008)
16 #define AUDIO_TOP_CON3			(0x000c)
17 
18 #define AFE_DAC_CON0			(0x0010)
19 #define AFE_DAC_CON1			(0x0014)
20 #define AFE_I2S_CON			(0x0018)
21 #define AFE_CONN0			(0x0020)
22 #define AFE_CONN1			(0x0024)
23 #define AFE_CONN2			(0x0028)
24 #define AFE_CONN3			(0x002c)
25 #define AFE_CONN4			(0x0030)
26 #define AFE_I2S_CON1			(0x0034)
27 #define AFE_I2S_CON2			(0x0038)
28 #define AFE_MRGIF_CON			(0x003c)
29 #define AFE_DL1_BASE			(0x0040)
30 #define AFE_DL1_CUR			(0x0044)
31 #define AFE_DL1_END			(0x0048)
32 #define AFE_I2S_CON3			(0x004c)
33 #define AFE_DL2_BASE			(0x0050)
34 #define AFE_DL2_CUR			(0x0054)
35 #define AFE_DL2_END			(0x0058)
36 #define AFE_CONN5			(0x005c)
37 #define AFE_AWB_BASE			(0x0070)
38 #define AFE_AWB_END			(0x0078)
39 #define AFE_AWB_CUR			(0x007c)
40 #define AFE_VUL_BASE			(0x0080)
41 #define AFE_VUL_END			(0x0088)
42 #define AFE_VUL_CUR			(0x008c)
43 #define AFE_CONN6			(0x00bc)
44 #define AFE_MEMIF_MSB			(0x00cc)
45 #define AFE_MEMIF_MON0			(0x00d0)
46 #define AFE_MEMIF_MON1			(0x00d4)
47 #define AFE_MEMIF_MON2			(0x00d8)
48 #define AFE_MEMIF_MON3			(0x00dc)
49 #define AFE_MEMIF_MON4			(0x00e0)
50 #define AFE_MEMIF_MON5			(0x00e4)
51 #define AFE_MEMIF_MON6			(0x00e8)
52 #define AFE_MEMIF_MON7			(0x00ec)
53 #define AFE_MEMIF_MON8			(0x00f0)
54 #define AFE_MEMIF_MON9			(0x00f4)
55 #define AFE_MEMIF_MON10			(0x00f8)
56 #define AFE_MEMIF_MON11			(0x00fc)
57 #define AFE_ADDA_DL_SRC2_CON0		(0x0108)
58 #define AFE_ADDA_DL_SRC2_CON1		(0x010c)
59 #define AFE_ADDA_UL_SRC_CON0		(0x0114)
60 #define AFE_ADDA_UL_SRC_CON1		(0x0118)
61 #define AFE_ADDA_TOP_CON0		(0x0120)
62 #define AFE_ADDA_UL_DL_CON0		(0x0124)
63 #define AFE_ADDA_SRC_DEBUG		(0x012c)
64 #define AFE_ADDA_SRC_DEBUG_MON0		(0x0130)
65 #define AFE_ADDA_SRC_DEBUG_MON1		(0x0134)
66 #define AFE_ADDA_UL_SRC_MON0		(0x0148)
67 #define AFE_ADDA_UL_SRC_MON1		(0x014c)
68 #define AFE_SRAM_BOUND			(0x0170)
69 #define AFE_SECURE_CON			(0x0174)
70 #define AFE_SECURE_CONN0		(0x0178)
71 #define AFE_SIDETONE_DEBUG		(0x01d0)
72 #define AFE_SIDETONE_MON		(0x01d4)
73 #define AFE_SIDETONE_CON0		(0x01e0)
74 #define AFE_SIDETONE_COEFF		(0x01e4)
75 #define AFE_SIDETONE_CON1		(0x01e8)
76 #define AFE_SIDETONE_GAIN		(0x01ec)
77 #define AFE_SGEN_CON0			(0x01f0)
78 #define AFE_SINEGEN_CON_TDM		(0x01f8)
79 #define AFE_SINEGEN_CON_TDM_IN		(0x01fc)
80 #define AFE_TOP_CON0			(0x0200)
81 #define AFE_BUS_CFG			(0x0240)
82 #define AFE_BUS_MON0			(0x0244)
83 #define AFE_ADDA_PREDIS_CON0		(0x0260)
84 #define AFE_ADDA_PREDIS_CON1		(0x0264)
85 #define AFE_CONN_MON0			(0x0280)
86 #define AFE_CONN_MON1			(0x0284)
87 #define AFE_CONN_MON2			(0x0288)
88 #define AFE_CONN_MON3			(0x028c)
89 #define AFE_ADDA_IIR_COEF_02_01		(0x0290)
90 #define AFE_ADDA_IIR_COEF_04_03		(0x0294)
91 #define AFE_ADDA_IIR_COEF_06_05		(0x0298)
92 #define AFE_ADDA_IIR_COEF_08_07		(0x029c)
93 #define AFE_ADDA_IIR_COEF_10_09		(0x02a0)
94 #define AFE_VUL_D2_BASE			(0x0350)
95 #define AFE_VUL_D2_END			(0x0358)
96 #define AFE_VUL_D2_CUR			(0x035c)
97 #define AFE_HDMI_OUT_CON0		(0x0370)
98 #define AFE_HDMI_OUT_BASE		(0x0374)
99 #define AFE_HDMI_OUT_CUR		(0x0378)
100 #define AFE_HDMI_OUT_END		(0x037c)
101 #define AFE_SPDIF_OUT_CON0		(0x0380)
102 #define AFE_SPDIF_OUT_BASE		(0x0384)
103 #define AFE_SPDIF_OUT_CUR		(0x0388)
104 #define AFE_SPDIF_OUT_END		(0x038c)
105 #define AFE_HDMI_CONN0			(0x0390)
106 #define AFE_HDMI_CONN1			(0x0398)
107 #define AFE_CONN_TDMIN_CON		(0x039c)
108 #define AFE_IRQ_MCU_CON			(0x03a0)
109 #define AFE_IRQ_MCU_STATUS		(0x03a4)
110 #define AFE_IRQ_MCU_CLR			(0x03a8)
111 #define AFE_IRQ_MCU_CNT1		(0x03ac)
112 #define AFE_IRQ_MCU_CNT2		(0x03b0)
113 #define AFE_IRQ_MCU_EN			(0x03b4)
114 #define AFE_IRQ_MCU_MON2		(0x03b8)
115 #define AFE_IRQ_MCU_CNT5		(0x03bc)
116 #define AFE_IRQ1_MCU_CNT_MON		(0x03c0)
117 #define AFE_IRQ2_MCU_CNT_MON		(0x03c4)
118 #define AFE_IRQ1_MCU_EN_CNT_MON		(0x03c8)
119 #define AFE_IRQ5_MCU_CNT_MON		(0x03cc)
120 #define AFE_MEMIF_MINLEN		(0x03d0)
121 #define AFE_MEMIF_MAXLEN		(0x03d4)
122 #define AFE_MEMIF_PBUF_SIZE		(0x03d8)
123 #define AFE_IRQ_MCU_CNT7		(0x03dc)
124 #define AFE_IRQ7_MCU_CNT_MON		(0x03e0)
125 #define AFE_MEMIF_PBUF2_SIZE		(0x03ec)
126 #define AFE_APLL_TUNER_CFG		(0x03f0)
127 #define AFE_APLL_TUNER_CFG1		(0x03f4)
128 #define AFE_IRQ_MCU_CON2		(0x03f8)
129 #define IRQ13_MCU_CNT			(0x0408)
130 #define IRQ13_MCU_CNT_MON		(0x040c)
131 #define AFE_GAIN1_CON0			(0x0410)
132 #define AFE_GAIN1_CON1			(0x0414)
133 #define AFE_GAIN1_CON2			(0x0418)
134 #define AFE_GAIN1_CON3			(0x041c)
135 #define AFE_GAIN2_CON0			(0x0428)
136 #define AFE_GAIN2_CON1			(0x042c)
137 #define AFE_GAIN2_CON2			(0x0430)
138 #define AFE_GAIN2_CON3			(0x0434)
139 #define AFE_GAIN2_CUR			(0x043c)
140 #define AFE_CONN11			(0x0448)
141 #define AFE_CONN12			(0x044c)
142 #define AFE_CONN13			(0x0450)
143 #define AFE_CONN14			(0x0454)
144 #define AFE_CONN15			(0x0458)
145 #define AFE_CONN16			(0x045c)
146 #define AFE_CONN7			(0x0460)
147 #define AFE_CONN8			(0x0464)
148 #define AFE_CONN9			(0x0468)
149 #define AFE_CONN10			(0x046c)
150 #define AFE_CONN21			(0x0470)
151 #define AFE_CONN22			(0x0474)
152 #define AFE_CONN23			(0x0478)
153 #define AFE_CONN24			(0x047c)
154 #define AFE_IEC_CFG			(0x0480)
155 #define AFE_IEC_NSNUM			(0x0484)
156 #define AFE_IEC_BURST_INFO		(0x0488)
157 #define AFE_IEC_BURST_LEN		(0x048c)
158 #define AFE_IEC_NSADR			(0x0490)
159 #define AFE_CONN_RS			(0x0494)
160 #define AFE_CONN_DI			(0x0498)
161 #define AFE_IEC_CHL_STAT0		(0x04a0)
162 #define AFE_IEC_CHL_STAT1		(0x04a4)
163 #define AFE_IEC_CHR_STAT0		(0x04a8)
164 #define AFE_IEC_CHR_STAT1		(0x04ac)
165 #define AFE_CONN25			(0x04b0)
166 #define AFE_CONN26			(0x04b4)
167 #define FPGA_CFG2			(0x04b8)
168 #define FPGA_CFG3			(0x04bc)
169 #define FPGA_CFG0			(0x04c0)
170 #define FPGA_CFG1			(0x04c4)
171 #define AFE_SRAM_DELSEL_CON0		(0x04f0)
172 #define AFE_SRAM_DELSEL_CON1		(0x04f4)
173 #define AFE_SRAM_DELSEL_CON2		(0x04f8)
174 #define FPGA_CFG4			(0x04fc)
175 #define AFE_TDM_GASRC4_ASRC_2CH_CON0	(0x0500)
176 #define AFE_TDM_GASRC4_ASRC_2CH_CON1	(0x0504)
177 #define AFE_TDM_GASRC4_ASRC_2CH_CON2	(0x0508)
178 #define AFE_TDM_GASRC4_ASRC_2CH_CON3	(0x050c)
179 #define AFE_TDM_GASRC4_ASRC_2CH_CON4	(0x0510)
180 #define AFE_TDM_GASRC4_ASRC_2CH_CON5	(0x0514)
181 #define AFE_TDM_GASRC4_ASRC_2CH_CON6	(0x0518)
182 #define AFE_TDM_GASRC4_ASRC_2CH_CON7	(0x051c)
183 #define AFE_TDM_GASRC4_ASRC_2CH_CON8	(0x0520)
184 #define AFE_TDM_GASRC4_ASRC_2CH_CON9	(0x0524)
185 #define AFE_TDM_GASRC4_ASRC_2CH_CON10	(0x0528)
186 #define AFE_TDM_GASRC4_ASRC_2CH_CON12	(0x0530)
187 #define AFE_TDM_GASRC4_ASRC_2CH_CON13	(0x0534)
188 #define PCM_INTF_CON2			(0x0538)
189 #define PCM2_INTF_CON			(0x053c)
190 #define AFE_APB_MON			(0x0540)
191 #define AFE_CONN34			(0x0544)
192 #define AFE_TDM_CON1			(0x0548)
193 #define AFE_TDM_CON2			(0x054c)
194 #define PCM_INTF_CON1			(0x0550)
195 #define AFE_SECURE_MASK_CONN47_1	(0x0554)
196 #define AFE_SECURE_MASK_CONN48_1	(0x0558)
197 #define AFE_SECURE_MASK_CONN49_1	(0x055c)
198 #define AFE_SECURE_MASK_CONN50_1	(0x0560)
199 #define AFE_SECURE_MASK_CONN51_1	(0x0564)
200 #define AFE_SECURE_MASK_CONN52_1	(0x0568)
201 #define AFE_SECURE_MASK_CONN53_1	(0x056c)
202 #define AFE_SE_SECURE_CON		(0x0570)
203 #define AFE_TDM_IN_CON1			(0x0588)
204 #define AFE_TDM_IN_CON2			(0x058c)
205 #define AFE_TDM_IN_MON1			(0x0590)
206 #define AFE_TDM_IN_MON2			(0x0594)
207 #define AFE_TDM_IN_MON3			(0x0598)
208 #define AFE_DMIC0_UL_SRC_CON0		(0x05b4)
209 #define AFE_DMIC0_UL_SRC_CON1		(0x05b8)
210 #define AFE_DMIC0_SRC_DEBUG		(0x05bc)
211 #define AFE_DMIC0_SRC_DEBUG_MON0	(0x05c0)
212 #define AFE_DMIC0_UL_SRC_MON0		(0x05c8)
213 #define AFE_DMIC0_UL_SRC_MON1		(0x05cc)
214 #define AFE_DMIC0_IIR_COEF_02_01	(0x05d0)
215 #define AFE_DMIC0_IIR_COEF_04_03	(0x05d4)
216 #define AFE_DMIC0_IIR_COEF_06_05	(0x05d8)
217 #define AFE_DMIC0_IIR_COEF_08_07	(0x05dc)
218 #define AFE_DMIC0_IIR_COEF_10_09	(0x05e0)
219 #define AFE_DMIC1_UL_SRC_CON0		(0x0620)
220 #define AFE_DMIC1_UL_SRC_CON1		(0x0624)
221 #define AFE_DMIC1_SRC_DEBUG		(0x0628)
222 #define AFE_DMIC1_SRC_DEBUG_MON0	(0x062c)
223 #define AFE_DMIC1_UL_SRC_MON0		(0x0634)
224 #define AFE_DMIC1_UL_SRC_MON1		(0x0638)
225 #define AFE_DMIC1_IIR_COEF_02_01	(0x063c)
226 #define AFE_DMIC1_IIR_COEF_04_03	(0x0640)
227 #define AFE_DMIC1_IIR_COEF_06_05	(0x0644)
228 #define AFE_DMIC1_IIR_COEF_08_07	(0x0648)
229 #define AFE_DMIC1_IIR_COEF_10_09	(0x064c)
230 #define AFE_SECURE_MASK_CONN39_1	(0x068c)
231 #define AFE_SECURE_MASK_CONN40_1	(0x0690)
232 #define AFE_SECURE_MASK_CONN41_1	(0x0694)
233 #define AFE_SECURE_MASK_CONN42_1	(0x0698)
234 #define AFE_SECURE_MASK_CONN43_1	(0x069c)
235 #define AFE_SECURE_MASK_CONN44_1	(0x06a0)
236 #define AFE_SECURE_MASK_CONN45_1	(0x06a4)
237 #define AFE_SECURE_MASK_CONN46_1	(0x06a8)
238 #define AFE_TDM_GASRC1_ASRC_2CH_CON0	(0x06c0)
239 #define AFE_TDM_GASRC1_ASRC_2CH_CON1	(0x06c4)
240 #define AFE_TDM_GASRC1_ASRC_2CH_CON2	(0x06c8)
241 #define AFE_TDM_GASRC1_ASRC_2CH_CON3	(0x06cc)
242 #define AFE_TDM_GASRC1_ASRC_2CH_CON4	(0x06d0)
243 #define AFE_TDM_GASRC1_ASRC_2CH_CON5	(0x06d4)
244 #define AFE_TDM_GASRC1_ASRC_2CH_CON6	(0x06d8)
245 #define AFE_TDM_GASRC1_ASRC_2CH_CON7	(0x06dc)
246 #define AFE_TDM_GASRC1_ASRC_2CH_CON8	(0x06e0)
247 #define AFE_TDM_GASRC1_ASRC_2CH_CON9	(0x06e4)
248 #define AFE_TDM_GASRC1_ASRC_2CH_CON10	(0x06e8)
249 #define AFE_TDM_GASRC1_ASRC_2CH_CON12	(0x06f0)
250 #define AFE_TDM_GASRC1_ASRC_2CH_CON13	(0x06f4)
251 #define AFE_TDM_ASRC_CON0		(0x06f8)
252 #define AFE_TDM_GASRC2_ASRC_2CH_CON0	(0x0700)
253 #define AFE_TDM_GASRC2_ASRC_2CH_CON1	(0x0704)
254 #define AFE_TDM_GASRC2_ASRC_2CH_CON2	(0x0708)
255 #define AFE_TDM_GASRC2_ASRC_2CH_CON3	(0x070c)
256 #define AFE_TDM_GASRC2_ASRC_2CH_CON4	(0x0710)
257 #define AFE_TDM_GASRC2_ASRC_2CH_CON5	(0x0714)
258 #define AFE_TDM_GASRC2_ASRC_2CH_CON6	(0x0718)
259 #define AFE_TDM_GASRC2_ASRC_2CH_CON7	(0x071c)
260 #define AFE_TDM_GASRC2_ASRC_2CH_CON8	(0x0720)
261 #define AFE_TDM_GASRC2_ASRC_2CH_CON9	(0x0724)
262 #define AFE_TDM_GASRC2_ASRC_2CH_CON10	(0x0728)
263 #define AFE_TDM_GASRC2_ASRC_2CH_CON12	(0x0730)
264 #define AFE_TDM_GASRC2_ASRC_2CH_CON13	(0x0734)
265 #define AFE_TDM_GASRC3_ASRC_2CH_CON0	(0x0740)
266 #define AFE_TDM_GASRC3_ASRC_2CH_CON1	(0x0744)
267 #define AFE_TDM_GASRC3_ASRC_2CH_CON2	(0x0748)
268 #define AFE_TDM_GASRC3_ASRC_2CH_CON3	(0x074c)
269 #define AFE_TDM_GASRC3_ASRC_2CH_CON4	(0x0750)
270 #define AFE_TDM_GASRC3_ASRC_2CH_CON5	(0x0754)
271 #define AFE_TDM_GASRC3_ASRC_2CH_CON6	(0x0758)
272 #define AFE_TDM_GASRC3_ASRC_2CH_CON7	(0x075c)
273 #define AFE_TDM_GASRC3_ASRC_2CH_CON8	(0x0760)
274 #define AFE_TDM_GASRC3_ASRC_2CH_CON9	(0x0764)
275 #define AFE_TDM_GASRC3_ASRC_2CH_CON10	(0x0768)
276 #define AFE_TDM_GASRC3_ASRC_2CH_CON12	(0x0770)
277 #define AFE_TDM_GASRC3_ASRC_2CH_CON13	(0x0774)
278 #define AFE_DMIC2_UL_SRC_CON0		(0x0780)
279 #define AFE_DMIC2_UL_SRC_CON1		(0x0784)
280 #define AFE_DMIC2_SRC_DEBUG		(0x0788)
281 #define AFE_DMIC2_SRC_DEBUG_MON0	(0x078c)
282 #define AFE_DMIC2_UL_SRC_MON0		(0x0794)
283 #define AFE_DMIC2_UL_SRC_MON1		(0x0798)
284 #define AFE_DMIC2_IIR_COEF_02_01	(0x079c)
285 #define AFE_DMIC2_IIR_COEF_04_03	(0x07a0)
286 #define AFE_DMIC2_IIR_COEF_06_05	(0x07a4)
287 #define AFE_DMIC2_IIR_COEF_08_07	(0x07a8)
288 #define AFE_DMIC2_IIR_COEF_10_09	(0x07ac)
289 #define AFE_DMIC3_UL_SRC_CON0		(0x07ec)
290 #define AFE_DMIC3_UL_SRC_CON1		(0x07f0)
291 #define AFE_DMIC3_SRC_DEBUG		(0x07f4)
292 #define AFE_DMIC3_SRC_DEBUG_MON0	(0x07f8)
293 #define AFE_DMIC3_UL_SRC_MON0		(0x0800)
294 #define AFE_DMIC3_UL_SRC_MON1		(0x0804)
295 #define AFE_DMIC3_IIR_COEF_02_01	(0x0808)
296 #define AFE_DMIC3_IIR_COEF_04_03	(0x080c)
297 #define AFE_DMIC3_IIR_COEF_06_05	(0x0810)
298 #define AFE_DMIC3_IIR_COEF_08_07	(0x0814)
299 #define AFE_DMIC3_IIR_COEF_10_09	(0x0818)
300 #define AFE_SECURE_MASK_CONN25_1	(0x0858)
301 #define AFE_SECURE_MASK_CONN26_1	(0x085c)
302 #define AFE_SECURE_MASK_CONN27_1	(0x0860)
303 #define AFE_SECURE_MASK_CONN28_1	(0x0864)
304 #define AFE_SECURE_MASK_CONN29_1	(0x0868)
305 #define AFE_SECURE_MASK_CONN30_1	(0x086c)
306 #define AFE_SECURE_MASK_CONN31_1	(0x0870)
307 #define AFE_SECURE_MASK_CONN32_1	(0x0874)
308 #define AFE_SECURE_MASK_CONN33_1	(0x0878)
309 #define AFE_SECURE_MASK_CONN34_1	(0x087c)
310 #define AFE_SECURE_MASK_CONN35_1	(0x0880)
311 #define AFE_SECURE_MASK_CONN36_1	(0x0884)
312 #define AFE_SECURE_MASK_CONN37_1	(0x0888)
313 #define AFE_SECURE_MASK_CONN38_1	(0x088c)
314 #define AFE_IRQ_MCU_SCP_EN		(0x0890)
315 #define AFE_IRQ_MCU_DSP_EN		(0x0894)
316 #define AFE_IRQ3_MCU_CNT_MON		(0x0898)
317 #define AFE_IRQ4_MCU_CNT_MON		(0x089c)
318 #define AFE_IRQ8_MCU_CNT_MON		(0x08a0)
319 #define AFE_IRQ_MCU_CNT3		(0x08a4)
320 #define AFE_IRQ_MCU_CNT4		(0x08a8)
321 #define AFE_IRQ_MCU_CNT8		(0x08ac)
322 #define AFE_IRQ_MCU_CNT11		(0x08b0)
323 #define AFE_IRQ_MCU_CNT12		(0x08b4)
324 #define AFE_IRQ11_MCU_CNT_MON		(0x08b8)
325 #define AFE_IRQ12_MCU_CNT_MON		(0x08bc)
326 #define AFE_VUL3_BASE			(0x08c0)
327 #define AFE_VUL3_CUR			(0x08c4)
328 #define AFE_VUL3_END			(0x08c8)
329 #define AFE_VUL3_BASE_MSB		(0x08d0)
330 #define AFE_VUL3_END_MSB		(0x08d4)
331 #define AFE_IRQ10_MCU_CNT_MON		(0x08d8)
332 #define AFE_IRQ_MCU_CNT10		(0x08dc)
333 #define AFE_IRQ_ACC1_CNT		(0x08e0)
334 #define AFE_IRQ_ACC2_CNT		(0x08e4)
335 #define AFE_IRQ_ACC1_CNT_MON1		(0x08e8)
336 #define AFE_IRQ_ACC2_CNT_MON		(0x08ec)
337 #define AFE_TSF_CON			(0x08f0)
338 #define AFE_TSF_MON			(0x08f4)
339 #define AFE_IRQ_ACC1_CNT_MON2		(0x08f8)
340 #define AFE_SPDIFIN_CFG0		(0x0900)
341 #define AFE_SPDIFIN_CFG1		(0x0904)
342 #define AFE_SPDIFIN_CHSTS1		(0x0908)
343 #define AFE_SPDIFIN_CHSTS2		(0x090c)
344 #define AFE_SPDIFIN_CHSTS3		(0x0910)
345 #define AFE_SPDIFIN_CHSTS4		(0x0914)
346 #define AFE_SPDIFIN_CHSTS5		(0x0918)
347 #define AFE_SPDIFIN_CHSTS6		(0x091c)
348 #define AFE_SPDIFIN_DEBUG1		(0x0920)
349 #define AFE_SPDIFIN_DEBUG2		(0x0924)
350 #define AFE_SPDIFIN_DEBUG3		(0x0928)
351 #define AFE_SPDIFIN_DEBUG4		(0x092c)
352 #define AFE_SPDIFIN_EC			(0x0930)
353 #define AFE_SPDIFIN_CKLOCK_CFG		(0x0934)
354 #define AFE_SPDIFIN_BR			(0x093c)
355 #define AFE_SPDIFIN_BR_DBG1		(0x0940)
356 #define AFE_SPDIFIN_INT_EXT		(0x0948)
357 #define AFE_SPDIFIN_INT_EXT2		(0x094c)
358 #define SPDIFIN_FREQ_INFO		(0x0950)
359 #define SPDIFIN_FREQ_INFO_2		(0x0954)
360 #define SPDIFIN_FREQ_INFO_3		(0x0958)
361 #define SPDIFIN_FREQ_STATUS		(0x095c)
362 #define SPDIFIN_USERCODE1		(0x0960)
363 #define SPDIFIN_USERCODE2		(0x0964)
364 #define SPDIFIN_USERCODE3		(0x0968)
365 #define SPDIFIN_USERCODE4		(0x096c)
366 #define SPDIFIN_USERCODE5		(0x0970)
367 #define SPDIFIN_USERCODE6		(0x0974)
368 #define SPDIFIN_USERCODE7		(0x0978)
369 #define SPDIFIN_USERCODE8		(0x097c)
370 #define SPDIFIN_USERCODE9		(0x0980)
371 #define SPDIFIN_USERCODE10		(0x0984)
372 #define SPDIFIN_USERCODE11		(0x0988)
373 #define SPDIFIN_USERCODE12		(0x098c)
374 #define SPDIFIN_MEMIF_CON0		(0x0990)
375 #define SPDIFIN_BASE_ADR		(0x0994)
376 #define SPDIFIN_END_ADR			(0x0998)
377 #define SPDIFIN_APLL_TUNER_CFG		(0x09a0)
378 #define SPDIFIN_APLL_TUNER_CFG1		(0x09a4)
379 #define SPDIFIN_APLL2_TUNER_CFG		(0x09a8)
380 #define SPDIFIN_APLL2_TUNER_CFG1	(0x09ac)
381 #define SPDIFIN_TYPE_DET		(0x09b0)
382 #define MPHONE_MULTI_CON0		(0x09b4)
383 #define SPDIFIN_CUR_ADR			(0x09b8)
384 #define AFE_SINEGEN_CON_SPDIFIN		(0x09bc)
385 #define AFE_HDMI_IN_2CH_CON0		(0x09c0)
386 #define AFE_HDMI_IN_2CH_BASE		(0x09c4)
387 #define AFE_HDMI_IN_2CH_END		(0x09c8)
388 #define AFE_HDMI_IN_2CH_CUR		(0x09cc)
389 #define AFE_MEMIF_BUF_MON0		(0x09d0)
390 #define AFE_MEMIF_BUF_MON1		(0x09d4)
391 #define AFE_MEMIF_BUF_MON2		(0x09d8)
392 #define AFE_MEMIF_BUF_MON3		(0x09dc)
393 #define AFE_MEMIF_BUF_MON6		(0x09e8)
394 #define AFE_MEMIF_BUF_MON7		(0x09ec)
395 #define AFE_MEMIF_BUF_MON8		(0x09f0)
396 #define AFE_MEMIF_BUF_MON10		(0x09f8)
397 #define AFE_MEMIF_BUF_MON11		(0x09fc)
398 #define SYSTOP_STC_CONFIG		(0x0a00)
399 #define AUDIO_STC_STATUS		(0x0a04)
400 #define SYSTOP_W_STC_H			(0x0a08)
401 #define SYSTOP_W_STC_L			(0x0a0c)
402 #define SYSTOP_R_STC_H			(0x0a10)
403 #define SYSTOP_R_STC_L			(0x0a14)
404 #define AUDIO_W_STC_H			(0x0a18)
405 #define AUDIO_W_STC_L			(0x0a1c)
406 #define AUDIO_R_STC_H			(0x0a20)
407 #define AUDIO_R_STC_L			(0x0a24)
408 #define SYSTOP_W_STC2_H			(0x0a28)
409 #define SYSTOP_W_STC2_L			(0x0a2c)
410 #define SYSTOP_R_STC2_H			(0x0a30)
411 #define SYSTOP_R_STC2_L			(0x0a34)
412 #define AUDIO_W_STC2_H			(0x0a38)
413 #define AUDIO_W_STC2_L			(0x0a3c)
414 #define AUDIO_R_STC2_H			(0x0a40)
415 #define AUDIO_R_STC2_L			(0x0a44)
416 
417 #define AFE_CONN17			(0x0a48)
418 #define AFE_CONN18			(0x0a4c)
419 #define AFE_CONN19			(0x0a50)
420 #define AFE_CONN20			(0x0a54)
421 #define AFE_CONN27			(0x0a58)
422 #define AFE_CONN28			(0x0a5c)
423 #define AFE_CONN29			(0x0a60)
424 #define AFE_CONN30			(0x0a64)
425 #define AFE_CONN31			(0x0a68)
426 #define AFE_CONN32			(0x0a6c)
427 #define AFE_CONN33			(0x0a70)
428 #define AFE_CONN35			(0x0a74)
429 #define AFE_CONN36			(0x0a78)
430 #define AFE_CONN37			(0x0a7c)
431 #define AFE_CONN38			(0x0a80)
432 #define AFE_CONN39			(0x0a84)
433 #define AFE_CONN40			(0x0a88)
434 #define AFE_CONN41			(0x0a8c)
435 #define AFE_CONN42			(0x0a90)
436 #define AFE_CONN44			(0x0a94)
437 #define AFE_CONN45			(0x0a98)
438 #define AFE_CONN46			(0x0a9c)
439 #define AFE_CONN47			(0x0aa0)
440 #define AFE_CONN_24BIT			(0x0aa4)
441 #define AFE_CONN0_1			(0x0aa8)
442 #define AFE_CONN1_1			(0x0aac)
443 #define AFE_CONN2_1			(0x0ab0)
444 #define AFE_CONN3_1			(0x0ab4)
445 #define AFE_CONN4_1			(0x0ab8)
446 #define AFE_CONN5_1			(0x0abc)
447 #define AFE_CONN6_1			(0x0ac0)
448 #define AFE_CONN7_1			(0x0ac4)
449 #define AFE_CONN8_1			(0x0ac8)
450 #define AFE_CONN9_1			(0x0acc)
451 #define AFE_CONN10_1			(0x0ad0)
452 #define AFE_CONN11_1			(0x0ad4)
453 #define AFE_CONN12_1			(0x0ad8)
454 #define AFE_CONN13_1			(0x0adc)
455 #define AFE_CONN14_1			(0x0ae0)
456 #define AFE_CONN15_1			(0x0ae4)
457 #define AFE_CONN16_1			(0x0ae8)
458 #define AFE_CONN17_1			(0x0aec)
459 #define AFE_CONN18_1			(0x0af0)
460 #define AFE_CONN19_1			(0x0af4)
461 #define AFE_CONN43			(0x0af8)
462 #define AFE_CONN43_1			(0x0afc)
463 #define AFE_CONN21_1			(0x0b00)
464 #define AFE_CONN22_1			(0x0b04)
465 #define AFE_CONN23_1			(0x0b08)
466 #define AFE_CONN24_1			(0x0b0c)
467 #define AFE_CONN25_1			(0x0b10)
468 #define AFE_CONN26_1			(0x0b14)
469 #define AFE_CONN27_1			(0x0b18)
470 #define AFE_CONN28_1			(0x0b1c)
471 #define AFE_CONN29_1			(0x0b20)
472 #define AFE_CONN30_1			(0x0b24)
473 #define AFE_CONN31_1			(0x0b28)
474 #define AFE_CONN32_1			(0x0b2c)
475 #define AFE_CONN33_1			(0x0b30)
476 #define AFE_CONN34_1			(0x0b34)
477 #define AFE_CONN35_1			(0x0b38)
478 #define AFE_CONN36_1			(0x0b3c)
479 #define AFE_CONN37_1			(0x0b40)
480 #define AFE_CONN38_1			(0x0b44)
481 #define AFE_CONN39_1			(0x0b48)
482 #define AFE_CONN40_1			(0x0b4c)
483 #define AFE_CONN41_1			(0x0b50)
484 #define AFE_CONN42_1			(0x0b54)
485 #define AFE_CONN44_1			(0x0b58)
486 #define AFE_CONN45_1			(0x0b5c)
487 #define AFE_CONN46_1			(0x0b60)
488 #define AFE_CONN47_1			(0x0b64)
489 #define AFE_CONN_RS_1			(0x0b68)
490 #define AFE_CONN_DI_1			(0x0b6c)
491 #define AFE_CONN_24BIT_1		(0x0b70)
492 #define AFE_GAIN1_CUR			(0x0b78)
493 #define AFE_CONN20_1			(0x0b7c)
494 #define AFE_DL1_BASE_MSB		(0x0b80)
495 #define AFE_DL1_END_MSB			(0x0b84)
496 #define AFE_DL2_BASE_MSB		(0x0b88)
497 #define AFE_DL2_END_MSB			(0x0b8c)
498 #define AFE_AWB_BASE_MSB		(0x0b90)
499 #define AFE_AWB_END_MSB			(0x0b94)
500 #define AFE_VUL_BASE_MSB		(0x0ba0)
501 #define AFE_VUL_END_MSB			(0x0ba4)
502 #define AFE_VUL_D2_BASE_MSB		(0x0ba8)
503 #define AFE_VUL_D2_END_MSB		(0x0bac)
504 #define AFE_HDMI_OUT_BASE_MSB		(0x0bb8)
505 #define AFE_HDMI_OUT_END_MSB		(0x0bbc)
506 #define AFE_HDMI_IN_2CH_BASE_MSB	(0x0bc0)
507 #define AFE_HDMI_IN_2CH_END_MSB		(0x0bc4)
508 #define AFE_SPDIF_OUT_BASE_MSB		(0x0bc8)
509 #define AFE_SPDIF_OUT_END_MSB		(0x0bcc)
510 #define SPDIFIN_BASE_MSB		(0x0bd0)
511 #define SPDIFIN_END_MSB			(0x0bd4)
512 #define AFE_DL1_CUR_MSB			(0x0bd8)
513 #define AFE_DL2_CUR_MSB			(0x0bdc)
514 #define AFE_AWB_CUR_MSB			(0x0be8)
515 #define AFE_VUL_CUR_MSB			(0x0bf8)
516 #define AFE_VUL_D2_CUR_MSB		(0x0c04)
517 #define AFE_HDMI_OUT_CUR_MSB		(0x0c0c)
518 #define AFE_HDMI_IN_2CH_CUR_MSB		(0x0c10)
519 #define AFE_SPDIF_OUT_CUR_MSB		(0x0c14)
520 #define SPDIFIN_CUR_MSB			(0x0c18)
521 #define AFE_CONN_REG			(0x0c20)
522 #define AFE_SECURE_MASK_CONN14_1	(0x0c24)
523 #define AFE_SECURE_MASK_CONN15_1	(0x0c28)
524 #define AFE_SECURE_MASK_CONN16_1	(0x0c2c)
525 #define AFE_SECURE_MASK_CONN17_1	(0x0c30)
526 #define AFE_SECURE_MASK_CONN18_1	(0x0c34)
527 #define AFE_SECURE_MASK_CONN19_1	(0x0c38)
528 #define AFE_SECURE_MASK_CONN20_1	(0x0c3c)
529 #define AFE_SECURE_MASK_CONN21_1	(0x0c40)
530 #define AFE_SECURE_MASK_CONN22_1	(0x0c44)
531 #define AFE_SECURE_MASK_CONN23_1	(0x0c48)
532 #define AFE_SECURE_MASK_CONN24_1	(0x0c4c)
533 #define AFE_ADDA_DL_SDM_DCCOMP_CON	(0x0c50)
534 #define AFE_ADDA_DL_SDM_TEST		(0x0c54)
535 #define AFE_ADDA_DL_DC_COMP_CFG0	(0x0c58)
536 #define AFE_ADDA_DL_DC_COMP_CFG1	(0x0c5c)
537 #define AFE_ADDA_DL_SDM_FIFO_MON	(0x0c60)
538 #define AFE_ADDA_DL_SRC_LCH_MON		(0x0c64)
539 #define AFE_ADDA_DL_SRC_RCH_MON		(0x0c68)
540 #define AFE_ADDA_DL_SDM_OUT_MON		(0x0c6c)
541 #define AFE_ADDA_DL_SDM_DITHER_CON	(0x0c70)
542 
543 #define AFE_VUL3_CUR_MSB		(0x0c78)
544 #define AFE_ASRC_2CH_CON0		(0x0c80)
545 #define AFE_ASRC_2CH_CON1		(0x0c84)
546 #define AFE_ASRC_2CH_CON2		(0x0c88)
547 #define AFE_ASRC_2CH_CON3		(0x0c8c)
548 #define AFE_ASRC_2CH_CON4		(0x0c90)
549 #define AFE_ASRC_2CH_CON5		(0x0c94)
550 #define AFE_ASRC_2CH_CON6		(0x0c98)
551 #define AFE_ASRC_2CH_CON7		(0x0c9c)
552 #define AFE_ASRC_2CH_CON8		(0x0ca0)
553 #define AFE_ASRC_2CH_CON9		(0x0ca4)
554 #define AFE_ASRC_2CH_CON10		(0x0ca8)
555 #define AFE_ASRC_2CH_CON12		(0x0cb0)
556 #define AFE_ASRC_2CH_CON13		(0x0cb4)
557 
558 #define AFE_PCM_TX_ASRC_2CH_CON0	(0x0cc0)
559 #define AFE_PCM_TX_ASRC_2CH_CON1	(0x0cc4)
560 #define AFE_PCM_TX_ASRC_2CH_CON2	(0x0cc8)
561 #define AFE_PCM_TX_ASRC_2CH_CON3	(0x0ccc)
562 #define AFE_PCM_TX_ASRC_2CH_CON4	(0x0cd0)
563 #define AFE_PCM_TX_ASRC_2CH_CON5	(0x0cd4)
564 #define AFE_PCM_TX_ASRC_2CH_CON6	(0x0cd8)
565 #define AFE_PCM_TX_ASRC_2CH_CON7	(0x0cdc)
566 #define AFE_PCM_TX_ASRC_2CH_CON8	(0x0ce0)
567 #define AFE_PCM_TX_ASRC_2CH_CON9	(0x0ce4)
568 #define AFE_PCM_TX_ASRC_2CH_CON10	(0x0ce8)
569 #define AFE_PCM_TX_ASRC_2CH_CON12	(0x0cf0)
570 #define AFE_PCM_TX_ASRC_2CH_CON13	(0x0cf4)
571 #define AFE_PCM_RX_ASRC_2CH_CON0	(0x0d00)
572 #define AFE_PCM_RX_ASRC_2CH_CON1	(0x0d04)
573 #define AFE_PCM_RX_ASRC_2CH_CON2	(0x0d08)
574 #define AFE_PCM_RX_ASRC_2CH_CON3	(0x0d0c)
575 #define AFE_PCM_RX_ASRC_2CH_CON4	(0x0d10)
576 #define AFE_PCM_RX_ASRC_2CH_CON5	(0x0d14)
577 #define AFE_PCM_RX_ASRC_2CH_CON6	(0x0d18)
578 #define AFE_PCM_RX_ASRC_2CH_CON7	(0x0d1c)
579 #define AFE_PCM_RX_ASRC_2CH_CON8	(0x0d20)
580 #define AFE_PCM_RX_ASRC_2CH_CON9	(0x0d24)
581 #define AFE_PCM_RX_ASRC_2CH_CON10	(0x0d28)
582 #define AFE_PCM_RX_ASRC_2CH_CON12	(0x0d30)
583 #define AFE_PCM_RX_ASRC_2CH_CON13	(0x0d34)
584 
585 #define AFE_ADDA_PREDIS_CON2		(0x0d40)
586 #define AFE_ADDA_PREDIS_CON3		(0x0d44)
587 #define AFE_SECURE_MASK_CONN4_1		(0x0d48)
588 #define AFE_SECURE_MASK_CONN5_1		(0x0d4c)
589 #define AFE_SECURE_MASK_CONN6_1		(0x0d50)
590 #define AFE_SECURE_MASK_CONN7_1		(0x0d54)
591 #define AFE_SECURE_MASK_CONN8_1		(0x0d58)
592 #define AFE_SECURE_MASK_CONN9_1		(0x0d5c)
593 #define AFE_SECURE_MASK_CONN10_1	(0x0d60)
594 #define AFE_SECURE_MASK_CONN11_1	(0x0d64)
595 #define AFE_SECURE_MASK_CONN12_1	(0x0d68)
596 #define AFE_SECURE_MASK_CONN13_1	(0x0d6c)
597 #define AFE_MEMIF_MON12			(0x0d70)
598 #define AFE_MEMIF_MON13			(0x0d74)
599 #define AFE_MEMIF_MON14			(0x0d78)
600 #define AFE_MEMIF_MON15			(0x0d7c)
601 #define AFE_SECURE_MASK_CONN42		(0x0dbc)
602 #define AFE_SECURE_MASK_CONN43		(0x0dc0)
603 #define AFE_SECURE_MASK_CONN44		(0x0dc4)
604 #define AFE_SECURE_MASK_CONN45		(0x0dc8)
605 #define AFE_SECURE_MASK_CONN46		(0x0dcc)
606 #define AFE_HD_ENGEN_ENABLE		(0x0dd0)
607 #define AFE_SECURE_MASK_CONN47		(0x0dd4)
608 #define AFE_SECURE_MASK_CONN48		(0x0dd8)
609 #define AFE_SECURE_MASK_CONN49		(0x0ddc)
610 #define AFE_SECURE_MASK_CONN50		(0x0de0)
611 #define AFE_SECURE_MASK_CONN51		(0x0de4)
612 #define AFE_SECURE_MASK_CONN52		(0x0de8)
613 #define AFE_SECURE_MASK_CONN53		(0x0dec)
614 #define AFE_SECURE_MASK_CONN0_1		(0x0df0)
615 #define AFE_SECURE_MASK_CONN1_1		(0x0df4)
616 #define AFE_SECURE_MASK_CONN2_1		(0x0df8)
617 #define AFE_SECURE_MASK_CONN3_1		(0x0dfc)
618 
619 #define AFE_ADDA_MTKAIF_CFG0		(0x0e00)
620 #define AFE_ADDA_MTKAIF_SYNCWORD_CFG	(0x0e14)
621 #define AFE_ADDA_MTKAIF_RX_CFG0		(0x0e20)
622 #define AFE_ADDA_MTKAIF_RX_CFG1		(0x0e24)
623 #define AFE_ADDA_MTKAIF_RX_CFG2		(0x0e28)
624 #define AFE_ADDA_MTKAIF_MON0		(0x0e34)
625 #define AFE_ADDA_MTKAIF_MON1		(0x0e38)
626 #define AFE_AUD_PAD_TOP			(0x0e40)
627 
628 #define AFE_CM1_CON4			(0x0e48)
629 #define AFE_CM2_CON4			(0x0e4c)
630 #define AFE_CM1_CON0			(0x0e50)
631 #define AFE_CM1_CON1			(0x0e54)
632 #define AFE_CM1_CON2			(0x0e58)
633 #define AFE_CM1_CON3			(0x0e5c)
634 #define AFE_CM2_CON0			(0x0e60)
635 #define AFE_CM2_CON1			(0x0e64)
636 #define AFE_CM2_CON2			(0x0e68)
637 #define AFE_CM2_CON3			(0x0e6c)
638 #define AFE_CM2_CONN0			(0x0e70)
639 #define AFE_CM2_CONN1			(0x0e74)
640 #define AFE_CM2_CONN2			(0x0e78)
641 
642 #define AFE_GENERAL1_ASRC_2CH_CON0	(0x0e80)
643 #define AFE_GENERAL1_ASRC_2CH_CON1	(0x0e84)
644 #define AFE_GENERAL1_ASRC_2CH_CON2	(0x0e88)
645 #define AFE_GENERAL1_ASRC_2CH_CON3	(0x0e8c)
646 #define AFE_GENERAL1_ASRC_2CH_CON4	(0x0e90)
647 #define AFE_GENERAL1_ASRC_2CH_CON5	(0x0e94)
648 #define AFE_GENERAL1_ASRC_2CH_CON6	(0x0e98)
649 #define AFE_GENERAL1_ASRC_2CH_CON7	(0x0e9c)
650 #define AFE_GENERAL1_ASRC_2CH_CON8	(0x0ea0)
651 #define AFE_GENERAL1_ASRC_2CH_CON9	(0x0ea4)
652 #define AFE_GENERAL1_ASRC_2CH_CON10	(0x0ea8)
653 #define AFE_GENERAL1_ASRC_2CH_CON12	(0x0eb0)
654 #define AFE_GENERAL1_ASRC_2CH_CON13	(0x0eb4)
655 #define GENERAL_ASRC_MODE		(0x0eb8)
656 #define GENERAL_ASRC_EN_ON		(0x0ebc)
657 
658 #define AFE_CONN48			(0x0ec0)
659 #define AFE_CONN49			(0x0ec4)
660 #define AFE_CONN50			(0x0ec8)
661 #define AFE_CONN51			(0x0ecc)
662 #define AFE_CONN52			(0x0ed0)
663 #define AFE_CONN53			(0x0ed4)
664 #define AFE_CONN48_1			(0x0ee0)
665 #define AFE_CONN49_1			(0x0ee4)
666 #define AFE_CONN50_1			(0x0ee8)
667 #define AFE_CONN51_1			(0x0eec)
668 #define AFE_CONN52_1			(0x0ef0)
669 #define AFE_CONN53_1			(0x0ef4)
670 
671 #define AFE_GENERAL2_ASRC_2CH_CON0	(0x0f00)
672 #define AFE_GENERAL2_ASRC_2CH_CON1	(0x0f04)
673 #define AFE_GENERAL2_ASRC_2CH_CON2	(0x0f08)
674 #define AFE_GENERAL2_ASRC_2CH_CON3	(0x0f0c)
675 #define AFE_GENERAL2_ASRC_2CH_CON4	(0x0f10)
676 #define AFE_GENERAL2_ASRC_2CH_CON5	(0x0f14)
677 #define AFE_GENERAL2_ASRC_2CH_CON6	(0x0f18)
678 #define AFE_GENERAL2_ASRC_2CH_CON7	(0x0f1c)
679 #define AFE_GENERAL2_ASRC_2CH_CON8	(0x0f20)
680 #define AFE_GENERAL2_ASRC_2CH_CON9	(0x0f24)
681 #define AFE_GENERAL2_ASRC_2CH_CON10	(0x0f28)
682 #define AFE_GENERAL2_ASRC_2CH_CON12	(0x0f30)
683 #define AFE_GENERAL2_ASRC_2CH_CON13	(0x0f34)
684 
685 #define AFE_SECURE_MASK_CONN28		(0x0f48)
686 #define AFE_SECURE_MASK_CONN29		(0x0f4c)
687 #define AFE_SECURE_MASK_CONN30		(0x0f50)
688 #define AFE_SECURE_MASK_CONN31		(0x0f54)
689 #define AFE_SECURE_MASK_CONN32		(0x0f58)
690 #define AFE_SECURE_MASK_CONN33		(0x0f5c)
691 #define AFE_SECURE_MASK_CONN34		(0x0f60)
692 #define AFE_SECURE_MASK_CONN35		(0x0f64)
693 #define AFE_SECURE_MASK_CONN36		(0x0f68)
694 #define AFE_SECURE_MASK_CONN37		(0x0f6c)
695 #define AFE_SECURE_MASK_CONN38		(0x0f70)
696 #define AFE_SECURE_MASK_CONN39		(0x0f74)
697 #define AFE_SECURE_MASK_CONN40		(0x0f78)
698 #define AFE_SECURE_MASK_CONN41		(0x0f7c)
699 #define AFE_SIDEBAND0			(0x0f80)
700 #define AFE_SIDEBAND1			(0x0f84)
701 #define AFE_SECURE_SIDEBAND0		(0x0f88)
702 #define AFE_SECURE_SIDEBAND1		(0x0f8c)
703 #define AFE_SECURE_MASK_CONN0		(0x0f90)
704 #define AFE_SECURE_MASK_CONN1		(0x0f94)
705 #define AFE_SECURE_MASK_CONN2		(0x0f98)
706 #define AFE_SECURE_MASK_CONN3		(0x0f9c)
707 #define AFE_SECURE_MASK_CONN4		(0x0fa0)
708 #define AFE_SECURE_MASK_CONN5		(0x0fa4)
709 #define AFE_SECURE_MASK_CONN6		(0x0fa8)
710 #define AFE_SECURE_MASK_CONN7		(0x0fac)
711 #define AFE_SECURE_MASK_CONN8		(0x0fb0)
712 #define AFE_SECURE_MASK_CONN9		(0x0fb4)
713 #define AFE_SECURE_MASK_CONN10		(0x0fb8)
714 #define AFE_SECURE_MASK_CONN11		(0x0fbc)
715 #define AFE_SECURE_MASK_CONN12		(0x0fc0)
716 #define AFE_SECURE_MASK_CONN13		(0x0fc4)
717 #define AFE_SECURE_MASK_CONN14		(0x0fc8)
718 #define AFE_SECURE_MASK_CONN15		(0x0fcc)
719 #define AFE_SECURE_MASK_CONN16		(0x0fd0)
720 #define AFE_SECURE_MASK_CONN17		(0x0fd4)
721 #define AFE_SECURE_MASK_CONN18		(0x0fd8)
722 #define AFE_SECURE_MASK_CONN19		(0x0fdc)
723 #define AFE_SECURE_MASK_CONN20		(0x0fe0)
724 #define AFE_SECURE_MASK_CONN21		(0x0fe4)
725 #define AFE_SECURE_MASK_CONN22		(0x0fe8)
726 #define AFE_SECURE_MASK_CONN23		(0x0fec)
727 #define AFE_SECURE_MASK_CONN24		(0x0ff0)
728 #define AFE_SECURE_MASK_CONN25		(0x0ff4)
729 #define AFE_SECURE_MASK_CONN26		(0x0ff8)
730 #define AFE_SECURE_MASK_CONN27		(0x0ffc)
731 
732 #define MAX_REGISTER			AFE_SECURE_MASK_CONN27
733 
734 #define AFE_IRQ_STATUS_BITS		0x3ff
735 
736 /* AUDIO_TOP_CON0 (0x0000) */
737 #define AUD_TCON0_PDN_TML		BIT(27)
738 #define AUD_TCON0_PDN_DAC_PREDIS	BIT(26)
739 #define AUD_TCON0_PDN_DAC		BIT(25)
740 #define AUD_TCON0_PDN_ADC		BIT(24)
741 #define AUD_TCON0_PDN_TDM_IN		BIT(23)
742 #define AUD_TCON0_PDN_TDM_OUT		BIT(22)
743 #define AUD_TCON0_PDN_SPDIF		BIT(21)
744 #define AUD_TCON0_PDN_APLL_TUNER	BIT(19)
745 #define AUD_TCON0_PDN_APLL2_TUNER	BIT(18)
746 #define AUD_TCON0_PDN_INTDIR		BIT(15)
747 #define AUD_TCON0_PDN_24M		BIT(9)
748 #define AUD_TCON0_PDN_22M		BIT(8)
749 #define AUD_TCON0_PDN_I2S_IN		BIT(6)
750 #define AUD_TCON0_PDN_AFE		BIT(2)
751 
752 /* AUDIO_TOP_CON1 (0x0004) */
753 #define AUD_TCON1_PDN_TDM_ASRC		BIT(15)
754 #define AUD_TCON1_PDN_GENERAL2_ASRC	BIT(14)
755 #define AUD_TCON1_PDN_GENERAL1_ASRC	BIT(13)
756 #define AUD_TCON1_PDN_CONNSYS_I2S_ASRC	BIT(12)
757 #define AUD_TCON1_PDN_DMIC3_ADC		BIT(11)
758 #define AUD_TCON1_PDN_DMIC2_ADC		BIT(10)
759 #define AUD_TCON1_PDN_DMIC1_ADC		BIT(9)
760 #define AUD_TCON1_PDN_DMIC0_ADC		BIT(8)
761 #define AUD_TCON1_PDN_I2S4_BCLK		BIT(7)
762 #define AUD_TCON1_PDN_I2S3_BCLK		BIT(6)
763 #define AUD_TCON1_PDN_I2S2_BCLK		BIT(5)
764 #define AUD_TCON1_PDN_I2S1_BCLK		BIT(4)
765 
766 /* AUDIO_TOP_CON3 (0x000C) */
767 #define AUD_TCON3_HDMI_BCK_INV		BIT(3)
768 
769 /* AFE_I2S_CON (0x0018) */
770 #define AFE_I2S_CON_PHASE_SHIFT_FIX	BIT(31)
771 #define AFE_I2S_CON_FROM_IO_MUX		BIT(28)
772 #define AFE_I2S_CON_LOW_JITTER_CLK	BIT(12)
773 #define AFE_I2S_CON_RATE_MASK		GENMASK(11, 8)
774 #define AFE_I2S_CON_FORMAT_I2S		BIT(3)
775 #define AFE_I2S_CON_SRC_SLAVE		BIT(2)
776 
777 /* AFE_ASRC_2CH_CON0 */
778 #define ONE_HEART	BIT(31)
779 #define CHSET_STR_CLR	BIT(4)
780 #define COEFF_SRAM_CTRL	BIT(1)
781 #define ASM_ON		BIT(0)
782 
783 /* CON2 */
784 #define O16BIT		BIT(19)
785 #define CLR_IIR_HISTORY	BIT(17)
786 #define IS_MONO		BIT(16)
787 #define IIR_EN		BIT(11)
788 #define IIR_STAGE_MASK	GENMASK(10, 8)
789 
790 /* CON5 */
791 #define CALI_CYCLE_MASK	GENMASK(31, 16)
792 #define CALI_64_CYCLE	FIELD_PREP(CALI_CYCLE_MASK, 0x3F)
793 #define CALI_96_CYCLE	FIELD_PREP(CALI_CYCLE_MASK, 0x5F)
794 #define CALI_441_CYCLE	FIELD_PREP(CALI_CYCLE_MASK, 0x1B8)
795 
796 #define CALI_AUTORST	BIT(15)
797 #define AUTO_TUNE_FREQ5	BIT(12)
798 #define COMP_FREQ_RES	BIT(11)
799 
800 #define CALI_SEL_MASK	GENMASK(9, 8)
801 #define CALI_SEL_00	FIELD_PREP(CALI_SEL_MASK, 0)
802 #define CALI_SEL_01	FIELD_PREP(CALI_SEL_MASK, 1)
803 
804 #define CALI_BP_DGL		BIT(7) /* Bypass the deglitch circuit */
805 #define AUTO_TUNE_FREQ4		BIT(3)
806 #define CALI_AUTO_RESTART	BIT(2)
807 #define CALI_USE_FREQ_OUT	BIT(1)
808 #define CALI_ON			BIT(0)
809 
810 #define AFE_I2S_CON_WLEN_32BIT		BIT(1)
811 #define AFE_I2S_CON_EN			BIT(0)
812 
813 #define AFE_CONN3_I03_O03_S		BIT(3)
814 #define AFE_CONN4_I04_O04_S		BIT(4)
815 #define AFE_CONN4_I03_O04_S		BIT(3)
816 
817 /* AFE_I2S_CON1 (0x0034) */
818 #define AFE_I2S_CON1_I2S2_TO_PAD	BIT(18)
819 #define AFE_I2S_CON1_TDMOUT_TO_PAD	(0 << 18)
820 #define AFE_I2S_CON1_RATE		GENMASK(11, 8)
821 #define AFE_I2S_CON1_FORMAT_I2S		BIT(3)
822 #define AFE_I2S_CON1_WLEN_32BIT		BIT(1)
823 #define AFE_I2S_CON1_EN			BIT(0)
824 
825 /* AFE_I2S_CON2 (0x0038) */
826 #define AFE_I2S_CON2_LOW_JITTER_CLK	BIT(12)
827 #define AFE_I2S_CON2_RATE		GENMASK(11, 8)
828 #define AFE_I2S_CON2_FORMAT_I2S		BIT(3)
829 #define AFE_I2S_CON2_WLEN_32BIT		BIT(1)
830 #define AFE_I2S_CON2_EN			BIT(0)
831 
832 /* AFE_I2S_CON3 (0x004C) */
833 #define AFE_I2S_CON3_LOW_JITTER_CLK	BIT(12)
834 #define AFE_I2S_CON3_RATE		GENMASK(11, 8)
835 #define AFE_I2S_CON3_FORMAT_I2S		BIT(3)
836 #define AFE_I2S_CON3_WLEN_32BIT		BIT(1)
837 #define AFE_I2S_CON3_EN			BIT(0)
838 
839 /* AFE_ADDA_DL_SRC2_CON0 (0x0108) */
840 #define AFE_ADDA_DL_SAMPLING_RATE	GENMASK(31, 28)
841 #define AFE_ADDA_DL_8X_UPSAMPLE		GENMASK(25, 24)
842 #define AFE_ADDA_DL_MUTE_OFF_CH1	BIT(12)
843 #define AFE_ADDA_DL_MUTE_OFF_CH2	BIT(11)
844 #define AFE_ADDA_DL_VOICE_DATA		BIT(5)
845 #define AFE_ADDA_DL_DEGRADE_GAIN	BIT(1)
846 
847 /* AFE_ADDA_UL_SRC_CON0 (0x0114) */
848 #define AFE_ADDA_UL_SAMPLING_RATE	GENMASK(19, 17)
849 
850 /* AFE_ADDA_UL_DL_CON0 */
851 #define AFE_ADDA_UL_DL_ADDA_AFE_ON	BIT(0)
852 #define AFE_ADDA_UL_DL_DMIC_CLKDIV_ON	BIT(1)
853 
854 /* AFE_APLL_TUNER_CFG (0x03f0) */
855 #define AFE_APLL_TUNER_CFG_MASK		GENMASK(15, 1)
856 #define AFE_APLL_TUNER_CFG_EN_MASK	BIT(0)
857 
858 /* AFE_APLL_TUNER_CFG1 (0x03f4) */
859 #define AFE_APLL_TUNER_CFG1_MASK	GENMASK(15, 1)
860 #define AFE_APLL_TUNER_CFG1_EN_MASK	BIT(0)
861 
862 /* PCM_INTF_CON1 (0x0550) */
863 #define PCM_INTF_CON1_EXT_MODEM		BIT(17)
864 #define PCM_INTF_CON1_16BIT		(0 << 16)
865 #define PCM_INTF_CON1_24BIT		BIT(16)
866 #define PCM_INTF_CON1_32BCK		(0 << 14)
867 #define PCM_INTF_CON1_64BCK		BIT(14)
868 #define PCM_INTF_CON1_MASTER_MODE	(0 << 5)
869 #define PCM_INTF_CON1_SLAVE_MODE	BIT(5)
870 #define PCM_INTF_CON1_FS_MASK		GENMASK(4, 3)
871 #define PCM_INTF_CON1_FS_8K		FIELD_PREP(PCM_INTF_CON1_FS_MASK, 0)
872 #define PCM_INTF_CON1_FS_16K		FIELD_PREP(PCM_INTF_CON1_FS_MASK, 1)
873 #define PCM_INTF_CON1_FS_32K		FIELD_PREP(PCM_INTF_CON1_FS_MASK, 2)
874 #define PCM_INTF_CON1_FS_48K		FIELD_PREP(PCM_INTF_CON1_FS_MASK, 3)
875 #define PCM_INTF_CON1_SYNC_LEN_MASK	GENMASK(13, 9)
876 #define PCM_INTF_CON1_SYNC_LEN(x)	FIELD_PREP(PCM_INTF_CON1_SYNC_LEN_MASK, ((x) - 1))
877 #define PCM_INTF_CON1_FORMAT_MASK	GENMASK(2, 1)
878 #define PCM_INTF_CON1_SYNC_OUT_INV	BIT(23)
879 #define PCM_INTF_CON1_BCLK_OUT_INV	BIT(22)
880 #define PCM_INTF_CON1_SYNC_IN_INV	BIT(21)
881 #define PCM_INTF_CON1_BCLK_IN_INV	BIT(20)
882 #define PCM_INTF_CON1_BYPASS_ASRC	BIT(6)
883 #define PCM_INTF_CON1_EN		BIT(0)
884 #define PCM_INTF_CON1_CONFIG_MASK	(0xf3fffe)
885 
886 /* AFE_DMIC0_UL_SRC_CON0 (0x05b4)
887  * AFE_DMIC1_UL_SRC_CON0 (0x0620)
888  * AFE_DMIC2_UL_SRC_CON0 (0x0780)
889  * AFE_DMIC3_UL_SRC_CON0 (0x07ec)
890  */
891 #define DMIC_TOP_CON_CK_PHASE_SEL_CH1		GENMASK(29, 27)
892 #define DMIC_TOP_CON_CK_PHASE_SEL_CH2		GENMASK(26, 24)
893 #define DMIC_TOP_CON_TWO_WIRE_MODE		BIT(23)
894 #define DMIC_TOP_CON_CH2_ON			BIT(22)
895 #define DMIC_TOP_CON_CH1_ON			BIT(21)
896 #define DMIC_TOP_CON_VOICE_MODE_MASK		GENMASK(19, 17)
897 #define DMIC_TOP_CON_VOICE_MODE_8K		FIELD_PREP(DMIC_TOP_CON_VOICE_MODE_MASK, 0)
898 #define DMIC_TOP_CON_VOICE_MODE_16K		FIELD_PREP(DMIC_TOP_CON_VOICE_MODE_MASK, 1)
899 #define DMIC_TOP_CON_VOICE_MODE_32K		FIELD_PREP(DMIC_TOP_CON_VOICE_MODE_MASK, 2)
900 #define DMIC_TOP_CON_VOICE_MODE_48K		FIELD_PREP(DMIC_TOP_CON_VOICE_MODE_MASK, 3)
901 #define DMIC_TOP_CON_LOW_POWER_MODE_MASK	GENMASK(15, 14)
902 #define DMIC_TOP_CON_LOW_POWER_MODE(x)		FIELD_PREP(DMIC_TOP_CON_LOW_POWER_MODE_MASK, (x))
903 #define DMIC_TOP_CON_IIR_ON			BIT(10)
904 #define DMIC_TOP_CON_IIR_MODE			GENMASK(9, 7)
905 #define DMIC_TOP_CON_INPUT_MODE			BIT(5)
906 #define DMIC_TOP_CON_SDM3_LEVEL_MODE		BIT(1)
907 #define DMIC_TOP_CON_SRC_ON			BIT(0)
908 #define DMIC_TOP_CON_SDM3_DE_SELECT		(0 << 1)
909 #define DMIC_TOP_CON_CONFIG_MASK		(0x3f8ed7a6)
910 
911 /* AFE_CONN_24BIT (0x0AA4) */
912 #define AFE_CONN_24BIT_O10		BIT(10)
913 #define AFE_CONN_24BIT_O09		BIT(9)
914 #define AFE_CONN_24BIT_O06		BIT(6)
915 #define AFE_CONN_24BIT_O05		BIT(5)
916 #define AFE_CONN_24BIT_O04		BIT(4)
917 #define AFE_CONN_24BIT_O03		BIT(3)
918 #define AFE_CONN_24BIT_O02		BIT(2)
919 #define AFE_CONN_24BIT_O01		BIT(1)
920 #define AFE_CONN_24BIT_O00		BIT(0)
921 
922 /* AFE_HD_ENGEN_ENABLE */
923 #define AFE_22M_PLL_EN		BIT(0)
924 #define AFE_24M_PLL_EN		BIT(1)
925 
926 /* AFE_GAIN1_CON0 (0x0410) */
927 #define AFE_GAIN1_CON0_EN_MASK			GENMASK(0, 0)
928 #define AFE_GAIN1_CON0_MODE_MASK		GENMASK(7, 4)
929 #define AFE_GAIN1_CON0_SAMPLE_PER_STEP_MASK	GENMASK(15, 8)
930 
931 /* AFE_GAIN1_CON1 (0x0414) */
932 #define AFE_GAIN1_CON1_MASK		GENMASK(19, 0)
933 
934 /* AFE_GAIN1_CUR (0x0B78) */
935 #define AFE_GAIN1_CUR_MASK		GENMASK(19, 0)
936 
937 /* AFE_CM1_CON0 (0x0e50) */
938 /* AFE_CM2_CON0 (0x0e60) */
939 #define CM_AFE_CM_CH_NUM_MASK		GENMASK(3, 0)
940 #define CM_AFE_CM_CH_NUM(x)		FIELD_PREP(CM_AFE_CM_CH_NUM_MASK, ((x) - 1))
941 #define CM_AFE_CM_ON			BIT(4)
942 #define CM_AFE_CM_START_DATA_MASK	GENMASK(11, 8)
943 
944 #define CM_AFE_CM1_VUL_SEL		BIT(12)
945 #define CM_AFE_CM1_IN_MODE_MASK		GENMASK(19, 16)
946 #define CM_AFE_CM2_TDM_SEL		BIT(12)
947 #define CM_AFE_CM2_CLK_SEL		BIT(13)
948 #define CM_AFE_CM2_GASRC1_OUT_SEL	BIT(17)
949 #define CM_AFE_CM2_GASRC2_OUT_SEL	BIT(16)
950 
951 /* AFE_CM2_CONN* */
952 #define CM2_AFE_CM2_CONN_CFG1(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG1_MASK, (x))
953 #define CM2_AFE_CM2_CONN_CFG1_MASK	GENMASK(4, 0)
954 #define CM2_AFE_CM2_CONN_CFG2(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG2_MASK, (x))
955 #define CM2_AFE_CM2_CONN_CFG2_MASK	GENMASK(9, 5)
956 #define CM2_AFE_CM2_CONN_CFG3(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG3_MASK, (x))
957 #define CM2_AFE_CM2_CONN_CFG3_MASK	GENMASK(14, 10)
958 #define CM2_AFE_CM2_CONN_CFG4(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG4_MASK, (x))
959 #define CM2_AFE_CM2_CONN_CFG4_MASK	GENMASK(19, 15)
960 #define CM2_AFE_CM2_CONN_CFG5(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG5_MASK, (x))
961 #define CM2_AFE_CM2_CONN_CFG5_MASK	GENMASK(24, 20)
962 #define CM2_AFE_CM2_CONN_CFG6(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG6_MASK, (x))
963 #define CM2_AFE_CM2_CONN_CFG6_MASK	GENMASK(29, 25)
964 #define CM2_AFE_CM2_CONN_CFG7(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG7_MASK, (x))
965 #define CM2_AFE_CM2_CONN_CFG7_MASK	GENMASK(4, 0)
966 #define CM2_AFE_CM2_CONN_CFG8(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG8_MASK, (x))
967 #define CM2_AFE_CM2_CONN_CFG8_MASK	GENMASK(9, 5)
968 #define CM2_AFE_CM2_CONN_CFG9(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG9_MASK, (x))
969 #define CM2_AFE_CM2_CONN_CFG9_MASK	GENMASK(14, 10)
970 #define CM2_AFE_CM2_CONN_CFG10(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG10_MASK, (x))
971 #define CM2_AFE_CM2_CONN_CFG10_MASK	GENMASK(19, 15)
972 #define CM2_AFE_CM2_CONN_CFG11(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG11_MASK, (x))
973 #define CM2_AFE_CM2_CONN_CFG11_MASK	GENMASK(24, 20)
974 #define CM2_AFE_CM2_CONN_CFG12(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG12_MASK, (x))
975 #define CM2_AFE_CM2_CONN_CFG12_MASK	GENMASK(29, 25)
976 #define CM2_AFE_CM2_CONN_CFG13(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG13_MASK, (x))
977 #define CM2_AFE_CM2_CONN_CFG13_MASK	GENMASK(4, 0)
978 #define CM2_AFE_CM2_CONN_CFG14(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG14_MASK, (x))
979 #define CM2_AFE_CM2_CONN_CFG14_MASK	GENMASK(9, 5)
980 #define CM2_AFE_CM2_CONN_CFG15(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG15_MASK, (x))
981 #define CM2_AFE_CM2_CONN_CFG15_MASK	GENMASK(14, 10)
982 #define CM2_AFE_CM2_CONN_CFG16(x)	FIELD_PREP(CM2_AFE_CM2_CONN_CFG16_MASK, (x))
983 #define CM2_AFE_CM2_CONN_CFG16_MASK	GENMASK(19, 15)
984 
985 /* AFE_CM1_CON* */
986 #define CM_AFE_CM_UPDATE_CNT1_MASK	GENMASK(15, 0)
987 #define CM_AFE_CM_UPDATE_CNT1(x)	FIELD_PREP(CM_AFE_CM_UPDATE_CNT1_MASK, (x))
988 #define CM_AFE_CM_UPDATE_CNT2_MASK	GENMASK(31, 16)
989 #define CM_AFE_CM_UPDATE_CNT2(x)	FIELD_PREP(CM_AFE_CM_UPDATE_CNT2_MASK, (x))
990 
991 #endif
992