1*b886d83cSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 22f989f7eSM R Swami Reddy /* 32f989f7eSM R Swami Reddy * isabelle.h - Low power high fidelity audio codec driver header file 42f989f7eSM R Swami Reddy * 52f989f7eSM R Swami Reddy * Copyright (c) 2012 Texas Instruments, Inc 62f989f7eSM R Swami Reddy */ 72f989f7eSM R Swami Reddy 82f989f7eSM R Swami Reddy #ifndef _ISABELLE_H 92f989f7eSM R Swami Reddy #define _ISABELLE_H 102f989f7eSM R Swami Reddy 112f989f7eSM R Swami Reddy #include <linux/bitops.h> 122f989f7eSM R Swami Reddy 132f989f7eSM R Swami Reddy /* ISABELLE REGISTERS */ 142f989f7eSM R Swami Reddy 152f989f7eSM R Swami Reddy #define ISABELLE_PWR_CFG_REG 0x01 162f989f7eSM R Swami Reddy #define ISABELLE_PWR_EN_REG 0x02 172f989f7eSM R Swami Reddy #define ISABELLE_PS_EN1_REG 0x03 182f989f7eSM R Swami Reddy #define ISABELLE_INT1_STATUS_REG 0x04 192f989f7eSM R Swami Reddy #define ISABELLE_INT1_MASK_REG 0x05 202f989f7eSM R Swami Reddy #define ISABELLE_INT2_STATUS_REG 0x06 212f989f7eSM R Swami Reddy #define ISABELLE_INT2_MASK_REG 0x07 222f989f7eSM R Swami Reddy #define ISABELLE_HKCTL1_REG 0x08 232f989f7eSM R Swami Reddy #define ISABELLE_HKCTL2_REG 0x09 242f989f7eSM R Swami Reddy #define ISABELLE_HKCTL3_REG 0x0A 252f989f7eSM R Swami Reddy #define ISABELLE_ACCDET_STATUS_REG 0x0B 262f989f7eSM R Swami Reddy #define ISABELLE_BUTTON_ID_REG 0x0C 272f989f7eSM R Swami Reddy #define ISABELLE_PLL_CFG_REG 0x10 282f989f7eSM R Swami Reddy #define ISABELLE_PLL_EN_REG 0x11 292f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_CFG_REG 0x12 302f989f7eSM R Swami Reddy #define ISABELLE_INTF_CFG_REG 0x13 312f989f7eSM R Swami Reddy #define ISABELLE_INTF_EN_REG 0x14 322f989f7eSM R Swami Reddy #define ISABELLE_ULATX12_INTF_CFG_REG 0x15 332f989f7eSM R Swami Reddy #define ISABELLE_DL12_INTF_CFG_REG 0x16 342f989f7eSM R Swami Reddy #define ISABELLE_DL34_INTF_CFG_REG 0x17 352f989f7eSM R Swami Reddy #define ISABELLE_DL56_INTF_CFG_REG 0x18 362f989f7eSM R Swami Reddy #define ISABELLE_ATX_STPGA1_CFG_REG 0x19 372f989f7eSM R Swami Reddy #define ISABELLE_ATX_STPGA2_CFG_REG 0x1A 382f989f7eSM R Swami Reddy #define ISABELLE_VTX_STPGA1_CFG_REG 0x1B 392f989f7eSM R Swami Reddy #define ISABELLE_VTX2_STPGA2_CFG_REG 0x1C 402f989f7eSM R Swami Reddy #define ISABELLE_ATX1_DPGA_REG 0x1D 412f989f7eSM R Swami Reddy #define ISABELLE_ATX2_DPGA_REG 0x1E 422f989f7eSM R Swami Reddy #define ISABELLE_VTX1_DPGA_REG 0x1F 432f989f7eSM R Swami Reddy #define ISABELLE_VTX2_DPGA_REG 0x20 442f989f7eSM R Swami Reddy #define ISABELLE_TX_INPUT_CFG_REG 0x21 452f989f7eSM R Swami Reddy #define ISABELLE_RX_INPUT_CFG_REG 0x22 462f989f7eSM R Swami Reddy #define ISABELLE_RX_INPUT_CFG2_REG 0x23 472f989f7eSM R Swami Reddy #define ISABELLE_VOICE_HPF_CFG_REG 0x24 482f989f7eSM R Swami Reddy #define ISABELLE_AUDIO_HPF_CFG_REG 0x25 492f989f7eSM R Swami Reddy #define ISABELLE_RX1_DPGA_REG 0x26 502f989f7eSM R Swami Reddy #define ISABELLE_RX2_DPGA_REG 0x27 512f989f7eSM R Swami Reddy #define ISABELLE_RX3_DPGA_REG 0x28 522f989f7eSM R Swami Reddy #define ISABELLE_RX4_DPGA_REG 0x29 532f989f7eSM R Swami Reddy #define ISABELLE_RX5_DPGA_REG 0x2A 542f989f7eSM R Swami Reddy #define ISABELLE_RX6_DPGA_REG 0x2B 552f989f7eSM R Swami Reddy #define ISABELLE_ALU_TX_EN_REG 0x2C 562f989f7eSM R Swami Reddy #define ISABELLE_ALU_RX_EN_REG 0x2D 572f989f7eSM R Swami Reddy #define ISABELLE_IIR_RESYNC_REG 0x2E 582f989f7eSM R Swami Reddy #define ISABELLE_ABIAS_CFG_REG 0x30 592f989f7eSM R Swami Reddy #define ISABELLE_DBIAS_CFG_REG 0x31 602f989f7eSM R Swami Reddy #define ISABELLE_MIC1_GAIN_REG 0x32 612f989f7eSM R Swami Reddy #define ISABELLE_MIC2_GAIN_REG 0x33 622f989f7eSM R Swami Reddy #define ISABELLE_AMIC_CFG_REG 0x34 632f989f7eSM R Swami Reddy #define ISABELLE_DMIC_CFG_REG 0x35 642f989f7eSM R Swami Reddy #define ISABELLE_APGA_GAIN_REG 0x36 652f989f7eSM R Swami Reddy #define ISABELLE_APGA_CFG_REG 0x37 662f989f7eSM R Swami Reddy #define ISABELLE_TX_GAIN_DLY_REG 0x38 672f989f7eSM R Swami Reddy #define ISABELLE_RX_GAIN_DLY_REG 0x39 682f989f7eSM R Swami Reddy #define ISABELLE_RX_PWR_CTRL_REG 0x3A 692f989f7eSM R Swami Reddy #define ISABELLE_DPGA1LR_IN_SEL_REG 0x3B 702f989f7eSM R Swami Reddy #define ISABELLE_DPGA1L_GAIN_REG 0x3C 712f989f7eSM R Swami Reddy #define ISABELLE_DPGA1R_GAIN_REG 0x3D 722f989f7eSM R Swami Reddy #define ISABELLE_DPGA2L_IN_SEL_REG 0x3E 732f989f7eSM R Swami Reddy #define ISABELLE_DPGA2R_IN_SEL_REG 0x3F 742f989f7eSM R Swami Reddy #define ISABELLE_DPGA2L_GAIN_REG 0x40 752f989f7eSM R Swami Reddy #define ISABELLE_DPGA2R_GAIN_REG 0x41 762f989f7eSM R Swami Reddy #define ISABELLE_DPGA3LR_IN_SEL_REG 0x42 772f989f7eSM R Swami Reddy #define ISABELLE_DPGA3L_GAIN_REG 0x43 782f989f7eSM R Swami Reddy #define ISABELLE_DPGA3R_GAIN_REG 0x44 792f989f7eSM R Swami Reddy #define ISABELLE_DAC1_SOFTRAMP_REG 0x45 802f989f7eSM R Swami Reddy #define ISABELLE_DAC2_SOFTRAMP_REG 0x46 812f989f7eSM R Swami Reddy #define ISABELLE_DAC3_SOFTRAMP_REG 0x47 822f989f7eSM R Swami Reddy #define ISABELLE_DAC_CFG_REG 0x48 832f989f7eSM R Swami Reddy #define ISABELLE_EARDRV_CFG1_REG 0x49 842f989f7eSM R Swami Reddy #define ISABELLE_EARDRV_CFG2_REG 0x4A 852f989f7eSM R Swami Reddy #define ISABELLE_HSDRV_GAIN_REG 0x4B 862f989f7eSM R Swami Reddy #define ISABELLE_HSDRV_CFG1_REG 0x4C 872f989f7eSM R Swami Reddy #define ISABELLE_HSDRV_CFG2_REG 0x4D 882f989f7eSM R Swami Reddy #define ISABELLE_HS_NG_CFG1_REG 0x4E 892f989f7eSM R Swami Reddy #define ISABELLE_HS_NG_CFG2_REG 0x4F 902f989f7eSM R Swami Reddy #define ISABELLE_LINEAMP_GAIN_REG 0x50 912f989f7eSM R Swami Reddy #define ISABELLE_LINEAMP_CFG_REG 0x51 922f989f7eSM R Swami Reddy #define ISABELLE_HFL_VOL_CTRL_REG 0x52 932f989f7eSM R Swami Reddy #define ISABELLE_HFL_SFTVOL_CTRL_REG 0x53 942f989f7eSM R Swami Reddy #define ISABELLE_HFL_LIM_CTRL_1_REG 0x54 952f989f7eSM R Swami Reddy #define ISABELLE_HFL_LIM_CTRL_2_REG 0x55 962f989f7eSM R Swami Reddy #define ISABELLE_HFR_VOL_CTRL_REG 0x56 972f989f7eSM R Swami Reddy #define ISABELLE_HFR_SFTVOL_CTRL_REG 0x57 982f989f7eSM R Swami Reddy #define ISABELLE_HFR_LIM_CTRL_1_REG 0x58 992f989f7eSM R Swami Reddy #define ISABELLE_HFR_LIM_CTRL_2_REG 0x59 1002f989f7eSM R Swami Reddy #define ISABELLE_HF_MODE_REG 0x5A 1012f989f7eSM R Swami Reddy #define ISABELLE_HFLPGA_CFG_REG 0x5B 1022f989f7eSM R Swami Reddy #define ISABELLE_HFRPGA_CFG_REG 0x5C 1032f989f7eSM R Swami Reddy #define ISABELLE_HFDRV_CFG_REG 0x5D 1042f989f7eSM R Swami Reddy #define ISABELLE_PDMOUT_CFG1_REG 0x5E 1052f989f7eSM R Swami Reddy #define ISABELLE_PDMOUT_CFG2_REG 0x5F 1062f989f7eSM R Swami Reddy #define ISABELLE_PDMOUT_L_WM_REG 0x60 1072f989f7eSM R Swami Reddy #define ISABELLE_PDMOUT_R_WM_REG 0x61 1082f989f7eSM R Swami Reddy #define ISABELLE_HF_NG_CFG1_REG 0x62 1092f989f7eSM R Swami Reddy #define ISABELLE_HF_NG_CFG2_REG 0x63 1102f989f7eSM R Swami Reddy 1112f989f7eSM R Swami Reddy /* ISABELLE_PWR_EN_REG (0x02h) */ 1122f989f7eSM R Swami Reddy #define ISABELLE_CHIP_EN BIT(0) 1132f989f7eSM R Swami Reddy 1142f989f7eSM R Swami Reddy /* ISABELLE DAI FORMATS */ 1152f989f7eSM R Swami Reddy #define ISABELLE_AIF_FMT_MASK 0x70 1162f989f7eSM R Swami Reddy #define ISABELLE_I2S_MODE 0x0 1172f989f7eSM R Swami Reddy #define ISABELLE_LEFT_J_MODE 0x1 1182f989f7eSM R Swami Reddy #define ISABELLE_PDM_MODE 0x2 1192f989f7eSM R Swami Reddy 1202f989f7eSM R Swami Reddy #define ISABELLE_AIF_LENGTH_MASK 0x30 1212f989f7eSM R Swami Reddy #define ISABELLE_AIF_LENGTH_20 0x00 1222f989f7eSM R Swami Reddy #define ISABELLE_AIF_LENGTH_32 0x10 1232f989f7eSM R Swami Reddy 1242f989f7eSM R Swami Reddy #define ISABELLE_AIF_MS 0x80 1252f989f7eSM R Swami Reddy 1262f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_MASK 0xF 1272f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_8 0x0 1282f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_11 0x1 1292f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_12 0x2 1302f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_16 0x4 1312f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_22 0x5 1322f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_24 0x6 1332f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_32 0x8 1342f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_44 0x9 1352f989f7eSM R Swami Reddy #define ISABELLE_FS_RATE_48 0xA 1362f989f7eSM R Swami Reddy 1372f989f7eSM R Swami Reddy #define ISABELLE_MAX_REGISTER 0xFF 1382f989f7eSM R Swami Reddy 1392f989f7eSM R Swami Reddy #endif 140