Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * isabelle.h - Low power high fidelity audio codec driver header file
0004  *
0005  * Copyright (c) 2012 Texas Instruments, Inc
0006  */
0007 
0008 #ifndef _ISABELLE_H
0009 #define _ISABELLE_H
0010 
0011 #include <linux/bitops.h>
0012 
0013 /* ISABELLE REGISTERS */
0014 
0015 #define ISABELLE_PWR_CFG_REG        0x01
0016 #define ISABELLE_PWR_EN_REG     0x02
0017 #define ISABELLE_PS_EN1_REG     0x03
0018 #define ISABELLE_INT1_STATUS_REG    0x04
0019 #define ISABELLE_INT1_MASK_REG      0x05
0020 #define ISABELLE_INT2_STATUS_REG    0x06
0021 #define ISABELLE_INT2_MASK_REG      0x07
0022 #define ISABELLE_HKCTL1_REG     0x08
0023 #define ISABELLE_HKCTL2_REG     0x09
0024 #define ISABELLE_HKCTL3_REG     0x0A
0025 #define ISABELLE_ACCDET_STATUS_REG  0x0B
0026 #define ISABELLE_BUTTON_ID_REG      0x0C
0027 #define ISABELLE_PLL_CFG_REG        0x10
0028 #define ISABELLE_PLL_EN_REG     0x11
0029 #define ISABELLE_FS_RATE_CFG_REG    0x12
0030 #define ISABELLE_INTF_CFG_REG       0x13
0031 #define ISABELLE_INTF_EN_REG        0x14
0032 #define ISABELLE_ULATX12_INTF_CFG_REG   0x15
0033 #define ISABELLE_DL12_INTF_CFG_REG  0x16
0034 #define ISABELLE_DL34_INTF_CFG_REG  0x17
0035 #define ISABELLE_DL56_INTF_CFG_REG  0x18
0036 #define ISABELLE_ATX_STPGA1_CFG_REG 0x19
0037 #define ISABELLE_ATX_STPGA2_CFG_REG 0x1A
0038 #define ISABELLE_VTX_STPGA1_CFG_REG 0x1B
0039 #define ISABELLE_VTX2_STPGA2_CFG_REG    0x1C
0040 #define ISABELLE_ATX1_DPGA_REG      0x1D
0041 #define ISABELLE_ATX2_DPGA_REG      0x1E
0042 #define ISABELLE_VTX1_DPGA_REG      0x1F
0043 #define ISABELLE_VTX2_DPGA_REG      0x20
0044 #define ISABELLE_TX_INPUT_CFG_REG   0x21
0045 #define ISABELLE_RX_INPUT_CFG_REG   0x22
0046 #define ISABELLE_RX_INPUT_CFG2_REG  0x23
0047 #define ISABELLE_VOICE_HPF_CFG_REG  0x24
0048 #define ISABELLE_AUDIO_HPF_CFG_REG  0x25
0049 #define ISABELLE_RX1_DPGA_REG       0x26
0050 #define ISABELLE_RX2_DPGA_REG       0x27
0051 #define ISABELLE_RX3_DPGA_REG       0x28
0052 #define ISABELLE_RX4_DPGA_REG       0x29
0053 #define ISABELLE_RX5_DPGA_REG       0x2A
0054 #define ISABELLE_RX6_DPGA_REG       0x2B
0055 #define ISABELLE_ALU_TX_EN_REG      0x2C
0056 #define ISABELLE_ALU_RX_EN_REG      0x2D
0057 #define ISABELLE_IIR_RESYNC_REG     0x2E
0058 #define ISABELLE_ABIAS_CFG_REG      0x30
0059 #define ISABELLE_DBIAS_CFG_REG      0x31
0060 #define ISABELLE_MIC1_GAIN_REG      0x32
0061 #define ISABELLE_MIC2_GAIN_REG      0x33
0062 #define ISABELLE_AMIC_CFG_REG       0x34
0063 #define ISABELLE_DMIC_CFG_REG       0x35
0064 #define ISABELLE_APGA_GAIN_REG      0x36
0065 #define ISABELLE_APGA_CFG_REG       0x37
0066 #define ISABELLE_TX_GAIN_DLY_REG    0x38
0067 #define ISABELLE_RX_GAIN_DLY_REG    0x39
0068 #define ISABELLE_RX_PWR_CTRL_REG    0x3A
0069 #define ISABELLE_DPGA1LR_IN_SEL_REG 0x3B
0070 #define ISABELLE_DPGA1L_GAIN_REG    0x3C
0071 #define ISABELLE_DPGA1R_GAIN_REG    0x3D
0072 #define ISABELLE_DPGA2L_IN_SEL_REG  0x3E
0073 #define ISABELLE_DPGA2R_IN_SEL_REG  0x3F
0074 #define ISABELLE_DPGA2L_GAIN_REG    0x40
0075 #define ISABELLE_DPGA2R_GAIN_REG    0x41
0076 #define ISABELLE_DPGA3LR_IN_SEL_REG 0x42
0077 #define ISABELLE_DPGA3L_GAIN_REG    0x43
0078 #define ISABELLE_DPGA3R_GAIN_REG    0x44
0079 #define ISABELLE_DAC1_SOFTRAMP_REG  0x45
0080 #define ISABELLE_DAC2_SOFTRAMP_REG  0x46
0081 #define ISABELLE_DAC3_SOFTRAMP_REG  0x47
0082 #define ISABELLE_DAC_CFG_REG        0x48
0083 #define ISABELLE_EARDRV_CFG1_REG    0x49
0084 #define ISABELLE_EARDRV_CFG2_REG    0x4A
0085 #define ISABELLE_HSDRV_GAIN_REG     0x4B
0086 #define ISABELLE_HSDRV_CFG1_REG     0x4C
0087 #define ISABELLE_HSDRV_CFG2_REG     0x4D
0088 #define ISABELLE_HS_NG_CFG1_REG     0x4E
0089 #define ISABELLE_HS_NG_CFG2_REG     0x4F
0090 #define ISABELLE_LINEAMP_GAIN_REG   0x50
0091 #define ISABELLE_LINEAMP_CFG_REG    0x51
0092 #define ISABELLE_HFL_VOL_CTRL_REG   0x52
0093 #define ISABELLE_HFL_SFTVOL_CTRL_REG    0x53
0094 #define ISABELLE_HFL_LIM_CTRL_1_REG 0x54
0095 #define ISABELLE_HFL_LIM_CTRL_2_REG 0x55
0096 #define ISABELLE_HFR_VOL_CTRL_REG   0x56
0097 #define ISABELLE_HFR_SFTVOL_CTRL_REG    0x57
0098 #define ISABELLE_HFR_LIM_CTRL_1_REG 0x58
0099 #define ISABELLE_HFR_LIM_CTRL_2_REG 0x59
0100 #define ISABELLE_HF_MODE_REG        0x5A
0101 #define ISABELLE_HFLPGA_CFG_REG     0x5B
0102 #define ISABELLE_HFRPGA_CFG_REG     0x5C
0103 #define ISABELLE_HFDRV_CFG_REG      0x5D
0104 #define ISABELLE_PDMOUT_CFG1_REG    0x5E
0105 #define ISABELLE_PDMOUT_CFG2_REG    0x5F
0106 #define ISABELLE_PDMOUT_L_WM_REG    0x60
0107 #define ISABELLE_PDMOUT_R_WM_REG    0x61
0108 #define ISABELLE_HF_NG_CFG1_REG     0x62
0109 #define ISABELLE_HF_NG_CFG2_REG     0x63
0110 
0111 /* ISABELLE_PWR_EN_REG (0x02h) */
0112 #define ISABELLE_CHIP_EN        BIT(0)
0113 
0114 /* ISABELLE DAI FORMATS */
0115 #define ISABELLE_AIF_FMT_MASK       0x70
0116 #define ISABELLE_I2S_MODE       0x0
0117 #define ISABELLE_LEFT_J_MODE        0x1
0118 #define ISABELLE_PDM_MODE       0x2
0119 
0120 #define ISABELLE_AIF_LENGTH_MASK    0x30
0121 #define ISABELLE_AIF_LENGTH_20      0x00
0122 #define ISABELLE_AIF_LENGTH_32      0x10
0123 
0124 #define ISABELLE_AIF_MS         0x80
0125 
0126 #define ISABELLE_FS_RATE_MASK       0xF
0127 #define ISABELLE_FS_RATE_8      0x0
0128 #define ISABELLE_FS_RATE_11     0x1
0129 #define ISABELLE_FS_RATE_12     0x2
0130 #define ISABELLE_FS_RATE_16     0x4
0131 #define ISABELLE_FS_RATE_22     0x5
0132 #define ISABELLE_FS_RATE_24     0x6
0133 #define ISABELLE_FS_RATE_32     0x8
0134 #define ISABELLE_FS_RATE_44     0x9
0135 #define ISABELLE_FS_RATE_48     0xA
0136 
0137 #define ISABELLE_MAX_REGISTER       0xFF
0138 
0139 #endif