aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap3pandora.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3pandora.c')
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c115
1 files changed, 69 insertions, 46 deletions
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 7f6bf8772af7..2db5ba5b3bf7 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -27,20 +27,20 @@
27#include <linux/i2c/twl4030.h> 27#include <linux/i2c/twl4030.h>
28#include <linux/leds.h> 28#include <linux/leds.h>
29#include <linux/input.h> 29#include <linux/input.h>
30#include <linux/input/matrix_keypad.h>
30#include <linux/gpio_keys.h> 31#include <linux/gpio_keys.h>
31 32
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 35#include <asm/mach/map.h>
35 36
36#include <mach/board.h> 37#include <plat/board.h>
37#include <mach/common.h> 38#include <plat/common.h>
38#include <mach/gpio.h> 39#include <mach/gpio.h>
39#include <mach/hardware.h> 40#include <mach/hardware.h>
40#include <mach/mcspi.h> 41#include <plat/mcspi.h>
41#include <mach/usb.h> 42#include <plat/usb.h>
42#include <mach/keypad.h> 43#include <plat/mux.h>
43#include <mach/mux.h>
44 44
45#include "sdram-micron-mt46h32m32lf-6.h" 45#include "sdram-micron-mt46h32m32lf-6.h"
46#include "mmc-twl4030.h" 46#include "mmc-twl4030.h"
@@ -134,50 +134,50 @@ static void __init pandora_keys_gpio_init(void)
134} 134}
135 135
136static int board_keymap[] = { 136static int board_keymap[] = {
137 /* col, row, code */ 137 /* row, col, code */
138 KEY(0, 0, KEY_9), 138 KEY(0, 0, KEY_9),
139 KEY(0, 1, KEY_0), 139 KEY(0, 1, KEY_8),
140 KEY(0, 2, KEY_BACKSPACE), 140 KEY(0, 2, KEY_I),
141 KEY(0, 3, KEY_O), 141 KEY(0, 3, KEY_J),
142 KEY(0, 4, KEY_P), 142 KEY(0, 4, KEY_N),
143 KEY(0, 5, KEY_K), 143 KEY(0, 5, KEY_M),
144 KEY(0, 6, KEY_L), 144 KEY(1, 0, KEY_0),
145 KEY(0, 7, KEY_ENTER),
146 KEY(1, 0, KEY_8),
147 KEY(1, 1, KEY_7), 145 KEY(1, 1, KEY_7),
148 KEY(1, 2, KEY_6), 146 KEY(1, 2, KEY_U),
149 KEY(1, 3, KEY_5), 147 KEY(1, 3, KEY_H),
150 KEY(1, 4, KEY_4), 148 KEY(1, 4, KEY_B),
151 KEY(1, 5, KEY_3), 149 KEY(1, 5, KEY_SPACE),
152 KEY(1, 6, KEY_2), 150 KEY(2, 0, KEY_BACKSPACE),
153 KEY(1, 7, KEY_1), 151 KEY(2, 1, KEY_6),
154 KEY(2, 0, KEY_I),
155 KEY(2, 1, KEY_U),
156 KEY(2, 2, KEY_Y), 152 KEY(2, 2, KEY_Y),
157 KEY(2, 3, KEY_T), 153 KEY(2, 3, KEY_G),
158 KEY(2, 4, KEY_R), 154 KEY(2, 4, KEY_V),
159 KEY(2, 5, KEY_E), 155 KEY(2, 5, KEY_FN),
160 KEY(2, 6, KEY_W), 156 KEY(3, 0, KEY_O),
161 KEY(2, 7, KEY_Q), 157 KEY(3, 1, KEY_5),
162 KEY(3, 0, KEY_J), 158 KEY(3, 2, KEY_T),
163 KEY(3, 1, KEY_H),
164 KEY(3, 2, KEY_G),
165 KEY(3, 3, KEY_F), 159 KEY(3, 3, KEY_F),
166 KEY(3, 4, KEY_D), 160 KEY(3, 4, KEY_C),
167 KEY(3, 5, KEY_S), 161 KEY(4, 0, KEY_P),
168 KEY(3, 6, KEY_A), 162 KEY(4, 1, KEY_4),
169 KEY(3, 7, KEY_LEFTSHIFT), 163 KEY(4, 2, KEY_R),
170 KEY(4, 0, KEY_N), 164 KEY(4, 3, KEY_D),
171 KEY(4, 1, KEY_B),
172 KEY(4, 2, KEY_V),
173 KEY(4, 3, KEY_C),
174 KEY(4, 4, KEY_X), 165 KEY(4, 4, KEY_X),
175 KEY(4, 5, KEY_Z), 166 KEY(5, 0, KEY_K),
176 KEY(4, 6, KEY_DOT), 167 KEY(5, 1, KEY_3),
177 KEY(4, 7, KEY_COMMA), 168 KEY(5, 2, KEY_E),
178 KEY(5, 0, KEY_M), 169 KEY(5, 3, KEY_S),
179 KEY(5, 1, KEY_SPACE), 170 KEY(5, 4, KEY_Z),
180 KEY(5, 2, KEY_FN), 171 KEY(6, 0, KEY_L),
172 KEY(6, 1, KEY_2),
173 KEY(6, 2, KEY_W),
174 KEY(6, 3, KEY_A),
175 KEY(6, 4, KEY_DOT),
176 KEY(7, 0, KEY_ENTER),
177 KEY(7, 1, KEY_1),
178 KEY(7, 2, KEY_Q),
179 KEY(7, 3, KEY_LEFTSHIFT),
180 KEY(7, 4, KEY_COMMA),
181}; 181};
182 182
183static struct matrix_keymap_data board_map_data = { 183static struct matrix_keymap_data board_map_data = {
@@ -281,11 +281,21 @@ static struct twl4030_usb_data omap3pandora_usb_data = {
281 .usb_mode = T2_USB_MODE_ULPI, 281 .usb_mode = T2_USB_MODE_ULPI,
282}; 282};
283 283
284static struct twl4030_codec_audio_data omap3pandora_audio_data = {
285 .audio_mclk = 26000000,
286};
287
288static struct twl4030_codec_data omap3pandora_codec_data = {
289 .audio_mclk = 26000000,
290 .audio = &omap3pandora_audio_data,
291};
292
284static struct twl4030_platform_data omap3pandora_twldata = { 293static struct twl4030_platform_data omap3pandora_twldata = {
285 .irq_base = TWL4030_IRQ_BASE, 294 .irq_base = TWL4030_IRQ_BASE,
286 .irq_end = TWL4030_IRQ_END, 295 .irq_end = TWL4030_IRQ_END,
287 .gpio = &omap3pandora_gpio_data, 296 .gpio = &omap3pandora_gpio_data,
288 .usb = &omap3pandora_usb_data, 297 .usb = &omap3pandora_usb_data,
298 .codec = &omap3pandora_codec_data,
289 .vmmc1 = &pandora_vmmc1, 299 .vmmc1 = &pandora_vmmc1,
290 .vmmc2 = &pandora_vmmc2, 300 .vmmc2 = &pandora_vmmc2,
291 .keypad = &pandora_kp_data, 301 .keypad = &pandora_kp_data,
@@ -387,6 +397,18 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
387 &pandora_keys_gpio, 397 &pandora_keys_gpio,
388}; 398};
389 399
400static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
401
402 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
403 .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
404 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
405
406 .phy_reset = true,
407 .reset_gpio_port[0] = 16,
408 .reset_gpio_port[1] = -EINVAL,
409 .reset_gpio_port[2] = -EINVAL
410};
411
390static void __init omap3pandora_init(void) 412static void __init omap3pandora_init(void)
391{ 413{
392 omap3pandora_i2c_init(); 414 omap3pandora_i2c_init();
@@ -396,6 +418,7 @@ static void __init omap3pandora_init(void)
396 spi_register_board_info(omap3pandora_spi_board_info, 418 spi_register_board_info(omap3pandora_spi_board_info,
397 ARRAY_SIZE(omap3pandora_spi_board_info)); 419 ARRAY_SIZE(omap3pandora_spi_board_info));
398 omap3pandora_ads7846_init(); 420 omap3pandora_ads7846_init();
421 usb_ehci_init(&ehci_pdata);
399 pandora_keys_gpio_init(); 422 pandora_keys_gpio_init();
400 usb_musb_init(); 423 usb_musb_init();
401 424
@@ -412,7 +435,7 @@ static void __init omap3pandora_map_io(void)
412 435
413MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") 436MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
414 .phys_io = 0x48000000, 437 .phys_io = 0x48000000,
415 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, 438 .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
416 .boot_params = 0x80000100, 439 .boot_params = 0x80000100,
417 .map_io = omap3pandora_map_io, 440 .map_io = omap3pandora_map_io,
418 .init_irq = omap3pandora_init_irq, 441 .init_irq = omap3pandora_init_irq,