162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * isabelle.h - Low power high fidelity audio codec driver header file 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2012 Texas Instruments, Inc 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef _ISABELLE_H 962306a36Sopenharmony_ci#define _ISABELLE_H 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#include <linux/bitops.h> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* ISABELLE REGISTERS */ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#define ISABELLE_PWR_CFG_REG 0x01 1662306a36Sopenharmony_ci#define ISABELLE_PWR_EN_REG 0x02 1762306a36Sopenharmony_ci#define ISABELLE_PS_EN1_REG 0x03 1862306a36Sopenharmony_ci#define ISABELLE_INT1_STATUS_REG 0x04 1962306a36Sopenharmony_ci#define ISABELLE_INT1_MASK_REG 0x05 2062306a36Sopenharmony_ci#define ISABELLE_INT2_STATUS_REG 0x06 2162306a36Sopenharmony_ci#define ISABELLE_INT2_MASK_REG 0x07 2262306a36Sopenharmony_ci#define ISABELLE_HKCTL1_REG 0x08 2362306a36Sopenharmony_ci#define ISABELLE_HKCTL2_REG 0x09 2462306a36Sopenharmony_ci#define ISABELLE_HKCTL3_REG 0x0A 2562306a36Sopenharmony_ci#define ISABELLE_ACCDET_STATUS_REG 0x0B 2662306a36Sopenharmony_ci#define ISABELLE_BUTTON_ID_REG 0x0C 2762306a36Sopenharmony_ci#define ISABELLE_PLL_CFG_REG 0x10 2862306a36Sopenharmony_ci#define ISABELLE_PLL_EN_REG 0x11 2962306a36Sopenharmony_ci#define ISABELLE_FS_RATE_CFG_REG 0x12 3062306a36Sopenharmony_ci#define ISABELLE_INTF_CFG_REG 0x13 3162306a36Sopenharmony_ci#define ISABELLE_INTF_EN_REG 0x14 3262306a36Sopenharmony_ci#define ISABELLE_ULATX12_INTF_CFG_REG 0x15 3362306a36Sopenharmony_ci#define ISABELLE_DL12_INTF_CFG_REG 0x16 3462306a36Sopenharmony_ci#define ISABELLE_DL34_INTF_CFG_REG 0x17 3562306a36Sopenharmony_ci#define ISABELLE_DL56_INTF_CFG_REG 0x18 3662306a36Sopenharmony_ci#define ISABELLE_ATX_STPGA1_CFG_REG 0x19 3762306a36Sopenharmony_ci#define ISABELLE_ATX_STPGA2_CFG_REG 0x1A 3862306a36Sopenharmony_ci#define ISABELLE_VTX_STPGA1_CFG_REG 0x1B 3962306a36Sopenharmony_ci#define ISABELLE_VTX2_STPGA2_CFG_REG 0x1C 4062306a36Sopenharmony_ci#define ISABELLE_ATX1_DPGA_REG 0x1D 4162306a36Sopenharmony_ci#define ISABELLE_ATX2_DPGA_REG 0x1E 4262306a36Sopenharmony_ci#define ISABELLE_VTX1_DPGA_REG 0x1F 4362306a36Sopenharmony_ci#define ISABELLE_VTX2_DPGA_REG 0x20 4462306a36Sopenharmony_ci#define ISABELLE_TX_INPUT_CFG_REG 0x21 4562306a36Sopenharmony_ci#define ISABELLE_RX_INPUT_CFG_REG 0x22 4662306a36Sopenharmony_ci#define ISABELLE_RX_INPUT_CFG2_REG 0x23 4762306a36Sopenharmony_ci#define ISABELLE_VOICE_HPF_CFG_REG 0x24 4862306a36Sopenharmony_ci#define ISABELLE_AUDIO_HPF_CFG_REG 0x25 4962306a36Sopenharmony_ci#define ISABELLE_RX1_DPGA_REG 0x26 5062306a36Sopenharmony_ci#define ISABELLE_RX2_DPGA_REG 0x27 5162306a36Sopenharmony_ci#define ISABELLE_RX3_DPGA_REG 0x28 5262306a36Sopenharmony_ci#define ISABELLE_RX4_DPGA_REG 0x29 5362306a36Sopenharmony_ci#define ISABELLE_RX5_DPGA_REG 0x2A 5462306a36Sopenharmony_ci#define ISABELLE_RX6_DPGA_REG 0x2B 5562306a36Sopenharmony_ci#define ISABELLE_ALU_TX_EN_REG 0x2C 5662306a36Sopenharmony_ci#define ISABELLE_ALU_RX_EN_REG 0x2D 5762306a36Sopenharmony_ci#define ISABELLE_IIR_RESYNC_REG 0x2E 5862306a36Sopenharmony_ci#define ISABELLE_ABIAS_CFG_REG 0x30 5962306a36Sopenharmony_ci#define ISABELLE_DBIAS_CFG_REG 0x31 6062306a36Sopenharmony_ci#define ISABELLE_MIC1_GAIN_REG 0x32 6162306a36Sopenharmony_ci#define ISABELLE_MIC2_GAIN_REG 0x33 6262306a36Sopenharmony_ci#define ISABELLE_AMIC_CFG_REG 0x34 6362306a36Sopenharmony_ci#define ISABELLE_DMIC_CFG_REG 0x35 6462306a36Sopenharmony_ci#define ISABELLE_APGA_GAIN_REG 0x36 6562306a36Sopenharmony_ci#define ISABELLE_APGA_CFG_REG 0x37 6662306a36Sopenharmony_ci#define ISABELLE_TX_GAIN_DLY_REG 0x38 6762306a36Sopenharmony_ci#define ISABELLE_RX_GAIN_DLY_REG 0x39 6862306a36Sopenharmony_ci#define ISABELLE_RX_PWR_CTRL_REG 0x3A 6962306a36Sopenharmony_ci#define ISABELLE_DPGA1LR_IN_SEL_REG 0x3B 7062306a36Sopenharmony_ci#define ISABELLE_DPGA1L_GAIN_REG 0x3C 7162306a36Sopenharmony_ci#define ISABELLE_DPGA1R_GAIN_REG 0x3D 7262306a36Sopenharmony_ci#define ISABELLE_DPGA2L_IN_SEL_REG 0x3E 7362306a36Sopenharmony_ci#define ISABELLE_DPGA2R_IN_SEL_REG 0x3F 7462306a36Sopenharmony_ci#define ISABELLE_DPGA2L_GAIN_REG 0x40 7562306a36Sopenharmony_ci#define ISABELLE_DPGA2R_GAIN_REG 0x41 7662306a36Sopenharmony_ci#define ISABELLE_DPGA3LR_IN_SEL_REG 0x42 7762306a36Sopenharmony_ci#define ISABELLE_DPGA3L_GAIN_REG 0x43 7862306a36Sopenharmony_ci#define ISABELLE_DPGA3R_GAIN_REG 0x44 7962306a36Sopenharmony_ci#define ISABELLE_DAC1_SOFTRAMP_REG 0x45 8062306a36Sopenharmony_ci#define ISABELLE_DAC2_SOFTRAMP_REG 0x46 8162306a36Sopenharmony_ci#define ISABELLE_DAC3_SOFTRAMP_REG 0x47 8262306a36Sopenharmony_ci#define ISABELLE_DAC_CFG_REG 0x48 8362306a36Sopenharmony_ci#define ISABELLE_EARDRV_CFG1_REG 0x49 8462306a36Sopenharmony_ci#define ISABELLE_EARDRV_CFG2_REG 0x4A 8562306a36Sopenharmony_ci#define ISABELLE_HSDRV_GAIN_REG 0x4B 8662306a36Sopenharmony_ci#define ISABELLE_HSDRV_CFG1_REG 0x4C 8762306a36Sopenharmony_ci#define ISABELLE_HSDRV_CFG2_REG 0x4D 8862306a36Sopenharmony_ci#define ISABELLE_HS_NG_CFG1_REG 0x4E 8962306a36Sopenharmony_ci#define ISABELLE_HS_NG_CFG2_REG 0x4F 9062306a36Sopenharmony_ci#define ISABELLE_LINEAMP_GAIN_REG 0x50 9162306a36Sopenharmony_ci#define ISABELLE_LINEAMP_CFG_REG 0x51 9262306a36Sopenharmony_ci#define ISABELLE_HFL_VOL_CTRL_REG 0x52 9362306a36Sopenharmony_ci#define ISABELLE_HFL_SFTVOL_CTRL_REG 0x53 9462306a36Sopenharmony_ci#define ISABELLE_HFL_LIM_CTRL_1_REG 0x54 9562306a36Sopenharmony_ci#define ISABELLE_HFL_LIM_CTRL_2_REG 0x55 9662306a36Sopenharmony_ci#define ISABELLE_HFR_VOL_CTRL_REG 0x56 9762306a36Sopenharmony_ci#define ISABELLE_HFR_SFTVOL_CTRL_REG 0x57 9862306a36Sopenharmony_ci#define ISABELLE_HFR_LIM_CTRL_1_REG 0x58 9962306a36Sopenharmony_ci#define ISABELLE_HFR_LIM_CTRL_2_REG 0x59 10062306a36Sopenharmony_ci#define ISABELLE_HF_MODE_REG 0x5A 10162306a36Sopenharmony_ci#define ISABELLE_HFLPGA_CFG_REG 0x5B 10262306a36Sopenharmony_ci#define ISABELLE_HFRPGA_CFG_REG 0x5C 10362306a36Sopenharmony_ci#define ISABELLE_HFDRV_CFG_REG 0x5D 10462306a36Sopenharmony_ci#define ISABELLE_PDMOUT_CFG1_REG 0x5E 10562306a36Sopenharmony_ci#define ISABELLE_PDMOUT_CFG2_REG 0x5F 10662306a36Sopenharmony_ci#define ISABELLE_PDMOUT_L_WM_REG 0x60 10762306a36Sopenharmony_ci#define ISABELLE_PDMOUT_R_WM_REG 0x61 10862306a36Sopenharmony_ci#define ISABELLE_HF_NG_CFG1_REG 0x62 10962306a36Sopenharmony_ci#define ISABELLE_HF_NG_CFG2_REG 0x63 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci/* ISABELLE_PWR_EN_REG (0x02h) */ 11262306a36Sopenharmony_ci#define ISABELLE_CHIP_EN BIT(0) 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci/* ISABELLE DAI FORMATS */ 11562306a36Sopenharmony_ci#define ISABELLE_AIF_FMT_MASK 0x70 11662306a36Sopenharmony_ci#define ISABELLE_I2S_MODE 0x0 11762306a36Sopenharmony_ci#define ISABELLE_LEFT_J_MODE 0x1 11862306a36Sopenharmony_ci#define ISABELLE_PDM_MODE 0x2 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci#define ISABELLE_AIF_LENGTH_MASK 0x30 12162306a36Sopenharmony_ci#define ISABELLE_AIF_LENGTH_20 0x00 12262306a36Sopenharmony_ci#define ISABELLE_AIF_LENGTH_32 0x10 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci#define ISABELLE_AIF_MS 0x80 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci#define ISABELLE_FS_RATE_MASK 0xF 12762306a36Sopenharmony_ci#define ISABELLE_FS_RATE_8 0x0 12862306a36Sopenharmony_ci#define ISABELLE_FS_RATE_11 0x1 12962306a36Sopenharmony_ci#define ISABELLE_FS_RATE_12 0x2 13062306a36Sopenharmony_ci#define ISABELLE_FS_RATE_16 0x4 13162306a36Sopenharmony_ci#define ISABELLE_FS_RATE_22 0x5 13262306a36Sopenharmony_ci#define ISABELLE_FS_RATE_24 0x6 13362306a36Sopenharmony_ci#define ISABELLE_FS_RATE_32 0x8 13462306a36Sopenharmony_ci#define ISABELLE_FS_RATE_44 0x9 13562306a36Sopenharmony_ci#define ISABELLE_FS_RATE_48 0xA 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci#define ISABELLE_MAX_REGISTER 0xFF 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci#endif 140