aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-seaboard.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-08-08 16:35:14 -0400
committerOlof Johansson <olof@lixom.net>2011-08-09 15:07:32 -0400
commita697e694aeb82f2643825c45dc0214666172c540 (patch)
tree77af9b22d7e0ab638690a8624ef340b045d9f30e /arch/arm/mach-tegra/board-seaboard.c
parentdd58bdbceb087238bead08e05226c0cef20aab4d (diff)
ARM: Tegra: Seaboard board updates for audio
* Initialize clock tree for audio * Add GPIO base definitions * Add audio GPIO definitions * Define platform data for WM8903 and ASoC machine driver * Add special case for Kaen to handle HP_MUTE GPIO * Register platform devices for audio * Update pinmux to cater for new GPIOs used for audio Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/board-seaboard.c')
-rw-r--r--arch/arm/mach-tegra/board-seaboard.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index 56cbabf6aa68..07cd8e4885c9 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -25,9 +25,12 @@
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/gpio_keys.h> 26#include <linux/gpio_keys.h>
27 27
28#include <sound/wm8903.h>
29
28#include <mach/iomap.h> 30#include <mach/iomap.h>
29#include <mach/irqs.h> 31#include <mach/irqs.h>
30#include <mach/sdhci.h> 32#include <mach/sdhci.h>
33#include <mach/tegra_wm8903_pdata.h>
31 34
32#include <asm/mach-types.h> 35#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -62,6 +65,10 @@ static __initdata struct tegra_clk_init_table seaboard_clk_init_table[] = {
62 /* name parent rate enabled */ 65 /* name parent rate enabled */
63 { "uartb", "pll_p", 216000000, true}, 66 { "uartb", "pll_p", 216000000, true},
64 { "uartd", "pll_p", 216000000, true}, 67 { "uartd", "pll_p", 216000000, true},
68 { "pll_a", "pll_p_out1", 56448000, true },
69 { "pll_a_out0", "pll_a", 11289600, true },
70 { "cdev1", NULL, 0, true },
71 { "i2s1", "pll_a_out0", 11289600, false},
65 { NULL, NULL, 0, 0}, 72 { NULL, NULL, 0, 0},
66}; 73};
67 74
@@ -117,6 +124,22 @@ static struct tegra_sdhci_platform_data sdhci_pdata4 = {
117 .is_8bit = 1, 124 .is_8bit = 1,
118}; 125};
119 126
127static struct tegra_wm8903_platform_data seaboard_audio_pdata = {
128 .gpio_spkr_en = TEGRA_GPIO_SPKR_EN,
129 .gpio_hp_det = TEGRA_GPIO_HP_DET,
130 .gpio_hp_mute = -1,
131 .gpio_int_mic_en = -1,
132 .gpio_ext_mic_en = -1,
133};
134
135static struct platform_device seaboard_audio_device = {
136 .name = "tegra-snd-wm8903",
137 .id = 0,
138 .dev = {
139 .platform_data = &seaboard_audio_pdata,
140 },
141};
142
120static struct platform_device *seaboard_devices[] __initdata = { 143static struct platform_device *seaboard_devices[] __initdata = {
121 &debug_uart, 144 &debug_uart,
122 &tegra_pmu_device, 145 &tegra_pmu_device,
@@ -124,6 +147,10 @@ static struct platform_device *seaboard_devices[] __initdata = {
124 &tegra_sdhci_device3, 147 &tegra_sdhci_device3,
125 &tegra_sdhci_device1, 148 &tegra_sdhci_device1,
126 &seaboard_gpio_keys_device, 149 &seaboard_gpio_keys_device,
150 &tegra_i2s_device1,
151 &tegra_das_device,
152 &tegra_pcm_device,
153 &seaboard_audio_device,
127}; 154};
128 155
129static struct i2c_board_info __initdata isl29018_device = { 156static struct i2c_board_info __initdata isl29018_device = {
@@ -135,12 +162,33 @@ static struct i2c_board_info __initdata adt7461_device = {
135 I2C_BOARD_INFO("adt7461", 0x4c), 162 I2C_BOARD_INFO("adt7461", 0x4c),
136}; 163};
137 164
165static struct wm8903_platform_data wm8903_pdata = {
166 .irq_active_low = 0,
167 .micdet_cfg = 0,
168 .micdet_delay = 100,
169 .gpio_base = SEABOARD_GPIO_WM8903(0),
170 .gpio_cfg = {
171 WM8903_GPIO_NO_CONFIG,
172 WM8903_GPIO_NO_CONFIG,
173 0,
174 WM8903_GPIO_NO_CONFIG,
175 WM8903_GPIO_NO_CONFIG,
176 },
177};
178
179static struct i2c_board_info __initdata wm8903_device = {
180 I2C_BOARD_INFO("wm8903", 0x1a),
181 .platform_data = &wm8903_pdata,
182 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ),
183};
184
138static void __init seaboard_i2c_init(void) 185static void __init seaboard_i2c_init(void)
139{ 186{
140 gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018"); 187 gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018");
141 gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ); 188 gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ);
142 189
143 i2c_register_board_info(0, &isl29018_device, 1); 190 i2c_register_board_info(0, &isl29018_device, 1);
191 i2c_register_board_info(0, &wm8903_device, 1);
144 192
145 i2c_register_board_info(3, &adt7461_device, 1); 193 i2c_register_board_info(3, &adt7461_device, 1);
146 194
@@ -182,6 +230,9 @@ static void __init tegra_kaen_init(void)
182 debug_uart_platform_data[0].mapbase = TEGRA_UARTB_BASE; 230 debug_uart_platform_data[0].mapbase = TEGRA_UARTB_BASE;
183 debug_uart_platform_data[0].irq = INT_UARTB; 231 debug_uart_platform_data[0].irq = INT_UARTB;
184 232
233 seaboard_audio_pdata.gpio_hp_mute = TEGRA_GPIO_KAEN_HP_MUTE;
234 tegra_gpio_enable(TEGRA_GPIO_KAEN_HP_MUTE);
235
185 seaboard_common_init(); 236 seaboard_common_init();
186 237
187 seaboard_i2c_init(); 238 seaboard_i2c_init();