diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-igep0030.c')
-rw-r--r-- | arch/arm/mach-omap2/board-igep0030.c | 85 |
1 files changed, 72 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index bcccd68f1856..4dc62a9b9cb2 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | 20 | ||
21 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
22 | #include <linux/regulator/fixed.h> | ||
22 | #include <linux/i2c/twl.h> | 23 | #include <linux/i2c/twl.h> |
23 | #include <linux/mmc/host.h> | 24 | #include <linux/mmc/host.h> |
24 | 25 | ||
@@ -43,7 +44,7 @@ | |||
43 | #define IGEP3_GPIO_WIFI_NRESET 139 | 44 | #define IGEP3_GPIO_WIFI_NRESET 139 |
44 | #define IGEP3_GPIO_BT_NRESET 137 | 45 | #define IGEP3_GPIO_BT_NRESET 137 |
45 | 46 | ||
46 | #define IGEP3_GPIO_USBH_NRESET 115 | 47 | #define IGEP3_GPIO_USBH_NRESET 183 |
47 | 48 | ||
48 | 49 | ||
49 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | 50 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
@@ -103,7 +104,7 @@ static struct platform_device igep3_onenand_device = { | |||
103 | }, | 104 | }, |
104 | }; | 105 | }; |
105 | 106 | ||
106 | void __init igep3_flash_init(void) | 107 | static void __init igep3_flash_init(void) |
107 | { | 108 | { |
108 | u8 cs = 0; | 109 | u8 cs = 0; |
109 | u8 onenandcs = GPMC_CS_NUM + 1; | 110 | u8 onenandcs = GPMC_CS_NUM + 1; |
@@ -137,12 +138,11 @@ void __init igep3_flash_init(void) | |||
137 | } | 138 | } |
138 | 139 | ||
139 | #else | 140 | #else |
140 | void __init igep3_flash_init(void) {} | 141 | static void __init igep3_flash_init(void) {} |
141 | #endif | 142 | #endif |
142 | 143 | ||
143 | static struct regulator_consumer_supply igep3_vmmc1_supply = { | 144 | static struct regulator_consumer_supply igep3_vmmc1_supply = |
144 | .supply = "vmmc", | 145 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); |
145 | }; | ||
146 | 146 | ||
147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
148 | static struct regulator_init_data igep3_vmmc1 = { | 148 | static struct regulator_init_data igep3_vmmc1 = { |
@@ -159,6 +159,52 @@ static struct regulator_init_data igep3_vmmc1 = { | |||
159 | .consumer_supplies = &igep3_vmmc1_supply, | 159 | .consumer_supplies = &igep3_vmmc1_supply, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static struct regulator_consumer_supply igep3_vio_supply = | ||
163 | REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); | ||
164 | |||
165 | static struct regulator_init_data igep3_vio = { | ||
166 | .constraints = { | ||
167 | .min_uV = 1800000, | ||
168 | .max_uV = 1800000, | ||
169 | .apply_uV = 1, | ||
170 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
171 | | REGULATOR_MODE_STANDBY, | ||
172 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
173 | | REGULATOR_CHANGE_MODE | ||
174 | | REGULATOR_CHANGE_STATUS, | ||
175 | }, | ||
176 | .num_consumer_supplies = 1, | ||
177 | .consumer_supplies = &igep3_vio_supply, | ||
178 | }; | ||
179 | |||
180 | static struct regulator_consumer_supply igep3_vmmc2_supply = | ||
181 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | ||
182 | |||
183 | static struct regulator_init_data igep3_vmmc2 = { | ||
184 | .constraints = { | ||
185 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
186 | .always_on = 1, | ||
187 | }, | ||
188 | .num_consumer_supplies = 1, | ||
189 | .consumer_supplies = &igep3_vmmc2_supply, | ||
190 | }; | ||
191 | |||
192 | static struct fixed_voltage_config igep3_vwlan = { | ||
193 | .supply_name = "vwlan", | ||
194 | .microvolts = 3300000, | ||
195 | .gpio = -EINVAL, | ||
196 | .enabled_at_boot = 1, | ||
197 | .init_data = &igep3_vmmc2, | ||
198 | }; | ||
199 | |||
200 | static struct platform_device igep3_vwlan_device = { | ||
201 | .name = "reg-fixed-voltage", | ||
202 | .id = 0, | ||
203 | .dev = { | ||
204 | .platform_data = &igep3_vwlan, | ||
205 | }, | ||
206 | }; | ||
207 | |||
162 | static struct omap2_hsmmc_info mmc[] = { | 208 | static struct omap2_hsmmc_info mmc[] = { |
163 | [0] = { | 209 | [0] = { |
164 | .mmc = 1, | 210 | .mmc = 1, |
@@ -254,12 +300,6 @@ static int igep3_twl4030_gpio_setup(struct device *dev, | |||
254 | mmc[0].gpio_cd = gpio + 0; | 300 | mmc[0].gpio_cd = gpio + 0; |
255 | omap2_hsmmc_init(mmc); | 301 | omap2_hsmmc_init(mmc); |
256 | 302 | ||
257 | /* | ||
258 | * link regulators to MMC adapters ... we "know" the | ||
259 | * regulators will be set up only *after* we return. | ||
260 | */ | ||
261 | igep3_vmmc1_supply.dev = mmc[0].dev; | ||
262 | |||
263 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | 303 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ |
264 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) | 304 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) |
265 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) | 305 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) |
@@ -287,6 +327,10 @@ static struct twl4030_usb_data igep3_twl4030_usb_data = { | |||
287 | .usb_mode = T2_USB_MODE_ULPI, | 327 | .usb_mode = T2_USB_MODE_ULPI, |
288 | }; | 328 | }; |
289 | 329 | ||
330 | static struct platform_device *igep3_devices[] __initdata = { | ||
331 | &igep3_vwlan_device, | ||
332 | }; | ||
333 | |||
290 | static void __init igep3_init_irq(void) | 334 | static void __init igep3_init_irq(void) |
291 | { | 335 | { |
292 | omap2_init_common_infrastructure(); | 336 | omap2_init_common_infrastructure(); |
@@ -303,6 +347,7 @@ static struct twl4030_platform_data igep3_twl4030_pdata = { | |||
303 | .usb = &igep3_twl4030_usb_data, | 347 | .usb = &igep3_twl4030_usb_data, |
304 | .gpio = &igep3_twl4030_gpio_pdata, | 348 | .gpio = &igep3_twl4030_gpio_pdata, |
305 | .vmmc1 = &igep3_vmmc1, | 349 | .vmmc1 = &igep3_vmmc1, |
350 | .vio = &igep3_vio, | ||
306 | }; | 351 | }; |
307 | 352 | ||
308 | static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = { | 353 | static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = { |
@@ -363,8 +408,20 @@ static void __init igep3_wifi_bt_init(void) | |||
363 | void __init igep3_wifi_bt_init(void) {} | 408 | void __init igep3_wifi_bt_init(void) {} |
364 | #endif | 409 | #endif |
365 | 410 | ||
411 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | ||
412 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
413 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | ||
414 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
415 | |||
416 | .phy_reset = true, | ||
417 | .reset_gpio_port[0] = -EINVAL, | ||
418 | .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET, | ||
419 | .reset_gpio_port[2] = -EINVAL, | ||
420 | }; | ||
421 | |||
366 | #ifdef CONFIG_OMAP_MUX | 422 | #ifdef CONFIG_OMAP_MUX |
367 | static struct omap_board_mux board_mux[] __initdata = { | 423 | static struct omap_board_mux board_mux[] __initdata = { |
424 | OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
368 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 425 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
369 | }; | 426 | }; |
370 | #endif | 427 | #endif |
@@ -375,9 +432,10 @@ static void __init igep3_init(void) | |||
375 | 432 | ||
376 | /* Register I2C busses and drivers */ | 433 | /* Register I2C busses and drivers */ |
377 | igep3_i2c_init(); | 434 | igep3_i2c_init(); |
378 | 435 | platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices)); | |
379 | omap_serial_init(); | 436 | omap_serial_init(); |
380 | usb_musb_init(&musb_board_data); | 437 | usb_musb_init(&musb_board_data); |
438 | usb_ehci_init(&ehci_pdata); | ||
381 | 439 | ||
382 | igep3_flash_init(); | 440 | igep3_flash_init(); |
383 | igep3_leds_init(); | 441 | igep3_leds_init(); |
@@ -392,6 +450,7 @@ static void __init igep3_init(void) | |||
392 | 450 | ||
393 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") | 451 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") |
394 | .boot_params = 0x80000100, | 452 | .boot_params = 0x80000100, |
453 | .reserve = omap_reserve, | ||
395 | .map_io = omap3_map_io, | 454 | .map_io = omap3_map_io, |
396 | .init_irq = igep3_init_irq, | 455 | .init_irq = igep3_init_irq, |
397 | .init_machine = igep3_init, | 456 | .init_machine = igep3_init, |