18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * mt8183-reg.h -- Mediatek 8183 audio driver reg definition 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2018 MediaTek Inc. 68c2ecf20Sopenharmony_ci * Author: KaiChieh Chuang <kaichieh.chuang@mediatek.com> 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef _MT8183_REG_H_ 108c2ecf20Sopenharmony_ci#define _MT8183_REG_H_ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define AUDIO_TOP_CON0 0x0000 138c2ecf20Sopenharmony_ci#define AUDIO_TOP_CON1 0x0004 148c2ecf20Sopenharmony_ci#define AUDIO_TOP_CON3 0x000c 158c2ecf20Sopenharmony_ci#define AFE_DAC_CON0 0x0010 168c2ecf20Sopenharmony_ci#define AFE_DAC_CON1 0x0014 178c2ecf20Sopenharmony_ci#define AFE_I2S_CON 0x0018 188c2ecf20Sopenharmony_ci#define AFE_DAIBT_CON0 0x001c 198c2ecf20Sopenharmony_ci#define AFE_CONN0 0x0020 208c2ecf20Sopenharmony_ci#define AFE_CONN1 0x0024 218c2ecf20Sopenharmony_ci#define AFE_CONN2 0x0028 228c2ecf20Sopenharmony_ci#define AFE_CONN3 0x002c 238c2ecf20Sopenharmony_ci#define AFE_CONN4 0x0030 248c2ecf20Sopenharmony_ci#define AFE_I2S_CON1 0x0034 258c2ecf20Sopenharmony_ci#define AFE_I2S_CON2 0x0038 268c2ecf20Sopenharmony_ci#define AFE_MRGIF_CON 0x003c 278c2ecf20Sopenharmony_ci#define AFE_DL1_BASE 0x0040 288c2ecf20Sopenharmony_ci#define AFE_DL1_CUR 0x0044 298c2ecf20Sopenharmony_ci#define AFE_DL1_END 0x0048 308c2ecf20Sopenharmony_ci#define AFE_I2S_CON3 0x004c 318c2ecf20Sopenharmony_ci#define AFE_DL2_BASE 0x0050 328c2ecf20Sopenharmony_ci#define AFE_DL2_CUR 0x0054 338c2ecf20Sopenharmony_ci#define AFE_DL2_END 0x0058 348c2ecf20Sopenharmony_ci#define AFE_CONN5 0x005c 358c2ecf20Sopenharmony_ci#define AFE_CONN_24BIT 0x006c 368c2ecf20Sopenharmony_ci#define AFE_AWB_BASE 0x0070 378c2ecf20Sopenharmony_ci#define AFE_AWB_END 0x0078 388c2ecf20Sopenharmony_ci#define AFE_AWB_CUR 0x007c 398c2ecf20Sopenharmony_ci#define AFE_VUL_BASE 0x0080 408c2ecf20Sopenharmony_ci#define AFE_VUL_END 0x0088 418c2ecf20Sopenharmony_ci#define AFE_VUL_CUR 0x008c 428c2ecf20Sopenharmony_ci#define AFE_CONN6 0x00bc 438c2ecf20Sopenharmony_ci#define AFE_MEMIF_MSB 0x00cc 448c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON0 0x00d0 458c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON1 0x00d4 468c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON2 0x00d8 478c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON3 0x00dc 488c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON4 0x00e0 498c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON5 0x00e4 508c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON6 0x00e8 518c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON7 0x00ec 528c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON8 0x00f0 538c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON9 0x00f4 548c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_SRC2_CON0 0x0108 558c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_SRC2_CON1 0x010c 568c2ecf20Sopenharmony_ci#define AFE_ADDA_UL_SRC_CON0 0x0114 578c2ecf20Sopenharmony_ci#define AFE_ADDA_UL_SRC_CON1 0x0118 588c2ecf20Sopenharmony_ci#define AFE_ADDA_TOP_CON0 0x0120 598c2ecf20Sopenharmony_ci#define AFE_ADDA_UL_DL_CON0 0x0124 608c2ecf20Sopenharmony_ci#define AFE_ADDA_SRC_DEBUG 0x012c 618c2ecf20Sopenharmony_ci#define AFE_ADDA_SRC_DEBUG_MON0 0x0130 628c2ecf20Sopenharmony_ci#define AFE_ADDA_SRC_DEBUG_MON1 0x0134 638c2ecf20Sopenharmony_ci#define AFE_ADDA_UL_SRC_MON0 0x0148 648c2ecf20Sopenharmony_ci#define AFE_ADDA_UL_SRC_MON1 0x014c 658c2ecf20Sopenharmony_ci#define AFE_SIDETONE_DEBUG 0x01d0 668c2ecf20Sopenharmony_ci#define AFE_SIDETONE_MON 0x01d4 678c2ecf20Sopenharmony_ci#define AFE_SINEGEN_CON2 0x01dc 688c2ecf20Sopenharmony_ci#define AFE_SIDETONE_CON0 0x01e0 698c2ecf20Sopenharmony_ci#define AFE_SIDETONE_COEFF 0x01e4 708c2ecf20Sopenharmony_ci#define AFE_SIDETONE_CON1 0x01e8 718c2ecf20Sopenharmony_ci#define AFE_SIDETONE_GAIN 0x01ec 728c2ecf20Sopenharmony_ci#define AFE_SINEGEN_CON0 0x01f0 738c2ecf20Sopenharmony_ci#define AFE_TOP_CON0 0x0200 748c2ecf20Sopenharmony_ci#define AFE_BUS_CFG 0x0240 758c2ecf20Sopenharmony_ci#define AFE_BUS_MON0 0x0244 768c2ecf20Sopenharmony_ci#define AFE_ADDA_PREDIS_CON0 0x0260 778c2ecf20Sopenharmony_ci#define AFE_ADDA_PREDIS_CON1 0x0264 788c2ecf20Sopenharmony_ci#define AFE_MRGIF_MON0 0x0270 798c2ecf20Sopenharmony_ci#define AFE_MRGIF_MON1 0x0274 808c2ecf20Sopenharmony_ci#define AFE_MRGIF_MON2 0x0278 818c2ecf20Sopenharmony_ci#define AFE_I2S_MON 0x027c 828c2ecf20Sopenharmony_ci#define AFE_ADDA_IIR_COEF_02_01 0x0290 838c2ecf20Sopenharmony_ci#define AFE_ADDA_IIR_COEF_04_03 0x0294 848c2ecf20Sopenharmony_ci#define AFE_ADDA_IIR_COEF_06_05 0x0298 858c2ecf20Sopenharmony_ci#define AFE_ADDA_IIR_COEF_08_07 0x029c 868c2ecf20Sopenharmony_ci#define AFE_ADDA_IIR_COEF_10_09 0x02a0 878c2ecf20Sopenharmony_ci#define AFE_DAC_CON2 0x02e0 888c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CON1 0x02e4 898c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CON2 0x02e8 908c2ecf20Sopenharmony_ci#define AFE_DAC_MON 0x02ec 918c2ecf20Sopenharmony_ci#define AFE_VUL2_BASE 0x02f0 928c2ecf20Sopenharmony_ci#define AFE_VUL2_END 0x02f8 938c2ecf20Sopenharmony_ci#define AFE_VUL2_CUR 0x02fc 948c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT0 0x0300 958c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT6 0x0304 968c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT8 0x0308 978c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_EN1 0x030c 988c2ecf20Sopenharmony_ci#define AFE_IRQ0_MCU_CNT_MON 0x0310 998c2ecf20Sopenharmony_ci#define AFE_IRQ6_MCU_CNT_MON 0x0314 1008c2ecf20Sopenharmony_ci#define AFE_MOD_DAI_BASE 0x0330 1018c2ecf20Sopenharmony_ci#define AFE_MOD_DAI_END 0x0338 1028c2ecf20Sopenharmony_ci#define AFE_MOD_DAI_CUR 0x033c 1038c2ecf20Sopenharmony_ci#define AFE_VUL_D2_BASE 0x0350 1048c2ecf20Sopenharmony_ci#define AFE_VUL_D2_END 0x0358 1058c2ecf20Sopenharmony_ci#define AFE_VUL_D2_CUR 0x035c 1068c2ecf20Sopenharmony_ci#define AFE_DL3_BASE 0x0360 1078c2ecf20Sopenharmony_ci#define AFE_DL3_CUR 0x0364 1088c2ecf20Sopenharmony_ci#define AFE_DL3_END 0x0368 1098c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_CON0 0x0370 1108c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_BASE 0x0374 1118c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_CUR 0x0378 1128c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_END 0x037c 1138c2ecf20Sopenharmony_ci#define AFE_HDMI_CONN0 0x0390 1148c2ecf20Sopenharmony_ci#define AFE_IRQ3_MCU_CNT_MON 0x0398 1158c2ecf20Sopenharmony_ci#define AFE_IRQ4_MCU_CNT_MON 0x039c 1168c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CON0 0x03a0 1178c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_STATUS 0x03a4 1188c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CLR 0x03a8 1198c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT1 0x03ac 1208c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT2 0x03b0 1218c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_EN 0x03b4 1228c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_MON2 0x03b8 1238c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT5 0x03bc 1248c2ecf20Sopenharmony_ci#define AFE_IRQ1_MCU_CNT_MON 0x03c0 1258c2ecf20Sopenharmony_ci#define AFE_IRQ2_MCU_CNT_MON 0x03c4 1268c2ecf20Sopenharmony_ci#define AFE_IRQ1_MCU_EN_CNT_MON 0x03c8 1278c2ecf20Sopenharmony_ci#define AFE_IRQ5_MCU_CNT_MON 0x03cc 1288c2ecf20Sopenharmony_ci#define AFE_MEMIF_MINLEN 0x03d0 1298c2ecf20Sopenharmony_ci#define AFE_MEMIF_MAXLEN 0x03d4 1308c2ecf20Sopenharmony_ci#define AFE_MEMIF_PBUF_SIZE 0x03d8 1318c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT7 0x03dc 1328c2ecf20Sopenharmony_ci#define AFE_IRQ7_MCU_CNT_MON 0x03e0 1338c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT3 0x03e4 1348c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT4 0x03e8 1358c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT11 0x03ec 1368c2ecf20Sopenharmony_ci#define AFE_APLL1_TUNER_CFG 0x03f0 1378c2ecf20Sopenharmony_ci#define AFE_APLL2_TUNER_CFG 0x03f4 1388c2ecf20Sopenharmony_ci#define AFE_MEMIF_HD_MODE 0x03f8 1398c2ecf20Sopenharmony_ci#define AFE_MEMIF_HDALIGN 0x03fc 1408c2ecf20Sopenharmony_ci#define AFE_CONN33 0x0408 1418c2ecf20Sopenharmony_ci#define AFE_IRQ_MCU_CNT12 0x040c 1428c2ecf20Sopenharmony_ci#define AFE_GAIN1_CON0 0x0410 1438c2ecf20Sopenharmony_ci#define AFE_GAIN1_CON1 0x0414 1448c2ecf20Sopenharmony_ci#define AFE_GAIN1_CON2 0x0418 1458c2ecf20Sopenharmony_ci#define AFE_GAIN1_CON3 0x041c 1468c2ecf20Sopenharmony_ci#define AFE_CONN7 0x0420 1478c2ecf20Sopenharmony_ci#define AFE_GAIN1_CUR 0x0424 1488c2ecf20Sopenharmony_ci#define AFE_GAIN2_CON0 0x0428 1498c2ecf20Sopenharmony_ci#define AFE_GAIN2_CON1 0x042c 1508c2ecf20Sopenharmony_ci#define AFE_GAIN2_CON2 0x0430 1518c2ecf20Sopenharmony_ci#define AFE_GAIN2_CON3 0x0434 1528c2ecf20Sopenharmony_ci#define AFE_CONN8 0x0438 1538c2ecf20Sopenharmony_ci#define AFE_GAIN2_CUR 0x043c 1548c2ecf20Sopenharmony_ci#define AFE_CONN9 0x0440 1558c2ecf20Sopenharmony_ci#define AFE_CONN10 0x0444 1568c2ecf20Sopenharmony_ci#define AFE_CONN11 0x0448 1578c2ecf20Sopenharmony_ci#define AFE_CONN12 0x044c 1588c2ecf20Sopenharmony_ci#define AFE_CONN13 0x0450 1598c2ecf20Sopenharmony_ci#define AFE_CONN14 0x0454 1608c2ecf20Sopenharmony_ci#define AFE_CONN15 0x0458 1618c2ecf20Sopenharmony_ci#define AFE_CONN16 0x045c 1628c2ecf20Sopenharmony_ci#define AFE_CONN17 0x0460 1638c2ecf20Sopenharmony_ci#define AFE_CONN18 0x0464 1648c2ecf20Sopenharmony_ci#define AFE_CONN19 0x0468 1658c2ecf20Sopenharmony_ci#define AFE_CONN20 0x046c 1668c2ecf20Sopenharmony_ci#define AFE_CONN21 0x0470 1678c2ecf20Sopenharmony_ci#define AFE_CONN22 0x0474 1688c2ecf20Sopenharmony_ci#define AFE_CONN23 0x0478 1698c2ecf20Sopenharmony_ci#define AFE_CONN24 0x047c 1708c2ecf20Sopenharmony_ci#define AFE_CONN_RS 0x0494 1718c2ecf20Sopenharmony_ci#define AFE_CONN_DI 0x0498 1728c2ecf20Sopenharmony_ci#define AFE_CONN25 0x04b0 1738c2ecf20Sopenharmony_ci#define AFE_CONN26 0x04b4 1748c2ecf20Sopenharmony_ci#define AFE_CONN27 0x04b8 1758c2ecf20Sopenharmony_ci#define AFE_CONN28 0x04bc 1768c2ecf20Sopenharmony_ci#define AFE_CONN29 0x04c0 1778c2ecf20Sopenharmony_ci#define AFE_CONN30 0x04c4 1788c2ecf20Sopenharmony_ci#define AFE_CONN31 0x04c8 1798c2ecf20Sopenharmony_ci#define AFE_CONN32 0x04cc 1808c2ecf20Sopenharmony_ci#define AFE_SRAM_DELSEL_CON0 0x04f0 1818c2ecf20Sopenharmony_ci#define AFE_SRAM_DELSEL_CON2 0x04f8 1828c2ecf20Sopenharmony_ci#define AFE_SRAM_DELSEL_CON3 0x04fc 1838c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON12 0x0528 1848c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON13 0x052c 1858c2ecf20Sopenharmony_ci#define PCM_INTF_CON1 0x0530 1868c2ecf20Sopenharmony_ci#define PCM_INTF_CON2 0x0538 1878c2ecf20Sopenharmony_ci#define PCM2_INTF_CON 0x053c 1888c2ecf20Sopenharmony_ci#define AFE_TDM_CON1 0x0548 1898c2ecf20Sopenharmony_ci#define AFE_TDM_CON2 0x054c 1908c2ecf20Sopenharmony_ci#define AFE_CONN34 0x0580 1918c2ecf20Sopenharmony_ci#define FPGA_CFG0 0x05b0 1928c2ecf20Sopenharmony_ci#define FPGA_CFG1 0x05b4 1938c2ecf20Sopenharmony_ci#define FPGA_CFG2 0x05c0 1948c2ecf20Sopenharmony_ci#define FPGA_CFG3 0x05c4 1958c2ecf20Sopenharmony_ci#define AUDIO_TOP_DBG_CON 0x05c8 1968c2ecf20Sopenharmony_ci#define AUDIO_TOP_DBG_MON0 0x05cc 1978c2ecf20Sopenharmony_ci#define AUDIO_TOP_DBG_MON1 0x05d0 1988c2ecf20Sopenharmony_ci#define AFE_IRQ8_MCU_CNT_MON 0x05e4 1998c2ecf20Sopenharmony_ci#define AFE_IRQ11_MCU_CNT_MON 0x05e8 2008c2ecf20Sopenharmony_ci#define AFE_IRQ12_MCU_CNT_MON 0x05ec 2018c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG0 0x0800 2028c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG1 0x0804 2038c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG2 0x0808 2048c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG3 0x080c 2058c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG4 0x0810 2068c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG5 0x0814 2078c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG6 0x0818 2088c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG7 0x081c 2098c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG8 0x0820 2108c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG9 0x0824 2118c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG10 0x0828 2128c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG11 0x082c 2138c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG12 0x0830 2148c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG13 0x0834 2158c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG14 0x0838 2168c2ecf20Sopenharmony_ci#define AFE_GENERAL_REG15 0x083c 2178c2ecf20Sopenharmony_ci#define AFE_CBIP_CFG0 0x0840 2188c2ecf20Sopenharmony_ci#define AFE_CBIP_MON0 0x0844 2198c2ecf20Sopenharmony_ci#define AFE_CBIP_SLV_MUX_MON0 0x0848 2208c2ecf20Sopenharmony_ci#define AFE_CBIP_SLV_DECODER_MON0 0x084c 2218c2ecf20Sopenharmony_ci#define AFE_CONN0_1 0x0900 2228c2ecf20Sopenharmony_ci#define AFE_CONN1_1 0x0904 2238c2ecf20Sopenharmony_ci#define AFE_CONN2_1 0x0908 2248c2ecf20Sopenharmony_ci#define AFE_CONN3_1 0x090c 2258c2ecf20Sopenharmony_ci#define AFE_CONN4_1 0x0910 2268c2ecf20Sopenharmony_ci#define AFE_CONN5_1 0x0914 2278c2ecf20Sopenharmony_ci#define AFE_CONN6_1 0x0918 2288c2ecf20Sopenharmony_ci#define AFE_CONN7_1 0x091c 2298c2ecf20Sopenharmony_ci#define AFE_CONN8_1 0x0920 2308c2ecf20Sopenharmony_ci#define AFE_CONN9_1 0x0924 2318c2ecf20Sopenharmony_ci#define AFE_CONN10_1 0x0928 2328c2ecf20Sopenharmony_ci#define AFE_CONN11_1 0x092c 2338c2ecf20Sopenharmony_ci#define AFE_CONN12_1 0x0930 2348c2ecf20Sopenharmony_ci#define AFE_CONN13_1 0x0934 2358c2ecf20Sopenharmony_ci#define AFE_CONN14_1 0x0938 2368c2ecf20Sopenharmony_ci#define AFE_CONN15_1 0x093c 2378c2ecf20Sopenharmony_ci#define AFE_CONN16_1 0x0940 2388c2ecf20Sopenharmony_ci#define AFE_CONN17_1 0x0944 2398c2ecf20Sopenharmony_ci#define AFE_CONN18_1 0x0948 2408c2ecf20Sopenharmony_ci#define AFE_CONN19_1 0x094c 2418c2ecf20Sopenharmony_ci#define AFE_CONN20_1 0x0950 2428c2ecf20Sopenharmony_ci#define AFE_CONN21_1 0x0954 2438c2ecf20Sopenharmony_ci#define AFE_CONN22_1 0x0958 2448c2ecf20Sopenharmony_ci#define AFE_CONN23_1 0x095c 2458c2ecf20Sopenharmony_ci#define AFE_CONN24_1 0x0960 2468c2ecf20Sopenharmony_ci#define AFE_CONN25_1 0x0964 2478c2ecf20Sopenharmony_ci#define AFE_CONN26_1 0x0968 2488c2ecf20Sopenharmony_ci#define AFE_CONN27_1 0x096c 2498c2ecf20Sopenharmony_ci#define AFE_CONN28_1 0x0970 2508c2ecf20Sopenharmony_ci#define AFE_CONN29_1 0x0974 2518c2ecf20Sopenharmony_ci#define AFE_CONN30_1 0x0978 2528c2ecf20Sopenharmony_ci#define AFE_CONN31_1 0x097c 2538c2ecf20Sopenharmony_ci#define AFE_CONN32_1 0x0980 2548c2ecf20Sopenharmony_ci#define AFE_CONN33_1 0x0984 2558c2ecf20Sopenharmony_ci#define AFE_CONN34_1 0x0988 2568c2ecf20Sopenharmony_ci#define AFE_CONN_RS_1 0x098c 2578c2ecf20Sopenharmony_ci#define AFE_CONN_DI_1 0x0990 2588c2ecf20Sopenharmony_ci#define AFE_CONN_24BIT_1 0x0994 2598c2ecf20Sopenharmony_ci#define AFE_CONN_REG 0x0998 2608c2ecf20Sopenharmony_ci#define AFE_CONN35 0x09a0 2618c2ecf20Sopenharmony_ci#define AFE_CONN36 0x09a4 2628c2ecf20Sopenharmony_ci#define AFE_CONN37 0x09a8 2638c2ecf20Sopenharmony_ci#define AFE_CONN38 0x09ac 2648c2ecf20Sopenharmony_ci#define AFE_CONN35_1 0x09b0 2658c2ecf20Sopenharmony_ci#define AFE_CONN36_1 0x09b4 2668c2ecf20Sopenharmony_ci#define AFE_CONN37_1 0x09b8 2678c2ecf20Sopenharmony_ci#define AFE_CONN38_1 0x09bc 2688c2ecf20Sopenharmony_ci#define AFE_CONN39 0x09c0 2698c2ecf20Sopenharmony_ci#define AFE_CONN40 0x09c4 2708c2ecf20Sopenharmony_ci#define AFE_CONN41 0x09c8 2718c2ecf20Sopenharmony_ci#define AFE_CONN42 0x09cc 2728c2ecf20Sopenharmony_ci#define AFE_CONN39_1 0x09e0 2738c2ecf20Sopenharmony_ci#define AFE_CONN40_1 0x09e4 2748c2ecf20Sopenharmony_ci#define AFE_CONN41_1 0x09e8 2758c2ecf20Sopenharmony_ci#define AFE_CONN42_1 0x09ec 2768c2ecf20Sopenharmony_ci#define AFE_I2S_CON4 0x09f8 2778c2ecf20Sopenharmony_ci#define AFE_ADDA6_TOP_CON0 0x0a80 2788c2ecf20Sopenharmony_ci#define AFE_ADDA6_UL_SRC_CON0 0x0a84 2798c2ecf20Sopenharmony_ci#define AFE_ADD6_UL_SRC_CON1 0x0a88 2808c2ecf20Sopenharmony_ci#define AFE_ADDA6_SRC_DEBUG 0x0a8c 2818c2ecf20Sopenharmony_ci#define AFE_ADDA6_SRC_DEBUG_MON0 0x0a90 2828c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_02_01 0x0aa0 2838c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_04_03 0x0aa4 2848c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_06_05 0x0aa8 2858c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_08_07 0x0aac 2868c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_10_09 0x0ab0 2878c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_12_11 0x0ab4 2888c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_14_13 0x0ab8 2898c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_16_15 0x0abc 2908c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_18_17 0x0ac0 2918c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_20_19 0x0ac4 2928c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_22_21 0x0ac8 2938c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_24_23 0x0acc 2948c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_26_25 0x0ad0 2958c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_28_27 0x0ad4 2968c2ecf20Sopenharmony_ci#define AFE_ADDA6_ULCF_CFG_30_29 0x0ad8 2978c2ecf20Sopenharmony_ci#define AFE_ADD6A_UL_SRC_MON0 0x0ae4 2988c2ecf20Sopenharmony_ci#define AFE_ADDA6_UL_SRC_MON1 0x0ae8 2998c2ecf20Sopenharmony_ci#define AFE_CONN43 0x0af8 3008c2ecf20Sopenharmony_ci#define AFE_CONN43_1 0x0afc 3018c2ecf20Sopenharmony_ci#define AFE_DL1_BASE_MSB 0x0b00 3028c2ecf20Sopenharmony_ci#define AFE_DL1_CUR_MSB 0x0b04 3038c2ecf20Sopenharmony_ci#define AFE_DL1_END_MSB 0x0b08 3048c2ecf20Sopenharmony_ci#define AFE_DL2_BASE_MSB 0x0b10 3058c2ecf20Sopenharmony_ci#define AFE_DL2_CUR_MSB 0x0b14 3068c2ecf20Sopenharmony_ci#define AFE_DL2_END_MSB 0x0b18 3078c2ecf20Sopenharmony_ci#define AFE_AWB_BASE_MSB 0x0b20 3088c2ecf20Sopenharmony_ci#define AFE_AWB_END_MSB 0x0b28 3098c2ecf20Sopenharmony_ci#define AFE_AWB_CUR_MSB 0x0b2c 3108c2ecf20Sopenharmony_ci#define AFE_VUL_BASE_MSB 0x0b30 3118c2ecf20Sopenharmony_ci#define AFE_VUL_END_MSB 0x0b38 3128c2ecf20Sopenharmony_ci#define AFE_VUL_CUR_MSB 0x0b3c 3138c2ecf20Sopenharmony_ci#define AFE_VUL2_BASE_MSB 0x0b50 3148c2ecf20Sopenharmony_ci#define AFE_VUL2_END_MSB 0x0b58 3158c2ecf20Sopenharmony_ci#define AFE_VUL2_CUR_MSB 0x0b5c 3168c2ecf20Sopenharmony_ci#define AFE_MOD_DAI_BASE_MSB 0x0b60 3178c2ecf20Sopenharmony_ci#define AFE_MOD_DAI_END_MSB 0x0b68 3188c2ecf20Sopenharmony_ci#define AFE_MOD_DAI_CUR_MSB 0x0b6c 3198c2ecf20Sopenharmony_ci#define AFE_VUL_D2_BASE_MSB 0x0b80 3208c2ecf20Sopenharmony_ci#define AFE_VUL_D2_END_MSB 0x0b88 3218c2ecf20Sopenharmony_ci#define AFE_VUL_D2_CUR_MSB 0x0b8c 3228c2ecf20Sopenharmony_ci#define AFE_DL3_BASE_MSB 0x0b90 3238c2ecf20Sopenharmony_ci#define AFE_DL3_CUR_MSB 0x0b94 3248c2ecf20Sopenharmony_ci#define AFE_DL3_END_MSB 0x0b98 3258c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_BASE_MSB 0x0ba4 3268c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_CUR_MSB 0x0ba8 3278c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_END_MSB 0x0bac 3288c2ecf20Sopenharmony_ci#define AFE_AWB2_BASE 0x0bd0 3298c2ecf20Sopenharmony_ci#define AFE_AWB2_END 0x0bd8 3308c2ecf20Sopenharmony_ci#define AFE_AWB2_CUR 0x0bdc 3318c2ecf20Sopenharmony_ci#define AFE_AWB2_BASE_MSB 0x0be0 3328c2ecf20Sopenharmony_ci#define AFE_AWB2_END_MSB 0x0be8 3338c2ecf20Sopenharmony_ci#define AFE_AWB2_CUR_MSB 0x0bec 3348c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_SDM_DCCOMP_CON 0x0c50 3358c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_SDM_TEST 0x0c54 3368c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_DC_COMP_CFG0 0x0c58 3378c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_DC_COMP_CFG1 0x0c5c 3388c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_SDM_FIFO_MON 0x0c60 3398c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_SRC_LCH_MON 0x0c64 3408c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_SRC_RCH_MON 0x0c68 3418c2ecf20Sopenharmony_ci#define AFE_ADDA_DL_SDM_OUT_MON 0x0c6c 3428c2ecf20Sopenharmony_ci#define AFE_CONNSYS_I2S_CON 0x0c78 3438c2ecf20Sopenharmony_ci#define AFE_CONNSYS_I2S_MON 0x0c7c 3448c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON0 0x0c80 3458c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON1 0x0c84 3468c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON2 0x0c88 3478c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON3 0x0c8c 3488c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON4 0x0c90 3498c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON5 0x0c94 3508c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON6 0x0c98 3518c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON7 0x0c9c 3528c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON8 0x0ca0 3538c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON9 0x0ca4 3548c2ecf20Sopenharmony_ci#define AFE_ASRC_2CH_CON10 0x0ca8 3558c2ecf20Sopenharmony_ci#define AFE_ADDA6_IIR_COEF_02_01 0x0ce0 3568c2ecf20Sopenharmony_ci#define AFE_ADDA6_IIR_COEF_04_03 0x0ce4 3578c2ecf20Sopenharmony_ci#define AFE_ADDA6_IIR_COEF_06_05 0x0ce8 3588c2ecf20Sopenharmony_ci#define AFE_ADDA6_IIR_COEF_08_07 0x0cec 3598c2ecf20Sopenharmony_ci#define AFE_ADDA6_IIR_COEF_10_09 0x0cf0 3608c2ecf20Sopenharmony_ci#define AFE_ADDA_PREDIS_CON2 0x0d40 3618c2ecf20Sopenharmony_ci#define AFE_ADDA_PREDIS_CON3 0x0d44 3628c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON12 0x0d70 3638c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON13 0x0d74 3648c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON14 0x0d78 3658c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON15 0x0d7c 3668c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON16 0x0d80 3678c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON17 0x0d84 3688c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON18 0x0d88 3698c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON19 0x0d8c 3708c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON20 0x0d90 3718c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON21 0x0d94 3728c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON22 0x0d98 3738c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON23 0x0d9c 3748c2ecf20Sopenharmony_ci#define AFE_MEMIF_MON24 0x0da0 3758c2ecf20Sopenharmony_ci#define AFE_HD_ENGEN_ENABLE 0x0dd0 3768c2ecf20Sopenharmony_ci#define AFE_ADDA_MTKAIF_CFG0 0x0e00 3778c2ecf20Sopenharmony_ci#define AFE_ADDA_MTKAIF_TX_CFG1 0x0e14 3788c2ecf20Sopenharmony_ci#define AFE_ADDA_MTKAIF_RX_CFG0 0x0e20 3798c2ecf20Sopenharmony_ci#define AFE_ADDA_MTKAIF_RX_CFG1 0x0e24 3808c2ecf20Sopenharmony_ci#define AFE_ADDA_MTKAIF_RX_CFG2 0x0e28 3818c2ecf20Sopenharmony_ci#define AFE_ADDA_MTKAIF_MON0 0x0e34 3828c2ecf20Sopenharmony_ci#define AFE_ADDA_MTKAIF_MON1 0x0e38 3838c2ecf20Sopenharmony_ci#define AFE_AUD_PAD_TOP 0x0e40 3848c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON0 0x0e80 3858c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON1 0x0e84 3868c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON2 0x0e88 3878c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON3 0x0e8c 3888c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON4 0x0e90 3898c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON5 0x0e94 3908c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON6 0x0e98 3918c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON7 0x0e9c 3928c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON8 0x0ea0 3938c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON9 0x0ea4 3948c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON10 0x0ea8 3958c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON12 0x0eb0 3968c2ecf20Sopenharmony_ci#define AFE_GENERAL1_ASRC_2CH_CON13 0x0eb4 3978c2ecf20Sopenharmony_ci#define GENERAL_ASRC_MODE 0x0eb8 3988c2ecf20Sopenharmony_ci#define GENERAL_ASRC_EN_ON 0x0ebc 3998c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON0 0x0f00 4008c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON1 0x0f04 4018c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON2 0x0f08 4028c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON3 0x0f0c 4038c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON4 0x0f10 4048c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON5 0x0f14 4058c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON6 0x0f18 4068c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON7 0x0f1c 4078c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON8 0x0f20 4088c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON9 0x0f24 4098c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON10 0x0f28 4108c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON12 0x0f30 4118c2ecf20Sopenharmony_ci#define AFE_GENERAL2_ASRC_2CH_CON13 0x0f34 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci#define AFE_MAX_REGISTER AFE_GENERAL2_ASRC_2CH_CON13 4148c2ecf20Sopenharmony_ci#define AFE_IRQ_STATUS_BITS 0x1fff 4158c2ecf20Sopenharmony_ci 4168c2ecf20Sopenharmony_ci/* AUDIO_TOP_CON3 */ 4178c2ecf20Sopenharmony_ci#define BCK_INVERSE_SFT 3 4188c2ecf20Sopenharmony_ci#define BCK_INVERSE_MASK 0x1 4198c2ecf20Sopenharmony_ci#define BCK_INVERSE_MASK_SFT (0x1 << 3) 4208c2ecf20Sopenharmony_ci 4218c2ecf20Sopenharmony_ci/* AFE_DAC_CON0 */ 4228c2ecf20Sopenharmony_ci#define AWB2_ON_SFT 29 4238c2ecf20Sopenharmony_ci#define AWB2_ON_MASK 0x1 4248c2ecf20Sopenharmony_ci#define AWB2_ON_MASK_SFT (0x1 << 29) 4258c2ecf20Sopenharmony_ci#define VUL2_ON_SFT 27 4268c2ecf20Sopenharmony_ci#define VUL2_ON_MASK 0x1 4278c2ecf20Sopenharmony_ci#define VUL2_ON_MASK_SFT (0x1 << 27) 4288c2ecf20Sopenharmony_ci#define MOD_DAI_DUP_WR_SFT 26 4298c2ecf20Sopenharmony_ci#define MOD_DAI_DUP_WR_MASK 0x1 4308c2ecf20Sopenharmony_ci#define MOD_DAI_DUP_WR_MASK_SFT (0x1 << 26) 4318c2ecf20Sopenharmony_ci#define VUL12_MODE_SFT 20 4328c2ecf20Sopenharmony_ci#define VUL12_MODE_MASK 0xf 4338c2ecf20Sopenharmony_ci#define VUL12_MODE_MASK_SFT (0xf << 20) 4348c2ecf20Sopenharmony_ci#define VUL12_R_MONO_SFT 11 4358c2ecf20Sopenharmony_ci#define VUL12_R_MONO_MASK 0x1 4368c2ecf20Sopenharmony_ci#define VUL12_R_MONO_MASK_SFT (0x1 << 11) 4378c2ecf20Sopenharmony_ci#define VUL12_MONO_SFT 10 4388c2ecf20Sopenharmony_ci#define VUL12_MONO_MASK 0x1 4398c2ecf20Sopenharmony_ci#define VUL12_MONO_MASK_SFT (0x1 << 10) 4408c2ecf20Sopenharmony_ci#define VUL12_ON_SFT 9 4418c2ecf20Sopenharmony_ci#define VUL12_ON_MASK 0x1 4428c2ecf20Sopenharmony_ci#define VUL12_ON_MASK_SFT (0x1 << 9) 4438c2ecf20Sopenharmony_ci#define MOD_DAI_ON_SFT 7 4448c2ecf20Sopenharmony_ci#define MOD_DAI_ON_MASK 0x1 4458c2ecf20Sopenharmony_ci#define MOD_DAI_ON_MASK_SFT (0x1 << 7) 4468c2ecf20Sopenharmony_ci#define AWB_ON_SFT 6 4478c2ecf20Sopenharmony_ci#define AWB_ON_MASK 0x1 4488c2ecf20Sopenharmony_ci#define AWB_ON_MASK_SFT (0x1 << 6) 4498c2ecf20Sopenharmony_ci#define DL3_ON_SFT 5 4508c2ecf20Sopenharmony_ci#define DL3_ON_MASK 0x1 4518c2ecf20Sopenharmony_ci#define DL3_ON_MASK_SFT (0x1 << 5) 4528c2ecf20Sopenharmony_ci#define VUL_ON_SFT 3 4538c2ecf20Sopenharmony_ci#define VUL_ON_MASK 0x1 4548c2ecf20Sopenharmony_ci#define VUL_ON_MASK_SFT (0x1 << 3) 4558c2ecf20Sopenharmony_ci#define DL2_ON_SFT 2 4568c2ecf20Sopenharmony_ci#define DL2_ON_MASK 0x1 4578c2ecf20Sopenharmony_ci#define DL2_ON_MASK_SFT (0x1 << 2) 4588c2ecf20Sopenharmony_ci#define DL1_ON_SFT 1 4598c2ecf20Sopenharmony_ci#define DL1_ON_MASK 0x1 4608c2ecf20Sopenharmony_ci#define DL1_ON_MASK_SFT (0x1 << 1) 4618c2ecf20Sopenharmony_ci#define AFE_ON_SFT 0 4628c2ecf20Sopenharmony_ci#define AFE_ON_MASK 0x1 4638c2ecf20Sopenharmony_ci#define AFE_ON_MASK_SFT (0x1 << 0) 4648c2ecf20Sopenharmony_ci 4658c2ecf20Sopenharmony_ci/* AFE_DAC_CON1 */ 4668c2ecf20Sopenharmony_ci#define MOD_DAI_MODE_SFT 30 4678c2ecf20Sopenharmony_ci#define MOD_DAI_MODE_MASK 0x3 4688c2ecf20Sopenharmony_ci#define MOD_DAI_MODE_MASK_SFT (0x3 << 30) 4698c2ecf20Sopenharmony_ci#define VUL_R_MONO_SFT 28 4708c2ecf20Sopenharmony_ci#define VUL_R_MONO_MASK 0x1 4718c2ecf20Sopenharmony_ci#define VUL_R_MONO_MASK_SFT (0x1 << 28) 4728c2ecf20Sopenharmony_ci#define VUL_DATA_SFT 27 4738c2ecf20Sopenharmony_ci#define VUL_DATA_MASK 0x1 4748c2ecf20Sopenharmony_ci#define VUL_DATA_MASK_SFT (0x1 << 27) 4758c2ecf20Sopenharmony_ci#define AWB_R_MONO_SFT 25 4768c2ecf20Sopenharmony_ci#define AWB_R_MONO_MASK 0x1 4778c2ecf20Sopenharmony_ci#define AWB_R_MONO_MASK_SFT (0x1 << 25) 4788c2ecf20Sopenharmony_ci#define AWB_DATA_SFT 24 4798c2ecf20Sopenharmony_ci#define AWB_DATA_MASK 0x1 4808c2ecf20Sopenharmony_ci#define AWB_DATA_MASK_SFT (0x1 << 24) 4818c2ecf20Sopenharmony_ci#define DL3_DATA_SFT 23 4828c2ecf20Sopenharmony_ci#define DL3_DATA_MASK 0x1 4838c2ecf20Sopenharmony_ci#define DL3_DATA_MASK_SFT (0x1 << 23) 4848c2ecf20Sopenharmony_ci#define DL2_DATA_SFT 22 4858c2ecf20Sopenharmony_ci#define DL2_DATA_MASK 0x1 4868c2ecf20Sopenharmony_ci#define DL2_DATA_MASK_SFT (0x1 << 22) 4878c2ecf20Sopenharmony_ci#define DL1_DATA_SFT 21 4888c2ecf20Sopenharmony_ci#define DL1_DATA_MASK 0x1 4898c2ecf20Sopenharmony_ci#define DL1_DATA_MASK_SFT (0x1 << 21) 4908c2ecf20Sopenharmony_ci#define VUL_MODE_SFT 16 4918c2ecf20Sopenharmony_ci#define VUL_MODE_MASK 0xf 4928c2ecf20Sopenharmony_ci#define VUL_MODE_MASK_SFT (0xf << 16) 4938c2ecf20Sopenharmony_ci#define AWB_MODE_SFT 12 4948c2ecf20Sopenharmony_ci#define AWB_MODE_MASK 0xf 4958c2ecf20Sopenharmony_ci#define AWB_MODE_MASK_SFT (0xf << 12) 4968c2ecf20Sopenharmony_ci#define I2S_MODE_SFT 8 4978c2ecf20Sopenharmony_ci#define I2S_MODE_MASK 0xf 4988c2ecf20Sopenharmony_ci#define I2S_MODE_MASK_SFT (0xf << 8) 4998c2ecf20Sopenharmony_ci#define DL2_MODE_SFT 4 5008c2ecf20Sopenharmony_ci#define DL2_MODE_MASK 0xf 5018c2ecf20Sopenharmony_ci#define DL2_MODE_MASK_SFT (0xf << 4) 5028c2ecf20Sopenharmony_ci#define DL1_MODE_SFT 0 5038c2ecf20Sopenharmony_ci#define DL1_MODE_MASK 0xf 5048c2ecf20Sopenharmony_ci#define DL1_MODE_MASK_SFT (0xf << 0) 5058c2ecf20Sopenharmony_ci 5068c2ecf20Sopenharmony_ci/* AFE_DAC_CON2 */ 5078c2ecf20Sopenharmony_ci#define AWB2_R_MONO_SFT 21 5088c2ecf20Sopenharmony_ci#define AWB2_R_MONO_MASK 0x1 5098c2ecf20Sopenharmony_ci#define AWB2_R_MONO_MASK_SFT (0x1 << 21) 5108c2ecf20Sopenharmony_ci#define AWB2_DATA_SFT 20 5118c2ecf20Sopenharmony_ci#define AWB2_DATA_MASK 0x1 5128c2ecf20Sopenharmony_ci#define AWB2_DATA_MASK_SFT (0x1 << 20) 5138c2ecf20Sopenharmony_ci#define AWB2_MODE_SFT 16 5148c2ecf20Sopenharmony_ci#define AWB2_MODE_MASK 0xf 5158c2ecf20Sopenharmony_ci#define AWB2_MODE_MASK_SFT (0xf << 16) 5168c2ecf20Sopenharmony_ci#define DL3_MODE_SFT 8 5178c2ecf20Sopenharmony_ci#define DL3_MODE_MASK 0xf 5188c2ecf20Sopenharmony_ci#define DL3_MODE_MASK_SFT (0xf << 8) 5198c2ecf20Sopenharmony_ci#define VUL2_MODE_SFT 4 5208c2ecf20Sopenharmony_ci#define VUL2_MODE_MASK 0xf 5218c2ecf20Sopenharmony_ci#define VUL2_MODE_MASK_SFT (0xf << 4) 5228c2ecf20Sopenharmony_ci#define VUL2_R_MONO_SFT 1 5238c2ecf20Sopenharmony_ci#define VUL2_R_MONO_MASK 0x1 5248c2ecf20Sopenharmony_ci#define VUL2_R_MONO_MASK_SFT (0x1 << 1) 5258c2ecf20Sopenharmony_ci#define VUL2_DATA_SFT 0 5268c2ecf20Sopenharmony_ci#define VUL2_DATA_MASK 0x1 5278c2ecf20Sopenharmony_ci#define VUL2_DATA_MASK_SFT (0x1 << 0) 5288c2ecf20Sopenharmony_ci 5298c2ecf20Sopenharmony_ci/* AFE_DAC_MON */ 5308c2ecf20Sopenharmony_ci#define AFE_ON_RETM_SFT 0 5318c2ecf20Sopenharmony_ci#define AFE_ON_RETM_MASK 0x1 5328c2ecf20Sopenharmony_ci#define AFE_ON_RETM_MASK_SFT (0x1 << 0) 5338c2ecf20Sopenharmony_ci 5348c2ecf20Sopenharmony_ci/* AFE_I2S_CON */ 5358c2ecf20Sopenharmony_ci#define BCK_NEG_EG_LATCH_SFT 30 5368c2ecf20Sopenharmony_ci#define BCK_NEG_EG_LATCH_MASK 0x1 5378c2ecf20Sopenharmony_ci#define BCK_NEG_EG_LATCH_MASK_SFT (0x1 << 30) 5388c2ecf20Sopenharmony_ci#define BCK_INV_SFT 29 5398c2ecf20Sopenharmony_ci#define BCK_INV_MASK 0x1 5408c2ecf20Sopenharmony_ci#define BCK_INV_MASK_SFT (0x1 << 29) 5418c2ecf20Sopenharmony_ci#define I2SIN_PAD_SEL_SFT 28 5428c2ecf20Sopenharmony_ci#define I2SIN_PAD_SEL_MASK 0x1 5438c2ecf20Sopenharmony_ci#define I2SIN_PAD_SEL_MASK_SFT (0x1 << 28) 5448c2ecf20Sopenharmony_ci#define I2S_LOOPBACK_SFT 20 5458c2ecf20Sopenharmony_ci#define I2S_LOOPBACK_MASK 0x1 5468c2ecf20Sopenharmony_ci#define I2S_LOOPBACK_MASK_SFT (0x1 << 20) 5478c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_SFT 17 5488c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK 0x1 5498c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK_SFT (0x1 << 17) 5508c2ecf20Sopenharmony_ci#define I2S1_HD_EN_SFT 12 5518c2ecf20Sopenharmony_ci#define I2S1_HD_EN_MASK 0x1 5528c2ecf20Sopenharmony_ci#define I2S1_HD_EN_MASK_SFT (0x1 << 12) 5538c2ecf20Sopenharmony_ci#define INV_PAD_CTRL_SFT 7 5548c2ecf20Sopenharmony_ci#define INV_PAD_CTRL_MASK 0x1 5558c2ecf20Sopenharmony_ci#define INV_PAD_CTRL_MASK_SFT (0x1 << 7) 5568c2ecf20Sopenharmony_ci#define I2S_BYPSRC_SFT 6 5578c2ecf20Sopenharmony_ci#define I2S_BYPSRC_MASK 0x1 5588c2ecf20Sopenharmony_ci#define I2S_BYPSRC_MASK_SFT (0x1 << 6) 5598c2ecf20Sopenharmony_ci#define INV_LRCK_SFT 5 5608c2ecf20Sopenharmony_ci#define INV_LRCK_MASK 0x1 5618c2ecf20Sopenharmony_ci#define INV_LRCK_MASK_SFT (0x1 << 5) 5628c2ecf20Sopenharmony_ci#define I2S_FMT_SFT 3 5638c2ecf20Sopenharmony_ci#define I2S_FMT_MASK 0x1 5648c2ecf20Sopenharmony_ci#define I2S_FMT_MASK_SFT (0x1 << 3) 5658c2ecf20Sopenharmony_ci#define I2S_SRC_SFT 2 5668c2ecf20Sopenharmony_ci#define I2S_SRC_MASK 0x1 5678c2ecf20Sopenharmony_ci#define I2S_SRC_MASK_SFT (0x1 << 2) 5688c2ecf20Sopenharmony_ci#define I2S_WLEN_SFT 1 5698c2ecf20Sopenharmony_ci#define I2S_WLEN_MASK 0x1 5708c2ecf20Sopenharmony_ci#define I2S_WLEN_MASK_SFT (0x1 << 1) 5718c2ecf20Sopenharmony_ci#define I2S_EN_SFT 0 5728c2ecf20Sopenharmony_ci#define I2S_EN_MASK 0x1 5738c2ecf20Sopenharmony_ci#define I2S_EN_MASK_SFT (0x1 << 0) 5748c2ecf20Sopenharmony_ci 5758c2ecf20Sopenharmony_ci/* AFE_I2S_CON1 */ 5768c2ecf20Sopenharmony_ci#define I2S2_LR_SWAP_SFT 31 5778c2ecf20Sopenharmony_ci#define I2S2_LR_SWAP_MASK 0x1 5788c2ecf20Sopenharmony_ci#define I2S2_LR_SWAP_MASK_SFT (0x1 << 31) 5798c2ecf20Sopenharmony_ci#define I2S2_SEL_O19_O20_SFT 18 5808c2ecf20Sopenharmony_ci#define I2S2_SEL_O19_O20_MASK 0x1 5818c2ecf20Sopenharmony_ci#define I2S2_SEL_O19_O20_MASK_SFT (0x1 << 18) 5828c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_SFT 17 5838c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK 0x1 5848c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK_SFT (0x1 << 17) 5858c2ecf20Sopenharmony_ci#define I2S2_SEL_O03_O04_SFT 16 5868c2ecf20Sopenharmony_ci#define I2S2_SEL_O03_O04_MASK 0x1 5878c2ecf20Sopenharmony_ci#define I2S2_SEL_O03_O04_MASK_SFT (0x1 << 16) 5888c2ecf20Sopenharmony_ci#define I2S2_32BIT_EN_SFT 13 5898c2ecf20Sopenharmony_ci#define I2S2_32BIT_EN_MASK 0x1 5908c2ecf20Sopenharmony_ci#define I2S2_32BIT_EN_MASK_SFT (0x1 << 13) 5918c2ecf20Sopenharmony_ci#define I2S2_HD_EN_SFT 12 5928c2ecf20Sopenharmony_ci#define I2S2_HD_EN_MASK 0x1 5938c2ecf20Sopenharmony_ci#define I2S2_HD_EN_MASK_SFT (0x1 << 12) 5948c2ecf20Sopenharmony_ci#define I2S2_OUT_MODE_SFT 8 5958c2ecf20Sopenharmony_ci#define I2S2_OUT_MODE_MASK 0xf 5968c2ecf20Sopenharmony_ci#define I2S2_OUT_MODE_MASK_SFT (0xf << 8) 5978c2ecf20Sopenharmony_ci#define INV_LRCK_SFT 5 5988c2ecf20Sopenharmony_ci#define INV_LRCK_MASK 0x1 5998c2ecf20Sopenharmony_ci#define INV_LRCK_MASK_SFT (0x1 << 5) 6008c2ecf20Sopenharmony_ci#define I2S2_FMT_SFT 3 6018c2ecf20Sopenharmony_ci#define I2S2_FMT_MASK 0x1 6028c2ecf20Sopenharmony_ci#define I2S2_FMT_MASK_SFT (0x1 << 3) 6038c2ecf20Sopenharmony_ci#define I2S2_WLEN_SFT 1 6048c2ecf20Sopenharmony_ci#define I2S2_WLEN_MASK 0x1 6058c2ecf20Sopenharmony_ci#define I2S2_WLEN_MASK_SFT (0x1 << 1) 6068c2ecf20Sopenharmony_ci#define I2S2_EN_SFT 0 6078c2ecf20Sopenharmony_ci#define I2S2_EN_MASK 0x1 6088c2ecf20Sopenharmony_ci#define I2S2_EN_MASK_SFT (0x1 << 0) 6098c2ecf20Sopenharmony_ci 6108c2ecf20Sopenharmony_ci/* AFE_I2S_CON2 */ 6118c2ecf20Sopenharmony_ci#define I2S3_LR_SWAP_SFT 31 6128c2ecf20Sopenharmony_ci#define I2S3_LR_SWAP_MASK 0x1 6138c2ecf20Sopenharmony_ci#define I2S3_LR_SWAP_MASK_SFT (0x1 << 31) 6148c2ecf20Sopenharmony_ci#define I2S3_UPDATE_WORD_SFT 24 6158c2ecf20Sopenharmony_ci#define I2S3_UPDATE_WORD_MASK 0x1f 6168c2ecf20Sopenharmony_ci#define I2S3_UPDATE_WORD_MASK_SFT (0x1f << 24) 6178c2ecf20Sopenharmony_ci#define I2S3_BCK_INV_SFT 23 6188c2ecf20Sopenharmony_ci#define I2S3_BCK_INV_MASK 0x1 6198c2ecf20Sopenharmony_ci#define I2S3_BCK_INV_MASK_SFT (0x1 << 23) 6208c2ecf20Sopenharmony_ci#define I2S3_FPGA_BIT_TEST_SFT 22 6218c2ecf20Sopenharmony_ci#define I2S3_FPGA_BIT_TEST_MASK 0x1 6228c2ecf20Sopenharmony_ci#define I2S3_FPGA_BIT_TEST_MASK_SFT (0x1 << 22) 6238c2ecf20Sopenharmony_ci#define I2S3_FPGA_BIT_SFT 21 6248c2ecf20Sopenharmony_ci#define I2S3_FPGA_BIT_MASK 0x1 6258c2ecf20Sopenharmony_ci#define I2S3_FPGA_BIT_MASK_SFT (0x1 << 21) 6268c2ecf20Sopenharmony_ci#define I2S3_LOOPBACK_SFT 20 6278c2ecf20Sopenharmony_ci#define I2S3_LOOPBACK_MASK 0x1 6288c2ecf20Sopenharmony_ci#define I2S3_LOOPBACK_MASK_SFT (0x1 << 20) 6298c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_SFT 17 6308c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK 0x1 6318c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK_SFT (0x1 << 17) 6328c2ecf20Sopenharmony_ci#define I2S3_HD_EN_SFT 12 6338c2ecf20Sopenharmony_ci#define I2S3_HD_EN_MASK 0x1 6348c2ecf20Sopenharmony_ci#define I2S3_HD_EN_MASK_SFT (0x1 << 12) 6358c2ecf20Sopenharmony_ci#define I2S3_OUT_MODE_SFT 8 6368c2ecf20Sopenharmony_ci#define I2S3_OUT_MODE_MASK 0xf 6378c2ecf20Sopenharmony_ci#define I2S3_OUT_MODE_MASK_SFT (0xf << 8) 6388c2ecf20Sopenharmony_ci#define I2S3_FMT_SFT 3 6398c2ecf20Sopenharmony_ci#define I2S3_FMT_MASK 0x1 6408c2ecf20Sopenharmony_ci#define I2S3_FMT_MASK_SFT (0x1 << 3) 6418c2ecf20Sopenharmony_ci#define I2S3_WLEN_SFT 1 6428c2ecf20Sopenharmony_ci#define I2S3_WLEN_MASK 0x1 6438c2ecf20Sopenharmony_ci#define I2S3_WLEN_MASK_SFT (0x1 << 1) 6448c2ecf20Sopenharmony_ci#define I2S3_EN_SFT 0 6458c2ecf20Sopenharmony_ci#define I2S3_EN_MASK 0x1 6468c2ecf20Sopenharmony_ci#define I2S3_EN_MASK_SFT (0x1 << 0) 6478c2ecf20Sopenharmony_ci 6488c2ecf20Sopenharmony_ci/* AFE_I2S_CON3 */ 6498c2ecf20Sopenharmony_ci#define I2S4_LR_SWAP_SFT 31 6508c2ecf20Sopenharmony_ci#define I2S4_LR_SWAP_MASK 0x1 6518c2ecf20Sopenharmony_ci#define I2S4_LR_SWAP_MASK_SFT (0x1 << 31) 6528c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_SFT 17 6538c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK 0x1 6548c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK_SFT (0x1 << 17) 6558c2ecf20Sopenharmony_ci#define I2S4_32BIT_EN_SFT 13 6568c2ecf20Sopenharmony_ci#define I2S4_32BIT_EN_MASK 0x1 6578c2ecf20Sopenharmony_ci#define I2S4_32BIT_EN_MASK_SFT (0x1 << 13) 6588c2ecf20Sopenharmony_ci#define I2S4_HD_EN_SFT 12 6598c2ecf20Sopenharmony_ci#define I2S4_HD_EN_MASK 0x1 6608c2ecf20Sopenharmony_ci#define I2S4_HD_EN_MASK_SFT (0x1 << 12) 6618c2ecf20Sopenharmony_ci#define I2S4_OUT_MODE_SFT 8 6628c2ecf20Sopenharmony_ci#define I2S4_OUT_MODE_MASK 0xf 6638c2ecf20Sopenharmony_ci#define I2S4_OUT_MODE_MASK_SFT (0xf << 8) 6648c2ecf20Sopenharmony_ci#define INV_LRCK_SFT 5 6658c2ecf20Sopenharmony_ci#define INV_LRCK_MASK 0x1 6668c2ecf20Sopenharmony_ci#define INV_LRCK_MASK_SFT (0x1 << 5) 6678c2ecf20Sopenharmony_ci#define I2S4_FMT_SFT 3 6688c2ecf20Sopenharmony_ci#define I2S4_FMT_MASK 0x1 6698c2ecf20Sopenharmony_ci#define I2S4_FMT_MASK_SFT (0x1 << 3) 6708c2ecf20Sopenharmony_ci#define I2S4_WLEN_SFT 1 6718c2ecf20Sopenharmony_ci#define I2S4_WLEN_MASK 0x1 6728c2ecf20Sopenharmony_ci#define I2S4_WLEN_MASK_SFT (0x1 << 1) 6738c2ecf20Sopenharmony_ci#define I2S4_EN_SFT 0 6748c2ecf20Sopenharmony_ci#define I2S4_EN_MASK 0x1 6758c2ecf20Sopenharmony_ci#define I2S4_EN_MASK_SFT (0x1 << 0) 6768c2ecf20Sopenharmony_ci 6778c2ecf20Sopenharmony_ci/* AFE_I2S_CON4 */ 6788c2ecf20Sopenharmony_ci#define I2S5_LR_SWAP_SFT 31 6798c2ecf20Sopenharmony_ci#define I2S5_LR_SWAP_MASK 0x1 6808c2ecf20Sopenharmony_ci#define I2S5_LR_SWAP_MASK_SFT (0x1 << 31) 6818c2ecf20Sopenharmony_ci#define I2S_LOOPBACK_SFT 20 6828c2ecf20Sopenharmony_ci#define I2S_LOOPBACK_MASK 0x1 6838c2ecf20Sopenharmony_ci#define I2S_LOOPBACK_MASK_SFT (0x1 << 20) 6848c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_SFT 17 6858c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK 0x1 6868c2ecf20Sopenharmony_ci#define I2S_ONOFF_NOT_RESET_CK_ENABLE_MASK_SFT (0x1 << 17) 6878c2ecf20Sopenharmony_ci#define I2S5_32BIT_EN_SFT 13 6888c2ecf20Sopenharmony_ci#define I2S5_32BIT_EN_MASK 0x1 6898c2ecf20Sopenharmony_ci#define I2S5_32BIT_EN_MASK_SFT (0x1 << 13) 6908c2ecf20Sopenharmony_ci#define I2S5_HD_EN_SFT 12 6918c2ecf20Sopenharmony_ci#define I2S5_HD_EN_MASK 0x1 6928c2ecf20Sopenharmony_ci#define I2S5_HD_EN_MASK_SFT (0x1 << 12) 6938c2ecf20Sopenharmony_ci#define I2S5_OUT_MODE_SFT 8 6948c2ecf20Sopenharmony_ci#define I2S5_OUT_MODE_MASK 0xf 6958c2ecf20Sopenharmony_ci#define I2S5_OUT_MODE_MASK_SFT (0xf << 8) 6968c2ecf20Sopenharmony_ci#define INV_LRCK_SFT 5 6978c2ecf20Sopenharmony_ci#define INV_LRCK_MASK 0x1 6988c2ecf20Sopenharmony_ci#define INV_LRCK_MASK_SFT (0x1 << 5) 6998c2ecf20Sopenharmony_ci#define I2S5_FMT_SFT 3 7008c2ecf20Sopenharmony_ci#define I2S5_FMT_MASK 0x1 7018c2ecf20Sopenharmony_ci#define I2S5_FMT_MASK_SFT (0x1 << 3) 7028c2ecf20Sopenharmony_ci#define I2S5_WLEN_SFT 1 7038c2ecf20Sopenharmony_ci#define I2S5_WLEN_MASK 0x1 7048c2ecf20Sopenharmony_ci#define I2S5_WLEN_MASK_SFT (0x1 << 1) 7058c2ecf20Sopenharmony_ci#define I2S5_EN_SFT 0 7068c2ecf20Sopenharmony_ci#define I2S5_EN_MASK 0x1 7078c2ecf20Sopenharmony_ci#define I2S5_EN_MASK_SFT (0x1 << 0) 7088c2ecf20Sopenharmony_ci 7098c2ecf20Sopenharmony_ci/* AFE_GAIN1_CON0 */ 7108c2ecf20Sopenharmony_ci#define GAIN1_SAMPLE_PER_STEP_SFT 8 7118c2ecf20Sopenharmony_ci#define GAIN1_SAMPLE_PER_STEP_MASK 0xff 7128c2ecf20Sopenharmony_ci#define GAIN1_SAMPLE_PER_STEP_MASK_SFT (0xff << 8) 7138c2ecf20Sopenharmony_ci#define GAIN1_MODE_SFT 4 7148c2ecf20Sopenharmony_ci#define GAIN1_MODE_MASK 0xf 7158c2ecf20Sopenharmony_ci#define GAIN1_MODE_MASK_SFT (0xf << 4) 7168c2ecf20Sopenharmony_ci#define GAIN1_ON_SFT 0 7178c2ecf20Sopenharmony_ci#define GAIN1_ON_MASK 0x1 7188c2ecf20Sopenharmony_ci#define GAIN1_ON_MASK_SFT (0x1 << 0) 7198c2ecf20Sopenharmony_ci 7208c2ecf20Sopenharmony_ci/* AFE_GAIN1_CON1 */ 7218c2ecf20Sopenharmony_ci#define GAIN1_TARGET_SFT 0 7228c2ecf20Sopenharmony_ci#define GAIN1_TARGET_MASK 0xfffff 7238c2ecf20Sopenharmony_ci#define GAIN1_TARGET_MASK_SFT (0xfffff << 0) 7248c2ecf20Sopenharmony_ci 7258c2ecf20Sopenharmony_ci/* AFE_GAIN2_CON0 */ 7268c2ecf20Sopenharmony_ci#define GAIN2_SAMPLE_PER_STEP_SFT 8 7278c2ecf20Sopenharmony_ci#define GAIN2_SAMPLE_PER_STEP_MASK 0xff 7288c2ecf20Sopenharmony_ci#define GAIN2_SAMPLE_PER_STEP_MASK_SFT (0xff << 8) 7298c2ecf20Sopenharmony_ci#define GAIN2_MODE_SFT 4 7308c2ecf20Sopenharmony_ci#define GAIN2_MODE_MASK 0xf 7318c2ecf20Sopenharmony_ci#define GAIN2_MODE_MASK_SFT (0xf << 4) 7328c2ecf20Sopenharmony_ci#define GAIN2_ON_SFT 0 7338c2ecf20Sopenharmony_ci#define GAIN2_ON_MASK 0x1 7348c2ecf20Sopenharmony_ci#define GAIN2_ON_MASK_SFT (0x1 << 0) 7358c2ecf20Sopenharmony_ci 7368c2ecf20Sopenharmony_ci/* AFE_GAIN2_CON1 */ 7378c2ecf20Sopenharmony_ci#define GAIN2_TARGET_SFT 0 7388c2ecf20Sopenharmony_ci#define GAIN2_TARGET_MASK 0xfffff 7398c2ecf20Sopenharmony_ci#define GAIN2_TARGET_MASK_SFT (0xfffff << 0) 7408c2ecf20Sopenharmony_ci 7418c2ecf20Sopenharmony_ci/* AFE_GAIN1_CUR */ 7428c2ecf20Sopenharmony_ci#define AFE_GAIN1_CUR_SFT 0 7438c2ecf20Sopenharmony_ci#define AFE_GAIN1_CUR_MASK 0xfffff 7448c2ecf20Sopenharmony_ci#define AFE_GAIN1_CUR_MASK_SFT (0xfffff << 0) 7458c2ecf20Sopenharmony_ci 7468c2ecf20Sopenharmony_ci/* AFE_GAIN2_CUR */ 7478c2ecf20Sopenharmony_ci#define AFE_GAIN2_CUR_SFT 0 7488c2ecf20Sopenharmony_ci#define AFE_GAIN2_CUR_MASK 0xfffff 7498c2ecf20Sopenharmony_ci#define AFE_GAIN2_CUR_MASK_SFT (0xfffff << 0) 7508c2ecf20Sopenharmony_ci 7518c2ecf20Sopenharmony_ci/* AFE_MEMIF_HD_MODE */ 7528c2ecf20Sopenharmony_ci#define AWB2_HD_SFT 28 7538c2ecf20Sopenharmony_ci#define AWB2_HD_MASK 0x3 7548c2ecf20Sopenharmony_ci#define AWB2_HD_MASK_SFT (0x3 << 28) 7558c2ecf20Sopenharmony_ci#define HDMI_HD_SFT 20 7568c2ecf20Sopenharmony_ci#define HDMI_HD_MASK 0x3 7578c2ecf20Sopenharmony_ci#define HDMI_HD_MASK_SFT (0x3 << 20) 7588c2ecf20Sopenharmony_ci#define MOD_DAI_HD_SFT 18 7598c2ecf20Sopenharmony_ci#define MOD_DAI_HD_MASK 0x3 7608c2ecf20Sopenharmony_ci#define MOD_DAI_HD_MASK_SFT (0x3 << 18) 7618c2ecf20Sopenharmony_ci#define DAI_HD_SFT 16 7628c2ecf20Sopenharmony_ci#define DAI_HD_MASK 0x3 7638c2ecf20Sopenharmony_ci#define DAI_HD_MASK_SFT (0x3 << 16) 7648c2ecf20Sopenharmony_ci#define VUL2_HD_SFT 14 7658c2ecf20Sopenharmony_ci#define VUL2_HD_MASK 0x3 7668c2ecf20Sopenharmony_ci#define VUL2_HD_MASK_SFT (0x3 << 14) 7678c2ecf20Sopenharmony_ci#define VUL12_HD_SFT 12 7688c2ecf20Sopenharmony_ci#define VUL12_HD_MASK 0x3 7698c2ecf20Sopenharmony_ci#define VUL12_HD_MASK_SFT (0x3 << 12) 7708c2ecf20Sopenharmony_ci#define VUL_HD_SFT 10 7718c2ecf20Sopenharmony_ci#define VUL_HD_MASK 0x3 7728c2ecf20Sopenharmony_ci#define VUL_HD_MASK_SFT (0x3 << 10) 7738c2ecf20Sopenharmony_ci#define AWB_HD_SFT 8 7748c2ecf20Sopenharmony_ci#define AWB_HD_MASK 0x3 7758c2ecf20Sopenharmony_ci#define AWB_HD_MASK_SFT (0x3 << 8) 7768c2ecf20Sopenharmony_ci#define DL3_HD_SFT 6 7778c2ecf20Sopenharmony_ci#define DL3_HD_MASK 0x3 7788c2ecf20Sopenharmony_ci#define DL3_HD_MASK_SFT (0x3 << 6) 7798c2ecf20Sopenharmony_ci#define DL2_HD_SFT 4 7808c2ecf20Sopenharmony_ci#define DL2_HD_MASK 0x3 7818c2ecf20Sopenharmony_ci#define DL2_HD_MASK_SFT (0x3 << 4) 7828c2ecf20Sopenharmony_ci#define DL1_HD_SFT 0 7838c2ecf20Sopenharmony_ci#define DL1_HD_MASK 0x3 7848c2ecf20Sopenharmony_ci#define DL1_HD_MASK_SFT (0x3 << 0) 7858c2ecf20Sopenharmony_ci 7868c2ecf20Sopenharmony_ci/* AFE_MEMIF_HDALIGN */ 7878c2ecf20Sopenharmony_ci#define AWB2_NORMAL_MODE_SFT 30 7888c2ecf20Sopenharmony_ci#define AWB2_NORMAL_MODE_MASK 0x1 7898c2ecf20Sopenharmony_ci#define AWB2_NORMAL_MODE_MASK_SFT (0x1 << 30) 7908c2ecf20Sopenharmony_ci#define HDMI_NORMAL_MODE_SFT 26 7918c2ecf20Sopenharmony_ci#define HDMI_NORMAL_MODE_MASK 0x1 7928c2ecf20Sopenharmony_ci#define HDMI_NORMAL_MODE_MASK_SFT (0x1 << 26) 7938c2ecf20Sopenharmony_ci#define MOD_DAI_NORMAL_MODE_SFT 25 7948c2ecf20Sopenharmony_ci#define MOD_DAI_NORMAL_MODE_MASK 0x1 7958c2ecf20Sopenharmony_ci#define MOD_DAI_NORMAL_MODE_MASK_SFT (0x1 << 25) 7968c2ecf20Sopenharmony_ci#define DAI_NORMAL_MODE_SFT 24 7978c2ecf20Sopenharmony_ci#define DAI_NORMAL_MODE_MASK 0x1 7988c2ecf20Sopenharmony_ci#define DAI_NORMAL_MODE_MASK_SFT (0x1 << 24) 7998c2ecf20Sopenharmony_ci#define VUL2_NORMAL_MODE_SFT 23 8008c2ecf20Sopenharmony_ci#define VUL2_NORMAL_MODE_MASK 0x1 8018c2ecf20Sopenharmony_ci#define VUL2_NORMAL_MODE_MASK_SFT (0x1 << 23) 8028c2ecf20Sopenharmony_ci#define VUL12_NORMAL_MODE_SFT 22 8038c2ecf20Sopenharmony_ci#define VUL12_NORMAL_MODE_MASK 0x1 8048c2ecf20Sopenharmony_ci#define VUL12_NORMAL_MODE_MASK_SFT (0x1 << 22) 8058c2ecf20Sopenharmony_ci#define VUL_NORMAL_MODE_SFT 21 8068c2ecf20Sopenharmony_ci#define VUL_NORMAL_MODE_MASK 0x1 8078c2ecf20Sopenharmony_ci#define VUL_NORMAL_MODE_MASK_SFT (0x1 << 21) 8088c2ecf20Sopenharmony_ci#define AWB_NORMAL_MODE_SFT 20 8098c2ecf20Sopenharmony_ci#define AWB_NORMAL_MODE_MASK 0x1 8108c2ecf20Sopenharmony_ci#define AWB_NORMAL_MODE_MASK_SFT (0x1 << 20) 8118c2ecf20Sopenharmony_ci#define DL3_NORMAL_MODE_SFT 19 8128c2ecf20Sopenharmony_ci#define DL3_NORMAL_MODE_MASK 0x1 8138c2ecf20Sopenharmony_ci#define DL3_NORMAL_MODE_MASK_SFT (0x1 << 19) 8148c2ecf20Sopenharmony_ci#define DL2_NORMAL_MODE_SFT 18 8158c2ecf20Sopenharmony_ci#define DL2_NORMAL_MODE_MASK 0x1 8168c2ecf20Sopenharmony_ci#define DL2_NORMAL_MODE_MASK_SFT (0x1 << 18) 8178c2ecf20Sopenharmony_ci#define DL1_NORMAL_MODE_SFT 16 8188c2ecf20Sopenharmony_ci#define DL1_NORMAL_MODE_MASK 0x1 8198c2ecf20Sopenharmony_ci#define DL1_NORMAL_MODE_MASK_SFT (0x1 << 16) 8208c2ecf20Sopenharmony_ci#define RESERVED1_SFT 15 8218c2ecf20Sopenharmony_ci#define RESERVED1_MASK 0x1 8228c2ecf20Sopenharmony_ci#define RESERVED1_MASK_SFT (0x1 << 15) 8238c2ecf20Sopenharmony_ci#define AWB2_ALIGN_SFT 14 8248c2ecf20Sopenharmony_ci#define AWB2_ALIGN_MASK 0x1 8258c2ecf20Sopenharmony_ci#define AWB2_ALIGN_MASK_SFT (0x1 << 14) 8268c2ecf20Sopenharmony_ci#define HDMI_HD_ALIGN_SFT 10 8278c2ecf20Sopenharmony_ci#define HDMI_HD_ALIGN_MASK 0x1 8288c2ecf20Sopenharmony_ci#define HDMI_HD_ALIGN_MASK_SFT (0x1 << 10) 8298c2ecf20Sopenharmony_ci#define MOD_DAI_HD_ALIGN_SFT 9 8308c2ecf20Sopenharmony_ci#define MOD_DAI_HD_ALIGN_MASK 0x1 8318c2ecf20Sopenharmony_ci#define MOD_DAI_HD_ALIGN_MASK_SFT (0x1 << 9) 8328c2ecf20Sopenharmony_ci#define VUL2_HD_ALIGN_SFT 7 8338c2ecf20Sopenharmony_ci#define VUL2_HD_ALIGN_MASK 0x1 8348c2ecf20Sopenharmony_ci#define VUL2_HD_ALIGN_MASK_SFT (0x1 << 7) 8358c2ecf20Sopenharmony_ci#define VUL12_HD_ALIGN_SFT 6 8368c2ecf20Sopenharmony_ci#define VUL12_HD_ALIGN_MASK 0x1 8378c2ecf20Sopenharmony_ci#define VUL12_HD_ALIGN_MASK_SFT (0x1 << 6) 8388c2ecf20Sopenharmony_ci#define VUL_HD_ALIGN_SFT 5 8398c2ecf20Sopenharmony_ci#define VUL_HD_ALIGN_MASK 0x1 8408c2ecf20Sopenharmony_ci#define VUL_HD_ALIGN_MASK_SFT (0x1 << 5) 8418c2ecf20Sopenharmony_ci#define AWB_HD_ALIGN_SFT 4 8428c2ecf20Sopenharmony_ci#define AWB_HD_ALIGN_MASK 0x1 8438c2ecf20Sopenharmony_ci#define AWB_HD_ALIGN_MASK_SFT (0x1 << 4) 8448c2ecf20Sopenharmony_ci#define DL3_HD_ALIGN_SFT 3 8458c2ecf20Sopenharmony_ci#define DL3_HD_ALIGN_MASK 0x1 8468c2ecf20Sopenharmony_ci#define DL3_HD_ALIGN_MASK_SFT (0x1 << 3) 8478c2ecf20Sopenharmony_ci#define DL2_HD_ALIGN_SFT 2 8488c2ecf20Sopenharmony_ci#define DL2_HD_ALIGN_MASK 0x1 8498c2ecf20Sopenharmony_ci#define DL2_HD_ALIGN_MASK_SFT (0x1 << 2) 8508c2ecf20Sopenharmony_ci#define DL1_HD_ALIGN_SFT 0 8518c2ecf20Sopenharmony_ci#define DL1_HD_ALIGN_MASK 0x1 8528c2ecf20Sopenharmony_ci#define DL1_HD_ALIGN_MASK_SFT (0x1 << 0) 8538c2ecf20Sopenharmony_ci 8548c2ecf20Sopenharmony_ci/* PCM_INTF_CON1 */ 8558c2ecf20Sopenharmony_ci#define PCM_FIX_VALUE_SEL_SFT 31 8568c2ecf20Sopenharmony_ci#define PCM_FIX_VALUE_SEL_MASK 0x1 8578c2ecf20Sopenharmony_ci#define PCM_FIX_VALUE_SEL_MASK_SFT (0x1 << 31) 8588c2ecf20Sopenharmony_ci#define PCM_BUFFER_LOOPBACK_SFT 30 8598c2ecf20Sopenharmony_ci#define PCM_BUFFER_LOOPBACK_MASK 0x1 8608c2ecf20Sopenharmony_ci#define PCM_BUFFER_LOOPBACK_MASK_SFT (0x1 << 30) 8618c2ecf20Sopenharmony_ci#define PCM_PARALLEL_LOOPBACK_SFT 29 8628c2ecf20Sopenharmony_ci#define PCM_PARALLEL_LOOPBACK_MASK 0x1 8638c2ecf20Sopenharmony_ci#define PCM_PARALLEL_LOOPBACK_MASK_SFT (0x1 << 29) 8648c2ecf20Sopenharmony_ci#define PCM_SERIAL_LOOPBACK_SFT 28 8658c2ecf20Sopenharmony_ci#define PCM_SERIAL_LOOPBACK_MASK 0x1 8668c2ecf20Sopenharmony_ci#define PCM_SERIAL_LOOPBACK_MASK_SFT (0x1 << 28) 8678c2ecf20Sopenharmony_ci#define PCM_DAI_PCM_LOOPBACK_SFT 27 8688c2ecf20Sopenharmony_ci#define PCM_DAI_PCM_LOOPBACK_MASK 0x1 8698c2ecf20Sopenharmony_ci#define PCM_DAI_PCM_LOOPBACK_MASK_SFT (0x1 << 27) 8708c2ecf20Sopenharmony_ci#define PCM_I2S_PCM_LOOPBACK_SFT 26 8718c2ecf20Sopenharmony_ci#define PCM_I2S_PCM_LOOPBACK_MASK 0x1 8728c2ecf20Sopenharmony_ci#define PCM_I2S_PCM_LOOPBACK_MASK_SFT (0x1 << 26) 8738c2ecf20Sopenharmony_ci#define PCM_SYNC_DELSEL_SFT 25 8748c2ecf20Sopenharmony_ci#define PCM_SYNC_DELSEL_MASK 0x1 8758c2ecf20Sopenharmony_ci#define PCM_SYNC_DELSEL_MASK_SFT (0x1 << 25) 8768c2ecf20Sopenharmony_ci#define PCM_TX_LR_SWAP_SFT 24 8778c2ecf20Sopenharmony_ci#define PCM_TX_LR_SWAP_MASK 0x1 8788c2ecf20Sopenharmony_ci#define PCM_TX_LR_SWAP_MASK_SFT (0x1 << 24) 8798c2ecf20Sopenharmony_ci#define PCM_SYNC_OUT_INV_SFT 23 8808c2ecf20Sopenharmony_ci#define PCM_SYNC_OUT_INV_MASK 0x1 8818c2ecf20Sopenharmony_ci#define PCM_SYNC_OUT_INV_MASK_SFT (0x1 << 23) 8828c2ecf20Sopenharmony_ci#define PCM_BCLK_OUT_INV_SFT 22 8838c2ecf20Sopenharmony_ci#define PCM_BCLK_OUT_INV_MASK 0x1 8848c2ecf20Sopenharmony_ci#define PCM_BCLK_OUT_INV_MASK_SFT (0x1 << 22) 8858c2ecf20Sopenharmony_ci#define PCM_SYNC_IN_INV_SFT 21 8868c2ecf20Sopenharmony_ci#define PCM_SYNC_IN_INV_MASK 0x1 8878c2ecf20Sopenharmony_ci#define PCM_SYNC_IN_INV_MASK_SFT (0x1 << 21) 8888c2ecf20Sopenharmony_ci#define PCM_BCLK_IN_INV_SFT 20 8898c2ecf20Sopenharmony_ci#define PCM_BCLK_IN_INV_MASK 0x1 8908c2ecf20Sopenharmony_ci#define PCM_BCLK_IN_INV_MASK_SFT (0x1 << 20) 8918c2ecf20Sopenharmony_ci#define PCM_TX_LCH_RPT_SFT 19 8928c2ecf20Sopenharmony_ci#define PCM_TX_LCH_RPT_MASK 0x1 8938c2ecf20Sopenharmony_ci#define PCM_TX_LCH_RPT_MASK_SFT (0x1 << 19) 8948c2ecf20Sopenharmony_ci#define PCM_VBT_16K_MODE_SFT 18 8958c2ecf20Sopenharmony_ci#define PCM_VBT_16K_MODE_MASK 0x1 8968c2ecf20Sopenharmony_ci#define PCM_VBT_16K_MODE_MASK_SFT (0x1 << 18) 8978c2ecf20Sopenharmony_ci#define PCM_EXT_MODEM_SFT 17 8988c2ecf20Sopenharmony_ci#define PCM_EXT_MODEM_MASK 0x1 8998c2ecf20Sopenharmony_ci#define PCM_EXT_MODEM_MASK_SFT (0x1 << 17) 9008c2ecf20Sopenharmony_ci#define PCM_24BIT_SFT 16 9018c2ecf20Sopenharmony_ci#define PCM_24BIT_MASK 0x1 9028c2ecf20Sopenharmony_ci#define PCM_24BIT_MASK_SFT (0x1 << 16) 9038c2ecf20Sopenharmony_ci#define PCM_WLEN_SFT 14 9048c2ecf20Sopenharmony_ci#define PCM_WLEN_MASK 0x3 9058c2ecf20Sopenharmony_ci#define PCM_WLEN_MASK_SFT (0x3 << 14) 9068c2ecf20Sopenharmony_ci#define PCM_SYNC_LENGTH_SFT 9 9078c2ecf20Sopenharmony_ci#define PCM_SYNC_LENGTH_MASK 0x1f 9088c2ecf20Sopenharmony_ci#define PCM_SYNC_LENGTH_MASK_SFT (0x1f << 9) 9098c2ecf20Sopenharmony_ci#define PCM_SYNC_TYPE_SFT 8 9108c2ecf20Sopenharmony_ci#define PCM_SYNC_TYPE_MASK 0x1 9118c2ecf20Sopenharmony_ci#define PCM_SYNC_TYPE_MASK_SFT (0x1 << 8) 9128c2ecf20Sopenharmony_ci#define PCM_BT_MODE_SFT 7 9138c2ecf20Sopenharmony_ci#define PCM_BT_MODE_MASK 0x1 9148c2ecf20Sopenharmony_ci#define PCM_BT_MODE_MASK_SFT (0x1 << 7) 9158c2ecf20Sopenharmony_ci#define PCM_BYP_ASRC_SFT 6 9168c2ecf20Sopenharmony_ci#define PCM_BYP_ASRC_MASK 0x1 9178c2ecf20Sopenharmony_ci#define PCM_BYP_ASRC_MASK_SFT (0x1 << 6) 9188c2ecf20Sopenharmony_ci#define PCM_SLAVE_SFT 5 9198c2ecf20Sopenharmony_ci#define PCM_SLAVE_MASK 0x1 9208c2ecf20Sopenharmony_ci#define PCM_SLAVE_MASK_SFT (0x1 << 5) 9218c2ecf20Sopenharmony_ci#define PCM_MODE_SFT 3 9228c2ecf20Sopenharmony_ci#define PCM_MODE_MASK 0x3 9238c2ecf20Sopenharmony_ci#define PCM_MODE_MASK_SFT (0x3 << 3) 9248c2ecf20Sopenharmony_ci#define PCM_FMT_SFT 1 9258c2ecf20Sopenharmony_ci#define PCM_FMT_MASK 0x3 9268c2ecf20Sopenharmony_ci#define PCM_FMT_MASK_SFT (0x3 << 1) 9278c2ecf20Sopenharmony_ci#define PCM_EN_SFT 0 9288c2ecf20Sopenharmony_ci#define PCM_EN_MASK 0x1 9298c2ecf20Sopenharmony_ci#define PCM_EN_MASK_SFT (0x1 << 0) 9308c2ecf20Sopenharmony_ci 9318c2ecf20Sopenharmony_ci/* PCM_INTF_CON2 */ 9328c2ecf20Sopenharmony_ci#define PCM1_TX_FIFO_OV_SFT 31 9338c2ecf20Sopenharmony_ci#define PCM1_TX_FIFO_OV_MASK 0x1 9348c2ecf20Sopenharmony_ci#define PCM1_TX_FIFO_OV_MASK_SFT (0x1 << 31) 9358c2ecf20Sopenharmony_ci#define PCM1_RX_FIFO_OV_SFT 30 9368c2ecf20Sopenharmony_ci#define PCM1_RX_FIFO_OV_MASK 0x1 9378c2ecf20Sopenharmony_ci#define PCM1_RX_FIFO_OV_MASK_SFT (0x1 << 30) 9388c2ecf20Sopenharmony_ci#define PCM2_TX_FIFO_OV_SFT 29 9398c2ecf20Sopenharmony_ci#define PCM2_TX_FIFO_OV_MASK 0x1 9408c2ecf20Sopenharmony_ci#define PCM2_TX_FIFO_OV_MASK_SFT (0x1 << 29) 9418c2ecf20Sopenharmony_ci#define PCM2_RX_FIFO_OV_SFT 28 9428c2ecf20Sopenharmony_ci#define PCM2_RX_FIFO_OV_MASK 0x1 9438c2ecf20Sopenharmony_ci#define PCM2_RX_FIFO_OV_MASK_SFT (0x1 << 28) 9448c2ecf20Sopenharmony_ci#define PCM1_SYNC_GLITCH_SFT 27 9458c2ecf20Sopenharmony_ci#define PCM1_SYNC_GLITCH_MASK 0x1 9468c2ecf20Sopenharmony_ci#define PCM1_SYNC_GLITCH_MASK_SFT (0x1 << 27) 9478c2ecf20Sopenharmony_ci#define PCM2_SYNC_GLITCH_SFT 26 9488c2ecf20Sopenharmony_ci#define PCM2_SYNC_GLITCH_MASK 0x1 9498c2ecf20Sopenharmony_ci#define PCM2_SYNC_GLITCH_MASK_SFT (0x1 << 26) 9508c2ecf20Sopenharmony_ci#define TX3_RCH_DBG_MODE_SFT 17 9518c2ecf20Sopenharmony_ci#define TX3_RCH_DBG_MODE_MASK 0x1 9528c2ecf20Sopenharmony_ci#define TX3_RCH_DBG_MODE_MASK_SFT (0x1 << 17) 9538c2ecf20Sopenharmony_ci#define PCM1_PCM2_LOOPBACK_SFT 16 9548c2ecf20Sopenharmony_ci#define PCM1_PCM2_LOOPBACK_MASK 0x1 9558c2ecf20Sopenharmony_ci#define PCM1_PCM2_LOOPBACK_MASK_SFT (0x1 << 16) 9568c2ecf20Sopenharmony_ci#define DAI_PCM_LOOPBACK_CH_SFT 14 9578c2ecf20Sopenharmony_ci#define DAI_PCM_LOOPBACK_CH_MASK 0x3 9588c2ecf20Sopenharmony_ci#define DAI_PCM_LOOPBACK_CH_MASK_SFT (0x3 << 14) 9598c2ecf20Sopenharmony_ci#define I2S_PCM_LOOPBACK_CH_SFT 12 9608c2ecf20Sopenharmony_ci#define I2S_PCM_LOOPBACK_CH_MASK 0x3 9618c2ecf20Sopenharmony_ci#define I2S_PCM_LOOPBACK_CH_MASK_SFT (0x3 << 12) 9628c2ecf20Sopenharmony_ci#define TX_FIX_VALUE_SFT 0 9638c2ecf20Sopenharmony_ci#define TX_FIX_VALUE_MASK 0xff 9648c2ecf20Sopenharmony_ci#define TX_FIX_VALUE_MASK_SFT (0xff << 0) 9658c2ecf20Sopenharmony_ci 9668c2ecf20Sopenharmony_ci/* PCM2_INTF_CON */ 9678c2ecf20Sopenharmony_ci#define PCM2_TX_FIX_VALUE_SFT 24 9688c2ecf20Sopenharmony_ci#define PCM2_TX_FIX_VALUE_MASK 0xff 9698c2ecf20Sopenharmony_ci#define PCM2_TX_FIX_VALUE_MASK_SFT (0xff << 24) 9708c2ecf20Sopenharmony_ci#define PCM2_FIX_VALUE_SEL_SFT 23 9718c2ecf20Sopenharmony_ci#define PCM2_FIX_VALUE_SEL_MASK 0x1 9728c2ecf20Sopenharmony_ci#define PCM2_FIX_VALUE_SEL_MASK_SFT (0x1 << 23) 9738c2ecf20Sopenharmony_ci#define PCM2_BUFFER_LOOPBACK_SFT 22 9748c2ecf20Sopenharmony_ci#define PCM2_BUFFER_LOOPBACK_MASK 0x1 9758c2ecf20Sopenharmony_ci#define PCM2_BUFFER_LOOPBACK_MASK_SFT (0x1 << 22) 9768c2ecf20Sopenharmony_ci#define PCM2_PARALLEL_LOOPBACK_SFT 21 9778c2ecf20Sopenharmony_ci#define PCM2_PARALLEL_LOOPBACK_MASK 0x1 9788c2ecf20Sopenharmony_ci#define PCM2_PARALLEL_LOOPBACK_MASK_SFT (0x1 << 21) 9798c2ecf20Sopenharmony_ci#define PCM2_SERIAL_LOOPBACK_SFT 20 9808c2ecf20Sopenharmony_ci#define PCM2_SERIAL_LOOPBACK_MASK 0x1 9818c2ecf20Sopenharmony_ci#define PCM2_SERIAL_LOOPBACK_MASK_SFT (0x1 << 20) 9828c2ecf20Sopenharmony_ci#define PCM2_DAI_PCM_LOOPBACK_SFT 19 9838c2ecf20Sopenharmony_ci#define PCM2_DAI_PCM_LOOPBACK_MASK 0x1 9848c2ecf20Sopenharmony_ci#define PCM2_DAI_PCM_LOOPBACK_MASK_SFT (0x1 << 19) 9858c2ecf20Sopenharmony_ci#define PCM2_I2S_PCM_LOOPBACK_SFT 18 9868c2ecf20Sopenharmony_ci#define PCM2_I2S_PCM_LOOPBACK_MASK 0x1 9878c2ecf20Sopenharmony_ci#define PCM2_I2S_PCM_LOOPBACK_MASK_SFT (0x1 << 18) 9888c2ecf20Sopenharmony_ci#define PCM2_SYNC_DELSEL_SFT 17 9898c2ecf20Sopenharmony_ci#define PCM2_SYNC_DELSEL_MASK 0x1 9908c2ecf20Sopenharmony_ci#define PCM2_SYNC_DELSEL_MASK_SFT (0x1 << 17) 9918c2ecf20Sopenharmony_ci#define PCM2_TX_LR_SWAP_SFT 16 9928c2ecf20Sopenharmony_ci#define PCM2_TX_LR_SWAP_MASK 0x1 9938c2ecf20Sopenharmony_ci#define PCM2_TX_LR_SWAP_MASK_SFT (0x1 << 16) 9948c2ecf20Sopenharmony_ci#define PCM2_SYNC_IN_INV_SFT 15 9958c2ecf20Sopenharmony_ci#define PCM2_SYNC_IN_INV_MASK 0x1 9968c2ecf20Sopenharmony_ci#define PCM2_SYNC_IN_INV_MASK_SFT (0x1 << 15) 9978c2ecf20Sopenharmony_ci#define PCM2_BCLK_IN_INV_SFT 14 9988c2ecf20Sopenharmony_ci#define PCM2_BCLK_IN_INV_MASK 0x1 9998c2ecf20Sopenharmony_ci#define PCM2_BCLK_IN_INV_MASK_SFT (0x1 << 14) 10008c2ecf20Sopenharmony_ci#define PCM2_TX_LCH_RPT_SFT 13 10018c2ecf20Sopenharmony_ci#define PCM2_TX_LCH_RPT_MASK 0x1 10028c2ecf20Sopenharmony_ci#define PCM2_TX_LCH_RPT_MASK_SFT (0x1 << 13) 10038c2ecf20Sopenharmony_ci#define PCM2_VBT_16K_MODE_SFT 12 10048c2ecf20Sopenharmony_ci#define PCM2_VBT_16K_MODE_MASK 0x1 10058c2ecf20Sopenharmony_ci#define PCM2_VBT_16K_MODE_MASK_SFT (0x1 << 12) 10068c2ecf20Sopenharmony_ci#define PCM2_LOOPBACK_CH_SEL_SFT 10 10078c2ecf20Sopenharmony_ci#define PCM2_LOOPBACK_CH_SEL_MASK 0x3 10088c2ecf20Sopenharmony_ci#define PCM2_LOOPBACK_CH_SEL_MASK_SFT (0x3 << 10) 10098c2ecf20Sopenharmony_ci#define PCM2_TX2_BT_MODE_SFT 8 10108c2ecf20Sopenharmony_ci#define PCM2_TX2_BT_MODE_MASK 0x1 10118c2ecf20Sopenharmony_ci#define PCM2_TX2_BT_MODE_MASK_SFT (0x1 << 8) 10128c2ecf20Sopenharmony_ci#define PCM2_BT_MODE_SFT 7 10138c2ecf20Sopenharmony_ci#define PCM2_BT_MODE_MASK 0x1 10148c2ecf20Sopenharmony_ci#define PCM2_BT_MODE_MASK_SFT (0x1 << 7) 10158c2ecf20Sopenharmony_ci#define PCM2_AFIFO_SFT 6 10168c2ecf20Sopenharmony_ci#define PCM2_AFIFO_MASK 0x1 10178c2ecf20Sopenharmony_ci#define PCM2_AFIFO_MASK_SFT (0x1 << 6) 10188c2ecf20Sopenharmony_ci#define PCM2_WLEN_SFT 5 10198c2ecf20Sopenharmony_ci#define PCM2_WLEN_MASK 0x1 10208c2ecf20Sopenharmony_ci#define PCM2_WLEN_MASK_SFT (0x1 << 5) 10218c2ecf20Sopenharmony_ci#define PCM2_MODE_SFT 3 10228c2ecf20Sopenharmony_ci#define PCM2_MODE_MASK 0x3 10238c2ecf20Sopenharmony_ci#define PCM2_MODE_MASK_SFT (0x3 << 3) 10248c2ecf20Sopenharmony_ci#define PCM2_FMT_SFT 1 10258c2ecf20Sopenharmony_ci#define PCM2_FMT_MASK 0x3 10268c2ecf20Sopenharmony_ci#define PCM2_FMT_MASK_SFT (0x3 << 1) 10278c2ecf20Sopenharmony_ci#define PCM2_EN_SFT 0 10288c2ecf20Sopenharmony_ci#define PCM2_EN_MASK 0x1 10298c2ecf20Sopenharmony_ci#define PCM2_EN_MASK_SFT (0x1 << 0) 10308c2ecf20Sopenharmony_ci 10318c2ecf20Sopenharmony_ci/* AFE_ADDA_MTKAIF_CFG0 */ 10328c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_CLKINV_ADC_SFT 31 10338c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_CLKINV_ADC_MASK 0x1 10348c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_CLKINV_ADC_MASK_SFT (0x1 << 31) 10358c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_BYPASS_SRC_SFT 17 10368c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_BYPASS_SRC_MASK 0x1 10378c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_BYPASS_SRC_MASK_SFT (0x1 << 17) 10388c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_PROTOCOL2_SFT 16 10398c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_PROTOCOL2_MASK 0x1 10408c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_PROTOCOL2_MASK_SFT (0x1 << 16) 10418c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_BYPASS_SRC_SFT 5 10428c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_BYPASS_SRC_MASK 0x1 10438c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_BYPASS_SRC_MASK_SFT (0x1 << 5) 10448c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_PROTOCOL2_SFT 4 10458c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_PROTOCOL2_MASK 0x1 10468c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_PROTOCOL2_MASK_SFT (0x1 << 4) 10478c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_8TO5_SFT 2 10488c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_8TO5_MASK 0x1 10498c2ecf20Sopenharmony_ci#define MTKAIF_TXIF_8TO5_MASK_SFT (0x1 << 2) 10508c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_8TO5_SFT 1 10518c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_8TO5_MASK 0x1 10528c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_8TO5_MASK_SFT (0x1 << 1) 10538c2ecf20Sopenharmony_ci#define MTKAIF_IF_LOOPBACK1_SFT 0 10548c2ecf20Sopenharmony_ci#define MTKAIF_IF_LOOPBACK1_MASK 0x1 10558c2ecf20Sopenharmony_ci#define MTKAIF_IF_LOOPBACK1_MASK_SFT (0x1 << 0) 10568c2ecf20Sopenharmony_ci 10578c2ecf20Sopenharmony_ci/* AFE_ADDA_MTKAIF_RX_CFG2 */ 10588c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DETECT_ON_PROTOCOL2_SFT 16 10598c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DETECT_ON_PROTOCOL2_MASK 0x1 10608c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DETECT_ON_PROTOCOL2_MASK_SFT (0x1 << 16) 10618c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DELAY_CYCLE_SFT 12 10628c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DELAY_CYCLE_MASK 0xf 10638c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DELAY_CYCLE_MASK_SFT (0xf << 12) 10648c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DELAY_DATA_SFT 8 10658c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DELAY_DATA_MASK 0x1 10668c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_DELAY_DATA_MASK_SFT (0x1 << 8) 10678c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_FIFO_RSP_PROTOCOL2_SFT 4 10688c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_FIFO_RSP_PROTOCOL2_MASK 0x7 10698c2ecf20Sopenharmony_ci#define MTKAIF_RXIF_FIFO_RSP_PROTOCOL2_MASK_SFT (0x7 << 4) 10708c2ecf20Sopenharmony_ci 10718c2ecf20Sopenharmony_ci/* AFE_ADDA_DL_SRC2_CON0 */ 10728c2ecf20Sopenharmony_ci#define DL_2_INPUT_MODE_CTL_SFT 28 10738c2ecf20Sopenharmony_ci#define DL_2_INPUT_MODE_CTL_MASK 0xf 10748c2ecf20Sopenharmony_ci#define DL_2_INPUT_MODE_CTL_MASK_SFT (0xf << 28) 10758c2ecf20Sopenharmony_ci#define DL_2_CH1_SATURATION_EN_CTL_SFT 27 10768c2ecf20Sopenharmony_ci#define DL_2_CH1_SATURATION_EN_CTL_MASK 0x1 10778c2ecf20Sopenharmony_ci#define DL_2_CH1_SATURATION_EN_CTL_MASK_SFT (0x1 << 27) 10788c2ecf20Sopenharmony_ci#define DL_2_CH2_SATURATION_EN_CTL_SFT 26 10798c2ecf20Sopenharmony_ci#define DL_2_CH2_SATURATION_EN_CTL_MASK 0x1 10808c2ecf20Sopenharmony_ci#define DL_2_CH2_SATURATION_EN_CTL_MASK_SFT (0x1 << 26) 10818c2ecf20Sopenharmony_ci#define DL_2_OUTPUT_SEL_CTL_SFT 24 10828c2ecf20Sopenharmony_ci#define DL_2_OUTPUT_SEL_CTL_MASK 0x3 10838c2ecf20Sopenharmony_ci#define DL_2_OUTPUT_SEL_CTL_MASK_SFT (0x3 << 24) 10848c2ecf20Sopenharmony_ci#define DL_2_FADEIN_0START_EN_SFT 16 10858c2ecf20Sopenharmony_ci#define DL_2_FADEIN_0START_EN_MASK 0x3 10868c2ecf20Sopenharmony_ci#define DL_2_FADEIN_0START_EN_MASK_SFT (0x3 << 16) 10878c2ecf20Sopenharmony_ci#define DL_DISABLE_HW_CG_CTL_SFT 15 10888c2ecf20Sopenharmony_ci#define DL_DISABLE_HW_CG_CTL_MASK 0x1 10898c2ecf20Sopenharmony_ci#define DL_DISABLE_HW_CG_CTL_MASK_SFT (0x1 << 15) 10908c2ecf20Sopenharmony_ci#define C_DATA_EN_SEL_CTL_PRE_SFT 14 10918c2ecf20Sopenharmony_ci#define C_DATA_EN_SEL_CTL_PRE_MASK 0x1 10928c2ecf20Sopenharmony_ci#define C_DATA_EN_SEL_CTL_PRE_MASK_SFT (0x1 << 14) 10938c2ecf20Sopenharmony_ci#define DL_2_SIDE_TONE_ON_CTL_PRE_SFT 13 10948c2ecf20Sopenharmony_ci#define DL_2_SIDE_TONE_ON_CTL_PRE_MASK 0x1 10958c2ecf20Sopenharmony_ci#define DL_2_SIDE_TONE_ON_CTL_PRE_MASK_SFT (0x1 << 13) 10968c2ecf20Sopenharmony_ci#define DL_2_MUTE_CH1_OFF_CTL_PRE_SFT 12 10978c2ecf20Sopenharmony_ci#define DL_2_MUTE_CH1_OFF_CTL_PRE_MASK 0x1 10988c2ecf20Sopenharmony_ci#define DL_2_MUTE_CH1_OFF_CTL_PRE_MASK_SFT (0x1 << 12) 10998c2ecf20Sopenharmony_ci#define DL_2_MUTE_CH2_OFF_CTL_PRE_SFT 11 11008c2ecf20Sopenharmony_ci#define DL_2_MUTE_CH2_OFF_CTL_PRE_MASK 0x1 11018c2ecf20Sopenharmony_ci#define DL_2_MUTE_CH2_OFF_CTL_PRE_MASK_SFT (0x1 << 11) 11028c2ecf20Sopenharmony_ci#define DL2_ARAMPSP_CTL_PRE_SFT 9 11038c2ecf20Sopenharmony_ci#define DL2_ARAMPSP_CTL_PRE_MASK 0x3 11048c2ecf20Sopenharmony_ci#define DL2_ARAMPSP_CTL_PRE_MASK_SFT (0x3 << 9) 11058c2ecf20Sopenharmony_ci#define DL_2_IIRMODE_CTL_PRE_SFT 6 11068c2ecf20Sopenharmony_ci#define DL_2_IIRMODE_CTL_PRE_MASK 0x7 11078c2ecf20Sopenharmony_ci#define DL_2_IIRMODE_CTL_PRE_MASK_SFT (0x7 << 6) 11088c2ecf20Sopenharmony_ci#define DL_2_VOICE_MODE_CTL_PRE_SFT 5 11098c2ecf20Sopenharmony_ci#define DL_2_VOICE_MODE_CTL_PRE_MASK 0x1 11108c2ecf20Sopenharmony_ci#define DL_2_VOICE_MODE_CTL_PRE_MASK_SFT (0x1 << 5) 11118c2ecf20Sopenharmony_ci#define D2_2_MUTE_CH1_ON_CTL_PRE_SFT 4 11128c2ecf20Sopenharmony_ci#define D2_2_MUTE_CH1_ON_CTL_PRE_MASK 0x1 11138c2ecf20Sopenharmony_ci#define D2_2_MUTE_CH1_ON_CTL_PRE_MASK_SFT (0x1 << 4) 11148c2ecf20Sopenharmony_ci#define D2_2_MUTE_CH2_ON_CTL_PRE_SFT 3 11158c2ecf20Sopenharmony_ci#define D2_2_MUTE_CH2_ON_CTL_PRE_MASK 0x1 11168c2ecf20Sopenharmony_ci#define D2_2_MUTE_CH2_ON_CTL_PRE_MASK_SFT (0x1 << 3) 11178c2ecf20Sopenharmony_ci#define DL_2_IIR_ON_CTL_PRE_SFT 2 11188c2ecf20Sopenharmony_ci#define DL_2_IIR_ON_CTL_PRE_MASK 0x1 11198c2ecf20Sopenharmony_ci#define DL_2_IIR_ON_CTL_PRE_MASK_SFT (0x1 << 2) 11208c2ecf20Sopenharmony_ci#define DL_2_GAIN_ON_CTL_PRE_SFT 1 11218c2ecf20Sopenharmony_ci#define DL_2_GAIN_ON_CTL_PRE_MASK 0x1 11228c2ecf20Sopenharmony_ci#define DL_2_GAIN_ON_CTL_PRE_MASK_SFT (0x1 << 1) 11238c2ecf20Sopenharmony_ci#define DL_2_SRC_ON_TMP_CTL_PRE_SFT 0 11248c2ecf20Sopenharmony_ci#define DL_2_SRC_ON_TMP_CTL_PRE_MASK 0x1 11258c2ecf20Sopenharmony_ci#define DL_2_SRC_ON_TMP_CTL_PRE_MASK_SFT (0x1 << 0) 11268c2ecf20Sopenharmony_ci 11278c2ecf20Sopenharmony_ci/* AFE_ADDA_DL_SRC2_CON1 */ 11288c2ecf20Sopenharmony_ci#define DL_2_GAIN_CTL_PRE_SFT 16 11298c2ecf20Sopenharmony_ci#define DL_2_GAIN_CTL_PRE_MASK 0xffff 11308c2ecf20Sopenharmony_ci#define DL_2_GAIN_CTL_PRE_MASK_SFT (0xffff << 16) 11318c2ecf20Sopenharmony_ci#define DL_2_GAIN_MODE_CTL_SFT 0 11328c2ecf20Sopenharmony_ci#define DL_2_GAIN_MODE_CTL_MASK 0x1 11338c2ecf20Sopenharmony_ci#define DL_2_GAIN_MODE_CTL_MASK_SFT (0x1 << 0) 11348c2ecf20Sopenharmony_ci 11358c2ecf20Sopenharmony_ci/* AFE_ADDA_UL_SRC_CON0 */ 11368c2ecf20Sopenharmony_ci#define ULCF_CFG_EN_CTL_SFT 31 11378c2ecf20Sopenharmony_ci#define ULCF_CFG_EN_CTL_MASK 0x1 11388c2ecf20Sopenharmony_ci#define ULCF_CFG_EN_CTL_MASK_SFT (0x1 << 31) 11398c2ecf20Sopenharmony_ci#define UL_MODE_3P25M_CH2_CTL_SFT 22 11408c2ecf20Sopenharmony_ci#define UL_MODE_3P25M_CH2_CTL_MASK 0x1 11418c2ecf20Sopenharmony_ci#define UL_MODE_3P25M_CH2_CTL_MASK_SFT (0x1 << 22) 11428c2ecf20Sopenharmony_ci#define UL_MODE_3P25M_CH1_CTL_SFT 21 11438c2ecf20Sopenharmony_ci#define UL_MODE_3P25M_CH1_CTL_MASK 0x1 11448c2ecf20Sopenharmony_ci#define UL_MODE_3P25M_CH1_CTL_MASK_SFT (0x1 << 21) 11458c2ecf20Sopenharmony_ci#define UL_VOICE_MODE_CH1_CH2_CTL_SFT 17 11468c2ecf20Sopenharmony_ci#define UL_VOICE_MODE_CH1_CH2_CTL_MASK 0x7 11478c2ecf20Sopenharmony_ci#define UL_VOICE_MODE_CH1_CH2_CTL_MASK_SFT (0x7 << 17) 11488c2ecf20Sopenharmony_ci#define DMIC_LOW_POWER_MODE_CTL_SFT 14 11498c2ecf20Sopenharmony_ci#define DMIC_LOW_POWER_MODE_CTL_MASK 0x3 11508c2ecf20Sopenharmony_ci#define DMIC_LOW_POWER_MODE_CTL_MASK_SFT (0x3 << 14) 11518c2ecf20Sopenharmony_ci#define UL_DISABLE_HW_CG_CTL_SFT 12 11528c2ecf20Sopenharmony_ci#define UL_DISABLE_HW_CG_CTL_MASK 0x1 11538c2ecf20Sopenharmony_ci#define UL_DISABLE_HW_CG_CTL_MASK_SFT (0x1 << 12) 11548c2ecf20Sopenharmony_ci#define UL_IIR_ON_TMP_CTL_SFT 10 11558c2ecf20Sopenharmony_ci#define UL_IIR_ON_TMP_CTL_MASK 0x1 11568c2ecf20Sopenharmony_ci#define UL_IIR_ON_TMP_CTL_MASK_SFT (0x1 << 10) 11578c2ecf20Sopenharmony_ci#define UL_IIRMODE_CTL_SFT 7 11588c2ecf20Sopenharmony_ci#define UL_IIRMODE_CTL_MASK 0x7 11598c2ecf20Sopenharmony_ci#define UL_IIRMODE_CTL_MASK_SFT (0x7 << 7) 11608c2ecf20Sopenharmony_ci#define DIGMIC_3P25M_1P625M_SEL_CTL_SFT 5 11618c2ecf20Sopenharmony_ci#define DIGMIC_3P25M_1P625M_SEL_CTL_MASK 0x1 11628c2ecf20Sopenharmony_ci#define DIGMIC_3P25M_1P625M_SEL_CTL_MASK_SFT (0x1 << 5) 11638c2ecf20Sopenharmony_ci#define UL_LOOP_BACK_MODE_CTL_SFT 2 11648c2ecf20Sopenharmony_ci#define UL_LOOP_BACK_MODE_CTL_MASK 0x1 11658c2ecf20Sopenharmony_ci#define UL_LOOP_BACK_MODE_CTL_MASK_SFT (0x1 << 2) 11668c2ecf20Sopenharmony_ci#define UL_SDM_3_LEVEL_CTL_SFT 1 11678c2ecf20Sopenharmony_ci#define UL_SDM_3_LEVEL_CTL_MASK 0x1 11688c2ecf20Sopenharmony_ci#define UL_SDM_3_LEVEL_CTL_MASK_SFT (0x1 << 1) 11698c2ecf20Sopenharmony_ci#define UL_SRC_ON_TMP_CTL_SFT 0 11708c2ecf20Sopenharmony_ci#define UL_SRC_ON_TMP_CTL_MASK 0x1 11718c2ecf20Sopenharmony_ci#define UL_SRC_ON_TMP_CTL_MASK_SFT (0x1 << 0) 11728c2ecf20Sopenharmony_ci 11738c2ecf20Sopenharmony_ci/* AFE_ADDA_UL_SRC_CON1 */ 11748c2ecf20Sopenharmony_ci#define C_DAC_EN_CTL_SFT 27 11758c2ecf20Sopenharmony_ci#define C_DAC_EN_CTL_MASK 0x1 11768c2ecf20Sopenharmony_ci#define C_DAC_EN_CTL_MASK_SFT (0x1 << 27) 11778c2ecf20Sopenharmony_ci#define C_MUTE_SW_CTL_SFT 26 11788c2ecf20Sopenharmony_ci#define C_MUTE_SW_CTL_MASK 0x1 11798c2ecf20Sopenharmony_ci#define C_MUTE_SW_CTL_MASK_SFT (0x1 << 26) 11808c2ecf20Sopenharmony_ci#define ASDM_SRC_SEL_CTL_SFT 25 11818c2ecf20Sopenharmony_ci#define ASDM_SRC_SEL_CTL_MASK 0x1 11828c2ecf20Sopenharmony_ci#define ASDM_SRC_SEL_CTL_MASK_SFT (0x1 << 25) 11838c2ecf20Sopenharmony_ci#define C_AMP_DIV_CH2_CTL_SFT 21 11848c2ecf20Sopenharmony_ci#define C_AMP_DIV_CH2_CTL_MASK 0x7 11858c2ecf20Sopenharmony_ci#define C_AMP_DIV_CH2_CTL_MASK_SFT (0x7 << 21) 11868c2ecf20Sopenharmony_ci#define C_FREQ_DIV_CH2_CTL_SFT 16 11878c2ecf20Sopenharmony_ci#define C_FREQ_DIV_CH2_CTL_MASK 0x1f 11888c2ecf20Sopenharmony_ci#define C_FREQ_DIV_CH2_CTL_MASK_SFT (0x1f << 16) 11898c2ecf20Sopenharmony_ci#define C_SINE_MODE_CH2_CTL_SFT 12 11908c2ecf20Sopenharmony_ci#define C_SINE_MODE_CH2_CTL_MASK 0xf 11918c2ecf20Sopenharmony_ci#define C_SINE_MODE_CH2_CTL_MASK_SFT (0xf << 12) 11928c2ecf20Sopenharmony_ci#define C_AMP_DIV_CH1_CTL_SFT 9 11938c2ecf20Sopenharmony_ci#define C_AMP_DIV_CH1_CTL_MASK 0x7 11948c2ecf20Sopenharmony_ci#define C_AMP_DIV_CH1_CTL_MASK_SFT (0x7 << 9) 11958c2ecf20Sopenharmony_ci#define C_FREQ_DIV_CH1_CTL_SFT 4 11968c2ecf20Sopenharmony_ci#define C_FREQ_DIV_CH1_CTL_MASK 0x1f 11978c2ecf20Sopenharmony_ci#define C_FREQ_DIV_CH1_CTL_MASK_SFT (0x1f << 4) 11988c2ecf20Sopenharmony_ci#define C_SINE_MODE_CH1_CTL_SFT 0 11998c2ecf20Sopenharmony_ci#define C_SINE_MODE_CH1_CTL_MASK 0xf 12008c2ecf20Sopenharmony_ci#define C_SINE_MODE_CH1_CTL_MASK_SFT (0xf << 0) 12018c2ecf20Sopenharmony_ci 12028c2ecf20Sopenharmony_ci/* AFE_ADDA_TOP_CON0 */ 12038c2ecf20Sopenharmony_ci#define C_LOOP_BACK_MODE_CTL_SFT 12 12048c2ecf20Sopenharmony_ci#define C_LOOP_BACK_MODE_CTL_MASK 0xf 12058c2ecf20Sopenharmony_ci#define C_LOOP_BACK_MODE_CTL_MASK_SFT (0xf << 12) 12068c2ecf20Sopenharmony_ci#define C_EXT_ADC_CTL_SFT 0 12078c2ecf20Sopenharmony_ci#define C_EXT_ADC_CTL_MASK 0x1 12088c2ecf20Sopenharmony_ci#define C_EXT_ADC_CTL_MASK_SFT (0x1 << 0) 12098c2ecf20Sopenharmony_ci 12108c2ecf20Sopenharmony_ci/* AFE_ADDA_UL_DL_CON0 */ 12118c2ecf20Sopenharmony_ci#define AFE_ADDA6_UL_LR_SWAP_SFT 15 12128c2ecf20Sopenharmony_ci#define AFE_ADDA6_UL_LR_SWAP_MASK 0x1 12138c2ecf20Sopenharmony_ci#define AFE_ADDA6_UL_LR_SWAP_MASK_SFT (0x1 << 15) 12148c2ecf20Sopenharmony_ci#define AFE_ADDA6_CKDIV_RST_SFT 14 12158c2ecf20Sopenharmony_ci#define AFE_ADDA6_CKDIV_RST_MASK 0x1 12168c2ecf20Sopenharmony_ci#define AFE_ADDA6_CKDIV_RST_MASK_SFT (0x1 << 14) 12178c2ecf20Sopenharmony_ci#define AFE_ADDA6_FIFO_AUTO_RST_SFT 13 12188c2ecf20Sopenharmony_ci#define AFE_ADDA6_FIFO_AUTO_RST_MASK 0x1 12198c2ecf20Sopenharmony_ci#define AFE_ADDA6_FIFO_AUTO_RST_MASK_SFT (0x1 << 13) 12208c2ecf20Sopenharmony_ci#define UL_FIFO_DIGMIC_TESTIN_SFT 5 12218c2ecf20Sopenharmony_ci#define UL_FIFO_DIGMIC_TESTIN_MASK 0x3 12228c2ecf20Sopenharmony_ci#define UL_FIFO_DIGMIC_TESTIN_MASK_SFT (0x3 << 5) 12238c2ecf20Sopenharmony_ci#define UL_FIFO_DIGMIC_WDATA_TESTEN_SFT 4 12248c2ecf20Sopenharmony_ci#define UL_FIFO_DIGMIC_WDATA_TESTEN_MASK 0x1 12258c2ecf20Sopenharmony_ci#define UL_FIFO_DIGMIC_WDATA_TESTEN_MASK_SFT (0x1 << 4) 12268c2ecf20Sopenharmony_ci#define ADDA_AFE_ON_SFT 0 12278c2ecf20Sopenharmony_ci#define ADDA_AFE_ON_MASK 0x1 12288c2ecf20Sopenharmony_ci#define ADDA_AFE_ON_MASK_SFT (0x1 << 0) 12298c2ecf20Sopenharmony_ci 12308c2ecf20Sopenharmony_ci/* AFE_SIDETONE_CON0 */ 12318c2ecf20Sopenharmony_ci#define R_RDY_SFT 30 12328c2ecf20Sopenharmony_ci#define R_RDY_MASK 0x1 12338c2ecf20Sopenharmony_ci#define R_RDY_MASK_SFT (0x1 << 30) 12348c2ecf20Sopenharmony_ci#define W_RDY_SFT 29 12358c2ecf20Sopenharmony_ci#define W_RDY_MASK 0x1 12368c2ecf20Sopenharmony_ci#define W_RDY_MASK_SFT (0x1 << 29) 12378c2ecf20Sopenharmony_ci#define R_W_EN_SFT 25 12388c2ecf20Sopenharmony_ci#define R_W_EN_MASK 0x1 12398c2ecf20Sopenharmony_ci#define R_W_EN_MASK_SFT (0x1 << 25) 12408c2ecf20Sopenharmony_ci#define R_W_SEL_SFT 24 12418c2ecf20Sopenharmony_ci#define R_W_SEL_MASK 0x1 12428c2ecf20Sopenharmony_ci#define R_W_SEL_MASK_SFT (0x1 << 24) 12438c2ecf20Sopenharmony_ci#define SEL_CH2_SFT 23 12448c2ecf20Sopenharmony_ci#define SEL_CH2_MASK 0x1 12458c2ecf20Sopenharmony_ci#define SEL_CH2_MASK_SFT (0x1 << 23) 12468c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFFICIENT_ADDR_SFT 16 12478c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFFICIENT_ADDR_MASK 0x1f 12488c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFFICIENT_ADDR_MASK_SFT (0x1f << 16) 12498c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFFICIENT_SFT 0 12508c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFFICIENT_MASK 0xffff 12518c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFFICIENT_MASK_SFT (0xffff << 0) 12528c2ecf20Sopenharmony_ci 12538c2ecf20Sopenharmony_ci/* AFE_SIDETONE_COEFF */ 12548c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFF_SFT 0 12558c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFF_MASK 0xffff 12568c2ecf20Sopenharmony_ci#define SIDE_TONE_COEFF_MASK_SFT (0xffff << 0) 12578c2ecf20Sopenharmony_ci 12588c2ecf20Sopenharmony_ci/* AFE_SIDETONE_CON1 */ 12598c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_SFT 31 12608c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_MASK 0x1 12618c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_MASK_SFT (0x1 << 31) 12628c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_O28_O29_SFT 30 12638c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_O28_O29_MASK 0x1 12648c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_O28_O29_MASK_SFT (0x1 << 30) 12658c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_I2S4_SFT 29 12668c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_I2S4_MASK 0x1 12678c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_I2S4_MASK_SFT (0x1 << 29) 12688c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_I2S5_SFT 28 12698c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_I2S5_MASK 0x1 12708c2ecf20Sopenharmony_ci#define STF_BYPASS_MODE_I2S5_MASK_SFT (0x1 << 28) 12718c2ecf20Sopenharmony_ci#define STF_INPUT_EN_SEL_SFT 13 12728c2ecf20Sopenharmony_ci#define STF_INPUT_EN_SEL_MASK 0x1 12738c2ecf20Sopenharmony_ci#define STF_INPUT_EN_SEL_MASK_SFT (0x1 << 13) 12748c2ecf20Sopenharmony_ci#define STF_SOURCE_FROM_O19O20_SFT 12 12758c2ecf20Sopenharmony_ci#define STF_SOURCE_FROM_O19O20_MASK 0x1 12768c2ecf20Sopenharmony_ci#define STF_SOURCE_FROM_O19O20_MASK_SFT (0x1 << 12) 12778c2ecf20Sopenharmony_ci#define SIDE_TONE_ON_SFT 8 12788c2ecf20Sopenharmony_ci#define SIDE_TONE_ON_MASK 0x1 12798c2ecf20Sopenharmony_ci#define SIDE_TONE_ON_MASK_SFT (0x1 << 8) 12808c2ecf20Sopenharmony_ci#define SIDE_TONE_HALF_TAP_NUM_SFT 0 12818c2ecf20Sopenharmony_ci#define SIDE_TONE_HALF_TAP_NUM_MASK 0x3f 12828c2ecf20Sopenharmony_ci#define SIDE_TONE_HALF_TAP_NUM_MASK_SFT (0x3f << 0) 12838c2ecf20Sopenharmony_ci 12848c2ecf20Sopenharmony_ci/* AFE_SIDETONE_GAIN */ 12858c2ecf20Sopenharmony_ci#define POSITIVE_GAIN_SFT 16 12868c2ecf20Sopenharmony_ci#define POSITIVE_GAIN_MASK 0x7 12878c2ecf20Sopenharmony_ci#define POSITIVE_GAIN_MASK_SFT (0x7 << 16) 12888c2ecf20Sopenharmony_ci#define SIDE_TONE_GAIN_SFT 0 12898c2ecf20Sopenharmony_ci#define SIDE_TONE_GAIN_MASK 0xffff 12908c2ecf20Sopenharmony_ci#define SIDE_TONE_GAIN_MASK_SFT (0xffff << 0) 12918c2ecf20Sopenharmony_ci 12928c2ecf20Sopenharmony_ci/* AFE_ADDA_DL_SDM_DCCOMP_CON */ 12938c2ecf20Sopenharmony_ci#define AUD_DC_COMP_EN_SFT 8 12948c2ecf20Sopenharmony_ci#define AUD_DC_COMP_EN_MASK 0x1 12958c2ecf20Sopenharmony_ci#define AUD_DC_COMP_EN_MASK_SFT (0x1 << 8) 12968c2ecf20Sopenharmony_ci#define ATTGAIN_CTL_SFT 0 12978c2ecf20Sopenharmony_ci#define ATTGAIN_CTL_MASK 0x3f 12988c2ecf20Sopenharmony_ci#define ATTGAIN_CTL_MASK_SFT (0x3f << 0) 12998c2ecf20Sopenharmony_ci 13008c2ecf20Sopenharmony_ci/* AFE_SINEGEN_CON0 */ 13018c2ecf20Sopenharmony_ci#define DAC_EN_SFT 26 13028c2ecf20Sopenharmony_ci#define DAC_EN_MASK 0x1 13038c2ecf20Sopenharmony_ci#define DAC_EN_MASK_SFT (0x1 << 26) 13048c2ecf20Sopenharmony_ci#define MUTE_SW_CH2_SFT 25 13058c2ecf20Sopenharmony_ci#define MUTE_SW_CH2_MASK 0x1 13068c2ecf20Sopenharmony_ci#define MUTE_SW_CH2_MASK_SFT (0x1 << 25) 13078c2ecf20Sopenharmony_ci#define MUTE_SW_CH1_SFT 24 13088c2ecf20Sopenharmony_ci#define MUTE_SW_CH1_MASK 0x1 13098c2ecf20Sopenharmony_ci#define MUTE_SW_CH1_MASK_SFT (0x1 << 24) 13108c2ecf20Sopenharmony_ci#define SINE_MODE_CH2_SFT 20 13118c2ecf20Sopenharmony_ci#define SINE_MODE_CH2_MASK 0xf 13128c2ecf20Sopenharmony_ci#define SINE_MODE_CH2_MASK_SFT (0xf << 20) 13138c2ecf20Sopenharmony_ci#define AMP_DIV_CH2_SFT 17 13148c2ecf20Sopenharmony_ci#define AMP_DIV_CH2_MASK 0x7 13158c2ecf20Sopenharmony_ci#define AMP_DIV_CH2_MASK_SFT (0x7 << 17) 13168c2ecf20Sopenharmony_ci#define FREQ_DIV_CH2_SFT 12 13178c2ecf20Sopenharmony_ci#define FREQ_DIV_CH2_MASK 0x1f 13188c2ecf20Sopenharmony_ci#define FREQ_DIV_CH2_MASK_SFT (0x1f << 12) 13198c2ecf20Sopenharmony_ci#define SINE_MODE_CH1_SFT 8 13208c2ecf20Sopenharmony_ci#define SINE_MODE_CH1_MASK 0xf 13218c2ecf20Sopenharmony_ci#define SINE_MODE_CH1_MASK_SFT (0xf << 8) 13228c2ecf20Sopenharmony_ci#define AMP_DIV_CH1_SFT 5 13238c2ecf20Sopenharmony_ci#define AMP_DIV_CH1_MASK 0x7 13248c2ecf20Sopenharmony_ci#define AMP_DIV_CH1_MASK_SFT (0x7 << 5) 13258c2ecf20Sopenharmony_ci#define FREQ_DIV_CH1_SFT 0 13268c2ecf20Sopenharmony_ci#define FREQ_DIV_CH1_MASK 0x1f 13278c2ecf20Sopenharmony_ci#define FREQ_DIV_CH1_MASK_SFT (0x1f << 0) 13288c2ecf20Sopenharmony_ci 13298c2ecf20Sopenharmony_ci/* AFE_SINEGEN_CON2 */ 13308c2ecf20Sopenharmony_ci#define INNER_LOOP_BACK_MODE_SFT 0 13318c2ecf20Sopenharmony_ci#define INNER_LOOP_BACK_MODE_MASK 0x3f 13328c2ecf20Sopenharmony_ci#define INNER_LOOP_BACK_MODE_MASK_SFT (0x3f << 0) 13338c2ecf20Sopenharmony_ci 13348c2ecf20Sopenharmony_ci/* AFE_MEMIF_MINLEN */ 13358c2ecf20Sopenharmony_ci#define HDMI_MINLEN_SFT 24 13368c2ecf20Sopenharmony_ci#define HDMI_MINLEN_MASK 0xf 13378c2ecf20Sopenharmony_ci#define HDMI_MINLEN_MASK_SFT (0xf << 24) 13388c2ecf20Sopenharmony_ci#define DL3_MINLEN_SFT 12 13398c2ecf20Sopenharmony_ci#define DL3_MINLEN_MASK 0xf 13408c2ecf20Sopenharmony_ci#define DL3_MINLEN_MASK_SFT (0xf << 12) 13418c2ecf20Sopenharmony_ci#define DL2_MINLEN_SFT 8 13428c2ecf20Sopenharmony_ci#define DL2_MINLEN_MASK 0xf 13438c2ecf20Sopenharmony_ci#define DL2_MINLEN_MASK_SFT (0xf << 8) 13448c2ecf20Sopenharmony_ci#define DL1_DATA2_MINLEN_SFT 4 13458c2ecf20Sopenharmony_ci#define DL1_DATA2_MINLEN_MASK 0xf 13468c2ecf20Sopenharmony_ci#define DL1_DATA2_MINLEN_MASK_SFT (0xf << 4) 13478c2ecf20Sopenharmony_ci#define DL1_MINLEN_SFT 0 13488c2ecf20Sopenharmony_ci#define DL1_MINLEN_MASK 0xf 13498c2ecf20Sopenharmony_ci#define DL1_MINLEN_MASK_SFT (0xf << 0) 13508c2ecf20Sopenharmony_ci 13518c2ecf20Sopenharmony_ci/* AFE_MEMIF_MAXLEN */ 13528c2ecf20Sopenharmony_ci#define HDMI_MAXLEN_SFT 24 13538c2ecf20Sopenharmony_ci#define HDMI_MAXLEN_MASK 0xf 13548c2ecf20Sopenharmony_ci#define HDMI_MAXLEN_MASK_SFT (0xf << 24) 13558c2ecf20Sopenharmony_ci#define DL3_MAXLEN_SFT 8 13568c2ecf20Sopenharmony_ci#define DL3_MAXLEN_MASK 0xf 13578c2ecf20Sopenharmony_ci#define DL3_MAXLEN_MASK_SFT (0xf << 8) 13588c2ecf20Sopenharmony_ci#define DL2_MAXLEN_SFT 4 13598c2ecf20Sopenharmony_ci#define DL2_MAXLEN_MASK 0xf 13608c2ecf20Sopenharmony_ci#define DL2_MAXLEN_MASK_SFT (0xf << 4) 13618c2ecf20Sopenharmony_ci#define DL1_MAXLEN_SFT 0 13628c2ecf20Sopenharmony_ci#define DL1_MAXLEN_MASK 0x3 13638c2ecf20Sopenharmony_ci#define DL1_MAXLEN_MASK_SFT (0x3 << 0) 13648c2ecf20Sopenharmony_ci 13658c2ecf20Sopenharmony_ci/* AFE_MEMIF_PBUF_SIZE */ 13668c2ecf20Sopenharmony_ci#define VUL12_4CH_SFT 17 13678c2ecf20Sopenharmony_ci#define VUL12_4CH_MASK 0x1 13688c2ecf20Sopenharmony_ci#define VUL12_4CH_MASK_SFT (0x1 << 17) 13698c2ecf20Sopenharmony_ci#define DL3_PBUF_SIZE_SFT 10 13708c2ecf20Sopenharmony_ci#define DL3_PBUF_SIZE_MASK 0x3 13718c2ecf20Sopenharmony_ci#define DL3_PBUF_SIZE_MASK_SFT (0x3 << 10) 13728c2ecf20Sopenharmony_ci#define HDMI_PBUF_SIZE_SFT 4 13738c2ecf20Sopenharmony_ci#define HDMI_PBUF_SIZE_MASK 0x3 13748c2ecf20Sopenharmony_ci#define HDMI_PBUF_SIZE_MASK_SFT (0x3 << 4) 13758c2ecf20Sopenharmony_ci#define DL2_PBUF_SIZE_SFT 2 13768c2ecf20Sopenharmony_ci#define DL2_PBUF_SIZE_MASK 0x3 13778c2ecf20Sopenharmony_ci#define DL2_PBUF_SIZE_MASK_SFT (0x3 << 2) 13788c2ecf20Sopenharmony_ci#define DL1_PBUF_SIZE_SFT 0 13798c2ecf20Sopenharmony_ci#define DL1_PBUF_SIZE_MASK 0x3 13808c2ecf20Sopenharmony_ci#define DL1_PBUF_SIZE_MASK_SFT (0x3 << 0) 13818c2ecf20Sopenharmony_ci 13828c2ecf20Sopenharmony_ci/* AFE_HD_ENGEN_ENABLE */ 13838c2ecf20Sopenharmony_ci#define AFE_24M_ON_SFT 1 13848c2ecf20Sopenharmony_ci#define AFE_24M_ON_MASK 0x1 13858c2ecf20Sopenharmony_ci#define AFE_24M_ON_MASK_SFT (0x1 << 1) 13868c2ecf20Sopenharmony_ci#define AFE_22M_ON_SFT 0 13878c2ecf20Sopenharmony_ci#define AFE_22M_ON_MASK 0x1 13888c2ecf20Sopenharmony_ci#define AFE_22M_ON_MASK_SFT (0x1 << 0) 13898c2ecf20Sopenharmony_ci 13908c2ecf20Sopenharmony_ci/* AFE_IRQ_MCU_CON0 */ 13918c2ecf20Sopenharmony_ci#define IRQ12_MCU_ON_SFT 12 13928c2ecf20Sopenharmony_ci#define IRQ12_MCU_ON_MASK 0x1 13938c2ecf20Sopenharmony_ci#define IRQ12_MCU_ON_MASK_SFT (0x1 << 12) 13948c2ecf20Sopenharmony_ci#define IRQ11_MCU_ON_SFT 11 13958c2ecf20Sopenharmony_ci#define IRQ11_MCU_ON_MASK 0x1 13968c2ecf20Sopenharmony_ci#define IRQ11_MCU_ON_MASK_SFT (0x1 << 11) 13978c2ecf20Sopenharmony_ci#define IRQ10_MCU_ON_SFT 10 13988c2ecf20Sopenharmony_ci#define IRQ10_MCU_ON_MASK 0x1 13998c2ecf20Sopenharmony_ci#define IRQ10_MCU_ON_MASK_SFT (0x1 << 10) 14008c2ecf20Sopenharmony_ci#define IRQ9_MCU_ON_SFT 9 14018c2ecf20Sopenharmony_ci#define IRQ9_MCU_ON_MASK 0x1 14028c2ecf20Sopenharmony_ci#define IRQ9_MCU_ON_MASK_SFT (0x1 << 9) 14038c2ecf20Sopenharmony_ci#define IRQ8_MCU_ON_SFT 8 14048c2ecf20Sopenharmony_ci#define IRQ8_MCU_ON_MASK 0x1 14058c2ecf20Sopenharmony_ci#define IRQ8_MCU_ON_MASK_SFT (0x1 << 8) 14068c2ecf20Sopenharmony_ci#define IRQ7_MCU_ON_SFT 7 14078c2ecf20Sopenharmony_ci#define IRQ7_MCU_ON_MASK 0x1 14088c2ecf20Sopenharmony_ci#define IRQ7_MCU_ON_MASK_SFT (0x1 << 7) 14098c2ecf20Sopenharmony_ci#define IRQ6_MCU_ON_SFT 6 14108c2ecf20Sopenharmony_ci#define IRQ6_MCU_ON_MASK 0x1 14118c2ecf20Sopenharmony_ci#define IRQ6_MCU_ON_MASK_SFT (0x1 << 6) 14128c2ecf20Sopenharmony_ci#define IRQ5_MCU_ON_SFT 5 14138c2ecf20Sopenharmony_ci#define IRQ5_MCU_ON_MASK 0x1 14148c2ecf20Sopenharmony_ci#define IRQ5_MCU_ON_MASK_SFT (0x1 << 5) 14158c2ecf20Sopenharmony_ci#define IRQ4_MCU_ON_SFT 4 14168c2ecf20Sopenharmony_ci#define IRQ4_MCU_ON_MASK 0x1 14178c2ecf20Sopenharmony_ci#define IRQ4_MCU_ON_MASK_SFT (0x1 << 4) 14188c2ecf20Sopenharmony_ci#define IRQ3_MCU_ON_SFT 3 14198c2ecf20Sopenharmony_ci#define IRQ3_MCU_ON_MASK 0x1 14208c2ecf20Sopenharmony_ci#define IRQ3_MCU_ON_MASK_SFT (0x1 << 3) 14218c2ecf20Sopenharmony_ci#define IRQ2_MCU_ON_SFT 2 14228c2ecf20Sopenharmony_ci#define IRQ2_MCU_ON_MASK 0x1 14238c2ecf20Sopenharmony_ci#define IRQ2_MCU_ON_MASK_SFT (0x1 << 2) 14248c2ecf20Sopenharmony_ci#define IRQ1_MCU_ON_SFT 1 14258c2ecf20Sopenharmony_ci#define IRQ1_MCU_ON_MASK 0x1 14268c2ecf20Sopenharmony_ci#define IRQ1_MCU_ON_MASK_SFT (0x1 << 1) 14278c2ecf20Sopenharmony_ci#define IRQ0_MCU_ON_SFT 0 14288c2ecf20Sopenharmony_ci#define IRQ0_MCU_ON_MASK 0x1 14298c2ecf20Sopenharmony_ci#define IRQ0_MCU_ON_MASK_SFT (0x1 << 0) 14308c2ecf20Sopenharmony_ci 14318c2ecf20Sopenharmony_ci/* AFE_IRQ_MCU_CON1 */ 14328c2ecf20Sopenharmony_ci#define IRQ7_MCU_MODE_SFT 28 14338c2ecf20Sopenharmony_ci#define IRQ7_MCU_MODE_MASK 0xf 14348c2ecf20Sopenharmony_ci#define IRQ7_MCU_MODE_MASK_SFT (0xf << 28) 14358c2ecf20Sopenharmony_ci#define IRQ6_MCU_MODE_SFT 24 14368c2ecf20Sopenharmony_ci#define IRQ6_MCU_MODE_MASK 0xf 14378c2ecf20Sopenharmony_ci#define IRQ6_MCU_MODE_MASK_SFT (0xf << 24) 14388c2ecf20Sopenharmony_ci#define IRQ5_MCU_MODE_SFT 20 14398c2ecf20Sopenharmony_ci#define IRQ5_MCU_MODE_MASK 0xf 14408c2ecf20Sopenharmony_ci#define IRQ5_MCU_MODE_MASK_SFT (0xf << 20) 14418c2ecf20Sopenharmony_ci#define IRQ4_MCU_MODE_SFT 16 14428c2ecf20Sopenharmony_ci#define IRQ4_MCU_MODE_MASK 0xf 14438c2ecf20Sopenharmony_ci#define IRQ4_MCU_MODE_MASK_SFT (0xf << 16) 14448c2ecf20Sopenharmony_ci#define IRQ3_MCU_MODE_SFT 12 14458c2ecf20Sopenharmony_ci#define IRQ3_MCU_MODE_MASK 0xf 14468c2ecf20Sopenharmony_ci#define IRQ3_MCU_MODE_MASK_SFT (0xf << 12) 14478c2ecf20Sopenharmony_ci#define IRQ2_MCU_MODE_SFT 8 14488c2ecf20Sopenharmony_ci#define IRQ2_MCU_MODE_MASK 0xf 14498c2ecf20Sopenharmony_ci#define IRQ2_MCU_MODE_MASK_SFT (0xf << 8) 14508c2ecf20Sopenharmony_ci#define IRQ1_MCU_MODE_SFT 4 14518c2ecf20Sopenharmony_ci#define IRQ1_MCU_MODE_MASK 0xf 14528c2ecf20Sopenharmony_ci#define IRQ1_MCU_MODE_MASK_SFT (0xf << 4) 14538c2ecf20Sopenharmony_ci#define IRQ0_MCU_MODE_SFT 0 14548c2ecf20Sopenharmony_ci#define IRQ0_MCU_MODE_MASK 0xf 14558c2ecf20Sopenharmony_ci#define IRQ0_MCU_MODE_MASK_SFT (0xf << 0) 14568c2ecf20Sopenharmony_ci 14578c2ecf20Sopenharmony_ci/* AFE_IRQ_MCU_CON2 */ 14588c2ecf20Sopenharmony_ci#define IRQ12_MCU_MODE_SFT 4 14598c2ecf20Sopenharmony_ci#define IRQ12_MCU_MODE_MASK 0xf 14608c2ecf20Sopenharmony_ci#define IRQ12_MCU_MODE_MASK_SFT (0xf << 4) 14618c2ecf20Sopenharmony_ci#define IRQ11_MCU_MODE_SFT 0 14628c2ecf20Sopenharmony_ci#define IRQ11_MCU_MODE_MASK 0xf 14638c2ecf20Sopenharmony_ci#define IRQ11_MCU_MODE_MASK_SFT (0xf << 0) 14648c2ecf20Sopenharmony_ci 14658c2ecf20Sopenharmony_ci/* AFE_IRQ_MCU_CLR */ 14668c2ecf20Sopenharmony_ci#define IRQ12_MCU_MISS_CNT_CLR_SFT 28 14678c2ecf20Sopenharmony_ci#define IRQ12_MCU_MISS_CNT_CLR_MASK 0x1 14688c2ecf20Sopenharmony_ci#define IRQ12_MCU_MISS_CNT_CLR_MASK_SFT (0x1 << 28) 14698c2ecf20Sopenharmony_ci#define IRQ11_MCU_MISS_CNT_CLR_SFT 27 14708c2ecf20Sopenharmony_ci#define IRQ11_MCU_MISS_CNT_CLR_MASK 0x1 14718c2ecf20Sopenharmony_ci#define IRQ11_MCU_MISS_CNT_CLR_MASK_SFT (0x1 << 27) 14728c2ecf20Sopenharmony_ci#define IRQ10_MCU_MISS_CLR_SFT 26 14738c2ecf20Sopenharmony_ci#define IRQ10_MCU_MISS_CLR_MASK 0x1 14748c2ecf20Sopenharmony_ci#define IRQ10_MCU_MISS_CLR_MASK_SFT (0x1 << 26) 14758c2ecf20Sopenharmony_ci#define IRQ9_MCU_MISS_CLR_SFT 25 14768c2ecf20Sopenharmony_ci#define IRQ9_MCU_MISS_CLR_MASK 0x1 14778c2ecf20Sopenharmony_ci#define IRQ9_MCU_MISS_CLR_MASK_SFT (0x1 << 25) 14788c2ecf20Sopenharmony_ci#define IRQ8_MCU_MISS_CLR_SFT 24 14798c2ecf20Sopenharmony_ci#define IRQ8_MCU_MISS_CLR_MASK 0x1 14808c2ecf20Sopenharmony_ci#define IRQ8_MCU_MISS_CLR_MASK_SFT (0x1 << 24) 14818c2ecf20Sopenharmony_ci#define IRQ7_MCU_MISS_CLR_SFT 23 14828c2ecf20Sopenharmony_ci#define IRQ7_MCU_MISS_CLR_MASK 0x1 14838c2ecf20Sopenharmony_ci#define IRQ7_MCU_MISS_CLR_MASK_SFT (0x1 << 23) 14848c2ecf20Sopenharmony_ci#define IRQ6_MCU_MISS_CLR_SFT 22 14858c2ecf20Sopenharmony_ci#define IRQ6_MCU_MISS_CLR_MASK 0x1 14868c2ecf20Sopenharmony_ci#define IRQ6_MCU_MISS_CLR_MASK_SFT (0x1 << 22) 14878c2ecf20Sopenharmony_ci#define IRQ5_MCU_MISS_CLR_SFT 21 14888c2ecf20Sopenharmony_ci#define IRQ5_MCU_MISS_CLR_MASK 0x1 14898c2ecf20Sopenharmony_ci#define IRQ5_MCU_MISS_CLR_MASK_SFT (0x1 << 21) 14908c2ecf20Sopenharmony_ci#define IRQ4_MCU_MISS_CLR_SFT 20 14918c2ecf20Sopenharmony_ci#define IRQ4_MCU_MISS_CLR_MASK 0x1 14928c2ecf20Sopenharmony_ci#define IRQ4_MCU_MISS_CLR_MASK_SFT (0x1 << 20) 14938c2ecf20Sopenharmony_ci#define IRQ3_MCU_MISS_CLR_SFT 19 14948c2ecf20Sopenharmony_ci#define IRQ3_MCU_MISS_CLR_MASK 0x1 14958c2ecf20Sopenharmony_ci#define IRQ3_MCU_MISS_CLR_MASK_SFT (0x1 << 19) 14968c2ecf20Sopenharmony_ci#define IRQ2_MCU_MISS_CLR_SFT 18 14978c2ecf20Sopenharmony_ci#define IRQ2_MCU_MISS_CLR_MASK 0x1 14988c2ecf20Sopenharmony_ci#define IRQ2_MCU_MISS_CLR_MASK_SFT (0x1 << 18) 14998c2ecf20Sopenharmony_ci#define IRQ1_MCU_MISS_CLR_SFT 17 15008c2ecf20Sopenharmony_ci#define IRQ1_MCU_MISS_CLR_MASK 0x1 15018c2ecf20Sopenharmony_ci#define IRQ1_MCU_MISS_CLR_MASK_SFT (0x1 << 17) 15028c2ecf20Sopenharmony_ci#define IRQ0_MCU_MISS_CLR_SFT 16 15038c2ecf20Sopenharmony_ci#define IRQ0_MCU_MISS_CLR_MASK 0x1 15048c2ecf20Sopenharmony_ci#define IRQ0_MCU_MISS_CLR_MASK_SFT (0x1 << 16) 15058c2ecf20Sopenharmony_ci#define IRQ12_MCU_CLR_SFT 12 15068c2ecf20Sopenharmony_ci#define IRQ12_MCU_CLR_MASK 0x1 15078c2ecf20Sopenharmony_ci#define IRQ12_MCU_CLR_MASK_SFT (0x1 << 12) 15088c2ecf20Sopenharmony_ci#define IRQ11_MCU_CLR_SFT 11 15098c2ecf20Sopenharmony_ci#define IRQ11_MCU_CLR_MASK 0x1 15108c2ecf20Sopenharmony_ci#define IRQ11_MCU_CLR_MASK_SFT (0x1 << 11) 15118c2ecf20Sopenharmony_ci#define IRQ10_MCU_CLR_SFT 10 15128c2ecf20Sopenharmony_ci#define IRQ10_MCU_CLR_MASK 0x1 15138c2ecf20Sopenharmony_ci#define IRQ10_MCU_CLR_MASK_SFT (0x1 << 10) 15148c2ecf20Sopenharmony_ci#define IRQ9_MCU_CLR_SFT 9 15158c2ecf20Sopenharmony_ci#define IRQ9_MCU_CLR_MASK 0x1 15168c2ecf20Sopenharmony_ci#define IRQ9_MCU_CLR_MASK_SFT (0x1 << 9) 15178c2ecf20Sopenharmony_ci#define IRQ8_MCU_CLR_SFT 8 15188c2ecf20Sopenharmony_ci#define IRQ8_MCU_CLR_MASK 0x1 15198c2ecf20Sopenharmony_ci#define IRQ8_MCU_CLR_MASK_SFT (0x1 << 8) 15208c2ecf20Sopenharmony_ci#define IRQ7_MCU_CLR_SFT 7 15218c2ecf20Sopenharmony_ci#define IRQ7_MCU_CLR_MASK 0x1 15228c2ecf20Sopenharmony_ci#define IRQ7_MCU_CLR_MASK_SFT (0x1 << 7) 15238c2ecf20Sopenharmony_ci#define IRQ6_MCU_CLR_SFT 6 15248c2ecf20Sopenharmony_ci#define IRQ6_MCU_CLR_MASK 0x1 15258c2ecf20Sopenharmony_ci#define IRQ6_MCU_CLR_MASK_SFT (0x1 << 6) 15268c2ecf20Sopenharmony_ci#define IRQ5_MCU_CLR_SFT 5 15278c2ecf20Sopenharmony_ci#define IRQ5_MCU_CLR_MASK 0x1 15288c2ecf20Sopenharmony_ci#define IRQ5_MCU_CLR_MASK_SFT (0x1 << 5) 15298c2ecf20Sopenharmony_ci#define IRQ4_MCU_CLR_SFT 4 15308c2ecf20Sopenharmony_ci#define IRQ4_MCU_CLR_MASK 0x1 15318c2ecf20Sopenharmony_ci#define IRQ4_MCU_CLR_MASK_SFT (0x1 << 4) 15328c2ecf20Sopenharmony_ci#define IRQ3_MCU_CLR_SFT 3 15338c2ecf20Sopenharmony_ci#define IRQ3_MCU_CLR_MASK 0x1 15348c2ecf20Sopenharmony_ci#define IRQ3_MCU_CLR_MASK_SFT (0x1 << 3) 15358c2ecf20Sopenharmony_ci#define IRQ2_MCU_CLR_SFT 2 15368c2ecf20Sopenharmony_ci#define IRQ2_MCU_CLR_MASK 0x1 15378c2ecf20Sopenharmony_ci#define IRQ2_MCU_CLR_MASK_SFT (0x1 << 2) 15388c2ecf20Sopenharmony_ci#define IRQ1_MCU_CLR_SFT 1 15398c2ecf20Sopenharmony_ci#define IRQ1_MCU_CLR_MASK 0x1 15408c2ecf20Sopenharmony_ci#define IRQ1_MCU_CLR_MASK_SFT (0x1 << 1) 15418c2ecf20Sopenharmony_ci#define IRQ0_MCU_CLR_SFT 0 15428c2ecf20Sopenharmony_ci#define IRQ0_MCU_CLR_MASK 0x1 15438c2ecf20Sopenharmony_ci#define IRQ0_MCU_CLR_MASK_SFT (0x1 << 0) 15448c2ecf20Sopenharmony_ci 15458c2ecf20Sopenharmony_ci/* AFE_MEMIF_MSB */ 15468c2ecf20Sopenharmony_ci#define CPU_COMPACT_MODE_SFT 29 15478c2ecf20Sopenharmony_ci#define CPU_COMPACT_MODE_MASK 0x1 15488c2ecf20Sopenharmony_ci#define CPU_COMPACT_MODE_MASK_SFT (0x1 << 29) 15498c2ecf20Sopenharmony_ci#define CPU_HD_ALIGN_SFT 28 15508c2ecf20Sopenharmony_ci#define CPU_HD_ALIGN_MASK 0x1 15518c2ecf20Sopenharmony_ci#define CPU_HD_ALIGN_MASK_SFT (0x1 << 28) 15528c2ecf20Sopenharmony_ci#define AWB2_AXI_WR_SIGN_SFT 24 15538c2ecf20Sopenharmony_ci#define AWB2_AXI_WR_SIGN_MASK 0x1 15548c2ecf20Sopenharmony_ci#define AWB2_AXI_WR_SIGN_MASK_SFT (0x1 << 24) 15558c2ecf20Sopenharmony_ci#define VUL2_AXI_WR_SIGN_SFT 22 15568c2ecf20Sopenharmony_ci#define VUL2_AXI_WR_SIGN_MASK 0x1 15578c2ecf20Sopenharmony_ci#define VUL2_AXI_WR_SIGN_MASK_SFT (0x1 << 22) 15588c2ecf20Sopenharmony_ci#define VUL12_AXI_WR_SIGN_SFT 21 15598c2ecf20Sopenharmony_ci#define VUL12_AXI_WR_SIGN_MASK 0x1 15608c2ecf20Sopenharmony_ci#define VUL12_AXI_WR_SIGN_MASK_SFT (0x1 << 21) 15618c2ecf20Sopenharmony_ci#define VUL_AXI_WR_SIGN_SFT 20 15628c2ecf20Sopenharmony_ci#define VUL_AXI_WR_SIGN_MASK 0x1 15638c2ecf20Sopenharmony_ci#define VUL_AXI_WR_SIGN_MASK_SFT (0x1 << 20) 15648c2ecf20Sopenharmony_ci#define MOD_DAI_AXI_WR_SIGN_SFT 18 15658c2ecf20Sopenharmony_ci#define MOD_DAI_AXI_WR_SIGN_MASK 0x1 15668c2ecf20Sopenharmony_ci#define MOD_DAI_AXI_WR_SIGN_MASK_SFT (0x1 << 18) 15678c2ecf20Sopenharmony_ci#define AWB_MSTR_SIGN_SFT 17 15688c2ecf20Sopenharmony_ci#define AWB_MSTR_SIGN_MASK 0x1 15698c2ecf20Sopenharmony_ci#define AWB_MSTR_SIGN_MASK_SFT (0x1 << 17) 15708c2ecf20Sopenharmony_ci#define SYSRAM_SIGN_SFT 16 15718c2ecf20Sopenharmony_ci#define SYSRAM_SIGN_MASK 0x1 15728c2ecf20Sopenharmony_ci#define SYSRAM_SIGN_MASK_SFT (0x1 << 16) 15738c2ecf20Sopenharmony_ci 15748c2ecf20Sopenharmony_ci/* AFE_HDMI_CONN0 */ 15758c2ecf20Sopenharmony_ci#define HDMI_O_7_SFT 21 15768c2ecf20Sopenharmony_ci#define HDMI_O_7_MASK 0x7 15778c2ecf20Sopenharmony_ci#define HDMI_O_7_MASK_SFT (0x7 << 21) 15788c2ecf20Sopenharmony_ci#define HDMI_O_6_SFT 18 15798c2ecf20Sopenharmony_ci#define HDMI_O_6_MASK 0x7 15808c2ecf20Sopenharmony_ci#define HDMI_O_6_MASK_SFT (0x7 << 18) 15818c2ecf20Sopenharmony_ci#define HDMI_O_5_SFT 15 15828c2ecf20Sopenharmony_ci#define HDMI_O_5_MASK 0x7 15838c2ecf20Sopenharmony_ci#define HDMI_O_5_MASK_SFT (0x7 << 15) 15848c2ecf20Sopenharmony_ci#define HDMI_O_4_SFT 12 15858c2ecf20Sopenharmony_ci#define HDMI_O_4_MASK 0x7 15868c2ecf20Sopenharmony_ci#define HDMI_O_4_MASK_SFT (0x7 << 12) 15878c2ecf20Sopenharmony_ci#define HDMI_O_3_SFT 9 15888c2ecf20Sopenharmony_ci#define HDMI_O_3_MASK 0x7 15898c2ecf20Sopenharmony_ci#define HDMI_O_3_MASK_SFT (0x7 << 9) 15908c2ecf20Sopenharmony_ci#define HDMI_O_2_SFT 6 15918c2ecf20Sopenharmony_ci#define HDMI_O_2_MASK 0x7 15928c2ecf20Sopenharmony_ci#define HDMI_O_2_MASK_SFT (0x7 << 6) 15938c2ecf20Sopenharmony_ci#define HDMI_O_1_SFT 3 15948c2ecf20Sopenharmony_ci#define HDMI_O_1_MASK 0x7 15958c2ecf20Sopenharmony_ci#define HDMI_O_1_MASK_SFT (0x7 << 3) 15968c2ecf20Sopenharmony_ci#define HDMI_O_0_SFT 0 15978c2ecf20Sopenharmony_ci#define HDMI_O_0_MASK 0x7 15988c2ecf20Sopenharmony_ci#define HDMI_O_0_MASK_SFT (0x7 << 0) 15998c2ecf20Sopenharmony_ci 16008c2ecf20Sopenharmony_ci/* AFE_TDM_CON1 */ 16018c2ecf20Sopenharmony_ci#define TDM_EN_SFT 0 16028c2ecf20Sopenharmony_ci#define TDM_EN_MASK 0x1 16038c2ecf20Sopenharmony_ci#define TDM_EN_MASK_SFT (0x1 << 0) 16048c2ecf20Sopenharmony_ci#define LRCK_INVERSE_SFT 2 16058c2ecf20Sopenharmony_ci#define LRCK_INVERSE_MASK 0x1 16068c2ecf20Sopenharmony_ci#define LRCK_INVERSE_MASK_SFT (0x1 << 2) 16078c2ecf20Sopenharmony_ci#define DELAY_DATA_SFT 3 16088c2ecf20Sopenharmony_ci#define DELAY_DATA_MASK 0x1 16098c2ecf20Sopenharmony_ci#define DELAY_DATA_MASK_SFT (0x1 << 3) 16108c2ecf20Sopenharmony_ci#define LEFT_ALIGN_SFT 4 16118c2ecf20Sopenharmony_ci#define LEFT_ALIGN_MASK 0x1 16128c2ecf20Sopenharmony_ci#define LEFT_ALIGN_MASK_SFT (0x1 << 4) 16138c2ecf20Sopenharmony_ci#define WLEN_SFT 8 16148c2ecf20Sopenharmony_ci#define WLEN_MASK 0x3 16158c2ecf20Sopenharmony_ci#define WLEN_MASK_SFT (0x3 << 8) 16168c2ecf20Sopenharmony_ci#define CHANNEL_NUM_SFT 10 16178c2ecf20Sopenharmony_ci#define CHANNEL_NUM_MASK 0x3 16188c2ecf20Sopenharmony_ci#define CHANNEL_NUM_MASK_SFT (0x3 << 10) 16198c2ecf20Sopenharmony_ci#define CHANNEL_BCK_CYCLES_SFT 12 16208c2ecf20Sopenharmony_ci#define CHANNEL_BCK_CYCLES_MASK 0x3 16218c2ecf20Sopenharmony_ci#define CHANNEL_BCK_CYCLES_MASK_SFT (0x3 << 12) 16228c2ecf20Sopenharmony_ci#define DAC_BIT_NUM_SFT 16 16238c2ecf20Sopenharmony_ci#define DAC_BIT_NUM_MASK 0x1f 16248c2ecf20Sopenharmony_ci#define DAC_BIT_NUM_MASK_SFT (0x1f << 16) 16258c2ecf20Sopenharmony_ci#define LRCK_TDM_WIDTH_SFT 24 16268c2ecf20Sopenharmony_ci#define LRCK_TDM_WIDTH_MASK 0xff 16278c2ecf20Sopenharmony_ci#define LRCK_TDM_WIDTH_MASK_SFT (0xff << 24) 16288c2ecf20Sopenharmony_ci 16298c2ecf20Sopenharmony_ci/* AFE_TDM_CON2 */ 16308c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT0_SFT 0 16318c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT0_MASK 0x7 16328c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT0_MASK_SFT (0x7 << 0) 16338c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT1_SFT 4 16348c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT1_MASK 0x7 16358c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT1_MASK_SFT (0x7 << 4) 16368c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT2_SFT 8 16378c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT2_MASK 0x7 16388c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT2_MASK_SFT (0x7 << 8) 16398c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT3_SFT 12 16408c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT3_MASK 0x7 16418c2ecf20Sopenharmony_ci#define ST_CH_PAIR_SOUT3_MASK_SFT (0x7 << 12) 16428c2ecf20Sopenharmony_ci#define TDM_FIX_VALUE_SEL_SFT 16 16438c2ecf20Sopenharmony_ci#define TDM_FIX_VALUE_SEL_MASK 0x1 16448c2ecf20Sopenharmony_ci#define TDM_FIX_VALUE_SEL_MASK_SFT (0x1 << 16) 16458c2ecf20Sopenharmony_ci#define TDM_I2S_LOOPBACK_SFT 20 16468c2ecf20Sopenharmony_ci#define TDM_I2S_LOOPBACK_MASK 0x1 16478c2ecf20Sopenharmony_ci#define TDM_I2S_LOOPBACK_MASK_SFT (0x1 << 20) 16488c2ecf20Sopenharmony_ci#define TDM_I2S_LOOPBACK_CH_SFT 21 16498c2ecf20Sopenharmony_ci#define TDM_I2S_LOOPBACK_CH_MASK 0x3 16508c2ecf20Sopenharmony_ci#define TDM_I2S_LOOPBACK_CH_MASK_SFT (0x3 << 21) 16518c2ecf20Sopenharmony_ci#define TDM_FIX_VALUE_SFT 24 16528c2ecf20Sopenharmony_ci#define TDM_FIX_VALUE_MASK 0xff 16538c2ecf20Sopenharmony_ci#define TDM_FIX_VALUE_MASK_SFT (0xff << 24) 16548c2ecf20Sopenharmony_ci 16558c2ecf20Sopenharmony_ci/* AFE_HDMI_OUT_CON0 */ 16568c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_ON_RETM_SFT 8 16578c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_ON_RETM_MASK 0x1 16588c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_ON_RETM_MASK_SFT (0x1 << 8) 16598c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_CH_NUM_SFT 4 16608c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_CH_NUM_MASK 0xf 16618c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_CH_NUM_MASK_SFT (0xf << 4) 16628c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_BIT_WIDTH_SFT 1 16638c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_BIT_WIDTH_MASK 0x1 16648c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_BIT_WIDTH_MASK_SFT (0x1 << 1) 16658c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_ON_SFT 0 16668c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_ON_MASK 0x1 16678c2ecf20Sopenharmony_ci#define AFE_HDMI_OUT_ON_MASK_SFT (0x1 << 0) 16688c2ecf20Sopenharmony_ci#endif 1669