diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 48c8c9195dc3..2f8f6ecf111f 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -20,22 +20,23 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/init.h> | ||
24 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/i2c.h> | ||
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
27 | #include <linux/mtd/nand.h> | 27 | #include <linux/mtd/nand.h> |
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
30 | #include <linux/workqueue.h> | ||
31 | 30 | ||
32 | #include <asm/hardware.h> | 31 | #include <asm/hardware.h> |
32 | #include <asm/gpio.h> | ||
33 | |||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/flash.h> | 36 | #include <asm/mach/flash.h> |
36 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
37 | 38 | ||
38 | #include <asm/arch/gpio.h> | 39 | #include <asm/arch/tps65010.h> |
39 | #include <asm/arch/mux.h> | 40 | #include <asm/arch/mux.h> |
40 | #include <asm/arch/tc.h> | 41 | #include <asm/arch/tc.h> |
41 | #include <asm/arch/irda.h> | 42 | #include <asm/arch/irda.h> |
@@ -277,6 +278,20 @@ static struct platform_device *h2_devices[] __initdata = { | |||
277 | &h2_mcbsp1_device, | 278 | &h2_mcbsp1_device, |
278 | }; | 279 | }; |
279 | 280 | ||
281 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { | ||
282 | { | ||
283 | I2C_BOARD_INFO("tps65010", 0x48), | ||
284 | .type = "tps65010", | ||
285 | .irq = OMAP_GPIO_IRQ(58), | ||
286 | }, | ||
287 | /* TODO when driver support is ready: | ||
288 | * - isp1301 OTG transceiver | ||
289 | * - optional ov9640 camera sensor at 0x30 | ||
290 | * - pcf9754 for aGPS control | ||
291 | * - ... etc | ||
292 | */ | ||
293 | }; | ||
294 | |||
280 | static void __init h2_init_smc91x(void) | 295 | static void __init h2_init_smc91x(void) |
281 | { | 296 | { |
282 | if ((omap_request_gpio(0)) < 0) { | 297 | if ((omap_request_gpio(0)) < 0) { |
@@ -367,6 +382,14 @@ static void __init h2_init(void) | |||
367 | omap_board_config = h2_config; | 382 | omap_board_config = h2_config; |
368 | omap_board_config_size = ARRAY_SIZE(h2_config); | 383 | omap_board_config_size = ARRAY_SIZE(h2_config); |
369 | omap_serial_init(); | 384 | omap_serial_init(); |
385 | |||
386 | /* irq for tps65010 chip */ | ||
387 | omap_cfg_reg(W4_GPIO58); | ||
388 | if (gpio_request(58, "tps65010") == 0) | ||
389 | gpio_direction_input(58); | ||
390 | |||
391 | i2c_register_board_info(1, h2_i2c_board_info, | ||
392 | ARRAY_SIZE(h2_i2c_board_info)); | ||
370 | } | 393 | } |
371 | 394 | ||
372 | static void __init h2_map_io(void) | 395 | static void __init h2_map_io(void) |
@@ -374,6 +397,22 @@ static void __init h2_map_io(void) | |||
374 | omap1_map_common_io(); | 397 | omap1_map_common_io(); |
375 | } | 398 | } |
376 | 399 | ||
400 | #ifdef CONFIG_TPS65010 | ||
401 | static int __init h2_tps_init(void) | ||
402 | { | ||
403 | if (!machine_is_omap_h2()) | ||
404 | return 0; | ||
405 | |||
406 | /* gpio3 for SD, gpio4 for VDD_DSP */ | ||
407 | /* FIXME send power to DSP iff it's configured */ | ||
408 | |||
409 | /* Enable LOW_PWR */ | ||
410 | tps65010_set_low_pwr(ON); | ||
411 | return 0; | ||
412 | } | ||
413 | fs_initcall(h2_tps_init); | ||
414 | #endif | ||
415 | |||
377 | MACHINE_START(OMAP_H2, "TI-H2") | 416 | MACHINE_START(OMAP_H2, "TI-H2") |
378 | /* Maintainer: Imre Deak <imre.deak@nokia.com> */ | 417 | /* Maintainer: Imre Deak <imre.deak@nokia.com> */ |
379 | .phys_io = 0xfff00000, | 418 | .phys_io = 0xfff00000, |