diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-08-08 03:41:23 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-08-08 03:41:23 -0400 |
commit | 4791d63bd40ec63c533060707dae0232b9969dc0 (patch) | |
tree | 8e10fe91cea556c10f7d211b65c5f6bdd7ffeb55 /arch/arm/mach-omap2/board-4430sdp.c | |
parent | b3623080ff6974e696710b6c6eb4cdbf2bbab347 (diff) | |
parent | 322a8b034003c0d46d39af85bf24fee27b902f48 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into rmobile-latest
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 341 |
1 files changed, 206 insertions, 135 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 63de2d396e2d..c7cef44c75d4 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/i2c/twl.h> | 22 | #include <linux/i2c/twl.h> |
23 | #include <linux/gpio_keys.h> | 23 | #include <linux/gpio_keys.h> |
24 | #include <linux/regulator/machine.h> | 24 | #include <linux/regulator/machine.h> |
25 | #include <linux/regulator/fixed.h> | ||
25 | #include <linux/leds.h> | 26 | #include <linux/leds.h> |
26 | #include <linux/leds_pwm.h> | 27 | #include <linux/leds_pwm.h> |
27 | 28 | ||
@@ -37,10 +38,10 @@ | |||
37 | #include <plat/mmc.h> | 38 | #include <plat/mmc.h> |
38 | #include <plat/omap4-keypad.h> | 39 | #include <plat/omap4-keypad.h> |
39 | #include <video/omapdss.h> | 40 | #include <video/omapdss.h> |
41 | #include <linux/wl12xx.h> | ||
40 | 42 | ||
41 | #include "mux.h" | 43 | #include "mux.h" |
42 | #include "hsmmc.h" | 44 | #include "hsmmc.h" |
43 | #include "timer-gp.h" | ||
44 | #include "control.h" | 45 | #include "control.h" |
45 | #include "common-board-devices.h" | 46 | #include "common-board-devices.h" |
46 | 47 | ||
@@ -52,6 +53,9 @@ | |||
52 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ | 53 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ |
53 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | 54 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
54 | 55 | ||
56 | #define GPIO_WIFI_PMENA 54 | ||
57 | #define GPIO_WIFI_IRQ 53 | ||
58 | |||
55 | static const int sdp4430_keymap[] = { | 59 | static const int sdp4430_keymap[] = { |
56 | KEY(0, 0, KEY_E), | 60 | KEY(0, 0, KEY_E), |
57 | KEY(0, 1, KEY_R), | 61 | KEY(0, 1, KEY_R), |
@@ -125,6 +129,64 @@ static const int sdp4430_keymap[] = { | |||
125 | KEY(7, 6, KEY_OK), | 129 | KEY(7, 6, KEY_OK), |
126 | KEY(7, 7, KEY_DOWN), | 130 | KEY(7, 7, KEY_DOWN), |
127 | }; | 131 | }; |
132 | static struct omap_device_pad keypad_pads[] __initdata = { | ||
133 | { .name = "kpd_col1.kpd_col1", | ||
134 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
135 | }, | ||
136 | { .name = "kpd_col1.kpd_col1", | ||
137 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
138 | }, | ||
139 | { .name = "kpd_col2.kpd_col2", | ||
140 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
141 | }, | ||
142 | { .name = "kpd_col3.kpd_col3", | ||
143 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
144 | }, | ||
145 | { .name = "kpd_col4.kpd_col4", | ||
146 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
147 | }, | ||
148 | { .name = "kpd_col5.kpd_col5", | ||
149 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
150 | }, | ||
151 | { .name = "gpmc_a23.kpd_col7", | ||
152 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
153 | }, | ||
154 | { .name = "gpmc_a22.kpd_col6", | ||
155 | .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1, | ||
156 | }, | ||
157 | { .name = "kpd_row0.kpd_row0", | ||
158 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
159 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
160 | }, | ||
161 | { .name = "kpd_row1.kpd_row1", | ||
162 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
163 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
164 | }, | ||
165 | { .name = "kpd_row2.kpd_row2", | ||
166 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
167 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
168 | }, | ||
169 | { .name = "kpd_row3.kpd_row3", | ||
170 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
171 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
172 | }, | ||
173 | { .name = "kpd_row4.kpd_row4", | ||
174 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
175 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
176 | }, | ||
177 | { .name = "kpd_row5.kpd_row5", | ||
178 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
179 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
180 | }, | ||
181 | { .name = "gpmc_a18.kpd_row6", | ||
182 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
183 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
184 | }, | ||
185 | { .name = "gpmc_a19.kpd_row7", | ||
186 | .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN | | ||
187 | OMAP_MUX_MODE1 | OMAP_INPUT_EN, | ||
188 | }, | ||
189 | }; | ||
128 | 190 | ||
129 | static struct matrix_keymap_data sdp4430_keymap_data = { | 191 | static struct matrix_keymap_data sdp4430_keymap_data = { |
130 | .keymap = sdp4430_keymap, | 192 | .keymap = sdp4430_keymap, |
@@ -136,6 +198,13 @@ static struct omap4_keypad_platform_data sdp4430_keypad_data = { | |||
136 | .rows = 8, | 198 | .rows = 8, |
137 | .cols = 8, | 199 | .cols = 8, |
138 | }; | 200 | }; |
201 | |||
202 | static struct omap_board_data keypad_data = { | ||
203 | .id = 1, | ||
204 | .pads = keypad_pads, | ||
205 | .pads_cnt = ARRAY_SIZE(keypad_pads), | ||
206 | }; | ||
207 | |||
139 | static struct gpio_led sdp4430_gpio_leds[] = { | 208 | static struct gpio_led sdp4430_gpio_leds[] = { |
140 | { | 209 | { |
141 | .name = "omap4:green:debug0", | 210 | .name = "omap4:green:debug0", |
@@ -276,11 +345,40 @@ static struct platform_device sdp4430_lcd_device = { | |||
276 | .id = -1, | 345 | .id = -1, |
277 | }; | 346 | }; |
278 | 347 | ||
348 | static struct regulator_consumer_supply sdp4430_vbat_supply[] = { | ||
349 | REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), | ||
350 | REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), | ||
351 | }; | ||
352 | |||
353 | static struct regulator_init_data sdp4430_vbat_data = { | ||
354 | .constraints = { | ||
355 | .always_on = 1, | ||
356 | }, | ||
357 | .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply), | ||
358 | .consumer_supplies = sdp4430_vbat_supply, | ||
359 | }; | ||
360 | |||
361 | static struct fixed_voltage_config sdp4430_vbat_pdata = { | ||
362 | .supply_name = "VBAT", | ||
363 | .microvolts = 3750000, | ||
364 | .init_data = &sdp4430_vbat_data, | ||
365 | .gpio = -EINVAL, | ||
366 | }; | ||
367 | |||
368 | static struct platform_device sdp4430_vbat = { | ||
369 | .name = "reg-fixed-voltage", | ||
370 | .id = -1, | ||
371 | .dev = { | ||
372 | .platform_data = &sdp4430_vbat_pdata, | ||
373 | }, | ||
374 | }; | ||
375 | |||
279 | static struct platform_device *sdp4430_devices[] __initdata = { | 376 | static struct platform_device *sdp4430_devices[] __initdata = { |
280 | &sdp4430_lcd_device, | 377 | &sdp4430_lcd_device, |
281 | &sdp4430_gpio_keys_device, | 378 | &sdp4430_gpio_keys_device, |
282 | &sdp4430_leds_gpio, | 379 | &sdp4430_leds_gpio, |
283 | &sdp4430_leds_pwm, | 380 | &sdp4430_leds_pwm, |
381 | &sdp4430_vbat, | ||
284 | }; | 382 | }; |
285 | 383 | ||
286 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { | 384 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { |
@@ -295,9 +393,6 @@ static void __init omap_4430sdp_init_early(void) | |||
295 | { | 393 | { |
296 | omap2_init_common_infrastructure(); | 394 | omap2_init_common_infrastructure(); |
297 | omap2_init_common_devices(NULL, NULL); | 395 | omap2_init_common_devices(NULL, NULL); |
298 | #ifdef CONFIG_OMAP_32K_TIMER | ||
299 | omap2_gp_clockevent_set_gptimer(1); | ||
300 | #endif | ||
301 | } | 396 | } |
302 | 397 | ||
303 | static struct omap_musb_board_data musb_board_data = { | 398 | static struct omap_musb_board_data musb_board_data = { |
@@ -306,14 +401,6 @@ static struct omap_musb_board_data musb_board_data = { | |||
306 | .power = 100, | 401 | .power = 100, |
307 | }; | 402 | }; |
308 | 403 | ||
309 | static struct twl4030_usb_data omap4_usbphy_data = { | ||
310 | .phy_init = omap4430_phy_init, | ||
311 | .phy_exit = omap4430_phy_exit, | ||
312 | .phy_power = omap4430_phy_power, | ||
313 | .phy_set_clock = omap4430_phy_set_clk, | ||
314 | .phy_suspend = omap4430_phy_suspend, | ||
315 | }; | ||
316 | |||
317 | static struct omap2_hsmmc_info mmc[] = { | 404 | static struct omap2_hsmmc_info mmc[] = { |
318 | { | 405 | { |
319 | .mmc = 2, | 406 | .mmc = 2, |
@@ -327,21 +414,52 @@ static struct omap2_hsmmc_info mmc[] = { | |||
327 | { | 414 | { |
328 | .mmc = 1, | 415 | .mmc = 1, |
329 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | 416 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
417 | .gpio_cd = -EINVAL, | ||
330 | .gpio_wp = -EINVAL, | 418 | .gpio_wp = -EINVAL, |
331 | }, | 419 | }, |
420 | { | ||
421 | .mmc = 5, | ||
422 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
423 | .gpio_cd = -EINVAL, | ||
424 | .gpio_wp = -EINVAL, | ||
425 | .ocr_mask = MMC_VDD_165_195, | ||
426 | .nonremovable = true, | ||
427 | }, | ||
332 | {} /* Terminator */ | 428 | {} /* Terminator */ |
333 | }; | 429 | }; |
334 | 430 | ||
335 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { | 431 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { |
336 | { | 432 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
337 | .supply = "vmmc", | 433 | }; |
338 | .dev_name = "omap_hsmmc.1", | 434 | |
435 | static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = { | ||
436 | .supply = "vmmc", | ||
437 | .dev_name = "omap_hsmmc.4", | ||
438 | }; | ||
439 | |||
440 | static struct regulator_init_data sdp4430_vmmc5 = { | ||
441 | .constraints = { | ||
442 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
339 | }, | 443 | }, |
444 | .num_consumer_supplies = 1, | ||
445 | .consumer_supplies = &omap4_sdp4430_vmmc5_supply, | ||
340 | }; | 446 | }; |
341 | static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { | 447 | |
342 | { | 448 | static struct fixed_voltage_config sdp4430_vwlan = { |
343 | .supply = "vmmc", | 449 | .supply_name = "vwl1271", |
344 | .dev_name = "omap_hsmmc.0", | 450 | .microvolts = 1800000, /* 1.8V */ |
451 | .gpio = GPIO_WIFI_PMENA, | ||
452 | .startup_delay = 70000, /* 70msec */ | ||
453 | .enable_high = 1, | ||
454 | .enabled_at_boot = 0, | ||
455 | .init_data = &sdp4430_vmmc5, | ||
456 | }; | ||
457 | |||
458 | static struct platform_device omap_vwlan_device = { | ||
459 | .name = "reg-fixed-voltage", | ||
460 | .id = 1, | ||
461 | .dev = { | ||
462 | .platform_data = &sdp4430_vwlan, | ||
345 | }, | 463 | }, |
346 | }; | 464 | }; |
347 | 465 | ||
@@ -399,65 +517,10 @@ static struct regulator_init_data sdp4430_vaux1 = { | |||
399 | | REGULATOR_CHANGE_MODE | 517 | | REGULATOR_CHANGE_MODE |
400 | | REGULATOR_CHANGE_STATUS, | 518 | | REGULATOR_CHANGE_STATUS, |
401 | }, | 519 | }, |
402 | .num_consumer_supplies = 1, | 520 | .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply), |
403 | .consumer_supplies = sdp4430_vaux_supply, | 521 | .consumer_supplies = sdp4430_vaux_supply, |
404 | }; | 522 | }; |
405 | 523 | ||
406 | static struct regulator_init_data sdp4430_vaux2 = { | ||
407 | .constraints = { | ||
408 | .min_uV = 1200000, | ||
409 | .max_uV = 2800000, | ||
410 | .apply_uV = true, | ||
411 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
412 | | REGULATOR_MODE_STANDBY, | ||
413 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
414 | | REGULATOR_CHANGE_MODE | ||
415 | | REGULATOR_CHANGE_STATUS, | ||
416 | }, | ||
417 | }; | ||
418 | |||
419 | static struct regulator_init_data sdp4430_vaux3 = { | ||
420 | .constraints = { | ||
421 | .min_uV = 1000000, | ||
422 | .max_uV = 3000000, | ||
423 | .apply_uV = true, | ||
424 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
425 | | REGULATOR_MODE_STANDBY, | ||
426 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
427 | | REGULATOR_CHANGE_MODE | ||
428 | | REGULATOR_CHANGE_STATUS, | ||
429 | }, | ||
430 | }; | ||
431 | |||
432 | /* VMMC1 for MMC1 card */ | ||
433 | static struct regulator_init_data sdp4430_vmmc = { | ||
434 | .constraints = { | ||
435 | .min_uV = 1200000, | ||
436 | .max_uV = 3000000, | ||
437 | .apply_uV = true, | ||
438 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
439 | | REGULATOR_MODE_STANDBY, | ||
440 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
441 | | REGULATOR_CHANGE_MODE | ||
442 | | REGULATOR_CHANGE_STATUS, | ||
443 | }, | ||
444 | .num_consumer_supplies = 1, | ||
445 | .consumer_supplies = sdp4430_vmmc_supply, | ||
446 | }; | ||
447 | |||
448 | static struct regulator_init_data sdp4430_vpp = { | ||
449 | .constraints = { | ||
450 | .min_uV = 1800000, | ||
451 | .max_uV = 2500000, | ||
452 | .apply_uV = true, | ||
453 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
454 | | REGULATOR_MODE_STANDBY, | ||
455 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
456 | | REGULATOR_CHANGE_MODE | ||
457 | | REGULATOR_CHANGE_STATUS, | ||
458 | }, | ||
459 | }; | ||
460 | |||
461 | static struct regulator_init_data sdp4430_vusim = { | 524 | static struct regulator_init_data sdp4430_vusim = { |
462 | .constraints = { | 525 | .constraints = { |
463 | .min_uV = 1200000, | 526 | .min_uV = 1200000, |
@@ -471,74 +534,36 @@ static struct regulator_init_data sdp4430_vusim = { | |||
471 | }, | 534 | }, |
472 | }; | 535 | }; |
473 | 536 | ||
474 | static struct regulator_init_data sdp4430_vana = { | 537 | static struct twl4030_codec_data twl6040_codec = { |
475 | .constraints = { | 538 | /* single-step ramp for headset and handsfree */ |
476 | .min_uV = 2100000, | 539 | .hs_left_step = 0x0f, |
477 | .max_uV = 2100000, | 540 | .hs_right_step = 0x0f, |
478 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 541 | .hf_left_step = 0x1d, |
479 | | REGULATOR_MODE_STANDBY, | 542 | .hf_right_step = 0x1d, |
480 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
481 | | REGULATOR_CHANGE_STATUS, | ||
482 | }, | ||
483 | }; | ||
484 | |||
485 | static struct regulator_init_data sdp4430_vcxio = { | ||
486 | .constraints = { | ||
487 | .min_uV = 1800000, | ||
488 | .max_uV = 1800000, | ||
489 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
490 | | REGULATOR_MODE_STANDBY, | ||
491 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
492 | | REGULATOR_CHANGE_STATUS, | ||
493 | }, | ||
494 | }; | 543 | }; |
495 | 544 | ||
496 | static struct regulator_init_data sdp4430_vdac = { | 545 | static struct twl4030_vibra_data twl6040_vibra = { |
497 | .constraints = { | 546 | .vibldrv_res = 8, |
498 | .min_uV = 1800000, | 547 | .vibrdrv_res = 3, |
499 | .max_uV = 1800000, | 548 | .viblmotor_res = 10, |
500 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 549 | .vibrmotor_res = 10, |
501 | | REGULATOR_MODE_STANDBY, | 550 | .vddvibl_uV = 0, /* fixed volt supply - VBAT */ |
502 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 551 | .vddvibr_uV = 0, /* fixed volt supply - VBAT */ |
503 | | REGULATOR_CHANGE_STATUS, | ||
504 | }, | ||
505 | }; | 552 | }; |
506 | 553 | ||
507 | static struct regulator_init_data sdp4430_vusb = { | 554 | static struct twl4030_audio_data twl6040_audio = { |
508 | .constraints = { | 555 | .codec = &twl6040_codec, |
509 | .min_uV = 3300000, | 556 | .vibra = &twl6040_vibra, |
510 | .max_uV = 3300000, | 557 | .audpwron_gpio = 127, |
511 | .apply_uV = true, | 558 | .naudint_irq = OMAP44XX_IRQ_SYS_2N, |
512 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 559 | .irq_base = TWL6040_CODEC_IRQ_BASE, |
513 | | REGULATOR_MODE_STANDBY, | ||
514 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
515 | | REGULATOR_CHANGE_STATUS, | ||
516 | }, | ||
517 | }; | ||
518 | |||
519 | static struct regulator_init_data sdp4430_clk32kg = { | ||
520 | .constraints = { | ||
521 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
522 | }, | ||
523 | }; | 560 | }; |
524 | 561 | ||
525 | static struct twl4030_platform_data sdp4430_twldata = { | 562 | static struct twl4030_platform_data sdp4430_twldata = { |
526 | .irq_base = TWL6030_IRQ_BASE, | 563 | .audio = &twl6040_audio, |
527 | .irq_end = TWL6030_IRQ_END, | ||
528 | |||
529 | /* Regulators */ | 564 | /* Regulators */ |
530 | .vmmc = &sdp4430_vmmc, | ||
531 | .vpp = &sdp4430_vpp, | ||
532 | .vusim = &sdp4430_vusim, | 565 | .vusim = &sdp4430_vusim, |
533 | .vana = &sdp4430_vana, | ||
534 | .vcxio = &sdp4430_vcxio, | ||
535 | .vdac = &sdp4430_vdac, | ||
536 | .vusb = &sdp4430_vusb, | ||
537 | .vaux1 = &sdp4430_vaux1, | 566 | .vaux1 = &sdp4430_vaux1, |
538 | .vaux2 = &sdp4430_vaux2, | ||
539 | .vaux3 = &sdp4430_vaux3, | ||
540 | .clk32kg = &sdp4430_clk32kg, | ||
541 | .usb = &omap4_usbphy_data | ||
542 | }; | 567 | }; |
543 | 568 | ||
544 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { | 569 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { |
@@ -556,6 +581,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { | |||
556 | }; | 581 | }; |
557 | static int __init omap4_i2c_init(void) | 582 | static int __init omap4_i2c_init(void) |
558 | { | 583 | { |
584 | omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB, | ||
585 | TWL_COMMON_REGULATOR_VDAC | | ||
586 | TWL_COMMON_REGULATOR_VAUX2 | | ||
587 | TWL_COMMON_REGULATOR_VAUX3 | | ||
588 | TWL_COMMON_REGULATOR_VMMC | | ||
589 | TWL_COMMON_REGULATOR_VPP | | ||
590 | TWL_COMMON_REGULATOR_VANA | | ||
591 | TWL_COMMON_REGULATOR_VCXIO | | ||
592 | TWL_COMMON_REGULATOR_VUSB | | ||
593 | TWL_COMMON_REGULATOR_CLK32KG); | ||
559 | omap4_pmic_init("twl6030", &sdp4430_twldata); | 594 | omap4_pmic_init("twl6030", &sdp4430_twldata); |
560 | omap_register_i2c_bus(2, 400, NULL, 0); | 595 | omap_register_i2c_bus(2, 400, NULL, 0); |
561 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, | 596 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, |
@@ -723,6 +758,41 @@ static inline void board_serial_init(void) | |||
723 | } | 758 | } |
724 | #endif | 759 | #endif |
725 | 760 | ||
761 | static void omap4_sdp4430_wifi_mux_init(void) | ||
762 | { | ||
763 | omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | | ||
764 | OMAP_PIN_OFF_WAKEUPENABLE); | ||
765 | omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT); | ||
766 | |||
767 | omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd", | ||
768 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); | ||
769 | omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk", | ||
770 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); | ||
771 | omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0", | ||
772 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); | ||
773 | omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1", | ||
774 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); | ||
775 | omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2", | ||
776 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); | ||
777 | omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3", | ||
778 | OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP); | ||
779 | |||
780 | } | ||
781 | |||
782 | static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = { | ||
783 | .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ), | ||
784 | .board_ref_clock = WL12XX_REFCLOCK_26, | ||
785 | .board_tcxo_clock = WL12XX_TCXOCLOCK_26, | ||
786 | }; | ||
787 | |||
788 | static void omap4_sdp4430_wifi_init(void) | ||
789 | { | ||
790 | omap4_sdp4430_wifi_mux_init(); | ||
791 | if (wl12xx_set_platform_data(&omap4_sdp4430_wlan_data)) | ||
792 | pr_err("Error setting wl12xx data\n"); | ||
793 | platform_device_register(&omap_vwlan_device); | ||
794 | } | ||
795 | |||
726 | static void __init omap_4430sdp_init(void) | 796 | static void __init omap_4430sdp_init(void) |
727 | { | 797 | { |
728 | int status; | 798 | int status; |
@@ -739,6 +809,7 @@ static void __init omap_4430sdp_init(void) | |||
739 | omap_sfh7741prox_init(); | 809 | omap_sfh7741prox_init(); |
740 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); | 810 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); |
741 | board_serial_init(); | 811 | board_serial_init(); |
812 | omap4_sdp4430_wifi_init(); | ||
742 | omap4_twl6030_hsmmc_init(mmc); | 813 | omap4_twl6030_hsmmc_init(mmc); |
743 | 814 | ||
744 | usb_musb_init(&musb_board_data); | 815 | usb_musb_init(&musb_board_data); |
@@ -752,7 +823,7 @@ static void __init omap_4430sdp_init(void) | |||
752 | ARRAY_SIZE(sdp4430_spi_board_info)); | 823 | ARRAY_SIZE(sdp4430_spi_board_info)); |
753 | } | 824 | } |
754 | 825 | ||
755 | status = omap4_keyboard_init(&sdp4430_keypad_data); | 826 | status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data); |
756 | if (status) | 827 | if (status) |
757 | pr_err("Keypad initialization failed: %d\n", status); | 828 | pr_err("Keypad initialization failed: %d\n", status); |
758 | 829 | ||
@@ -773,5 +844,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") | |||
773 | .init_early = omap_4430sdp_init_early, | 844 | .init_early = omap_4430sdp_init_early, |
774 | .init_irq = gic_init_irq, | 845 | .init_irq = gic_init_irq, |
775 | .init_machine = omap_4430sdp_init, | 846 | .init_machine = omap_4430sdp_init, |
776 | .timer = &omap_timer, | 847 | .timer = &omap4_timer, |
777 | MACHINE_END | 848 | MACHINE_END |