Path: blob/master/sound/soc/mediatek/mt2701/mt2701-reg.h
26488 views
/* SPDX-License-Identifier: GPL-2.0 */1/*2* mt2701-reg.h -- Mediatek 2701 audio driver reg definition3*4* Copyright (c) 2016 MediaTek Inc.5* Author: Garlic Tseng <[email protected]>6*/78#ifndef _MT2701_REG_H_9#define _MT2701_REG_H_1011#define AUDIO_TOP_CON0 0x000012#define AUDIO_TOP_CON4 0x001013#define AUDIO_TOP_CON5 0x001414#define AFE_DAIBT_CON0 0x001c15#define AFE_MRGIF_CON 0x003c16#define ASMI_TIMING_CON1 0x010017#define ASMO_TIMING_CON1 0x010418#define PWR1_ASM_CON1 0x010819#define ASYS_TOP_CON 0x060020#define ASYS_I2SIN1_CON 0x060421#define ASYS_I2SIN2_CON 0x060822#define ASYS_I2SIN3_CON 0x060c23#define ASYS_I2SIN4_CON 0x061024#define ASYS_I2SIN5_CON 0x061425#define ASYS_I2SO1_CON 0x061C26#define ASYS_I2SO2_CON 0x062027#define ASYS_I2SO3_CON 0x062428#define ASYS_I2SO4_CON 0x062829#define ASYS_I2SO5_CON 0x062c30#define PWR2_TOP_CON 0x063431#define AFE_CONN0 0x06c032#define AFE_CONN1 0x06c433#define AFE_CONN2 0x06c834#define AFE_CONN3 0x06cc35#define AFE_CONN14 0x06f836#define AFE_CONN15 0x06fc37#define AFE_CONN16 0x070038#define AFE_CONN17 0x070439#define AFE_CONN18 0x070840#define AFE_CONN19 0x070c41#define AFE_CONN20 0x071042#define AFE_CONN21 0x071443#define AFE_CONN22 0x071844#define AFE_CONN23 0x071c45#define AFE_CONN24 0x072046#define AFE_CONN41 0x076447#define ASYS_IRQ1_CON 0x078048#define ASYS_IRQ2_CON 0x078449#define ASYS_IRQ3_CON 0x078850#define ASYS_IRQ_CLR 0x07c051#define ASYS_IRQ_STATUS 0x07c452#define PWR2_ASM_CON1 0x107053#define AFE_DAC_CON0 0x120054#define AFE_DAC_CON1 0x120455#define AFE_DAC_CON2 0x120856#define AFE_DAC_CON3 0x120c57#define AFE_DAC_CON4 0x121058#define AFE_MEMIF_HD_CON1 0x121c59#define AFE_MEMIF_PBUF_SIZE 0x123860#define AFE_MEMIF_HD_CON0 0x123c61#define AFE_DL1_BASE 0x124062#define AFE_DL1_CUR 0x124463#define AFE_DL2_BASE 0x125064#define AFE_DL2_CUR 0x125465#define AFE_DL3_BASE 0x126066#define AFE_DL3_CUR 0x126467#define AFE_DL4_BASE 0x127068#define AFE_DL4_CUR 0x127469#define AFE_DL5_BASE 0x128070#define AFE_DL5_CUR 0x128471#define AFE_DLMCH_BASE 0x12a072#define AFE_DLMCH_CUR 0x12a473#define AFE_ARB1_BASE 0x12b074#define AFE_ARB1_CUR 0x12b475#define AFE_VUL_BASE 0x130076#define AFE_VUL_CUR 0x130c77#define AFE_UL2_BASE 0x131078#define AFE_UL2_END 0x131879#define AFE_UL2_CUR 0x131c80#define AFE_UL3_BASE 0x132081#define AFE_UL3_END 0x132882#define AFE_UL3_CUR 0x132c83#define AFE_UL4_BASE 0x133084#define AFE_UL4_END 0x133885#define AFE_UL4_CUR 0x133c86#define AFE_UL5_BASE 0x134087#define AFE_UL5_END 0x134888#define AFE_UL5_CUR 0x134c89#define AFE_DAI_BASE 0x137090#define AFE_DAI_CUR 0x137c9192/* AFE_DAIBT_CON0 (0x001c) */93#define AFE_DAIBT_CON0_DAIBT_EN (0x1 << 0)94#define AFE_DAIBT_CON0_BT_FUNC_EN (0x1 << 1)95#define AFE_DAIBT_CON0_BT_FUNC_RDY (0x1 << 3)96#define AFE_DAIBT_CON0_BT_WIDE_MODE_EN (0x1 << 9)97#define AFE_DAIBT_CON0_MRG_USE (0x1 << 12)9899/* PWR1_ASM_CON1 (0x0108) */100#define PWR1_ASM_CON1_INIT_VAL (0x492)101102/* AFE_MRGIF_CON (0x003c) */103#define AFE_MRGIF_CON_MRG_EN (0x1 << 0)104#define AFE_MRGIF_CON_MRG_I2S_EN (0x1 << 16)105#define AFE_MRGIF_CON_I2S_MODE_MASK (0xf << 20)106#define AFE_MRGIF_CON_I2S_MODE_32K (0x4 << 20)107108/* ASYS_TOP_CON (0x0600) */109#define ASYS_TOP_CON_ASYS_TIMING_ON (0x3 << 0)110111/* PWR2_ASM_CON1 (0x1070) */112#define PWR2_ASM_CON1_INIT_VAL (0x492492)113114/* AFE_DAC_CON0 (0x1200) */115#define AFE_DAC_CON0_AFE_ON (0x1 << 0)116117/* AFE_MEMIF_PBUF_SIZE (0x1238) */118#define AFE_MEMIF_PBUF_SIZE_DLM_MASK (0x1 << 29)119#define AFE_MEMIF_PBUF_SIZE_PAIR_INTERLEAVE (0x0 << 29)120#define AFE_MEMIF_PBUF_SIZE_FULL_INTERLEAVE (0x1 << 29)121#define DLMCH_BIT_WIDTH_MASK (0x1 << 28)122#define AFE_MEMIF_PBUF_SIZE_DLM_CH_MASK (0xf << 24)123#define AFE_MEMIF_PBUF_SIZE_DLM_CH(x) ((x) << 24)124#define AFE_MEMIF_PBUF_SIZE_DLM_BYTE_MASK (0x3 << 12)125#define AFE_MEMIF_PBUF_SIZE_DLM_32BYTES (0x1 << 12)126127/* I2S in/out register bit control */128#define ASYS_I2S_CON_FS (0x1f << 8)129#define ASYS_I2S_CON_FS_SET(x) ((x) << 8)130#define ASYS_I2S_CON_RESET (0x1 << 30)131#define ASYS_I2S_CON_I2S_EN (0x1 << 0)132#define ASYS_I2S_CON_ONE_HEART_MODE (0x1 << 16)133#define ASYS_I2S_CON_I2S_COUPLE_MODE (0x1 << 17)134/* 0:EIAJ 1:I2S */135#define ASYS_I2S_CON_I2S_MODE (0x1 << 3)136#define ASYS_I2S_CON_WIDE_MODE (0x1 << 1)137#define ASYS_I2S_CON_WIDE_MODE_SET(x) ((x) << 1)138#define ASYS_I2S_IN_PHASE_FIX (0x1 << 31)139140#endif141142143