162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * rt5514.h -- RT5514 ALSA SoC audio driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright 2015 Realtek Microelectronics 662306a36Sopenharmony_ci * Author: Oder Chiou <oder_chiou@realtek.com> 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef __RT5514_H__ 1062306a36Sopenharmony_ci#define __RT5514_H__ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#include <linux/clk.h> 1362306a36Sopenharmony_ci#include <sound/rt5514.h> 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#define RT5514_DEVICE_ID 0x10ec5514 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#define RT5514_RESET 0x2000 1862306a36Sopenharmony_ci#define RT5514_PWR_ANA1 0x2004 1962306a36Sopenharmony_ci#define RT5514_PWR_ANA2 0x2008 2062306a36Sopenharmony_ci#define RT5514_I2S_CTRL1 0x2010 2162306a36Sopenharmony_ci#define RT5514_I2S_CTRL2 0x2014 2262306a36Sopenharmony_ci#define RT5514_VAD_CTRL6 0x2030 2362306a36Sopenharmony_ci#define RT5514_EXT_VAD_CTRL 0x206c 2462306a36Sopenharmony_ci#define RT5514_DIG_IO_CTRL 0x2070 2562306a36Sopenharmony_ci#define RT5514_PAD_CTRL1 0x2080 2662306a36Sopenharmony_ci#define RT5514_DMIC_DATA_CTRL 0x20a0 2762306a36Sopenharmony_ci#define RT5514_DIG_SOURCE_CTRL 0x20a4 2862306a36Sopenharmony_ci#define RT5514_SRC_CTRL 0x20ac 2962306a36Sopenharmony_ci#define RT5514_DOWNFILTER2_CTRL1 0x20d0 3062306a36Sopenharmony_ci#define RT5514_PLL_SOURCE_CTRL 0x2100 3162306a36Sopenharmony_ci#define RT5514_CLK_CTRL1 0x2104 3262306a36Sopenharmony_ci#define RT5514_CLK_CTRL2 0x2108 3362306a36Sopenharmony_ci#define RT5514_PLL3_CALIB_CTRL1 0x2110 3462306a36Sopenharmony_ci#define RT5514_PLL3_CALIB_CTRL4 0x2120 3562306a36Sopenharmony_ci#define RT5514_PLL3_CALIB_CTRL5 0x2124 3662306a36Sopenharmony_ci#define RT5514_PLL3_CALIB_CTRL6 0x2128 3762306a36Sopenharmony_ci#define RT5514_DELAY_BUF_CTRL1 0x2140 3862306a36Sopenharmony_ci#define RT5514_DELAY_BUF_CTRL3 0x2148 3962306a36Sopenharmony_ci#define RT5514_ASRC_IN_CTRL1 0x2180 4062306a36Sopenharmony_ci#define RT5514_DOWNFILTER0_CTRL1 0x2190 4162306a36Sopenharmony_ci#define RT5514_DOWNFILTER0_CTRL2 0x2194 4262306a36Sopenharmony_ci#define RT5514_DOWNFILTER0_CTRL3 0x2198 4362306a36Sopenharmony_ci#define RT5514_DOWNFILTER1_CTRL1 0x21a0 4462306a36Sopenharmony_ci#define RT5514_DOWNFILTER1_CTRL2 0x21a4 4562306a36Sopenharmony_ci#define RT5514_DOWNFILTER1_CTRL3 0x21a8 4662306a36Sopenharmony_ci#define RT5514_ANA_CTRL_LDO10 0x2200 4762306a36Sopenharmony_ci#define RT5514_ANA_CTRL_LDO18_16 0x2204 4862306a36Sopenharmony_ci#define RT5514_ANA_CTRL_ADC12 0x2210 4962306a36Sopenharmony_ci#define RT5514_ANA_CTRL_ADC21 0x2214 5062306a36Sopenharmony_ci#define RT5514_ANA_CTRL_ADC22 0x2218 5162306a36Sopenharmony_ci#define RT5514_ANA_CTRL_ADC23 0x221c 5262306a36Sopenharmony_ci#define RT5514_ANA_CTRL_MICBST 0x2220 5362306a36Sopenharmony_ci#define RT5514_ANA_CTRL_ADCFED 0x2224 5462306a36Sopenharmony_ci#define RT5514_ANA_CTRL_INBUF 0x2228 5562306a36Sopenharmony_ci#define RT5514_ANA_CTRL_VREF 0x222c 5662306a36Sopenharmony_ci#define RT5514_ANA_CTRL_PLL3 0x2240 5762306a36Sopenharmony_ci#define RT5514_ANA_CTRL_PLL1_1 0x2260 5862306a36Sopenharmony_ci#define RT5514_ANA_CTRL_PLL1_2 0x2264 5962306a36Sopenharmony_ci#define RT5514_DMIC_LP_CTRL 0x2e00 6062306a36Sopenharmony_ci#define RT5514_MISC_CTRL_DSP 0x2e04 6162306a36Sopenharmony_ci#define RT5514_DSP_CTRL1 0x2f00 6262306a36Sopenharmony_ci#define RT5514_DSP_CTRL3 0x2f08 6362306a36Sopenharmony_ci#define RT5514_DSP_CTRL4 0x2f10 6462306a36Sopenharmony_ci#define RT5514_VENDOR_ID1 0x2ff0 6562306a36Sopenharmony_ci#define RT5514_VENDOR_ID2 0x2ff4 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci#define RT5514_DSP_MAPPING 0x18000000 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci/* RT5514_PWR_ANA1 (0x2004) */ 7062306a36Sopenharmony_ci#define RT5514_POW_LDO18_IN (0x1 << 5) 7162306a36Sopenharmony_ci#define RT5514_POW_LDO18_IN_BIT 5 7262306a36Sopenharmony_ci#define RT5514_POW_LDO18_ADC (0x1 << 4) 7362306a36Sopenharmony_ci#define RT5514_POW_LDO18_ADC_BIT 4 7462306a36Sopenharmony_ci#define RT5514_POW_LDO21 (0x1 << 3) 7562306a36Sopenharmony_ci#define RT5514_POW_LDO21_BIT 3 7662306a36Sopenharmony_ci#define RT5514_POW_BG_LDO18_IN (0x1 << 2) 7762306a36Sopenharmony_ci#define RT5514_POW_BG_LDO18_IN_BIT 2 7862306a36Sopenharmony_ci#define RT5514_POW_BG_LDO21 (0x1 << 1) 7962306a36Sopenharmony_ci#define RT5514_POW_BG_LDO21_BIT 1 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci/* RT5514_PWR_ANA2 (0x2008) */ 8262306a36Sopenharmony_ci#define RT5514_POW_PLL1 (0x1 << 18) 8362306a36Sopenharmony_ci#define RT5514_POW_PLL1_BIT 18 8462306a36Sopenharmony_ci#define RT5514_POW_PLL1_LDO (0x1 << 16) 8562306a36Sopenharmony_ci#define RT5514_POW_PLL1_LDO_BIT 16 8662306a36Sopenharmony_ci#define RT5514_POW_BG_MBIAS (0x1 << 15) 8762306a36Sopenharmony_ci#define RT5514_POW_BG_MBIAS_BIT 15 8862306a36Sopenharmony_ci#define RT5514_POW_MBIAS (0x1 << 14) 8962306a36Sopenharmony_ci#define RT5514_POW_MBIAS_BIT 14 9062306a36Sopenharmony_ci#define RT5514_POW_VREF2 (0x1 << 13) 9162306a36Sopenharmony_ci#define RT5514_POW_VREF2_BIT 13 9262306a36Sopenharmony_ci#define RT5514_POW_VREF1 (0x1 << 12) 9362306a36Sopenharmony_ci#define RT5514_POW_VREF1_BIT 12 9462306a36Sopenharmony_ci#define RT5514_POWR_LDO16 (0x1 << 11) 9562306a36Sopenharmony_ci#define RT5514_POWR_LDO16_BIT 11 9662306a36Sopenharmony_ci#define RT5514_POWL_LDO16 (0x1 << 10) 9762306a36Sopenharmony_ci#define RT5514_POWL_LDO16_BIT 10 9862306a36Sopenharmony_ci#define RT5514_POW_ADC2 (0x1 << 9) 9962306a36Sopenharmony_ci#define RT5514_POW_ADC2_BIT 9 10062306a36Sopenharmony_ci#define RT5514_POW_INPUT_BUF (0x1 << 8) 10162306a36Sopenharmony_ci#define RT5514_POW_INPUT_BUF_BIT 8 10262306a36Sopenharmony_ci#define RT5514_POW_ADC1_R (0x1 << 7) 10362306a36Sopenharmony_ci#define RT5514_POW_ADC1_R_BIT 7 10462306a36Sopenharmony_ci#define RT5514_POW_ADC1_L (0x1 << 6) 10562306a36Sopenharmony_ci#define RT5514_POW_ADC1_L_BIT 6 10662306a36Sopenharmony_ci#define RT5514_POW2_BSTR (0x1 << 5) 10762306a36Sopenharmony_ci#define RT5514_POW2_BSTR_BIT 5 10862306a36Sopenharmony_ci#define RT5514_POW2_BSTL (0x1 << 4) 10962306a36Sopenharmony_ci#define RT5514_POW2_BSTL_BIT 4 11062306a36Sopenharmony_ci#define RT5514_POW_BSTR (0x1 << 3) 11162306a36Sopenharmony_ci#define RT5514_POW_BSTR_BIT 3 11262306a36Sopenharmony_ci#define RT5514_POW_BSTL (0x1 << 2) 11362306a36Sopenharmony_ci#define RT5514_POW_BSTL_BIT 2 11462306a36Sopenharmony_ci#define RT5514_POW_ADCFEDR (0x1 << 1) 11562306a36Sopenharmony_ci#define RT5514_POW_ADCFEDR_BIT 1 11662306a36Sopenharmony_ci#define RT5514_POW_ADCFEDL (0x1 << 0) 11762306a36Sopenharmony_ci#define RT5514_POW_ADCFEDL_BIT 0 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci/* RT5514_I2S_CTRL1 (0x2010) */ 12062306a36Sopenharmony_ci#define RT5514_TDM_MODE2 (0x1 << 30) 12162306a36Sopenharmony_ci#define RT5514_TDM_MODE2_SFT 30 12262306a36Sopenharmony_ci#define RT5514_TDM_MODE (0x1 << 28) 12362306a36Sopenharmony_ci#define RT5514_TDM_MODE_SFT 28 12462306a36Sopenharmony_ci#define RT5514_I2S_LR_MASK (0x1 << 26) 12562306a36Sopenharmony_ci#define RT5514_I2S_LR_SFT 26 12662306a36Sopenharmony_ci#define RT5514_I2S_LR_NOR (0x0 << 26) 12762306a36Sopenharmony_ci#define RT5514_I2S_LR_INV (0x1 << 26) 12862306a36Sopenharmony_ci#define RT5514_I2S_BP_MASK (0x1 << 25) 12962306a36Sopenharmony_ci#define RT5514_I2S_BP_SFT 25 13062306a36Sopenharmony_ci#define RT5514_I2S_BP_NOR (0x0 << 25) 13162306a36Sopenharmony_ci#define RT5514_I2S_BP_INV (0x1 << 25) 13262306a36Sopenharmony_ci#define RT5514_I2S_DF_MASK (0x7 << 16) 13362306a36Sopenharmony_ci#define RT5514_I2S_DF_SFT 16 13462306a36Sopenharmony_ci#define RT5514_I2S_DF_I2S (0x0 << 16) 13562306a36Sopenharmony_ci#define RT5514_I2S_DF_LEFT (0x1 << 16) 13662306a36Sopenharmony_ci#define RT5514_I2S_DF_PCM_A (0x2 << 16) 13762306a36Sopenharmony_ci#define RT5514_I2S_DF_PCM_B (0x3 << 16) 13862306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_RX_MASK (0x3 << 10) 13962306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_RX_SFT 10 14062306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_RX_4CH (0x1 << 10) 14162306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_RX_6CH (0x2 << 10) 14262306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_RX_8CH (0x3 << 10) 14362306a36Sopenharmony_ci#define RT5514_CH_LEN_RX_MASK (0x3 << 8) 14462306a36Sopenharmony_ci#define RT5514_CH_LEN_RX_SFT 8 14562306a36Sopenharmony_ci#define RT5514_CH_LEN_RX_16 (0x0 << 8) 14662306a36Sopenharmony_ci#define RT5514_CH_LEN_RX_20 (0x1 << 8) 14762306a36Sopenharmony_ci#define RT5514_CH_LEN_RX_24 (0x2 << 8) 14862306a36Sopenharmony_ci#define RT5514_CH_LEN_RX_32 (0x3 << 8) 14962306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_TX_MASK (0x3 << 6) 15062306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_TX_SFT 6 15162306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_TX_4CH (0x1 << 6) 15262306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_TX_6CH (0x2 << 6) 15362306a36Sopenharmony_ci#define RT5514_TDMSLOT_SEL_TX_8CH (0x3 << 6) 15462306a36Sopenharmony_ci#define RT5514_CH_LEN_TX_MASK (0x3 << 4) 15562306a36Sopenharmony_ci#define RT5514_CH_LEN_TX_SFT 4 15662306a36Sopenharmony_ci#define RT5514_CH_LEN_TX_16 (0x0 << 4) 15762306a36Sopenharmony_ci#define RT5514_CH_LEN_TX_20 (0x1 << 4) 15862306a36Sopenharmony_ci#define RT5514_CH_LEN_TX_24 (0x2 << 4) 15962306a36Sopenharmony_ci#define RT5514_CH_LEN_TX_32 (0x3 << 4) 16062306a36Sopenharmony_ci#define RT5514_I2S_DL_MASK (0x3 << 0) 16162306a36Sopenharmony_ci#define RT5514_I2S_DL_SFT 0 16262306a36Sopenharmony_ci#define RT5514_I2S_DL_16 (0x0 << 0) 16362306a36Sopenharmony_ci#define RT5514_I2S_DL_20 (0x1 << 0) 16462306a36Sopenharmony_ci#define RT5514_I2S_DL_24 (0x2 << 0) 16562306a36Sopenharmony_ci#define RT5514_I2S_DL_8 (0x3 << 0) 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci/* RT5514_I2S_CTRL2 (0x2014) */ 16862306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_MODE (0x1 << 31) 16962306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_MODE_SFT 31 17062306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_VALID_CH_MASK (0x1 << 29) 17162306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_VALID_CH_SFT 29 17262306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_VALID_CH2 (0x0 << 29) 17362306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_VALID_CH4 (0x1 << 29) 17462306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_START_MASK (0x1 << 28) 17562306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_START_SFT 28 17662306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_START_SLOT0 (0x0 << 28) 17762306a36Sopenharmony_ci#define RT5514_TDM_DOCKING_START_SLOT4 (0x1 << 28) 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci/* RT5514_DIG_SOURCE_CTRL (0x20a4) */ 18062306a36Sopenharmony_ci#define RT5514_AD1_DMIC_INPUT_SEL (0x1 << 1) 18162306a36Sopenharmony_ci#define RT5514_AD1_DMIC_INPUT_SEL_SFT 1 18262306a36Sopenharmony_ci#define RT5514_AD0_DMIC_INPUT_SEL (0x1 << 0) 18362306a36Sopenharmony_ci#define RT5514_AD0_DMIC_INPUT_SEL_SFT 0 18462306a36Sopenharmony_ci 18562306a36Sopenharmony_ci/* RT5514_PLL_SOURCE_CTRL (0x2100) */ 18662306a36Sopenharmony_ci#define RT5514_PLL_1_SEL_MASK (0x7 << 12) 18762306a36Sopenharmony_ci#define RT5514_PLL_1_SEL_SFT 12 18862306a36Sopenharmony_ci#define RT5514_PLL_1_SEL_SCLK (0x3 << 12) 18962306a36Sopenharmony_ci#define RT5514_PLL_1_SEL_MCLK (0x4 << 12) 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ci/* RT5514_CLK_CTRL1 (0x2104) */ 19262306a36Sopenharmony_ci#define RT5514_CLK_AD_ANA1_EN (0x1 << 31) 19362306a36Sopenharmony_ci#define RT5514_CLK_AD_ANA1_EN_BIT 31 19462306a36Sopenharmony_ci#define RT5514_CLK_AD1_EN (0x1 << 24) 19562306a36Sopenharmony_ci#define RT5514_CLK_AD1_EN_BIT 24 19662306a36Sopenharmony_ci#define RT5514_CLK_AD0_EN (0x1 << 23) 19762306a36Sopenharmony_ci#define RT5514_CLK_AD0_EN_BIT 23 19862306a36Sopenharmony_ci#define RT5514_CLK_DMIC_OUT_SEL_MASK (0x7 << 8) 19962306a36Sopenharmony_ci#define RT5514_CLK_DMIC_OUT_SEL_SFT 8 20062306a36Sopenharmony_ci#define RT5514_CLK_AD_ANA1_SEL_MASK (0xf << 0) 20162306a36Sopenharmony_ci#define RT5514_CLK_AD_ANA1_SEL_SFT 0 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci/* RT5514_CLK_CTRL2 (0x2108) */ 20462306a36Sopenharmony_ci#define RT5514_CLK_AD1_ASRC_EN (0x1 << 17) 20562306a36Sopenharmony_ci#define RT5514_CLK_AD1_ASRC_EN_BIT 17 20662306a36Sopenharmony_ci#define RT5514_CLK_AD0_ASRC_EN (0x1 << 16) 20762306a36Sopenharmony_ci#define RT5514_CLK_AD0_ASRC_EN_BIT 16 20862306a36Sopenharmony_ci#define RT5514_CLK_SYS_DIV_OUT_MASK (0x7 << 8) 20962306a36Sopenharmony_ci#define RT5514_CLK_SYS_DIV_OUT_SFT 8 21062306a36Sopenharmony_ci#define RT5514_SEL_ADC_OSR_MASK (0x7 << 4) 21162306a36Sopenharmony_ci#define RT5514_SEL_ADC_OSR_SFT 4 21262306a36Sopenharmony_ci#define RT5514_CLK_SYS_PRE_SEL_MASK (0x3 << 0) 21362306a36Sopenharmony_ci#define RT5514_CLK_SYS_PRE_SEL_SFT 0 21462306a36Sopenharmony_ci#define RT5514_CLK_SYS_PRE_SEL_MCLK (0x2 << 0) 21562306a36Sopenharmony_ci#define RT5514_CLK_SYS_PRE_SEL_PLL (0x3 << 0) 21662306a36Sopenharmony_ci 21762306a36Sopenharmony_ci/* RT5514_DOWNFILTER_CTRL (0x2190 0x2194 0x21a0 0x21a4) */ 21862306a36Sopenharmony_ci#define RT5514_AD_DMIC_MIX (0x1 << 11) 21962306a36Sopenharmony_ci#define RT5514_AD_DMIC_MIX_BIT 11 22062306a36Sopenharmony_ci#define RT5514_AD_AD_MIX (0x1 << 10) 22162306a36Sopenharmony_ci#define RT5514_AD_AD_MIX_BIT 10 22262306a36Sopenharmony_ci#define RT5514_AD_AD_MUTE (0x1 << 7) 22362306a36Sopenharmony_ci#define RT5514_AD_AD_MUTE_BIT 7 22462306a36Sopenharmony_ci#define RT5514_AD_GAIN_MASK (0x3f << 1) 22562306a36Sopenharmony_ci#define RT5514_AD_GAIN_SFT 1 22662306a36Sopenharmony_ci 22762306a36Sopenharmony_ci/* RT5514_ANA_CTRL_MICBST (0x2220) */ 22862306a36Sopenharmony_ci#define RT5514_SEL_BSTL_MASK (0xf << 4) 22962306a36Sopenharmony_ci#define RT5514_SEL_BSTL_SFT 4 23062306a36Sopenharmony_ci#define RT5514_SEL_BSTR_MASK (0xf << 0) 23162306a36Sopenharmony_ci#define RT5514_SEL_BSTR_SFT 0 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ci/* RT5514_ANA_CTRL_PLL1_1 (0x2260) */ 23462306a36Sopenharmony_ci#define RT5514_PLL_K_MAX 0x1f 23562306a36Sopenharmony_ci#define RT5514_PLL_K_MASK (RT5514_PLL_K_MAX << 16) 23662306a36Sopenharmony_ci#define RT5514_PLL_K_SFT 16 23762306a36Sopenharmony_ci#define RT5514_PLL_N_MAX 0x1ff 23862306a36Sopenharmony_ci#define RT5514_PLL_N_MASK (RT5514_PLL_N_MAX << 7) 23962306a36Sopenharmony_ci#define RT5514_PLL_N_SFT 4 24062306a36Sopenharmony_ci#define RT5514_PLL_M_MAX 0xf 24162306a36Sopenharmony_ci#define RT5514_PLL_M_MASK (RT5514_PLL_M_MAX << 0) 24262306a36Sopenharmony_ci#define RT5514_PLL_M_SFT 0 24362306a36Sopenharmony_ci 24462306a36Sopenharmony_ci/* RT5514_ANA_CTRL_PLL1_2 (0x2264) */ 24562306a36Sopenharmony_ci#define RT5514_PLL_M_BP (0x1 << 2) 24662306a36Sopenharmony_ci#define RT5514_PLL_M_BP_SFT 2 24762306a36Sopenharmony_ci#define RT5514_PLL_K_BP (0x1 << 1) 24862306a36Sopenharmony_ci#define RT5514_PLL_K_BP_SFT 1 24962306a36Sopenharmony_ci#define RT5514_EN_LDO_PLL1 (0x1 << 0) 25062306a36Sopenharmony_ci#define RT5514_EN_LDO_PLL1_BIT 0 25162306a36Sopenharmony_ci 25262306a36Sopenharmony_ci#define RT5514_PLL_INP_MAX 40000000 25362306a36Sopenharmony_ci#define RT5514_PLL_INP_MIN 256000 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_ci#define RT5514_FIRMWARE1 "rt5514_dsp_fw1.bin" 25662306a36Sopenharmony_ci#define RT5514_FIRMWARE2 "rt5514_dsp_fw2.bin" 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ci/* System Clock Source */ 25962306a36Sopenharmony_cienum { 26062306a36Sopenharmony_ci RT5514_SCLK_S_MCLK, 26162306a36Sopenharmony_ci RT5514_SCLK_S_PLL1, 26262306a36Sopenharmony_ci}; 26362306a36Sopenharmony_ci 26462306a36Sopenharmony_ci/* PLL1 Source */ 26562306a36Sopenharmony_cienum { 26662306a36Sopenharmony_ci RT5514_PLL1_S_MCLK, 26762306a36Sopenharmony_ci RT5514_PLL1_S_BCLK, 26862306a36Sopenharmony_ci}; 26962306a36Sopenharmony_ci 27062306a36Sopenharmony_cistruct rt5514_priv { 27162306a36Sopenharmony_ci struct rt5514_platform_data pdata; 27262306a36Sopenharmony_ci struct snd_soc_component *component; 27362306a36Sopenharmony_ci struct regmap *i2c_regmap, *regmap; 27462306a36Sopenharmony_ci struct clk *mclk, *dsp_calib_clk; 27562306a36Sopenharmony_ci int sysclk; 27662306a36Sopenharmony_ci int sysclk_src; 27762306a36Sopenharmony_ci int lrck; 27862306a36Sopenharmony_ci int bclk; 27962306a36Sopenharmony_ci int pll_src; 28062306a36Sopenharmony_ci int pll_in; 28162306a36Sopenharmony_ci int pll_out; 28262306a36Sopenharmony_ci int dsp_enabled; 28362306a36Sopenharmony_ci unsigned int pll3_cal_value; 28462306a36Sopenharmony_ci}; 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci#endif /* __RT5514_H__ */ 287