diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-overo.c')
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 61 |
1 files changed, 42 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 9917d2fddc2f..d192dd98a591 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/i2c/twl4030.h> | 29 | #include <linux/i2c/twl.h> |
30 | #include <linux/regulator/machine.h> | 30 | #include <linux/regulator/machine.h> |
31 | 31 | ||
32 | #include <linux/mtd/mtd.h> | 32 | #include <linux/mtd/mtd.h> |
@@ -38,15 +38,15 @@ | |||
38 | #include <asm/mach/flash.h> | 38 | #include <asm/mach/flash.h> |
39 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
40 | 40 | ||
41 | #include <mach/board.h> | 41 | #include <plat/board.h> |
42 | #include <mach/common.h> | 42 | #include <plat/common.h> |
43 | #include <mach/gpio.h> | 43 | #include <mach/gpio.h> |
44 | #include <mach/gpmc.h> | 44 | #include <plat/gpmc.h> |
45 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
46 | #include <mach/nand.h> | 46 | #include <plat/nand.h> |
47 | #include <mach/mux.h> | 47 | #include <plat/usb.h> |
48 | #include <mach/usb.h> | ||
49 | 48 | ||
49 | #include "mux.h" | ||
50 | #include "sdram-micron-mt46h32m32lf-6.h" | 50 | #include "sdram-micron-mt46h32m32lf-6.h" |
51 | #include "mmc-twl4030.h" | 51 | #include "mmc-twl4030.h" |
52 | 52 | ||
@@ -67,7 +67,7 @@ | |||
67 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ | 67 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ |
68 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 68 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
69 | 69 | ||
70 | #include <mach/mcspi.h> | 70 | #include <plat/mcspi.h> |
71 | #include <linux/spi/spi.h> | 71 | #include <linux/spi/spi.h> |
72 | #include <linux/spi/ads7846.h> | 72 | #include <linux/spi/ads7846.h> |
73 | 73 | ||
@@ -329,6 +329,15 @@ static struct regulator_init_data overo_vmmc1 = { | |||
329 | .consumer_supplies = &overo_vmmc1_supply, | 329 | .consumer_supplies = &overo_vmmc1_supply, |
330 | }; | 330 | }; |
331 | 331 | ||
332 | static struct twl4030_codec_audio_data overo_audio_data = { | ||
333 | .audio_mclk = 26000000, | ||
334 | }; | ||
335 | |||
336 | static struct twl4030_codec_data overo_codec_data = { | ||
337 | .audio_mclk = 26000000, | ||
338 | .audio = &overo_audio_data, | ||
339 | }; | ||
340 | |||
332 | /* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */ | 341 | /* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */ |
333 | 342 | ||
334 | static struct twl4030_platform_data overo_twldata = { | 343 | static struct twl4030_platform_data overo_twldata = { |
@@ -336,6 +345,7 @@ static struct twl4030_platform_data overo_twldata = { | |||
336 | .irq_end = TWL4030_IRQ_END, | 345 | .irq_end = TWL4030_IRQ_END, |
337 | .gpio = &overo_gpio_data, | 346 | .gpio = &overo_gpio_data, |
338 | .usb = &overo_usb_data, | 347 | .usb = &overo_usb_data, |
348 | .codec = &overo_codec_data, | ||
339 | .vmmc1 = &overo_vmmc1, | 349 | .vmmc1 = &overo_vmmc1, |
340 | }; | 350 | }; |
341 | 351 | ||
@@ -384,19 +394,40 @@ static struct platform_device *overo_devices[] __initdata = { | |||
384 | &overo_lcd_device, | 394 | &overo_lcd_device, |
385 | }; | 395 | }; |
386 | 396 | ||
397 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | ||
398 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
399 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | ||
400 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
401 | |||
402 | .phy_reset = true, | ||
403 | .reset_gpio_port[0] = -EINVAL, | ||
404 | .reset_gpio_port[1] = OVERO_GPIO_USBH_NRESET, | ||
405 | .reset_gpio_port[2] = -EINVAL | ||
406 | }; | ||
407 | |||
408 | #ifdef CONFIG_OMAP_MUX | ||
409 | static struct omap_board_mux board_mux[] __initdata = { | ||
410 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
411 | }; | ||
412 | #else | ||
413 | #define board_mux NULL | ||
414 | #endif | ||
415 | |||
387 | static void __init overo_init(void) | 416 | static void __init overo_init(void) |
388 | { | 417 | { |
418 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
389 | overo_i2c_init(); | 419 | overo_i2c_init(); |
390 | platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); | 420 | platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); |
391 | omap_serial_init(); | 421 | omap_serial_init(); |
392 | overo_flash_init(); | 422 | overo_flash_init(); |
393 | usb_musb_init(); | 423 | usb_musb_init(); |
424 | usb_ehci_init(&ehci_pdata); | ||
394 | overo_ads7846_init(); | 425 | overo_ads7846_init(); |
395 | overo_init_smsc911x(); | 426 | overo_init_smsc911x(); |
396 | 427 | ||
397 | /* Ensure SDRC pins are mux'd for self-refresh */ | 428 | /* Ensure SDRC pins are mux'd for self-refresh */ |
398 | omap_cfg_reg(H16_34XX_SDRC_CKE0); | 429 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
399 | omap_cfg_reg(H17_34XX_SDRC_CKE1); | 430 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
400 | 431 | ||
401 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, | 432 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, |
402 | "OVERO_GPIO_W2W_NRESET") == 0) && | 433 | "OVERO_GPIO_W2W_NRESET") == 0) && |
@@ -433,14 +464,6 @@ static void __init overo_init(void) | |||
433 | else | 464 | else |
434 | printk(KERN_ERR "could not obtain gpio for " | 465 | printk(KERN_ERR "could not obtain gpio for " |
435 | "OVERO_GPIO_USBH_CPEN\n"); | 466 | "OVERO_GPIO_USBH_CPEN\n"); |
436 | |||
437 | if ((gpio_request(OVERO_GPIO_USBH_NRESET, | ||
438 | "OVERO_GPIO_USBH_NRESET") == 0) && | ||
439 | (gpio_direction_output(OVERO_GPIO_USBH_NRESET, 1) == 0)) | ||
440 | gpio_export(OVERO_GPIO_USBH_NRESET, 0); | ||
441 | else | ||
442 | printk(KERN_ERR "could not obtain gpio for " | ||
443 | "OVERO_GPIO_USBH_NRESET\n"); | ||
444 | } | 467 | } |
445 | 468 | ||
446 | static void __init overo_map_io(void) | 469 | static void __init overo_map_io(void) |
@@ -451,7 +474,7 @@ static void __init overo_map_io(void) | |||
451 | 474 | ||
452 | MACHINE_START(OVERO, "Gumstix Overo") | 475 | MACHINE_START(OVERO, "Gumstix Overo") |
453 | .phys_io = 0x48000000, | 476 | .phys_io = 0x48000000, |
454 | .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, | 477 | .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, |
455 | .boot_params = 0x80000100, | 478 | .boot_params = 0x80000100, |
456 | .map_io = overo_map_io, | 479 | .map_io = overo_map_io, |
457 | .init_irq = overo_init_irq, | 480 | .init_irq = overo_init_irq, |