162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * 88pm860x-codec.h -- 88PM860x ALSA SoC Audio Driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright 2010 Marvell International Ltd. 662306a36Sopenharmony_ci * Haojian Zhuang <haojian.zhuang@marvell.com> 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef __88PM860X_H 1062306a36Sopenharmony_ci#define __88PM860X_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#define PM860X_PCM_IFACE_1 0xb0 1362306a36Sopenharmony_ci#define PM860X_PCM_IFACE_2 0xb1 1462306a36Sopenharmony_ci#define PM860X_PCM_IFACE_3 0xb2 1562306a36Sopenharmony_ci#define PM860X_PCM_RATE 0xb3 1662306a36Sopenharmony_ci#define PM860X_EC_PATH 0xb4 1762306a36Sopenharmony_ci#define PM860X_SIDETONE_L_GAIN 0xb5 1862306a36Sopenharmony_ci#define PM860X_SIDETONE_R_GAIN 0xb6 1962306a36Sopenharmony_ci#define PM860X_SIDETONE_SHIFT 0xb7 2062306a36Sopenharmony_ci#define PM860X_ADC_OFFSET_1 0xb8 2162306a36Sopenharmony_ci#define PM860X_ADC_OFFSET_2 0xb9 2262306a36Sopenharmony_ci#define PM860X_DMIC_DELAY 0xba 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci#define PM860X_I2S_IFACE_1 0xbb 2562306a36Sopenharmony_ci#define PM860X_I2S_IFACE_2 0xbc 2662306a36Sopenharmony_ci#define PM860X_I2S_IFACE_3 0xbd 2762306a36Sopenharmony_ci#define PM860X_I2S_IFACE_4 0xbe 2862306a36Sopenharmony_ci#define PM860X_EQUALIZER_N0_1 0xbf 2962306a36Sopenharmony_ci#define PM860X_EQUALIZER_N0_2 0xc0 3062306a36Sopenharmony_ci#define PM860X_EQUALIZER_N1_1 0xc1 3162306a36Sopenharmony_ci#define PM860X_EQUALIZER_N1_2 0xc2 3262306a36Sopenharmony_ci#define PM860X_EQUALIZER_D1_1 0xc3 3362306a36Sopenharmony_ci#define PM860X_EQUALIZER_D1_2 0xc4 3462306a36Sopenharmony_ci#define PM860X_LOFI_GAIN_LEFT 0xc5 3562306a36Sopenharmony_ci#define PM860X_LOFI_GAIN_RIGHT 0xc6 3662306a36Sopenharmony_ci#define PM860X_HIFIL_GAIN_LEFT 0xc7 3762306a36Sopenharmony_ci#define PM860X_HIFIL_GAIN_RIGHT 0xc8 3862306a36Sopenharmony_ci#define PM860X_HIFIR_GAIN_LEFT 0xc9 3962306a36Sopenharmony_ci#define PM860X_HIFIR_GAIN_RIGHT 0xca 4062306a36Sopenharmony_ci#define PM860X_DAC_OFFSET 0xcb 4162306a36Sopenharmony_ci#define PM860X_OFFSET_LEFT_1 0xcc 4262306a36Sopenharmony_ci#define PM860X_OFFSET_LEFT_2 0xcd 4362306a36Sopenharmony_ci#define PM860X_OFFSET_RIGHT_1 0xce 4462306a36Sopenharmony_ci#define PM860X_OFFSET_RIGHT_2 0xcf 4562306a36Sopenharmony_ci#define PM860X_ADC_ANA_1 0xd0 4662306a36Sopenharmony_ci#define PM860X_ADC_ANA_2 0xd1 4762306a36Sopenharmony_ci#define PM860X_ADC_ANA_3 0xd2 4862306a36Sopenharmony_ci#define PM860X_ADC_ANA_4 0xd3 4962306a36Sopenharmony_ci#define PM860X_ANA_TO_ANA 0xd4 5062306a36Sopenharmony_ci#define PM860X_HS1_CTRL 0xd5 5162306a36Sopenharmony_ci#define PM860X_HS2_CTRL 0xd6 5262306a36Sopenharmony_ci#define PM860X_LO1_CTRL 0xd7 5362306a36Sopenharmony_ci#define PM860X_LO2_CTRL 0xd8 5462306a36Sopenharmony_ci#define PM860X_EAR_CTRL_1 0xd9 5562306a36Sopenharmony_ci#define PM860X_EAR_CTRL_2 0xda 5662306a36Sopenharmony_ci#define PM860X_AUDIO_SUPPLIES_1 0xdb 5762306a36Sopenharmony_ci#define PM860X_AUDIO_SUPPLIES_2 0xdc 5862306a36Sopenharmony_ci#define PM860X_ADC_EN_1 0xdd 5962306a36Sopenharmony_ci#define PM860X_ADC_EN_2 0xde 6062306a36Sopenharmony_ci#define PM860X_DAC_EN_1 0xdf 6162306a36Sopenharmony_ci#define PM860X_DAC_EN_2 0xe1 6262306a36Sopenharmony_ci#define PM860X_AUDIO_CAL_1 0xe2 6362306a36Sopenharmony_ci#define PM860X_AUDIO_CAL_2 0xe3 6462306a36Sopenharmony_ci#define PM860X_AUDIO_CAL_3 0xe4 6562306a36Sopenharmony_ci#define PM860X_AUDIO_CAL_4 0xe5 6662306a36Sopenharmony_ci#define PM860X_AUDIO_CAL_5 0xe6 6762306a36Sopenharmony_ci#define PM860X_ANA_INPUT_SEL_1 0xe7 6862306a36Sopenharmony_ci#define PM860X_ANA_INPUT_SEL_2 0xe8 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci#define PM860X_PCM_IFACE_4 0xe9 7162306a36Sopenharmony_ci#define PM860X_I2S_IFACE_5 0xea 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci#define PM860X_SHORTS 0x3b 7462306a36Sopenharmony_ci#define PM860X_PLL_ADJ_1 0x3c 7562306a36Sopenharmony_ci#define PM860X_PLL_ADJ_2 0x3d 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci/* bits definition */ 7862306a36Sopenharmony_ci#define PM860X_CLK_DIR_IN 0 7962306a36Sopenharmony_ci#define PM860X_CLK_DIR_OUT 1 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci#define PM860X_DET_HEADSET (1 << 0) 8262306a36Sopenharmony_ci#define PM860X_DET_MIC (1 << 1) 8362306a36Sopenharmony_ci#define PM860X_DET_HOOK (1 << 2) 8462306a36Sopenharmony_ci#define PM860X_SHORT_HEADSET (1 << 3) 8562306a36Sopenharmony_ci#define PM860X_SHORT_LINEOUT (1 << 4) 8662306a36Sopenharmony_ci#define PM860X_DET_MASK 0x1F 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ciextern int pm860x_hs_jack_detect(struct snd_soc_component *, struct snd_soc_jack *, 8962306a36Sopenharmony_ci int, int, int, int); 9062306a36Sopenharmony_ciextern int pm860x_mic_jack_detect(struct snd_soc_component *, struct snd_soc_jack *, 9162306a36Sopenharmony_ci int); 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci#endif /* __88PM860X_H */ 94