diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 22:28:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 22:28:15 -0400 |
commit | 0df0914d414a504b975f3cc66ace0c16ef55b7f3 (patch) | |
tree | c97ffa357943a8b226cdec1b9632c4cede813205 /arch/arm/mach-omap2/board-omap4panda.c | |
parent | 6899608533410557e6698cb9d4ff6df553916e98 (diff) | |
parent | 05f689400ea5fa3d71af82f910c8b140f87ad1f3 (diff) |
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (258 commits)
omap: zoom: host should not pull up wl1271's irq line
arm: plat-omap: iommu: fix request_mem_region() error path
OMAP2+: Common CPU DIE ID reading code reads wrong registers for OMAP4430
omap4: mux: Remove duplicate mux modes
omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag
omap: iovmm: disallow mapping NULL address when IOVMF_DA_ANON is set
omap2+: mux: Fix compile when CONFIG_OMAP_MUX is not selected
omap4: board-omap4panda: Initialise the serial pads
omap3: board-3430sdp: Initialise the serial pads
omap4: board-4430sdp: Initialise the serial pads
omap2+: mux: Add macro for configuring static with omap_hwmod_mux_init
omap2+: mux: Remove the use of IDLE flag
omap2+: Add separate list for dynamic pads to mux
perf: add OMAP support for the new power events
OMAP4: Add IVA OPP enteries.
OMAP4: Update Voltage Rail Values for MPU, IVA and CORE
OMAP4: Enable 800 MHz and 1 GHz MPU-OPP
OMAP3+: OPP: Replace voltage values with Macros
OMAP3: wdtimer: Fix CORE idle transition
Watchdog: omap_wdt: add fine grain runtime-pm
...
Fix up various conflicts in
- arch/arm/mach-omap2/board-omap3evm.c
- arch/arm/mach-omap2/clock3xxx_data.c
- arch/arm/mach-omap2/usb-musb.c
- arch/arm/plat-omap/include/plat/usb.h
- drivers/usb/musb/musb_core.h
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 158 |
1 files changed, 150 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index ed61c1f5d5e6..0f4d8a762a70 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/usb/otg.h> | 26 | #include <linux/usb/otg.h> |
27 | #include <linux/i2c/twl.h> | 27 | #include <linux/i2c/twl.h> |
28 | #include <linux/regulator/machine.h> | 28 | #include <linux/regulator/machine.h> |
29 | #include <linux/regulator/fixed.h> | ||
30 | #include <linux/wl12xx.h> | ||
29 | 31 | ||
30 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
31 | #include <mach/omap4-common.h> | 33 | #include <mach/omap4-common.h> |
@@ -45,6 +47,18 @@ | |||
45 | 47 | ||
46 | #define GPIO_HUB_POWER 1 | 48 | #define GPIO_HUB_POWER 1 |
47 | #define GPIO_HUB_NRESET 62 | 49 | #define GPIO_HUB_NRESET 62 |
50 | #define GPIO_WIFI_PMENA 43 | ||
51 | #define GPIO_WIFI_IRQ 53 | ||
52 | |||
53 | /* wl127x BT, FM, GPS connectivity chip */ | ||
54 | static int wl1271_gpios[] = {46, -1, -1}; | ||
55 | static struct platform_device wl1271_device = { | ||
56 | .name = "kim", | ||
57 | .id = -1, | ||
58 | .dev = { | ||
59 | .platform_data = &wl1271_gpios, | ||
60 | }, | ||
61 | }; | ||
48 | 62 | ||
49 | static struct gpio_led gpio_leds[] = { | 63 | static struct gpio_led gpio_leds[] = { |
50 | { | 64 | { |
@@ -74,13 +88,13 @@ static struct platform_device leds_gpio = { | |||
74 | 88 | ||
75 | static struct platform_device *panda_devices[] __initdata = { | 89 | static struct platform_device *panda_devices[] __initdata = { |
76 | &leds_gpio, | 90 | &leds_gpio, |
91 | &wl1271_device, | ||
77 | }; | 92 | }; |
78 | 93 | ||
79 | static void __init omap4_panda_init_irq(void) | 94 | static void __init omap4_panda_init_early(void) |
80 | { | 95 | { |
81 | omap2_init_common_infrastructure(); | 96 | omap2_init_common_infrastructure(); |
82 | omap2_init_common_devices(NULL, NULL); | 97 | omap2_init_common_devices(NULL, NULL); |
83 | gic_init_irq(); | ||
84 | } | 98 | } |
85 | 99 | ||
86 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 100 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { |
@@ -163,16 +177,62 @@ static struct omap2_hsmmc_info mmc[] = { | |||
163 | .gpio_wp = -EINVAL, | 177 | .gpio_wp = -EINVAL, |
164 | .gpio_cd = -EINVAL, | 178 | .gpio_cd = -EINVAL, |
165 | }, | 179 | }, |
180 | { | ||
181 | .name = "wl1271", | ||
182 | .mmc = 5, | ||
183 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
184 | .gpio_wp = -EINVAL, | ||
185 | .gpio_cd = -EINVAL, | ||
186 | .ocr_mask = MMC_VDD_165_195, | ||
187 | .nonremovable = true, | ||
188 | }, | ||
166 | {} /* Terminator */ | 189 | {} /* Terminator */ |
167 | }; | 190 | }; |
168 | 191 | ||
169 | static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { | 192 | static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { |
170 | { | 193 | { |
171 | .supply = "vmmc", | 194 | .supply = "vmmc", |
172 | .dev_name = "mmci-omap-hs.0", | 195 | .dev_name = "omap_hsmmc.0", |
173 | }, | 196 | }, |
174 | }; | 197 | }; |
175 | 198 | ||
199 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply = { | ||
200 | .supply = "vmmc", | ||
201 | .dev_name = "omap_hsmmc.4", | ||
202 | }; | ||
203 | |||
204 | static struct regulator_init_data panda_vmmc5 = { | ||
205 | .constraints = { | ||
206 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
207 | }, | ||
208 | .num_consumer_supplies = 1, | ||
209 | .consumer_supplies = &omap4_panda_vmmc5_supply, | ||
210 | }; | ||
211 | |||
212 | static struct fixed_voltage_config panda_vwlan = { | ||
213 | .supply_name = "vwl1271", | ||
214 | .microvolts = 1800000, /* 1.8V */ | ||
215 | .gpio = GPIO_WIFI_PMENA, | ||
216 | .startup_delay = 70000, /* 70msec */ | ||
217 | .enable_high = 1, | ||
218 | .enabled_at_boot = 0, | ||
219 | .init_data = &panda_vmmc5, | ||
220 | }; | ||
221 | |||
222 | static struct platform_device omap_vwlan_device = { | ||
223 | .name = "reg-fixed-voltage", | ||
224 | .id = 1, | ||
225 | .dev = { | ||
226 | .platform_data = &panda_vwlan, | ||
227 | }, | ||
228 | }; | ||
229 | |||
230 | struct wl12xx_platform_data omap_panda_wlan_data __initdata = { | ||
231 | .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ), | ||
232 | /* PANDA ref clock is 38.4 MHz */ | ||
233 | .board_ref_clock = 2, | ||
234 | }; | ||
235 | |||
176 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | 236 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
177 | { | 237 | { |
178 | int ret = 0; | 238 | int ret = 0; |
@@ -306,7 +366,6 @@ static struct regulator_init_data omap4_panda_vana = { | |||
306 | .constraints = { | 366 | .constraints = { |
307 | .min_uV = 2100000, | 367 | .min_uV = 2100000, |
308 | .max_uV = 2100000, | 368 | .max_uV = 2100000, |
309 | .apply_uV = true, | ||
310 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 369 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
311 | | REGULATOR_MODE_STANDBY, | 370 | | REGULATOR_MODE_STANDBY, |
312 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 371 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -318,7 +377,6 @@ static struct regulator_init_data omap4_panda_vcxio = { | |||
318 | .constraints = { | 377 | .constraints = { |
319 | .min_uV = 1800000, | 378 | .min_uV = 1800000, |
320 | .max_uV = 1800000, | 379 | .max_uV = 1800000, |
321 | .apply_uV = true, | ||
322 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 380 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
323 | | REGULATOR_MODE_STANDBY, | 381 | | REGULATOR_MODE_STANDBY, |
324 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 382 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -330,7 +388,6 @@ static struct regulator_init_data omap4_panda_vdac = { | |||
330 | .constraints = { | 388 | .constraints = { |
331 | .min_uV = 1800000, | 389 | .min_uV = 1800000, |
332 | .max_uV = 1800000, | 390 | .max_uV = 1800000, |
333 | .apply_uV = true, | ||
334 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 391 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
335 | | REGULATOR_MODE_STANDBY, | 392 | | REGULATOR_MODE_STANDBY, |
336 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 393 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -392,10 +449,90 @@ static int __init omap4_panda_i2c_init(void) | |||
392 | 449 | ||
393 | #ifdef CONFIG_OMAP_MUX | 450 | #ifdef CONFIG_OMAP_MUX |
394 | static struct omap_board_mux board_mux[] __initdata = { | 451 | static struct omap_board_mux board_mux[] __initdata = { |
452 | /* WLAN IRQ - GPIO 53 */ | ||
453 | OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), | ||
454 | /* WLAN POWER ENABLE - GPIO 43 */ | ||
455 | OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT), | ||
456 | /* WLAN SDIO: MMC5 CMD */ | ||
457 | OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
458 | /* WLAN SDIO: MMC5 CLK */ | ||
459 | OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
460 | /* WLAN SDIO: MMC5 DAT[0-3] */ | ||
461 | OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
462 | OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
463 | OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
464 | OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
395 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 465 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
396 | }; | 466 | }; |
467 | |||
468 | static struct omap_device_pad serial2_pads[] __initdata = { | ||
469 | OMAP_MUX_STATIC("uart2_cts.uart2_cts", | ||
470 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), | ||
471 | OMAP_MUX_STATIC("uart2_rts.uart2_rts", | ||
472 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
473 | OMAP_MUX_STATIC("uart2_rx.uart2_rx", | ||
474 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), | ||
475 | OMAP_MUX_STATIC("uart2_tx.uart2_tx", | ||
476 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
477 | }; | ||
478 | |||
479 | static struct omap_device_pad serial3_pads[] __initdata = { | ||
480 | OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx", | ||
481 | OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), | ||
482 | OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd", | ||
483 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
484 | OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx", | ||
485 | OMAP_PIN_INPUT | OMAP_MUX_MODE0), | ||
486 | OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx", | ||
487 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
488 | }; | ||
489 | |||
490 | static struct omap_device_pad serial4_pads[] __initdata = { | ||
491 | OMAP_MUX_STATIC("uart4_rx.uart4_rx", | ||
492 | OMAP_PIN_INPUT | OMAP_MUX_MODE0), | ||
493 | OMAP_MUX_STATIC("uart4_tx.uart4_tx", | ||
494 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | ||
495 | }; | ||
496 | |||
497 | static struct omap_board_data serial2_data = { | ||
498 | .id = 1, | ||
499 | .pads = serial2_pads, | ||
500 | .pads_cnt = ARRAY_SIZE(serial2_pads), | ||
501 | }; | ||
502 | |||
503 | static struct omap_board_data serial3_data = { | ||
504 | .id = 2, | ||
505 | .pads = serial3_pads, | ||
506 | .pads_cnt = ARRAY_SIZE(serial3_pads), | ||
507 | }; | ||
508 | |||
509 | static struct omap_board_data serial4_data = { | ||
510 | .id = 3, | ||
511 | .pads = serial4_pads, | ||
512 | .pads_cnt = ARRAY_SIZE(serial4_pads), | ||
513 | }; | ||
514 | |||
515 | static inline void board_serial_init(void) | ||
516 | { | ||
517 | struct omap_board_data bdata; | ||
518 | bdata.flags = 0; | ||
519 | bdata.pads = NULL; | ||
520 | bdata.pads_cnt = 0; | ||
521 | bdata.id = 0; | ||
522 | /* pass dummy data for UART1 */ | ||
523 | omap_serial_init_port(&bdata); | ||
524 | |||
525 | omap_serial_init_port(&serial2_data); | ||
526 | omap_serial_init_port(&serial3_data); | ||
527 | omap_serial_init_port(&serial4_data); | ||
528 | } | ||
397 | #else | 529 | #else |
398 | #define board_mux NULL | 530 | #define board_mux NULL |
531 | |||
532 | static inline void board_serial_init(void) | ||
533 | { | ||
534 | omap_serial_init(); | ||
535 | } | ||
399 | #endif | 536 | #endif |
400 | 537 | ||
401 | static void __init omap4_panda_init(void) | 538 | static void __init omap4_panda_init(void) |
@@ -406,9 +543,13 @@ static void __init omap4_panda_init(void) | |||
406 | package = OMAP_PACKAGE_CBL; | 543 | package = OMAP_PACKAGE_CBL; |
407 | omap4_mux_init(board_mux, package); | 544 | omap4_mux_init(board_mux, package); |
408 | 545 | ||
546 | if (wl12xx_set_platform_data(&omap_panda_wlan_data)) | ||
547 | pr_err("error setting wl12xx data\n"); | ||
548 | |||
409 | omap4_panda_i2c_init(); | 549 | omap4_panda_i2c_init(); |
410 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | 550 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
411 | omap_serial_init(); | 551 | platform_device_register(&omap_vwlan_device); |
552 | board_serial_init(); | ||
412 | omap4_twl6030_hsmmc_init(mmc); | 553 | omap4_twl6030_hsmmc_init(mmc); |
413 | omap4_ehci_init(); | 554 | omap4_ehci_init(); |
414 | usb_musb_init(&musb_board_data); | 555 | usb_musb_init(&musb_board_data); |
@@ -425,7 +566,8 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") | |||
425 | .boot_params = 0x80000100, | 566 | .boot_params = 0x80000100, |
426 | .reserve = omap_reserve, | 567 | .reserve = omap_reserve, |
427 | .map_io = omap4_panda_map_io, | 568 | .map_io = omap4_panda_map_io, |
428 | .init_irq = omap4_panda_init_irq, | 569 | .init_early = omap4_panda_init_early, |
570 | .init_irq = gic_init_irq, | ||
429 | .init_machine = omap4_panda_init, | 571 | .init_machine = omap4_panda_init, |
430 | .timer = &omap_timer, | 572 | .timer = &omap_timer, |
431 | MACHINE_END | 573 | MACHINE_END |