aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-seaboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/board-seaboard.c')
-rw-r--r--arch/arm/mach-tegra/board-seaboard.c81
1 files changed, 80 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index 9e98ac706f40..bf13ea355efc 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>
@@ -41,7 +44,8 @@
41static struct plat_serial8250_port debug_uart_platform_data[] = { 44static struct plat_serial8250_port debug_uart_platform_data[] = {
42 { 45 {
43 /* Memory and IRQ filled in before registration */ 46 /* Memory and IRQ filled in before registration */
44 .flags = UPF_BOOT_AUTOCONF, 47 .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
48 .type = PORT_TEGRA,
45 .iotype = UPIO_MEM, 49 .iotype = UPIO_MEM,
46 .regshift = 2, 50 .regshift = 2,
47 .uartclk = 216000000, 51 .uartclk = 216000000,
@@ -62,6 +66,12 @@ static __initdata struct tegra_clk_init_table seaboard_clk_init_table[] = {
62 /* name parent rate enabled */ 66 /* name parent rate enabled */
63 { "uartb", "pll_p", 216000000, true}, 67 { "uartb", "pll_p", 216000000, true},
64 { "uartd", "pll_p", 216000000, true}, 68 { "uartd", "pll_p", 216000000, true},
69 { "pll_a", "pll_p_out1", 56448000, true },
70 { "pll_a_out0", "pll_a", 11289600, true },
71 { "cdev1", NULL, 0, true },
72 { "i2s1", "pll_a_out0", 11289600, false},
73 { "usbd", "clk_m", 12000000, true},
74 { "usb3", "clk_m", 12000000, true},
65 { NULL, NULL, 0, 0}, 75 { NULL, NULL, 0, 0},
66}; 76};
67 77
@@ -117,6 +127,22 @@ static struct tegra_sdhci_platform_data sdhci_pdata4 = {
117 .is_8bit = 1, 127 .is_8bit = 1,
118}; 128};
119 129
130static struct tegra_wm8903_platform_data seaboard_audio_pdata = {
131 .gpio_spkr_en = TEGRA_GPIO_SPKR_EN,
132 .gpio_hp_det = TEGRA_GPIO_HP_DET,
133 .gpio_hp_mute = -1,
134 .gpio_int_mic_en = -1,
135 .gpio_ext_mic_en = -1,
136};
137
138static struct platform_device seaboard_audio_device = {
139 .name = "tegra-snd-wm8903",
140 .id = 0,
141 .dev = {
142 .platform_data = &seaboard_audio_pdata,
143 },
144};
145
120static struct platform_device *seaboard_devices[] __initdata = { 146static struct platform_device *seaboard_devices[] __initdata = {
121 &debug_uart, 147 &debug_uart,
122 &tegra_pmu_device, 148 &tegra_pmu_device,
@@ -124,6 +150,10 @@ static struct platform_device *seaboard_devices[] __initdata = {
124 &tegra_sdhci_device3, 150 &tegra_sdhci_device3,
125 &tegra_sdhci_device1, 151 &tegra_sdhci_device1,
126 &seaboard_gpio_keys_device, 152 &seaboard_gpio_keys_device,
153 &tegra_i2s_device1,
154 &tegra_das_device,
155 &tegra_pcm_device,
156 &seaboard_audio_device,
127}; 157};
128 158
129static struct i2c_board_info __initdata isl29018_device = { 159static struct i2c_board_info __initdata isl29018_device = {
@@ -135,12 +165,56 @@ static struct i2c_board_info __initdata adt7461_device = {
135 I2C_BOARD_INFO("adt7461", 0x4c), 165 I2C_BOARD_INFO("adt7461", 0x4c),
136}; 166};
137 167
168static struct wm8903_platform_data wm8903_pdata = {
169 .irq_active_low = 0,
170 .micdet_cfg = 0,
171 .micdet_delay = 100,
172 .gpio_base = SEABOARD_GPIO_WM8903(0),
173 .gpio_cfg = {
174 WM8903_GPIO_NO_CONFIG,
175 WM8903_GPIO_NO_CONFIG,
176 0,
177 WM8903_GPIO_NO_CONFIG,
178 WM8903_GPIO_NO_CONFIG,
179 },
180};
181
182static struct i2c_board_info __initdata wm8903_device = {
183 I2C_BOARD_INFO("wm8903", 0x1a),
184 .platform_data = &wm8903_pdata,
185 .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ),
186};
187
188static int seaboard_ehci_init(void)
189{
190 int gpio_status;
191
192 gpio_status = gpio_request(TEGRA_GPIO_USB1, "VBUS_USB1");
193 if (gpio_status < 0) {
194 pr_err("VBUS_USB1 request GPIO FAILED\n");
195 WARN_ON(1);
196 }
197
198 gpio_status = gpio_direction_output(TEGRA_GPIO_USB1, 1);
199 if (gpio_status < 0) {
200 pr_err("VBUS_USB1 request GPIO DIRECTION FAILED\n");
201 WARN_ON(1);
202 }
203 gpio_set_value(TEGRA_GPIO_USB1, 1);
204
205 platform_device_register(&tegra_ehci1_device);
206 platform_device_register(&tegra_ehci3_device);
207
208 return 0;
209}
210
138static void __init seaboard_i2c_init(void) 211static void __init seaboard_i2c_init(void)
139{ 212{
140 gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018"); 213 gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018");
141 gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ); 214 gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ);
142 215
143 i2c_register_board_info(0, &isl29018_device, 1); 216 i2c_register_board_info(0, &isl29018_device, 1);
217 i2c_register_board_info(0, &wm8903_device, 1);
144 218
145 i2c_register_board_info(3, &adt7461_device, 1); 219 i2c_register_board_info(3, &adt7461_device, 1);
146 220
@@ -161,6 +235,8 @@ static void __init seaboard_common_init(void)
161 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; 235 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
162 236
163 platform_add_devices(seaboard_devices, ARRAY_SIZE(seaboard_devices)); 237 platform_add_devices(seaboard_devices, ARRAY_SIZE(seaboard_devices));
238
239 seaboard_ehci_init();
164} 240}
165 241
166static void __init tegra_seaboard_init(void) 242static void __init tegra_seaboard_init(void)
@@ -182,6 +258,9 @@ static void __init tegra_kaen_init(void)
182 debug_uart_platform_data[0].mapbase = TEGRA_UARTB_BASE; 258 debug_uart_platform_data[0].mapbase = TEGRA_UARTB_BASE;
183 debug_uart_platform_data[0].irq = INT_UARTB; 259 debug_uart_platform_data[0].irq = INT_UARTB;
184 260
261 seaboard_audio_pdata.gpio_hp_mute = TEGRA_GPIO_KAEN_HP_MUTE;
262 tegra_gpio_enable(TEGRA_GPIO_KAEN_HP_MUTE);
263
185 seaboard_common_init(); 264 seaboard_common_init();
186 265
187 seaboard_i2c_init(); 266 seaboard_i2c_init();