diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-overo.c')
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 79 |
1 files changed, 59 insertions, 20 deletions
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index b1f23bea863f..dff5528fbfb5 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -27,6 +27,7 @@ | |||
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/twl4030.h> |
30 | #include <linux/regulator/machine.h> | ||
30 | 31 | ||
31 | #include <linux/mtd/mtd.h> | 32 | #include <linux/mtd/mtd.h> |
32 | #include <linux/mtd/nand.h> | 33 | #include <linux/mtd/nand.h> |
@@ -45,6 +46,7 @@ | |||
45 | #include <mach/nand.h> | 46 | #include <mach/nand.h> |
46 | #include <mach/usb.h> | 47 | #include <mach/usb.h> |
47 | 48 | ||
49 | #include "sdram-micron-mt46h32m32lf-6.h" | ||
48 | #include "mmc-twl4030.h" | 50 | #include "mmc-twl4030.h" |
49 | 51 | ||
50 | #define OVERO_GPIO_BT_XGATE 15 | 52 | #define OVERO_GPIO_BT_XGATE 15 |
@@ -271,21 +273,76 @@ static struct omap_uart_config overo_uart_config __initdata = { | |||
271 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 273 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
272 | }; | 274 | }; |
273 | 275 | ||
276 | static struct twl4030_hsmmc_info mmc[] = { | ||
277 | { | ||
278 | .mmc = 1, | ||
279 | .wires = 4, | ||
280 | .gpio_cd = -EINVAL, | ||
281 | .gpio_wp = -EINVAL, | ||
282 | }, | ||
283 | { | ||
284 | .mmc = 2, | ||
285 | .wires = 4, | ||
286 | .gpio_cd = -EINVAL, | ||
287 | .gpio_wp = -EINVAL, | ||
288 | .transceiver = true, | ||
289 | .ocr_mask = 0x00100000, /* 3.3V */ | ||
290 | }, | ||
291 | {} /* Terminator */ | ||
292 | }; | ||
293 | |||
294 | static struct regulator_consumer_supply overo_vmmc1_supply = { | ||
295 | .supply = "vmmc", | ||
296 | }; | ||
297 | |||
298 | static int overo_twl_gpio_setup(struct device *dev, | ||
299 | unsigned gpio, unsigned ngpio) | ||
300 | { | ||
301 | twl4030_mmc_init(mmc); | ||
302 | |||
303 | overo_vmmc1_supply.dev = mmc[0].dev; | ||
304 | |||
305 | return 0; | ||
306 | } | ||
307 | |||
274 | static struct twl4030_gpio_platform_data overo_gpio_data = { | 308 | static struct twl4030_gpio_platform_data overo_gpio_data = { |
275 | .gpio_base = OMAP_MAX_GPIO_LINES, | 309 | .gpio_base = OMAP_MAX_GPIO_LINES, |
276 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 310 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
277 | .irq_end = TWL4030_GPIO_IRQ_END, | 311 | .irq_end = TWL4030_GPIO_IRQ_END, |
312 | .setup = overo_twl_gpio_setup, | ||
313 | }; | ||
314 | |||
315 | static struct twl4030_usb_data overo_usb_data = { | ||
316 | .usb_mode = T2_USB_MODE_ULPI, | ||
317 | }; | ||
318 | |||
319 | static struct regulator_init_data overo_vmmc1 = { | ||
320 | .constraints = { | ||
321 | .min_uV = 1850000, | ||
322 | .max_uV = 3150000, | ||
323 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
324 | | REGULATOR_MODE_STANDBY, | ||
325 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
326 | | REGULATOR_CHANGE_MODE | ||
327 | | REGULATOR_CHANGE_STATUS, | ||
328 | }, | ||
329 | .num_consumer_supplies = 1, | ||
330 | .consumer_supplies = &overo_vmmc1_supply, | ||
278 | }; | 331 | }; |
279 | 332 | ||
333 | /* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */ | ||
334 | |||
280 | static struct twl4030_platform_data overo_twldata = { | 335 | static struct twl4030_platform_data overo_twldata = { |
281 | .irq_base = TWL4030_IRQ_BASE, | 336 | .irq_base = TWL4030_IRQ_BASE, |
282 | .irq_end = TWL4030_IRQ_END, | 337 | .irq_end = TWL4030_IRQ_END, |
283 | .gpio = &overo_gpio_data, | 338 | .gpio = &overo_gpio_data, |
339 | .usb = &overo_usb_data, | ||
340 | .vmmc1 = &overo_vmmc1, | ||
284 | }; | 341 | }; |
285 | 342 | ||
286 | static struct i2c_board_info __initdata overo_i2c_boardinfo[] = { | 343 | static struct i2c_board_info __initdata overo_i2c_boardinfo[] = { |
287 | { | 344 | { |
288 | I2C_BOARD_INFO("twl4030", 0x48), | 345 | I2C_BOARD_INFO("tps65950", 0x48), |
289 | .flags = I2C_CLIENT_WAKE, | 346 | .flags = I2C_CLIENT_WAKE, |
290 | .irq = INT_34XX_SYS_NIRQ, | 347 | .irq = INT_34XX_SYS_NIRQ, |
291 | .platform_data = &overo_twldata, | 348 | .platform_data = &overo_twldata, |
@@ -303,7 +360,7 @@ static int __init overo_i2c_init(void) | |||
303 | 360 | ||
304 | static void __init overo_init_irq(void) | 361 | static void __init overo_init_irq(void) |
305 | { | 362 | { |
306 | omap2_init_common_hw(NULL); | 363 | omap2_init_common_hw(mt46h32m32lf6_sdrc_params); |
307 | omap_init_irq(); | 364 | omap_init_irq(); |
308 | omap_gpio_init(); | 365 | omap_gpio_init(); |
309 | } | 366 | } |
@@ -326,23 +383,6 @@ static struct platform_device *overo_devices[] __initdata = { | |||
326 | &overo_lcd_device, | 383 | &overo_lcd_device, |
327 | }; | 384 | }; |
328 | 385 | ||
329 | static struct twl4030_hsmmc_info mmc[] __initdata = { | ||
330 | { | ||
331 | .mmc = 1, | ||
332 | .wires = 4, | ||
333 | .gpio_cd = -EINVAL, | ||
334 | .gpio_wp = -EINVAL, | ||
335 | }, | ||
336 | { | ||
337 | .mmc = 2, | ||
338 | .wires = 4, | ||
339 | .gpio_cd = -EINVAL, | ||
340 | .gpio_wp = -EINVAL, | ||
341 | .transceiver = true, | ||
342 | }, | ||
343 | {} /* Terminator */ | ||
344 | }; | ||
345 | |||
346 | static void __init overo_init(void) | 386 | static void __init overo_init(void) |
347 | { | 387 | { |
348 | overo_i2c_init(); | 388 | overo_i2c_init(); |
@@ -350,7 +390,6 @@ static void __init overo_init(void) | |||
350 | omap_board_config = overo_config; | 390 | omap_board_config = overo_config; |
351 | omap_board_config_size = ARRAY_SIZE(overo_config); | 391 | omap_board_config_size = ARRAY_SIZE(overo_config); |
352 | omap_serial_init(); | 392 | omap_serial_init(); |
353 | twl4030_mmc_init(mmc); | ||
354 | overo_flash_init(); | 393 | overo_flash_init(); |
355 | usb_musb_init(); | 394 | usb_musb_init(); |
356 | overo_ads7846_init(); | 395 | overo_ads7846_init(); |