diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3evm.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 246 |
1 files changed, 208 insertions, 38 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 323c3809ce39..b65848c59e1d 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | #include <linux/usb/otg.h> | 30 | #include <linux/usb/otg.h> |
| 31 | #include <linux/smsc911x.h> | 31 | #include <linux/smsc911x.h> |
| 32 | 32 | ||
| 33 | #include <linux/wl12xx.h> | ||
| 34 | #include <linux/regulator/fixed.h> | ||
| 33 | #include <linux/regulator/machine.h> | 35 | #include <linux/regulator/machine.h> |
| 34 | #include <linux/mmc/host.h> | 36 | #include <linux/mmc/host.h> |
| 35 | 37 | ||
| @@ -58,6 +60,13 @@ | |||
| 58 | #define OMAP3EVM_ETHR_ID_REV 0x50 | 60 | #define OMAP3EVM_ETHR_ID_REV 0x50 |
| 59 | #define OMAP3EVM_ETHR_GPIO_IRQ 176 | 61 | #define OMAP3EVM_ETHR_GPIO_IRQ 176 |
| 60 | #define OMAP3EVM_SMSC911X_CS 5 | 62 | #define OMAP3EVM_SMSC911X_CS 5 |
| 63 | /* | ||
| 64 | * Eth Reset signal | ||
| 65 | * 64 = Generation 1 (<=RevD) | ||
| 66 | * 7 = Generation 2 (>=RevE) | ||
| 67 | */ | ||
| 68 | #define OMAP3EVM_GEN1_ETHR_GPIO_RST 64 | ||
| 69 | #define OMAP3EVM_GEN2_ETHR_GPIO_RST 7 | ||
| 61 | 70 | ||
| 62 | static u8 omap3_evm_version; | 71 | static u8 omap3_evm_version; |
| 63 | 72 | ||
| @@ -124,10 +133,15 @@ static struct platform_device omap3evm_smsc911x_device = { | |||
| 124 | 133 | ||
| 125 | static inline void __init omap3evm_init_smsc911x(void) | 134 | static inline void __init omap3evm_init_smsc911x(void) |
| 126 | { | 135 | { |
| 127 | int eth_cs; | 136 | int eth_cs, eth_rst; |
| 128 | struct clk *l3ck; | 137 | struct clk *l3ck; |
| 129 | unsigned int rate; | 138 | unsigned int rate; |
| 130 | 139 | ||
| 140 | if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) | ||
| 141 | eth_rst = OMAP3EVM_GEN1_ETHR_GPIO_RST; | ||
| 142 | else | ||
| 143 | eth_rst = OMAP3EVM_GEN2_ETHR_GPIO_RST; | ||
| 144 | |||
| 131 | eth_cs = OMAP3EVM_SMSC911X_CS; | 145 | eth_cs = OMAP3EVM_SMSC911X_CS; |
| 132 | 146 | ||
| 133 | l3ck = clk_get(NULL, "l3_ck"); | 147 | l3ck = clk_get(NULL, "l3_ck"); |
| @@ -136,6 +150,27 @@ static inline void __init omap3evm_init_smsc911x(void) | |||
| 136 | else | 150 | else |
| 137 | rate = clk_get_rate(l3ck); | 151 | rate = clk_get_rate(l3ck); |
| 138 | 152 | ||
| 153 | /* Configure ethernet controller reset gpio */ | ||
| 154 | if (cpu_is_omap3430()) { | ||
| 155 | if (gpio_request(eth_rst, "SMSC911x gpio") < 0) { | ||
| 156 | pr_err(KERN_ERR "Failed to request %d for smsc911x\n", | ||
| 157 | eth_rst); | ||
| 158 | return; | ||
| 159 | } | ||
| 160 | |||
| 161 | if (gpio_direction_output(eth_rst, 1) < 0) { | ||
| 162 | pr_err(KERN_ERR "Failed to set direction of %d for" \ | ||
| 163 | " smsc911x\n", eth_rst); | ||
| 164 | return; | ||
| 165 | } | ||
| 166 | /* reset pulse to ethernet controller*/ | ||
| 167 | usleep_range(150, 220); | ||
| 168 | gpio_set_value(eth_rst, 0); | ||
| 169 | usleep_range(150, 220); | ||
| 170 | gpio_set_value(eth_rst, 1); | ||
| 171 | usleep_range(1, 2); | ||
| 172 | } | ||
| 173 | |||
| 139 | if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) { | 174 | if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) { |
| 140 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", | 175 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", |
| 141 | OMAP3EVM_ETHR_GPIO_IRQ); | 176 | OMAP3EVM_ETHR_GPIO_IRQ); |
| @@ -235,9 +270,9 @@ static int omap3_evm_enable_lcd(struct omap_dss_device *dssdev) | |||
| 235 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0); | 270 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0); |
| 236 | 271 | ||
| 237 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | 272 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) |
| 238 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); | 273 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); |
| 239 | else | 274 | else |
| 240 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); | 275 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); |
| 241 | 276 | ||
| 242 | lcd_enabled = 1; | 277 | lcd_enabled = 1; |
| 243 | return 0; | 278 | return 0; |
| @@ -248,9 +283,9 @@ static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev) | |||
| 248 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1); | 283 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1); |
| 249 | 284 | ||
| 250 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | 285 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) |
| 251 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); | 286 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); |
| 252 | else | 287 | else |
| 253 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); | 288 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); |
| 254 | 289 | ||
| 255 | lcd_enabled = 0; | 290 | lcd_enabled = 0; |
| 256 | } | 291 | } |
| @@ -289,7 +324,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) | |||
| 289 | return -EINVAL; | 324 | return -EINVAL; |
| 290 | } | 325 | } |
| 291 | 326 | ||
| 292 | gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); | 327 | gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); |
| 293 | 328 | ||
| 294 | dvi_enabled = 1; | 329 | dvi_enabled = 1; |
| 295 | return 0; | 330 | return 0; |
| @@ -297,7 +332,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) | |||
| 297 | 332 | ||
| 298 | static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) | 333 | static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) |
| 299 | { | 334 | { |
| 300 | gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); | 335 | gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); |
| 301 | 336 | ||
| 302 | dvi_enabled = 0; | 337 | dvi_enabled = 0; |
| 303 | } | 338 | } |
| @@ -328,14 +363,6 @@ static struct omap_dss_board_info omap3_evm_dss_data = { | |||
| 328 | .default_device = &omap3_evm_lcd_device, | 363 | .default_device = &omap3_evm_lcd_device, |
| 329 | }; | 364 | }; |
| 330 | 365 | ||
| 331 | static struct platform_device omap3_evm_dss_device = { | ||
| 332 | .name = "omapdss", | ||
| 333 | .id = -1, | ||
| 334 | .dev = { | ||
| 335 | .platform_data = &omap3_evm_dss_data, | ||
| 336 | }, | ||
| 337 | }; | ||
| 338 | |||
| 339 | static struct regulator_consumer_supply omap3evm_vmmc1_supply = { | 366 | static struct regulator_consumer_supply omap3evm_vmmc1_supply = { |
| 340 | .supply = "vmmc", | 367 | .supply = "vmmc", |
| 341 | }; | 368 | }; |
| @@ -381,6 +408,16 @@ static struct omap2_hsmmc_info mmc[] = { | |||
| 381 | .gpio_cd = -EINVAL, | 408 | .gpio_cd = -EINVAL, |
| 382 | .gpio_wp = 63, | 409 | .gpio_wp = 63, |
| 383 | }, | 410 | }, |
| 411 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 412 | { | ||
| 413 | .name = "wl1271", | ||
| 414 | .mmc = 2, | ||
| 415 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
| 416 | .gpio_wp = -EINVAL, | ||
| 417 | .gpio_cd = -EINVAL, | ||
| 418 | .nonremovable = true, | ||
| 419 | }, | ||
| 420 | #endif | ||
| 384 | {} /* Terminator */ | 421 | {} /* Terminator */ |
| 385 | }; | 422 | }; |
| 386 | 423 | ||
| @@ -411,6 +448,8 @@ static struct platform_device leds_gpio = { | |||
| 411 | static int omap3evm_twl_gpio_setup(struct device *dev, | 448 | static int omap3evm_twl_gpio_setup(struct device *dev, |
| 412 | unsigned gpio, unsigned ngpio) | 449 | unsigned gpio, unsigned ngpio) |
| 413 | { | 450 | { |
| 451 | int r; | ||
| 452 | |||
| 414 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 453 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
| 415 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); | 454 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); |
| 416 | mmc[0].gpio_cd = gpio + 0; | 455 | mmc[0].gpio_cd = gpio + 0; |
| @@ -426,8 +465,12 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
| 426 | */ | 465 | */ |
| 427 | 466 | ||
| 428 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ | 467 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ |
| 429 | gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL"); | 468 | r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL"); |
| 430 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); | 469 | if (!r) |
| 470 | r = gpio_direction_output(gpio + TWL4030_GPIO_MAX, | ||
| 471 | (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0); | ||
| 472 | if (r) | ||
| 473 | printk(KERN_ERR "failed to get/set lcd_bkl gpio\n"); | ||
| 431 | 474 | ||
| 432 | /* gpio + 7 == DVI Enable */ | 475 | /* gpio + 7 == DVI Enable */ |
| 433 | gpio_request(gpio + 7, "EN_DVI"); | 476 | gpio_request(gpio + 7, "EN_DVI"); |
| @@ -491,19 +534,15 @@ static struct twl4030_madc_platform_data omap3evm_madc_data = { | |||
| 491 | .irq_line = 1, | 534 | .irq_line = 1, |
| 492 | }; | 535 | }; |
| 493 | 536 | ||
| 494 | static struct twl4030_codec_audio_data omap3evm_audio_data = { | 537 | static struct twl4030_codec_audio_data omap3evm_audio_data; |
| 495 | .audio_mclk = 26000000, | ||
| 496 | }; | ||
| 497 | 538 | ||
| 498 | static struct twl4030_codec_data omap3evm_codec_data = { | 539 | static struct twl4030_codec_data omap3evm_codec_data = { |
| 499 | .audio_mclk = 26000000, | 540 | .audio_mclk = 26000000, |
| 500 | .audio = &omap3evm_audio_data, | 541 | .audio = &omap3evm_audio_data, |
| 501 | }; | 542 | }; |
| 502 | 543 | ||
| 503 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = { | 544 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = |
| 504 | .supply = "vdda_dac", | 545 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
| 505 | .dev = &omap3_evm_dss_device.dev, | ||
| 506 | }; | ||
| 507 | 546 | ||
| 508 | /* VDAC for DSS driving S-Video */ | 547 | /* VDAC for DSS driving S-Video */ |
| 509 | static struct regulator_init_data omap3_evm_vdac = { | 548 | static struct regulator_init_data omap3_evm_vdac = { |
| @@ -538,6 +577,66 @@ static struct regulator_init_data omap3_evm_vpll2 = { | |||
| 538 | .consumer_supplies = &omap3_evm_vpll2_supply, | 577 | .consumer_supplies = &omap3_evm_vpll2_supply, |
| 539 | }; | 578 | }; |
| 540 | 579 | ||
| 580 | /* ads7846 on SPI */ | ||
| 581 | static struct regulator_consumer_supply omap3evm_vio_supply = | ||
| 582 | REGULATOR_SUPPLY("vcc", "spi1.0"); | ||
| 583 | |||
| 584 | /* VIO for ads7846 */ | ||
| 585 | static struct regulator_init_data omap3evm_vio = { | ||
| 586 | .constraints = { | ||
| 587 | .min_uV = 1800000, | ||
| 588 | .max_uV = 1800000, | ||
| 589 | .apply_uV = true, | ||
| 590 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 591 | | REGULATOR_MODE_STANDBY, | ||
| 592 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
| 593 | | REGULATOR_CHANGE_STATUS, | ||
| 594 | }, | ||
| 595 | .num_consumer_supplies = 1, | ||
| 596 | .consumer_supplies = &omap3evm_vio_supply, | ||
| 597 | }; | ||
| 598 | |||
| 599 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 600 | |||
| 601 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) | ||
| 602 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) | ||
| 603 | |||
| 604 | static struct regulator_consumer_supply omap3evm_vmmc2_supply = | ||
| 605 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | ||
| 606 | |||
| 607 | /* VMMC2 for driving the WL12xx module */ | ||
| 608 | static struct regulator_init_data omap3evm_vmmc2 = { | ||
| 609 | .constraints = { | ||
| 610 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 611 | }, | ||
| 612 | .num_consumer_supplies = 1, | ||
| 613 | .consumer_supplies = &omap3evm_vmmc2_supply, | ||
| 614 | }; | ||
| 615 | |||
| 616 | static struct fixed_voltage_config omap3evm_vwlan = { | ||
| 617 | .supply_name = "vwl1271", | ||
| 618 | .microvolts = 1800000, /* 1.80V */ | ||
| 619 | .gpio = OMAP3EVM_WLAN_PMENA_GPIO, | ||
| 620 | .startup_delay = 70000, /* 70ms */ | ||
| 621 | .enable_high = 1, | ||
| 622 | .enabled_at_boot = 0, | ||
| 623 | .init_data = &omap3evm_vmmc2, | ||
| 624 | }; | ||
| 625 | |||
| 626 | static struct platform_device omap3evm_wlan_regulator = { | ||
| 627 | .name = "reg-fixed-voltage", | ||
| 628 | .id = 1, | ||
| 629 | .dev = { | ||
| 630 | .platform_data = &omap3evm_vwlan, | ||
| 631 | }, | ||
| 632 | }; | ||
| 633 | |||
| 634 | struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | ||
| 635 | .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO), | ||
| 636 | .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */ | ||
| 637 | }; | ||
| 638 | #endif | ||
| 639 | |||
| 541 | static struct twl4030_platform_data omap3evm_twldata = { | 640 | static struct twl4030_platform_data omap3evm_twldata = { |
| 542 | .irq_base = TWL4030_IRQ_BASE, | 641 | .irq_base = TWL4030_IRQ_BASE, |
| 543 | .irq_end = TWL4030_IRQ_END, | 642 | .irq_end = TWL4030_IRQ_END, |
| @@ -550,6 +649,7 @@ static struct twl4030_platform_data omap3evm_twldata = { | |||
| 550 | .codec = &omap3evm_codec_data, | 649 | .codec = &omap3evm_codec_data, |
| 551 | .vdac = &omap3_evm_vdac, | 650 | .vdac = &omap3_evm_vdac, |
| 552 | .vpll2 = &omap3_evm_vpll2, | 651 | .vpll2 = &omap3_evm_vpll2, |
| 652 | .vio = &omap3evm_vio, | ||
| 553 | }; | 653 | }; |
| 554 | 654 | ||
| 555 | static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = { | 655 | static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = { |
| @@ -625,19 +725,12 @@ static struct spi_board_info omap3evm_spi_board_info[] = { | |||
| 625 | static struct omap_board_config_kernel omap3_evm_config[] __initdata = { | 725 | static struct omap_board_config_kernel omap3_evm_config[] __initdata = { |
| 626 | }; | 726 | }; |
| 627 | 727 | ||
| 628 | static void __init omap3_evm_init_irq(void) | 728 | static void __init omap3_evm_init_early(void) |
| 629 | { | 729 | { |
| 630 | omap_board_config = omap3_evm_config; | ||
| 631 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); | ||
| 632 | omap2_init_common_infrastructure(); | 730 | omap2_init_common_infrastructure(); |
| 633 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); | 731 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); |
| 634 | omap_init_irq(); | ||
| 635 | } | 732 | } |
| 636 | 733 | ||
| 637 | static struct platform_device *omap3_evm_devices[] __initdata = { | ||
| 638 | &omap3_evm_dss_device, | ||
| 639 | }; | ||
| 640 | |||
| 641 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | 734 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
| 642 | 735 | ||
| 643 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 736 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
| @@ -652,14 +745,76 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | |||
| 652 | }; | 745 | }; |
| 653 | 746 | ||
| 654 | #ifdef CONFIG_OMAP_MUX | 747 | #ifdef CONFIG_OMAP_MUX |
| 655 | static struct omap_board_mux board_mux[] __initdata = { | 748 | static struct omap_board_mux omap35x_board_mux[] __initdata = { |
| 749 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | | ||
| 750 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
| 751 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
| 752 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
| 753 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
| 754 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
| 755 | OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
| 756 | OMAP_PIN_OFF_NONE), | ||
| 757 | OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
| 758 | OMAP_PIN_OFF_NONE), | ||
| 759 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 760 | /* WLAN IRQ - GPIO 149 */ | ||
| 761 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
| 762 | |||
| 763 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
| 764 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
| 765 | |||
| 766 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
| 767 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 768 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 769 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 770 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 771 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 772 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 773 | #endif | ||
| 774 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
| 775 | }; | ||
| 776 | |||
| 777 | static struct omap_board_mux omap36x_board_mux[] __initdata = { | ||
| 656 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | | 778 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | |
| 657 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | 779 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | |
| 658 | OMAP_PIN_OFF_WAKEUPENABLE), | 780 | OMAP_PIN_OFF_WAKEUPENABLE), |
| 659 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | 781 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | |
| 660 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW), | 782 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | |
| 783 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
| 784 | /* AM/DM37x EVM: DSS data bus muxed with sys_boot */ | ||
| 785 | OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 786 | OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 787 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 788 | OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 789 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 790 | OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 791 | OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 792 | OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 793 | OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 794 | OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 795 | OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 796 | OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 797 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 798 | /* WLAN IRQ - GPIO 149 */ | ||
| 799 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
| 800 | |||
| 801 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
| 802 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
| 803 | |||
| 804 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
| 805 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 806 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 807 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 808 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 809 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 810 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 811 | #endif | ||
| 812 | |||
| 661 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 813 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 662 | }; | 814 | }; |
| 815 | #else | ||
| 816 | #define omap35x_board_mux NULL | ||
| 817 | #define omap36x_board_mux NULL | ||
| 663 | #endif | 818 | #endif |
| 664 | 819 | ||
| 665 | static struct omap_musb_board_data musb_board_data = { | 820 | static struct omap_musb_board_data musb_board_data = { |
| @@ -671,11 +826,18 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 671 | static void __init omap3_evm_init(void) | 826 | static void __init omap3_evm_init(void) |
| 672 | { | 827 | { |
| 673 | omap3_evm_get_revision(); | 828 | omap3_evm_get_revision(); |
| 674 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 829 | |
| 830 | if (cpu_is_omap3630()) | ||
| 831 | omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); | ||
| 832 | else | ||
| 833 | omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB); | ||
| 834 | |||
| 835 | omap_board_config = omap3_evm_config; | ||
| 836 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); | ||
| 675 | 837 | ||
| 676 | omap3_evm_i2c_init(); | 838 | omap3_evm_i2c_init(); |
| 677 | 839 | ||
| 678 | platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices)); | 840 | omap_display_init(&omap3_evm_dss_data); |
| 679 | 841 | ||
| 680 | spi_register_board_info(omap3evm_spi_board_info, | 842 | spi_register_board_info(omap3evm_spi_board_info, |
| 681 | ARRAY_SIZE(omap3evm_spi_board_info)); | 843 | ARRAY_SIZE(omap3evm_spi_board_info)); |
| @@ -715,14 +877,22 @@ static void __init omap3_evm_init(void) | |||
| 715 | ads7846_dev_init(); | 877 | ads7846_dev_init(); |
| 716 | omap3evm_init_smsc911x(); | 878 | omap3evm_init_smsc911x(); |
| 717 | omap3_evm_display_init(); | 879 | omap3_evm_display_init(); |
| 880 | |||
| 881 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 882 | /* WL12xx WLAN Init */ | ||
| 883 | if (wl12xx_set_platform_data(&omap3evm_wlan_data)) | ||
| 884 | pr_err("error setting wl12xx data\n"); | ||
| 885 | platform_device_register(&omap3evm_wlan_regulator); | ||
| 886 | #endif | ||
| 718 | } | 887 | } |
| 719 | 888 | ||
| 720 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") | 889 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") |
| 721 | /* Maintainer: Syed Mohammed Khasim - Texas Instruments */ | 890 | /* Maintainer: Syed Mohammed Khasim - Texas Instruments */ |
| 722 | .boot_params = 0x80000100, | 891 | .boot_params = 0x80000100, |
| 723 | .map_io = omap3_map_io, | ||
| 724 | .reserve = omap_reserve, | 892 | .reserve = omap_reserve, |
| 725 | .init_irq = omap3_evm_init_irq, | 893 | .map_io = omap3_map_io, |
| 894 | .init_early = omap3_evm_init_early, | ||
| 895 | .init_irq = omap_init_irq, | ||
| 726 | .init_machine = omap3_evm_init, | 896 | .init_machine = omap3_evm_init, |
| 727 | .timer = &omap_timer, | 897 | .timer = &omap_timer, |
| 728 | MACHINE_END | 898 | MACHINE_END |
