/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright Everest Semiconductor Co.,Ltd
*
* Author: David Yang <yangxiaohua@everest-semi.com>
*/
#ifndef _ES8316_H
#define _ES8316_H
/*
* ES8316 register space
*/
/* Reset Control */
#define ES8316_RESET 0 x00
/* Clock Management */
#define ES8316_CLKMGR_CLKSW 0 x01
#define ES8316_CLKMGR_CLKSEL 0 x02
#define ES8316_CLKMGR_ADCOSR 0 x03
#define ES8316_CLKMGR_ADCDIV1 0 x04
#define ES8316_CLKMGR_ADCDIV2 0 x05
#define ES8316_CLKMGR_DACDIV1 0 x06
#define ES8316_CLKMGR_DACDIV2 0 x07
#define ES8316_CLKMGR_CPDIV 0 x08
/* Serial Data Port Control */
#define ES8316_SERDATA1 0 x09
#define ES8316_SERDATA_ADC 0 x0a
#define ES8316_SERDATA_DAC 0 x0b
/* System Control */
#define ES8316_SYS_VMIDSEL 0 x0c
#define ES8316_SYS_PDN 0 x0d
#define ES8316_SYS_LP1 0 x0e
#define ES8316_SYS_LP2 0 x0f
#define ES8316_SYS_VMIDLOW 0 x10
#define ES8316_SYS_VSEL 0 x11
#define ES8316_SYS_REF 0 x12
/* Headphone Mixer */
#define ES8316_HPMIX_SEL 0 x13
#define ES8316_HPMIX_SWITCH 0 x14
#define ES8316_HPMIX_PDN 0 x15
#define ES8316_HPMIX_VOL 0 x16
/* Charge Pump Headphone driver */
#define ES8316_CPHP_OUTEN 0 x17
#define ES8316_CPHP_ICAL_VOL 0 x18
#define ES8316_CPHP_PDN1 0 x19
#define ES8316_CPHP_PDN2 0 x1a
#define ES8316_CPHP_LDOCTL 0 x1b
/* Calibration */
#define ES8316_CAL_TYPE 0 x1c
#define ES8316_CAL_SET 0 x1d
#define ES8316_CAL_HPLIV 0 x1e
#define ES8316_CAL_HPRIV 0 x1f
#define ES8316_CAL_HPLMV 0 x20
#define ES8316_CAL_HPRMV 0 x21
/* ADC Control */
#define ES8316_ADC_PDN_LINSEL 0 x22
#define ES8316_ADC_PGAGAIN 0 x23
#define ES8316_ADC_D2SEPGA 0 x24
#define ES8316_ADC_DMIC 0 x25
#define ES8316_ADC_MUTE 0 x26
#define ES8316_ADC_VOLUME 0 x27
#define ES8316_ADC_ALC1 0 x29
#define ES8316_ADC_ALC2 0 x2a
#define ES8316_ADC_ALC3 0 x2b
#define ES8316_ADC_ALC4 0 x2c
#define ES8316_ADC_ALC5 0 x2d
#define ES8316_ADC_ALC_NG 0 x2e
/* DAC Control */
#define ES8316_DAC_PDN 0 x2f
#define ES8316_DAC_SET1 0 x30
#define ES8316_DAC_SET2 0 x31
#define ES8316_DAC_SET3 0 x32
#define ES8316_DAC_VOLL 0 x33
#define ES8316_DAC_VOLR 0 x34
/* GPIO */
#define ES8316_GPIO_SEL 0 x4d
#define ES8316_GPIO_DEBOUNCE 0 x4e
#define ES8316_GPIO_FLAG 0 x4f
/* Test mode */
#define ES8316_TESTMODE 0 x50
#define ES8316_TEST1 0 x51
#define ES8316_TEST2 0 x52
#define ES8316_TEST3 0 x53
/*
* Field definitions
*/
/* ES8316_RESET */
#define ES8316_RESET_CSM_ON 0 x80
/* ES8316_CLKMGR_CLKSW */
#define ES8316_CLKMGR_CLKSW_MCLK_ON 0 x40
#define ES8316_CLKMGR_CLKSW_BCLK_ON 0 x20
/* ES8316_SERDATA1 */
#define ES8316_SERDATA1_MASTER 0 x80
#define ES8316_SERDATA1_BCLK_INV 0 x20
/* ES8316_SERDATA_ADC and _DAC */
#define ES8316_SERDATA2_FMT_MASK 0 x3
#define ES8316_SERDATA2_FMT_I2S 0 x00
#define ES8316_SERDATA2_FMT_LEFTJ 0 x01
#define ES8316_SERDATA2_FMT_RIGHTJ 0 x02
#define ES8316_SERDATA2_FMT_PCM 0 x03
#define ES8316_SERDATA2_ADCLRP 0 x20
#define ES8316_SERDATA2_LEN_MASK 0 x1c
#define ES8316_SERDATA2_LEN_24 0 x00
#define ES8316_SERDATA2_LEN_20 0 x04
#define ES8316_SERDATA2_LEN_18 0 x08
#define ES8316_SERDATA2_LEN_16 0 x0c
#define ES8316_SERDATA2_LEN_32 0 x10
/* ES8316_GPIO_DEBOUNCE */
#define ES8316_GPIO_ENABLE_INTERRUPT 0 x02
/* ES8316_GPIO_FLAG */
#define ES8316_GPIO_FLAG_GM_NOT_SHORTED 0 x02
#define ES8316_GPIO_FLAG_HP_NOT_INSERTED 0 x04
/* ES8316_CLKMGR_CLKSW */
#define ES8316_CLKMGR_CLKSW_MCLK_DIV 0 x80
#endif
Messung V0.5 in Prozent C=87 H=95 G=90
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-05)
¤
*© Formatika GbR, Deutschland