Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 - ISEE 2007 SL |
| 3 | * |
| 4 | * Modified from mach-omap2/board-generic.c |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/delay.h> |
| 15 | #include <linux/err.h> |
| 16 | #include <linux/clk.h> |
| 17 | #include <linux/io.h> |
| 18 | #include <linux/gpio.h> |
| 19 | #include <linux/interrupt.h> |
| 20 | |
| 21 | #include <linux/regulator/machine.h> |
Enric Balletbo i Serra | a271c6c | 2011-01-10 13:26:13 +0000 | [diff] [blame] | 22 | #include <linux/regulator/fixed.h> |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 23 | #include <linux/i2c/twl.h> |
| 24 | #include <linux/mmc/host.h> |
| 25 | |
| 26 | #include <asm/mach-types.h> |
| 27 | #include <asm/mach/arch.h> |
| 28 | |
| 29 | #include <plat/board.h> |
| 30 | #include <plat/common.h> |
| 31 | #include <plat/gpmc.h> |
| 32 | #include <plat/usb.h> |
| 33 | #include <plat/onenand.h> |
| 34 | |
| 35 | #include "mux.h" |
| 36 | #include "hsmmc.h" |
| 37 | #include "sdram-numonyx-m65kxxxxam.h" |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame^] | 38 | #include "common-board-devices.h" |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 39 | |
| 40 | #define IGEP3_GPIO_LED0_GREEN 54 |
| 41 | #define IGEP3_GPIO_LED0_RED 53 |
| 42 | #define IGEP3_GPIO_LED1_RED 16 |
| 43 | |
| 44 | #define IGEP3_GPIO_WIFI_NPD 138 |
| 45 | #define IGEP3_GPIO_WIFI_NRESET 139 |
| 46 | #define IGEP3_GPIO_BT_NRESET 137 |
| 47 | |
Enric Balletbo i Serra | 7b0d4b7 | 2011-01-10 13:26:12 +0000 | [diff] [blame] | 48 | #define IGEP3_GPIO_USBH_NRESET 183 |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 49 | |
| 50 | |
| 51 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
| 52 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) |
| 53 | |
| 54 | #define ONENAND_MAP 0x20000000 |
| 55 | |
| 56 | /* |
| 57 | * x2 Flash built-in COMBO POP MEMORY |
| 58 | * Since the device is equipped with two DataRAMs, and two-plane NAND |
| 59 | * Flash memory array, these two component enables simultaneous program |
| 60 | * of 4KiB. Plane1 has only even blocks such as block0, block2, block4 |
| 61 | * while Plane2 has only odd blocks such as block1, block3, block5. |
| 62 | * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048) |
| 63 | */ |
| 64 | |
| 65 | static struct mtd_partition igep3_onenand_partitions[] = { |
| 66 | { |
| 67 | .name = "X-Loader", |
| 68 | .offset = 0, |
| 69 | .size = 2 * (64*(2*2048)) |
| 70 | }, |
| 71 | { |
| 72 | .name = "U-Boot", |
| 73 | .offset = MTDPART_OFS_APPEND, |
| 74 | .size = 6 * (64*(2*2048)), |
| 75 | }, |
| 76 | { |
| 77 | .name = "Environment", |
| 78 | .offset = MTDPART_OFS_APPEND, |
| 79 | .size = 2 * (64*(2*2048)), |
| 80 | }, |
| 81 | { |
| 82 | .name = "Kernel", |
| 83 | .offset = MTDPART_OFS_APPEND, |
| 84 | .size = 12 * (64*(2*2048)), |
| 85 | }, |
| 86 | { |
| 87 | .name = "File System", |
| 88 | .offset = MTDPART_OFS_APPEND, |
| 89 | .size = MTDPART_SIZ_FULL, |
| 90 | }, |
| 91 | }; |
| 92 | |
| 93 | static struct omap_onenand_platform_data igep3_onenand_pdata = { |
| 94 | .parts = igep3_onenand_partitions, |
| 95 | .nr_parts = ARRAY_SIZE(igep3_onenand_partitions), |
| 96 | .onenand_setup = NULL, |
| 97 | .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */ |
| 98 | }; |
| 99 | |
| 100 | static struct platform_device igep3_onenand_device = { |
| 101 | .name = "omap2-onenand", |
| 102 | .id = -1, |
| 103 | .dev = { |
| 104 | .platform_data = &igep3_onenand_pdata, |
| 105 | }, |
| 106 | }; |
| 107 | |
Nishanth Menon | 2393608 | 2011-01-06 19:49:29 -0800 | [diff] [blame] | 108 | static void __init igep3_flash_init(void) |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 109 | { |
| 110 | u8 cs = 0; |
| 111 | u8 onenandcs = GPMC_CS_NUM + 1; |
| 112 | |
| 113 | for (cs = 0; cs < GPMC_CS_NUM; cs++) { |
| 114 | u32 ret; |
| 115 | ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); |
| 116 | |
| 117 | /* Check if NAND/oneNAND is configured */ |
| 118 | if ((ret & 0xC00) == 0x800) |
| 119 | /* NAND found */ |
| 120 | pr_err("IGEP3: Unsupported NAND found\n"); |
| 121 | else { |
| 122 | ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); |
| 123 | |
| 124 | if ((ret & 0x3F) == (ONENAND_MAP >> 24)) |
| 125 | /* OneNAND found */ |
| 126 | onenandcs = cs; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | if (onenandcs > GPMC_CS_NUM) { |
| 131 | pr_err("IGEP3: Unable to find configuration in GPMC\n"); |
| 132 | return; |
| 133 | } |
| 134 | |
| 135 | igep3_onenand_pdata.cs = onenandcs; |
| 136 | |
| 137 | if (platform_device_register(&igep3_onenand_device) < 0) |
| 138 | pr_err("IGEP3: Unable to register OneNAND device\n"); |
| 139 | } |
| 140 | |
| 141 | #else |
Nishanth Menon | 2393608 | 2011-01-06 19:49:29 -0800 | [diff] [blame] | 142 | static void __init igep3_flash_init(void) {} |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 143 | #endif |
| 144 | |
Enric Balletbo i Serra | a271c6c | 2011-01-10 13:26:13 +0000 | [diff] [blame] | 145 | static struct regulator_consumer_supply igep3_vmmc1_supply = |
Kishore Kadiyala | 0005ae7 | 2011-02-28 20:48:05 +0530 | [diff] [blame] | 146 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 147 | |
| 148 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
| 149 | static struct regulator_init_data igep3_vmmc1 = { |
| 150 | .constraints = { |
| 151 | .min_uV = 1850000, |
| 152 | .max_uV = 3150000, |
| 153 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 154 | | REGULATOR_MODE_STANDBY, |
| 155 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 156 | | REGULATOR_CHANGE_MODE |
| 157 | | REGULATOR_CHANGE_STATUS, |
| 158 | }, |
| 159 | .num_consumer_supplies = 1, |
| 160 | .consumer_supplies = &igep3_vmmc1_supply, |
| 161 | }; |
| 162 | |
Enric Balletbo i Serra | a271c6c | 2011-01-10 13:26:13 +0000 | [diff] [blame] | 163 | static struct regulator_consumer_supply igep3_vio_supply = |
Kishore Kadiyala | 0005ae7 | 2011-02-28 20:48:05 +0530 | [diff] [blame] | 164 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); |
Enric Balletbo i Serra | a271c6c | 2011-01-10 13:26:13 +0000 | [diff] [blame] | 165 | |
| 166 | static struct regulator_init_data igep3_vio = { |
| 167 | .constraints = { |
| 168 | .min_uV = 1800000, |
| 169 | .max_uV = 1800000, |
| 170 | .apply_uV = 1, |
| 171 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 172 | | REGULATOR_MODE_STANDBY, |
| 173 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
| 174 | | REGULATOR_CHANGE_MODE |
| 175 | | REGULATOR_CHANGE_STATUS, |
| 176 | }, |
| 177 | .num_consumer_supplies = 1, |
| 178 | .consumer_supplies = &igep3_vio_supply, |
| 179 | }; |
| 180 | |
| 181 | static struct regulator_consumer_supply igep3_vmmc2_supply = |
Kishore Kadiyala | 0005ae7 | 2011-02-28 20:48:05 +0530 | [diff] [blame] | 182 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); |
Enric Balletbo i Serra | a271c6c | 2011-01-10 13:26:13 +0000 | [diff] [blame] | 183 | |
| 184 | static struct regulator_init_data igep3_vmmc2 = { |
| 185 | .constraints = { |
| 186 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
| 187 | .always_on = 1, |
| 188 | }, |
| 189 | .num_consumer_supplies = 1, |
| 190 | .consumer_supplies = &igep3_vmmc2_supply, |
| 191 | }; |
| 192 | |
| 193 | static struct fixed_voltage_config igep3_vwlan = { |
| 194 | .supply_name = "vwlan", |
| 195 | .microvolts = 3300000, |
| 196 | .gpio = -EINVAL, |
| 197 | .enabled_at_boot = 1, |
| 198 | .init_data = &igep3_vmmc2, |
| 199 | }; |
| 200 | |
| 201 | static struct platform_device igep3_vwlan_device = { |
| 202 | .name = "reg-fixed-voltage", |
| 203 | .id = 0, |
| 204 | .dev = { |
| 205 | .platform_data = &igep3_vwlan, |
| 206 | }, |
| 207 | }; |
| 208 | |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 209 | static struct omap2_hsmmc_info mmc[] = { |
| 210 | [0] = { |
| 211 | .mmc = 1, |
| 212 | .caps = MMC_CAP_4_BIT_DATA, |
| 213 | .gpio_cd = -EINVAL, |
| 214 | .gpio_wp = -EINVAL, |
| 215 | }, |
| 216 | #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) |
| 217 | [1] = { |
| 218 | .mmc = 2, |
| 219 | .caps = MMC_CAP_4_BIT_DATA, |
| 220 | .gpio_cd = -EINVAL, |
| 221 | .gpio_wp = -EINVAL, |
| 222 | }, |
| 223 | #endif |
| 224 | {} /* Terminator */ |
| 225 | }; |
| 226 | |
| 227 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
| 228 | #include <linux/leds.h> |
| 229 | |
| 230 | static struct gpio_led igep3_gpio_leds[] = { |
| 231 | [0] = { |
| 232 | .name = "gpio-led:red:d0", |
| 233 | .gpio = IGEP3_GPIO_LED0_RED, |
| 234 | .default_trigger = "default-off" |
| 235 | }, |
| 236 | [1] = { |
| 237 | .name = "gpio-led:green:d0", |
| 238 | .gpio = IGEP3_GPIO_LED0_GREEN, |
| 239 | .default_trigger = "default-off", |
| 240 | }, |
| 241 | [2] = { |
| 242 | .name = "gpio-led:red:d1", |
| 243 | .gpio = IGEP3_GPIO_LED1_RED, |
| 244 | .default_trigger = "default-off", |
| 245 | }, |
| 246 | [3] = { |
| 247 | .name = "gpio-led:green:d1", |
| 248 | .default_trigger = "heartbeat", |
| 249 | .gpio = -EINVAL, /* gets replaced */ |
| 250 | }, |
| 251 | }; |
| 252 | |
| 253 | static struct gpio_led_platform_data igep3_led_pdata = { |
| 254 | .leds = igep3_gpio_leds, |
| 255 | .num_leds = ARRAY_SIZE(igep3_gpio_leds), |
| 256 | }; |
| 257 | |
| 258 | static struct platform_device igep3_led_device = { |
| 259 | .name = "leds-gpio", |
| 260 | .id = -1, |
| 261 | .dev = { |
| 262 | .platform_data = &igep3_led_pdata, |
| 263 | }, |
| 264 | }; |
| 265 | |
| 266 | static void __init igep3_leds_init(void) |
| 267 | { |
| 268 | platform_device_register(&igep3_led_device); |
| 269 | } |
| 270 | |
| 271 | #else |
| 272 | static inline void igep3_leds_init(void) |
| 273 | { |
| 274 | if ((gpio_request(IGEP3_GPIO_LED0_RED, "gpio-led:red:d0") == 0) && |
| 275 | (gpio_direction_output(IGEP3_GPIO_LED0_RED, 1) == 0)) { |
| 276 | gpio_export(IGEP3_GPIO_LED0_RED, 0); |
| 277 | gpio_set_value(IGEP3_GPIO_LED0_RED, 1); |
| 278 | } else |
| 279 | pr_warning("IGEP3: Could not obtain gpio GPIO_LED0_RED\n"); |
| 280 | |
| 281 | if ((gpio_request(IGEP3_GPIO_LED0_GREEN, "gpio-led:green:d0") == 0) && |
| 282 | (gpio_direction_output(IGEP3_GPIO_LED0_GREEN, 1) == 0)) { |
| 283 | gpio_export(IGEP3_GPIO_LED0_GREEN, 0); |
| 284 | gpio_set_value(IGEP3_GPIO_LED0_GREEN, 1); |
| 285 | } else |
| 286 | pr_warning("IGEP3: Could not obtain gpio GPIO_LED0_GREEN\n"); |
| 287 | |
| 288 | if ((gpio_request(IGEP3_GPIO_LED1_RED, "gpio-led:red:d1") == 0) && |
| 289 | (gpio_direction_output(IGEP3_GPIO_LED1_RED, 1) == 0)) { |
| 290 | gpio_export(IGEP3_GPIO_LED1_RED, 0); |
| 291 | gpio_set_value(IGEP3_GPIO_LED1_RED, 1); |
| 292 | } else |
| 293 | pr_warning("IGEP3: Could not obtain gpio GPIO_LED1_RED\n"); |
| 294 | } |
| 295 | #endif |
| 296 | |
| 297 | static int igep3_twl4030_gpio_setup(struct device *dev, |
| 298 | unsigned gpio, unsigned ngpio) |
| 299 | { |
| 300 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
| 301 | mmc[0].gpio_cd = gpio + 0; |
| 302 | omap2_hsmmc_init(mmc); |
| 303 | |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 304 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ |
| 305 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) |
| 306 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) |
| 307 | && (gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) { |
| 308 | gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0); |
| 309 | gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0); |
| 310 | } else |
| 311 | pr_warning("IGEP3: Could not obtain gpio GPIO_LED1_GREEN\n"); |
| 312 | #else |
| 313 | igep3_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1; |
| 314 | #endif |
| 315 | |
| 316 | return 0; |
| 317 | }; |
| 318 | |
| 319 | static struct twl4030_gpio_platform_data igep3_twl4030_gpio_pdata = { |
| 320 | .gpio_base = OMAP_MAX_GPIO_LINES, |
| 321 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
| 322 | .irq_end = TWL4030_GPIO_IRQ_END, |
| 323 | .use_leds = true, |
| 324 | .setup = igep3_twl4030_gpio_setup, |
| 325 | }; |
| 326 | |
| 327 | static struct twl4030_usb_data igep3_twl4030_usb_data = { |
| 328 | .usb_mode = T2_USB_MODE_ULPI, |
| 329 | }; |
| 330 | |
Enric Balletbo i Serra | a271c6c | 2011-01-10 13:26:13 +0000 | [diff] [blame] | 331 | static struct platform_device *igep3_devices[] __initdata = { |
| 332 | &igep3_vwlan_device, |
| 333 | }; |
| 334 | |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 335 | static void __init igep3_init_early(void) |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 336 | { |
Paul Walmsley | 4805734 | 2010-12-21 15:25:10 -0700 | [diff] [blame] | 337 | omap2_init_common_infrastructure(); |
| 338 | omap2_init_common_devices(m65kxxxxam_sdrc_params, |
| 339 | m65kxxxxam_sdrc_params); |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 340 | } |
| 341 | |
| 342 | static struct twl4030_platform_data igep3_twl4030_pdata = { |
| 343 | .irq_base = TWL4030_IRQ_BASE, |
| 344 | .irq_end = TWL4030_IRQ_END, |
| 345 | |
| 346 | /* platform_data for children goes here */ |
| 347 | .usb = &igep3_twl4030_usb_data, |
| 348 | .gpio = &igep3_twl4030_gpio_pdata, |
| 349 | .vmmc1 = &igep3_vmmc1, |
Enric Balletbo i Serra | a271c6c | 2011-01-10 13:26:13 +0000 | [diff] [blame] | 350 | .vio = &igep3_vio, |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 351 | }; |
| 352 | |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 353 | static int __init igep3_i2c_init(void) |
| 354 | { |
Mike Rapoport | fbd8071 | 2011-04-25 01:09:06 +0300 | [diff] [blame^] | 355 | omap3_pmic_init("twl4030", &igep3_twl4030_pdata); |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 356 | |
| 357 | return 0; |
| 358 | } |
| 359 | |
| 360 | static struct omap_musb_board_data musb_board_data = { |
| 361 | .interface_type = MUSB_INTERFACE_ULPI, |
| 362 | .mode = MUSB_OTG, |
| 363 | .power = 100, |
| 364 | }; |
| 365 | |
| 366 | #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) |
| 367 | |
| 368 | static void __init igep3_wifi_bt_init(void) |
| 369 | { |
| 370 | /* Configure MUX values for W-LAN + Bluetooth GPIO's */ |
| 371 | omap_mux_init_gpio(IGEP3_GPIO_WIFI_NPD, OMAP_PIN_OUTPUT); |
| 372 | omap_mux_init_gpio(IGEP3_GPIO_WIFI_NRESET, OMAP_PIN_OUTPUT); |
| 373 | omap_mux_init_gpio(IGEP3_GPIO_BT_NRESET, OMAP_PIN_OUTPUT); |
| 374 | |
| 375 | /* Set GPIO's for W-LAN + Bluetooth combo module */ |
| 376 | if ((gpio_request(IGEP3_GPIO_WIFI_NPD, "GPIO_WIFI_NPD") == 0) && |
| 377 | (gpio_direction_output(IGEP3_GPIO_WIFI_NPD, 1) == 0)) { |
| 378 | gpio_export(IGEP3_GPIO_WIFI_NPD, 0); |
| 379 | } else |
| 380 | pr_warning("IGEP3: Could not obtain gpio GPIO_WIFI_NPD\n"); |
| 381 | |
| 382 | if ((gpio_request(IGEP3_GPIO_WIFI_NRESET, "GPIO_WIFI_NRESET") == 0) && |
| 383 | (gpio_direction_output(IGEP3_GPIO_WIFI_NRESET, 1) == 0)) { |
| 384 | gpio_export(IGEP3_GPIO_WIFI_NRESET, 0); |
| 385 | gpio_set_value(IGEP3_GPIO_WIFI_NRESET, 0); |
| 386 | udelay(10); |
| 387 | gpio_set_value(IGEP3_GPIO_WIFI_NRESET, 1); |
| 388 | } else |
| 389 | pr_warning("IGEP3: Could not obtain gpio GPIO_WIFI_NRESET\n"); |
| 390 | |
| 391 | if ((gpio_request(IGEP3_GPIO_BT_NRESET, "GPIO_BT_NRESET") == 0) && |
| 392 | (gpio_direction_output(IGEP3_GPIO_BT_NRESET, 1) == 0)) { |
| 393 | gpio_export(IGEP3_GPIO_BT_NRESET, 0); |
| 394 | } else |
| 395 | pr_warning("IGEP3: Could not obtain gpio GPIO_BT_NRESET\n"); |
| 396 | } |
| 397 | #else |
| 398 | void __init igep3_wifi_bt_init(void) {} |
| 399 | #endif |
| 400 | |
Keshava Munegowda | 181b250 | 2011-03-01 20:08:16 +0530 | [diff] [blame] | 401 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { |
| 402 | .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, |
| 403 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, |
| 404 | .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, |
Enric Balletbo i Serra | 7b0d4b7 | 2011-01-10 13:26:12 +0000 | [diff] [blame] | 405 | |
| 406 | .phy_reset = true, |
| 407 | .reset_gpio_port[0] = -EINVAL, |
| 408 | .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET, |
| 409 | .reset_gpio_port[2] = -EINVAL, |
| 410 | }; |
| 411 | |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 412 | #ifdef CONFIG_OMAP_MUX |
| 413 | static struct omap_board_mux board_mux[] __initdata = { |
Enric Balletbo i Serra | 7b0d4b7 | 2011-01-10 13:26:12 +0000 | [diff] [blame] | 414 | OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 415 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 416 | }; |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 417 | #endif |
| 418 | |
| 419 | static void __init igep3_init(void) |
| 420 | { |
| 421 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 422 | |
| 423 | /* Register I2C busses and drivers */ |
| 424 | igep3_i2c_init(); |
Enric Balletbo i Serra | a271c6c | 2011-01-10 13:26:13 +0000 | [diff] [blame] | 425 | platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices)); |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 426 | omap_serial_init(); |
| 427 | usb_musb_init(&musb_board_data); |
Keshava Munegowda | 9e64bb1 | 2011-03-01 20:08:19 +0530 | [diff] [blame] | 428 | usbhs_init(&usbhs_bdata); |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 429 | |
| 430 | igep3_flash_init(); |
| 431 | igep3_leds_init(); |
| 432 | |
| 433 | /* |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 434 | * WLAN-BT combo module from MuRata which has a Marvell WLAN |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 435 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. |
| 436 | */ |
| 437 | igep3_wifi_bt_init(); |
| 438 | |
| 439 | } |
| 440 | |
| 441 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 442 | .boot_params = 0x80000100, |
Enric Balletbo i Serra | 0f7e2aa | 2011-01-11 15:47:54 +0000 | [diff] [blame] | 443 | .reserve = omap_reserve, |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 444 | .map_io = omap3_map_io, |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 445 | .init_early = igep3_init_early, |
| 446 | .init_irq = omap_init_irq, |
Enric Balletbo i Serra | e844b1d | 2010-10-08 10:22:11 -0700 | [diff] [blame] | 447 | .init_machine = igep3_init, |
| 448 | .timer = &omap_timer, |
| 449 | MACHINE_END |