diff options
author | Manoj Gangwal <mgangwal@nvidia.com> | 2012-08-22 20:02:19 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-08-27 19:25:01 -0700 |
commit | ebc38db61f1d6407c761beea4b48252a613ed6a6 (patch) | |
tree | ccae61902104f3bd279865f5bcd1f29903b93ddf | |
parent | 22c39b2a2302932c58ebe78e7c9315c07d84e6ab (diff) |
arm: tegra: E1239: Add TI aic326x support
1) Add latest TI aic326x codec driver support
2) Dmic support for TAI
Bug 1034241
Change-Id: I8db5223fd203a4e8f93f159a9c654486831f08a1
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/125265
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/board-enterprise.c | 45 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-enterprise.h | 7 |
2 files changed, 49 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-enterprise.c b/arch/arm/mach-tegra/board-enterprise.c index 498f8a176991..88c824761ebe 100644 --- a/arch/arm/mach-tegra/board-enterprise.c +++ b/arch/arm/mach-tegra/board-enterprise.c @@ -38,6 +38,8 @@ #include <linux/i2c/atmel_mxt_ts.h> #include <linux/memblock.h> #include <linux/rfkill-gpio.h> +#include <linux/mfd/tlv320aic3262-registers.h> +#include <linux/mfd/tlv320aic3262-core.h> #include <linux/nfc/pn544.h> #include <sound/max98088.h> @@ -210,6 +212,44 @@ static __initdata struct tegra_clk_init_table enterprise_clk_i2s4_table[] = { { NULL, NULL, 0, 0}, }; +static struct aic3262_gpio_setup aic3262_gpio[] = { + /* GPIO 1*/ + { + .used = 1, + .in = 0, + .value = AIC3262_GPIO1_FUNC_INT1_OUTPUT , + }, + /* GPIO 2*/ + { + .used = 1, + .in = 0, + .value = AIC3262_GPIO2_FUNC_ADC_MOD_CLK_OUTPUT, + }, + /* GPIO 1 */ + { + .used = 0, + }, + {// GPI2 + .used = 1, + .in = 1, + .in_reg = AIC3262_DMIC_INPUT_CNTL, + .in_reg_bitmask = AIC3262_DMIC_CONFIGURE_MASK, + .in_reg_shift = AIC3262_DMIC_CONFIGURE_SHIFT, + .value = AIC3262_DMIC_GPI2_LEFT_GPI2_RIGHT, + }, + {// GPO1 + .used = 0, + .value = AIC3262_GPO1_FUNC_DISABLED, + }, +}; + +static struct aic3262_pdata aic3262_codec_pdata = { + .gpio_irq = 1, + .gpio = aic3262_gpio, + .naudint_irq = TEGRA_GPIO_HP_DET, + .irq_base = AIC3262_CODEC_IRQ_BASE, +}; + static struct tegra_i2c_platform_data enterprise_i2c1_platform_data = { .adapter_nr = 0, .bus_count = 1, @@ -364,8 +404,9 @@ static struct i2c_board_info __initdata max98088_board_info = { }; static struct i2c_board_info __initdata enterprise_codec_aic326x_info = { - I2C_BOARD_INFO("aic3262-codec", 0x18), - .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_HP_DET), + I2C_BOARD_INFO("tlv320aic3262", 0x18), + .platform_data = &aic3262_codec_pdata, + .irq = TEGRA_GPIO_HP_DET, }; static struct i2c_board_info __initdata nfc_board_info = { diff --git a/arch/arm/mach-tegra/board-enterprise.h b/arch/arm/mach-tegra/board-enterprise.h index b77c3cae7346..e9bda707fed2 100644 --- a/arch/arm/mach-tegra/board-enterprise.h +++ b/arch/arm/mach-tegra/board-enterprise.h @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/board-enterprise.h * - * Copyright (c) 2011, NVIDIA Corporation. + * Copyright (c) 2012, NVIDIA Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -94,6 +94,11 @@ void enterprise_bpc_mgmt_init(void); #define ENT_TPS80031_IRQ_BASE TEGRA_NR_IRQS #define ENT_TPS80031_IRQ_END (ENT_TPS80031_IRQ_BASE + TPS80031_INT_NR) +/* AIC326X IRQs */ +/* Assuming TPS is the PMIC on Ent */ +#define AIC3262_CODEC_IRQ_BASE ENT_TPS80031_IRQ_END +#define AIC3262_CODEC_IRQ_END (AIC3262_CODEC_IRQ_BASE + 6) + /*****************Camera GPIOs ******************/ #define CAM_CSI_MUX_SEL_GPIO TEGRA_GPIO_PM3 #define CAM_CSI_MUX_SEL_REAR 1 |