blob: 3a42eca1ad80ac3ddeda980fce3b11fe2baf2c01 [file] [log] [blame]
Vikram Pandita577145f2009-05-28 14:04:04 -07001/*
2 * Copyright (C) 2009 Texas Instruments Inc.
3 * Mikkel Christensen <mlc@ti.com>
4 *
5 * Modified from mach-omap2/board-ldp.c
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/gpio.h>
16#include <linux/i2c/twl4030.h>
17
18#include <asm/mach-types.h>
19#include <asm/mach/arch.h>
20
21#include <mach/common.h>
22#include <mach/usb.h>
23
24#include "mmc-twl4030.h"
25
26static void __init omap_zoom2_init_irq(void)
27{
Jean Pihet58cda882009-07-24 19:43:25 -060028 omap2_init_common_hw(NULL, NULL);
Vikram Pandita577145f2009-05-28 14:04:04 -070029 omap_init_irq();
30 omap_gpio_init();
31}
32
Vikram Pandita577145f2009-05-28 14:04:04 -070033static struct omap_board_config_kernel zoom2_config[] __initdata = {
Vikram Pandita577145f2009-05-28 14:04:04 -070034};
35
36static struct twl4030_gpio_platform_data zoom2_gpio_data = {
37 .gpio_base = OMAP_MAX_GPIO_LINES,
38 .irq_base = TWL4030_GPIO_IRQ_BASE,
39 .irq_end = TWL4030_GPIO_IRQ_END,
40};
41
42static struct twl4030_platform_data zoom2_twldata = {
43 .irq_base = TWL4030_IRQ_BASE,
44 .irq_end = TWL4030_IRQ_END,
45
46 /* platform_data for children goes here */
47 .gpio = &zoom2_gpio_data,
48};
49
50static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = {
51 {
52 I2C_BOARD_INFO("twl4030", 0x48),
53 .flags = I2C_CLIENT_WAKE,
54 .irq = INT_34XX_SYS_NIRQ,
55 .platform_data = &zoom2_twldata,
56 },
57};
58
59static int __init omap_i2c_init(void)
60{
61 omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo,
62 ARRAY_SIZE(zoom2_i2c_boardinfo));
63 omap_register_i2c_bus(2, 400, NULL, 0);
64 omap_register_i2c_bus(3, 400, NULL, 0);
65 return 0;
66}
67
68static struct twl4030_hsmmc_info mmc[] __initdata = {
69 {
70 .mmc = 1,
71 .wires = 4,
72 .gpio_cd = -EINVAL,
73 .gpio_wp = -EINVAL,
74 },
75 {} /* Terminator */
76};
77
78extern int __init omap_zoom2_debugboard_init(void);
79
80static void __init omap_zoom2_init(void)
81{
82 omap_i2c_init();
83 omap_board_config = zoom2_config;
84 omap_board_config_size = ARRAY_SIZE(zoom2_config);
85 omap_serial_init();
86 omap_zoom2_debugboard_init();
87 twl4030_mmc_init(mmc);
88 usb_musb_init();
89}
90
91static void __init omap_zoom2_map_io(void)
92{
93 omap2_set_globals_343x();
94 omap2_map_common_io();
95}
96
97MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
98 .phys_io = 0x48000000,
99 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
100 .boot_params = 0x80000100,
101 .map_io = omap_zoom2_map_io,
102 .init_irq = omap_zoom2_init_irq,
103 .init_machine = omap_zoom2_init,
104 .timer = &omap_timer,
105MACHINE_END