linux/sound/soc/codecs/aw88399.h

// SPDX-License-Identifier: GPL-2.0-only
//
// aw88399.h --  ALSA SoC AW88399 codec support
//
// Copyright (c) 2023 AWINIC Technology CO., LTD
//
// Author: Weidong Wang <[email protected]>
//

#ifndef __AW88399_H__
#define __AW88399_H__

/* registers list */
#define AW88399_ID_REG
#define AW88399_SYSST_REG
#define AW88399_SYSINT_REG
#define AW88399_SYSINTM_REG
#define AW88399_SYSCTRL_REG
#define AW88399_SYSCTRL2_REG
#define AW88399_I2SCTRL1_REG
#define AW88399_I2SCTRL2_REG
#define AW88399_I2SCTRL3_REG
#define AW88399_DACCFG1_REG
#define AW88399_DACCFG2_REG
#define AW88399_DACCFG3_REG
#define AW88399_DACCFG4_REG
#define AW88399_DACCFG5_REG
#define AW88399_DACCFG6_REG
#define AW88399_DACCFG7_REG
#define AW88399_MPDCFG1_REG
#define AW88399_MPDCFG2_REG
#define AW88399_MPDCFG3_REG
#define AW88399_MPDCFG4_REG
#define AW88399_PWMCTRL1_REG
#define AW88399_PWMCTRL2_REG
#define AW88399_PWMCTRL3_REG
#define AW88399_I2SCFG1_REG
#define AW88399_DBGCTRL_REG
#define AW88399_HAGCST_REG
#define AW88399_VBAT_REG
#define AW88399_TEMP_REG
#define AW88399_PVDD_REG
#define AW88399_ISNDAT_REG
#define AW88399_VSNDAT_REG
#define AW88399_I2SINT_REG
#define AW88399_I2SCAPCNT_REG
#define AW88399_ANASTA1_REG
#define AW88399_ANASTA2_REG
#define AW88399_ANASTA3_REG
#define AW88399_TESTDET_REG
#define AW88399_DSMCFG1_REG
#define AW88399_DSMCFG2_REG
#define AW88399_DSMCFG3_REG
#define AW88399_DSMCFG4_REG
#define AW88399_DSMCFG5_REG
#define AW88399_DSMCFG6_REG
#define AW88399_DSMCFG7_REG
#define AW88399_DSMCFG8_REG
#define AW88399_TESTIN_REG
#define AW88399_TESTOUT_REG
#define AW88399_MEMTEST_REG
#define AW88399_VSNCTRL1_REG
#define AW88399_ISNCTRL1_REG
#define AW88399_ISNCTRL2_REG
#define AW88399_DSPMADD_REG
#define AW88399_DSPMDAT_REG
#define AW88399_WDT_REG
#define AW88399_ACR1_REG
#define AW88399_ACR2_REG
#define AW88399_ASR1_REG
#define AW88399_ASR2_REG
#define AW88399_DSPCFG_REG
#define AW88399_ASR3_REG
#define AW88399_ASR4_REG
#define AW88399_DSPVCALB_REG
#define AW88399_CRCCTRL_REG
#define AW88399_DSPDBG1_REG
#define AW88399_DSPDBG2_REG
#define AW88399_DSPDBG3_REG
#define AW88399_PLLCTRL1_REG
#define AW88399_PLLCTRL2_REG
#define AW88399_PLLCTRL3_REG
#define AW88399_CDACTRL1_REG
#define AW88399_CDACTRL2_REG
#define AW88399_CDACTRL3_REG
#define AW88399_SADCCTRL1_REG
#define AW88399_SADCCTRL2_REG
#define AW88399_BOPCTRL1_REG
#define AW88399_BOPCTRL2_REG
#define AW88399_BOPCTRL3_REG
#define AW88399_BOPCTRL4_REG
#define AW88399_BOPCTRL5_REG
#define AW88399_BOPCTRL6_REG
#define AW88399_BOPCTRL7_REG
#define AW88399_BSTCTRL1_REG
#define AW88399_BSTCTRL2_REG
#define AW88399_BSTCTRL3_REG
#define AW88399_BSTCTRL4_REG
#define AW88399_BSTCTRL5_REG
#define AW88399_BSTCTRL6_REG
#define AW88399_BSTCTRL7_REG
#define AW88399_BSTCTRL8_REG
#define AW88399_BSTCTRL9_REG
#define AW88399_BSTCTRL10_REG
#define AW88399_CPCTRL_REG
#define AW88399_EFWH_REG
#define AW88399_EFWM2_REG
#define AW88399_EFWM1_REG
#define AW88399_EFWL_REG
#define AW88399_TESTCTRL1_REG
#define AW88399_TESTCTRL2_REG
#define AW88399_EFCTRL1_REG
#define AW88399_EFCTRL2_REG
#define AW88399_EFRH4_REG
#define AW88399_EFRH3_REG
#define AW88399_EFRH2_REG
#define AW88399_EFRH1_REG
#define AW88399_EFRL4_REG
#define AW88399_EFRL3_REG
#define AW88399_EFRL2_REG
#define AW88399_EFRL1_REG
#define AW88399_TM_REG
#define AW88399_TM2_REG

#define AW88399_REG_MAX
#define AW88399_MUTE_VOL

#define AW88399_DSP_CFG_ADDR
#define AW88399_DSP_REG_CFG_ADPZ_RA
#define AW88399_DSP_FW_ADDR
#define AW88399_DSP_ROM_CHECK_ADDR
#define AW88399_DSP_ROM_CHECK_DATA

#define AW88399_CALI_RE_HBITS_MASK
#define AW88399_CALI_RE_HBITS_SHIFT

#define AW88399_CALI_RE_LBITS_MASK
#define AW88399_CALI_RE_LBITS_SHIFT

#define AW88399_I2STXEN_START_BIT
#define AW88399_I2STXEN_BITS_LEN
#define AW88399_I2STXEN_MASK

#define AW88399_I2STXEN_DISABLE
#define AW88399_I2STXEN_DISABLE_VALUE

#define AW88399_I2STXEN_ENABLE
#define AW88399_I2STXEN_ENABLE_VALUE

#define AW88399_VOL_START_BIT
#define AW88399_VOL_BITS_LEN
#define AW88399_VOL_MASK

#define AW88399_PWDN_START_BIT
#define AW88399_PWDN_BITS_LEN
#define AW88399_PWDN_MASK

#define AW88399_PWDN_POWER_DOWN
#define AW88399_PWDN_POWER_DOWN_VALUE

#define AW88399_PWDN_WORKING
#define AW88399_PWDN_WORKING_VALUE

#define AW88399_DSPBY_START_BIT
#define AW88399_DSPBY_BITS_LEN
#define AW88399_DSPBY_MASK

#define AW88399_DSPBY_WORKING
#define AW88399_DSPBY_WORKING_VALUE

#define AW88399_DSPBY_BYPASS
#define AW88399_DSPBY_BYPASS_VALUE

#define AW88399_MEM_CLKSEL_START_BIT
#define AW88399_MEM_CLKSEL_BITS_LEN
#define AW88399_MEM_CLKSEL_MASK

#define AW88399_MEM_CLKSEL_OSCCLK
#define AW88399_MEM_CLKSEL_OSCCLK_VALUE

#define AW88399_MEM_CLKSEL_DAPHCLK
#define AW88399_MEM_CLKSEL_DAPHCLK_VALUE

#define AW88399_DITHER_EN_START_BIT
#define AW88399_DITHER_EN_BITS_LEN
#define AW88399_DITHER_EN_MASK

#define AW88399_DITHER_EN_DISABLE
#define AW88399_DITHER_EN_DISABLE_VALUE

#define AW88399_DITHER_EN_ENABLE
#define AW88399_DITHER_EN_ENABLE_VALUE

#define AW88399_HMUTE_START_BIT
#define AW88399_HMUTE_BITS_LEN
#define AW88399_HMUTE_MASK

#define AW88399_HMUTE_DISABLE
#define AW88399_HMUTE_DISABLE_VALUE

#define AW88399_HMUTE_ENABLE
#define AW88399_HMUTE_ENABLE_VALUE

#define AW88399_EF_DBMD_START_BIT
#define AW88399_EF_DBMD_BITS_LEN
#define AW88399_EF_DBMD_MASK

#define AW88399_EF_DBMD_OR
#define AW88399_EF_DBMD_OR_VALUE

#define AW88399_VDSEL_START_BIT
#define AW88399_VDSEL_BITS_LEN
#define AW88399_VDSEL_MASK

#define AW88399_EF_ISN_GESLP_H_START_BIT
#define AW88399_EF_ISN_GESLP_H_BITS_LEN
#define AW88399_EF_ISN_GESLP_H_MASK

/* EF_VSN_GESLP_H bit 9:0 (EFRH3 0x75) */
#define AW88399_EF_VSN_GESLP_H_START_BIT
#define AW88399_EF_VSN_GESLP_H_BITS_LEN
#define AW88399_EF_VSN_GESLP_H_MASK

#define AW88399_EF_ISN_GESLP_L_START_BIT
#define AW88399_EF_ISN_GESLP_L_BITS_LEN
#define AW88399_EF_ISN_GESLP_L_MASK

/* EF_VSN_GESLP_L bit 9:0 (EFRL3 0x79) */
#define AW88399_EF_VSN_GESLP_L_START_BIT
#define AW88399_EF_VSN_GESLP_L_BITS_LEN
#define AW88399_EF_VSN_GESLP_L_MASK

#define AW88399_INTERNAL_VSN_TRIM_H_START_BIT
#define AW88399_INTERNAL_VSN_TRIM_H_BITS_LEN
#define AW88399_INTERNAL_VSN_TRIM_H_MASK

#define AW88399_INTERNAL_VSN_TRIM_L_START_BIT
#define AW88399_INTERNAL_VSN_TRIM_L_BITS_LEN
#define AW88399_INTERNAL_VSN_TRIM_L_MASK

#define AW88399_RCV_MODE_START_BIT
#define AW88399_RCV_MODE_BITS_LEN
#define AW88399_RCV_MODE_MASK

#define AW88399_CLKI_START_BIT
#define AW88399_NOCLKI_START_BIT
#define AW88399_PLLI_START_BIT
#define AW88399_PLLI_INT_VALUE
#define AW88399_PLLI_INT_INTERRUPT

#define AW88399_CLKI_INT_VALUE
#define AW88399_CLKI_INT_INTERRUPT

#define AW88399_NOCLKI_INT_VALUE
#define AW88399_NOCLKI_INT_INTERRUPT

#define AW88399_BIT_SYSINT_CHECK

#define AW88399_CRC_CHECK_START_BIT
#define AW88399_CRC_CHECK_BITS_LEN
#define AW88399_CRC_CHECK_BITS_MASK

#define AW88399_RCV_MODE_RECEIVER
#define AW88399_RCV_MODE_RECEIVER_VALUE

#define AW88399_AMPPD_START_BIT
#define AW88399_AMPPD_BITS_LEN
#define AW88399_AMPPD_MASK

#define AW88399_AMPPD_WORKING
#define AW88399_AMPPD_WORKING_VALUE

#define AW88399_AMPPD_POWER_DOWN
#define AW88399_AMPPD_POWER_DOWN_VALUE

#define AW88399_RAM_CG_BYP_START_BIT
#define AW88399_RAM_CG_BYP_BITS_LEN
#define AW88399_RAM_CG_BYP_MASK

#define AW88399_RAM_CG_BYP_WORK
#define AW88399_RAM_CG_BYP_WORK_VALUE

#define AW88399_RAM_CG_BYP_BYPASS
#define AW88399_RAM_CG_BYP_BYPASS_VALUE

#define AW88399_CRC_END_ADDR_START_BIT
#define AW88399_CRC_END_ADDR_BITS_LEN
#define AW88399_CRC_END_ADDR_MASK

#define AW88399_CRC_CODE_EN_START_BIT
#define AW88399_CRC_CODE_EN_BITS_LEN
#define AW88399_CRC_CODE_EN_MASK

#define AW88399_CRC_CODE_EN_DISABLE
#define AW88399_CRC_CODE_EN_DISABLE_VALUE

#define AW88399_CRC_CODE_EN_ENABLE
#define AW88399_CRC_CODE_EN_ENABLE_VALUE

#define AW88399_CRC_CFG_EN_START_BIT
#define AW88399_CRC_CFG_EN_BITS_LEN
#define AW88399_CRC_CFG_EN_MASK

#define AW88399_CRC_CFG_EN_DISABLE
#define AW88399_CRC_CFG_EN_DISABLE_VALUE

#define AW88399_CRC_CFG_EN_ENABLE
#define AW88399_CRC_CFG_EN_ENABLE_VALUE

#define AW88399_OCDS_START_BIT
#define AW88399_OCDS_OC
#define AW88399_OCDS_OC_VALUE

#define AW88399_NOCLKS_START_BIT
#define AW88399_NOCLKS_NO_CLOCK
#define AW88399_NOCLKS_NO_CLOCK_VALUE

#define AW88399_SWS_START_BIT
#define AW88399_SWS_SWITCHING
#define AW88399_SWS_SWITCHING_VALUE

#define AW88399_BSTS_START_BIT
#define AW88399_BSTS_FINISHED
#define AW88399_BSTS_FINISHED_VALUE

#define AW88399_UVLS_START_BIT
#define AW88399_UVLS_NORMAL
#define AW88399_UVLS_NORMAL_VALUE

#define AW88399_BSTOCS_START_BIT
#define AW88399_BSTOCS_OVER_CURRENT
#define AW88399_BSTOCS_OVER_CURRENT_VALUE

#define AW88399_OTHS_START_BIT
#define AW88399_OTHS_OT
#define AW88399_OTHS_OT_VALUE

#define AW88399_PLLS_START_BIT
#define AW88399_PLLS_LOCKED
#define AW88399_PLLS_LOCKED_VALUE

#define AW88399_CLKS_START_BIT
#define AW88399_CLKS_STABLE
#define AW88399_CLKS_STABLE_VALUE

#define AW88399_BIT_PLL_CHECK

#define AW88399_BIT_SYSST_CHECK_MASK

#define AW88399_BIT_SYSST_NOSWS_CHECK

#define AW88399_BIT_SYSST_SWS_CHECK

#define AW88399_CCO_MUX_START_BIT
#define AW88399_CCO_MUX_BITS_LEN
#define AW88399_CCO_MUX_MASK

#define AW88399_CCO_MUX_DIVIDED
#define AW88399_CCO_MUX_DIVIDED_VALUE

#define AW88399_CCO_MUX_BYPASS
#define AW88399_CCO_MUX_BYPASS_VALUE

#define AW88399_NOISE_GATE_EN_START_BIT
#define AW88399_NOISE_GATE_EN_BITS_LEN
#define AW88399_NOISE_GATE_EN_MASK

#define AW88399_WDT_CNT_START_BIT
#define AW88399_WDT_CNT_BITS_LEN
#define AW88399_WDT_CNT_MASK

#define AW88399_VOLUME_STEP_DB
#define AW88399_VOL_DEFAULT_VALUE
#define AW88399_DSP_ODD_NUM_BIT_TEST
#define AW88399_EF_ISN_GESLP_SIGN_MASK
#define AW88399_EF_ISN_GESLP_SIGN_NEG

#define AW88399_EF_VSN_GESLP_SIGN_MASK
#define AW88399_EF_VSN_GESLP_SIGN_NEG

#define AW88399_TEM4_SIGN_MASK
#define AW88399_TEM4_SIGN_NEG

#define AW88399_ICABLK_FACTOR
#define AW88399_VCABLK_FACTOR
#define AW88399_VCABLK_DAC_FACTOR

#define AW88399_VCALB_ADJ_FACTOR
#define AW88399_VCALB_ACCURACY

#define AW88399_ISCAL_FACTOR
#define AW88399_VSCAL_FACTOR
#define AW88399_ISCAL_DAC_FACTOR
#define AW88399_VSCAL_DAC_FACTOR
#define AW88399_CABL_BASE_VALUE

#define AW88399_DEV_DEFAULT_CH
#define AW88399_DEV_DSP_CHECK_MAX
#define AW88399_MAX_RAM_WRITE_BYTE_SIZE
#define AW88399_DSP_RE_SHIFT
#define AW88399_CALI_RE_MAX
#define AW88399_CALI_RE_MIN
#define AW_FW_ADDR_LEN
#define AW88399_DSP_RE_TO_SHOW_RE(re, shift)
#define AW88399_SHOW_RE_TO_DSP_RE(re, shift)
#define AW88399_CRC_CHECK_PASS_VAL

#define AW88399_CRC_CFG_BASE_ADDR
#define AW88399_CRC_FW_BASE_ADDR
#define AW88399_ACF_FILE
#define AW88399_DEV_SYSST_CHECK_MAX
#define AW88399_CHIP_ID

#define AW88399_I2C_NAME

#define AW88399_START_RETRIES
#define AW88399_START_WORK_DELAY_MS

#define AW88399_RATES
#define AW88399_FORMATS

#define FADE_TIME_MAX
#define FADE_TIME_MIN

#define AW88399_PROFILE_EXT(xname, profile_info, profile_get, profile_set)

enum {};

enum {};

enum {};

enum {};

enum {};

enum {};

enum AW88399_DEV_STATUS {};

enum AW88399_DEV_FW_STATUS {};

enum AW88399_DEV_MEMCLK {};

enum AW88399_DEV_DSP_CFG {};

enum {};

enum {};

enum {};

struct aw88399 {};

#endif