linux/sound/soc/codecs/rt5514.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * rt5514.h  --  RT5514 ALSA SoC audio driver
 *
 * Copyright 2015 Realtek Microelectronics
 * Author: Oder Chiou <[email protected]>
 */

#ifndef __RT5514_H__
#define __RT5514_H__

#include <linux/clk.h>
#include <sound/rt5514.h>

#define RT5514_DEVICE_ID

#define RT5514_RESET
#define RT5514_PWR_ANA1
#define RT5514_PWR_ANA2
#define RT5514_I2S_CTRL1
#define RT5514_I2S_CTRL2
#define RT5514_VAD_CTRL6
#define RT5514_EXT_VAD_CTRL
#define RT5514_DIG_IO_CTRL
#define RT5514_PAD_CTRL1
#define RT5514_DMIC_DATA_CTRL
#define RT5514_DIG_SOURCE_CTRL
#define RT5514_SRC_CTRL
#define RT5514_DOWNFILTER2_CTRL1
#define RT5514_PLL_SOURCE_CTRL
#define RT5514_CLK_CTRL1
#define RT5514_CLK_CTRL2
#define RT5514_PLL3_CALIB_CTRL1
#define RT5514_PLL3_CALIB_CTRL4
#define RT5514_PLL3_CALIB_CTRL5
#define RT5514_PLL3_CALIB_CTRL6
#define RT5514_DELAY_BUF_CTRL1
#define RT5514_DELAY_BUF_CTRL3
#define RT5514_ASRC_IN_CTRL1
#define RT5514_DOWNFILTER0_CTRL1
#define RT5514_DOWNFILTER0_CTRL2
#define RT5514_DOWNFILTER0_CTRL3
#define RT5514_DOWNFILTER1_CTRL1
#define RT5514_DOWNFILTER1_CTRL2
#define RT5514_DOWNFILTER1_CTRL3
#define RT5514_ANA_CTRL_LDO10
#define RT5514_ANA_CTRL_LDO18_16
#define RT5514_ANA_CTRL_ADC12
#define RT5514_ANA_CTRL_ADC21
#define RT5514_ANA_CTRL_ADC22
#define RT5514_ANA_CTRL_ADC23
#define RT5514_ANA_CTRL_MICBST
#define RT5514_ANA_CTRL_ADCFED
#define RT5514_ANA_CTRL_INBUF
#define RT5514_ANA_CTRL_VREF
#define RT5514_ANA_CTRL_PLL3
#define RT5514_ANA_CTRL_PLL1_1
#define RT5514_ANA_CTRL_PLL1_2
#define RT5514_DMIC_LP_CTRL
#define RT5514_MISC_CTRL_DSP
#define RT5514_DSP_CTRL1
#define RT5514_DSP_CTRL3
#define RT5514_DSP_CTRL4
#define RT5514_VENDOR_ID1
#define RT5514_VENDOR_ID2

#define RT5514_DSP_MAPPING

/* RT5514_PWR_ANA1 (0x2004) */
#define RT5514_POW_LDO18_IN
#define RT5514_POW_LDO18_IN_BIT
#define RT5514_POW_LDO18_ADC
#define RT5514_POW_LDO18_ADC_BIT
#define RT5514_POW_LDO21
#define RT5514_POW_LDO21_BIT
#define RT5514_POW_BG_LDO18_IN
#define RT5514_POW_BG_LDO18_IN_BIT
#define RT5514_POW_BG_LDO21
#define RT5514_POW_BG_LDO21_BIT

/* RT5514_PWR_ANA2 (0x2008) */
#define RT5514_POW_PLL1
#define RT5514_POW_PLL1_BIT
#define RT5514_POW_PLL1_LDO
#define RT5514_POW_PLL1_LDO_BIT
#define RT5514_POW_BG_MBIAS
#define RT5514_POW_BG_MBIAS_BIT
#define RT5514_POW_MBIAS
#define RT5514_POW_MBIAS_BIT
#define RT5514_POW_VREF2
#define RT5514_POW_VREF2_BIT
#define RT5514_POW_VREF1
#define RT5514_POW_VREF1_BIT
#define RT5514_POWR_LDO16
#define RT5514_POWR_LDO16_BIT
#define RT5514_POWL_LDO16
#define RT5514_POWL_LDO16_BIT
#define RT5514_POW_ADC2
#define RT5514_POW_ADC2_BIT
#define RT5514_POW_INPUT_BUF
#define RT5514_POW_INPUT_BUF_BIT
#define RT5514_POW_ADC1_R
#define RT5514_POW_ADC1_R_BIT
#define RT5514_POW_ADC1_L
#define RT5514_POW_ADC1_L_BIT
#define RT5514_POW2_BSTR
#define RT5514_POW2_BSTR_BIT
#define RT5514_POW2_BSTL
#define RT5514_POW2_BSTL_BIT
#define RT5514_POW_BSTR
#define RT5514_POW_BSTR_BIT
#define RT5514_POW_BSTL
#define RT5514_POW_BSTL_BIT
#define RT5514_POW_ADCFEDR
#define RT5514_POW_ADCFEDR_BIT
#define RT5514_POW_ADCFEDL
#define RT5514_POW_ADCFEDL_BIT

/* RT5514_I2S_CTRL1 (0x2010) */
#define RT5514_TDM_MODE2
#define RT5514_TDM_MODE2_SFT
#define RT5514_TDM_MODE
#define RT5514_TDM_MODE_SFT
#define RT5514_I2S_LR_MASK
#define RT5514_I2S_LR_SFT
#define RT5514_I2S_LR_NOR
#define RT5514_I2S_LR_INV
#define RT5514_I2S_BP_MASK
#define RT5514_I2S_BP_SFT
#define RT5514_I2S_BP_NOR
#define RT5514_I2S_BP_INV
#define RT5514_I2S_DF_MASK
#define RT5514_I2S_DF_SFT
#define RT5514_I2S_DF_I2S
#define RT5514_I2S_DF_LEFT
#define RT5514_I2S_DF_PCM_A
#define RT5514_I2S_DF_PCM_B
#define RT5514_TDMSLOT_SEL_RX_MASK
#define RT5514_TDMSLOT_SEL_RX_SFT
#define RT5514_TDMSLOT_SEL_RX_4CH
#define RT5514_TDMSLOT_SEL_RX_6CH
#define RT5514_TDMSLOT_SEL_RX_8CH
#define RT5514_CH_LEN_RX_MASK
#define RT5514_CH_LEN_RX_SFT
#define RT5514_CH_LEN_RX_16
#define RT5514_CH_LEN_RX_20
#define RT5514_CH_LEN_RX_24
#define RT5514_CH_LEN_RX_32
#define RT5514_TDMSLOT_SEL_TX_MASK
#define RT5514_TDMSLOT_SEL_TX_SFT
#define RT5514_TDMSLOT_SEL_TX_4CH
#define RT5514_TDMSLOT_SEL_TX_6CH
#define RT5514_TDMSLOT_SEL_TX_8CH
#define RT5514_CH_LEN_TX_MASK
#define RT5514_CH_LEN_TX_SFT
#define RT5514_CH_LEN_TX_16
#define RT5514_CH_LEN_TX_20
#define RT5514_CH_LEN_TX_24
#define RT5514_CH_LEN_TX_32
#define RT5514_I2S_DL_MASK
#define RT5514_I2S_DL_SFT
#define RT5514_I2S_DL_16
#define RT5514_I2S_DL_20
#define RT5514_I2S_DL_24
#define RT5514_I2S_DL_8

/* RT5514_I2S_CTRL2 (0x2014) */
#define RT5514_TDM_DOCKING_MODE
#define RT5514_TDM_DOCKING_MODE_SFT
#define RT5514_TDM_DOCKING_VALID_CH_MASK
#define RT5514_TDM_DOCKING_VALID_CH_SFT
#define RT5514_TDM_DOCKING_VALID_CH2
#define RT5514_TDM_DOCKING_VALID_CH4
#define RT5514_TDM_DOCKING_START_MASK
#define RT5514_TDM_DOCKING_START_SFT
#define RT5514_TDM_DOCKING_START_SLOT0
#define RT5514_TDM_DOCKING_START_SLOT4

/* RT5514_DIG_SOURCE_CTRL (0x20a4) */
#define RT5514_AD1_DMIC_INPUT_SEL
#define RT5514_AD1_DMIC_INPUT_SEL_SFT
#define RT5514_AD0_DMIC_INPUT_SEL
#define RT5514_AD0_DMIC_INPUT_SEL_SFT

/* RT5514_PLL_SOURCE_CTRL (0x2100) */
#define RT5514_PLL_1_SEL_MASK
#define RT5514_PLL_1_SEL_SFT
#define RT5514_PLL_1_SEL_SCLK
#define RT5514_PLL_1_SEL_MCLK

/* RT5514_CLK_CTRL1 (0x2104) */
#define RT5514_CLK_AD_ANA1_EN
#define RT5514_CLK_AD_ANA1_EN_BIT
#define RT5514_CLK_AD1_EN
#define RT5514_CLK_AD1_EN_BIT
#define RT5514_CLK_AD0_EN
#define RT5514_CLK_AD0_EN_BIT
#define RT5514_CLK_DMIC_OUT_SEL_MASK
#define RT5514_CLK_DMIC_OUT_SEL_SFT
#define RT5514_CLK_AD_ANA1_SEL_MASK
#define RT5514_CLK_AD_ANA1_SEL_SFT

/* RT5514_CLK_CTRL2 (0x2108) */
#define RT5514_CLK_AD1_ASRC_EN
#define RT5514_CLK_AD1_ASRC_EN_BIT
#define RT5514_CLK_AD0_ASRC_EN
#define RT5514_CLK_AD0_ASRC_EN_BIT
#define RT5514_CLK_SYS_DIV_OUT_MASK
#define RT5514_CLK_SYS_DIV_OUT_SFT
#define RT5514_SEL_ADC_OSR_MASK
#define RT5514_SEL_ADC_OSR_SFT
#define RT5514_CLK_SYS_PRE_SEL_MASK
#define RT5514_CLK_SYS_PRE_SEL_SFT
#define RT5514_CLK_SYS_PRE_SEL_MCLK
#define RT5514_CLK_SYS_PRE_SEL_PLL

/*  RT5514_DOWNFILTER_CTRL (0x2190 0x2194 0x21a0 0x21a4) */
#define RT5514_AD_DMIC_MIX
#define RT5514_AD_DMIC_MIX_BIT
#define RT5514_AD_AD_MIX
#define RT5514_AD_AD_MIX_BIT
#define RT5514_AD_AD_MUTE
#define RT5514_AD_AD_MUTE_BIT
#define RT5514_AD_GAIN_MASK
#define RT5514_AD_GAIN_SFT

/*  RT5514_ANA_CTRL_MICBST (0x2220) */
#define RT5514_SEL_BSTL_MASK
#define RT5514_SEL_BSTL_SFT
#define RT5514_SEL_BSTR_MASK
#define RT5514_SEL_BSTR_SFT

/*  RT5514_ANA_CTRL_PLL1_1 (0x2260) */
#define RT5514_PLL_K_MAX
#define RT5514_PLL_K_MASK
#define RT5514_PLL_K_SFT
#define RT5514_PLL_N_MAX
#define RT5514_PLL_N_MASK
#define RT5514_PLL_N_SFT
#define RT5514_PLL_M_MAX
#define RT5514_PLL_M_MASK
#define RT5514_PLL_M_SFT

/*  RT5514_ANA_CTRL_PLL1_2 (0x2264) */
#define RT5514_PLL_M_BP
#define RT5514_PLL_M_BP_SFT
#define RT5514_PLL_K_BP
#define RT5514_PLL_K_BP_SFT
#define RT5514_EN_LDO_PLL1
#define RT5514_EN_LDO_PLL1_BIT

#define RT5514_PLL_INP_MAX
#define RT5514_PLL_INP_MIN

#define RT5514_FIRMWARE1
#define RT5514_FIRMWARE2

/* System Clock Source */
enum {};

/* PLL1 Source */
enum {};

struct rt5514_priv {};

#endif /* __RT5514_H__ */