aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAjay Kumar Gupta <ajay.gupta@ti.com>2009-11-22 13:11:28 -0500
committerTony Lindgren <tony@atomide.com>2009-11-22 13:24:33 -0500
commite8e51d29205b3c507a2e6126e18f76f42b49f5ca (patch)
tree7a1c6681d4c09ec29dc15689015aee88097b2b87 /arch
parentdb408023b85644e1bee80d4004aff1ff188032e9 (diff)
omap3evm: ehci: Update EHCI support on OMAP3EVM (Rev >= E)
Added runtime programming for the differences in EHCI interface between OMAP3EVM revisions (Rev >= E) and (Rev < E). Changes: - EHCI PHY reset GPIO pin is 21 on Rev >= E while Rev < E uses GPIO pin 135. - Rev >= E uses EHCI Vbus enable GPIO22 line. - Rev >= E uses GPIO61 to select EHCI port either on main board or on Mistral Daughter Card (MDC). OMAP3EVM Rev < E doesn't have EHCI port on main board. - Currently GPIO61 it programmed to enable EHCI port on main board only. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/configs/omap3_evm_defconfig12
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c29
-rw-r--r--arch/arm/mach-omap2/mux.c7
-rw-r--r--arch/arm/plat-omap/include/plat/mux.h5
4 files changed, 47 insertions, 6 deletions
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 180bf9fb3ecc..da69732dd048 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -676,13 +676,19 @@ CONFIG_INPUT_EVDEV=y
676# Input Device Drivers 676# Input Device Drivers
677# 677#
678CONFIG_INPUT_KEYBOARD=y 678CONFIG_INPUT_KEYBOARD=y
679# CONFIG_KEYBOARD_ADP5588 is not set
679# CONFIG_KEYBOARD_ATKBD is not set 680# CONFIG_KEYBOARD_ATKBD is not set
680# CONFIG_KEYBOARD_SUNKBD is not set 681# CONFIG_QT2160 is not set
681# CONFIG_KEYBOARD_LKKBD is not set 682# CONFIG_KEYBOARD_LKKBD is not set
682# CONFIG_KEYBOARD_XTKBD is not set 683# CONFIG_KEYBOARD_GPIO is not set
684# CONFIG_KEYBOARD_MATRIX is not set
685# CONFIG_KEYBOARD_MAX7359 is not set
683# CONFIG_KEYBOARD_NEWTON is not set 686# CONFIG_KEYBOARD_NEWTON is not set
687# CONFIG_KEYBOARD_OPENCORES is not set
684# CONFIG_KEYBOARD_STOWAWAY is not set 688# CONFIG_KEYBOARD_STOWAWAY is not set
685# CONFIG_KEYBOARD_GPIO is not set 689# CONFIG_KEYBOARD_SUNKBD is not set
690CONFIG_KEYBOARD_TWL4030=y
691# CONFIG_KEYBOARD_XTKBD is not set
686# CONFIG_INPUT_MOUSE is not set 692# CONFIG_INPUT_MOUSE is not set
687# CONFIG_INPUT_JOYSTICK is not set 693# CONFIG_INPUT_JOYSTICK is not set
688# CONFIG_INPUT_TABLET is not set 694# CONFIG_INPUT_TABLET is not set
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 149d45ca89a7..010454f58e7d 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -43,6 +43,8 @@
43#include "mmc-twl4030.h" 43#include "mmc-twl4030.h"
44 44
45#define OMAP3_EVM_TS_GPIO 175 45#define OMAP3_EVM_TS_GPIO 175
46#define OMAP3_EVM_EHCI_VBUS 22
47#define OMAP3_EVM_EHCI_SELECT 61
46 48
47#define OMAP3EVM_ETHR_START 0x2c000000 49#define OMAP3EVM_ETHR_START 0x2c000000
48#define OMAP3EVM_ETHR_SIZE 1024 50#define OMAP3EVM_ETHR_SIZE 1024
@@ -347,8 +349,9 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
347 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, 349 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
348 350
349 .phy_reset = true, 351 .phy_reset = true,
352 /* PHY reset GPIO will be runtime programmed based on EVM version */
350 .reset_gpio_port[0] = -EINVAL, 353 .reset_gpio_port[0] = -EINVAL,
351 .reset_gpio_port[1] = 135, 354 .reset_gpio_port[1] = -EINVAL,
352 .reset_gpio_port[2] = -EINVAL 355 .reset_gpio_port[2] = -EINVAL
353}; 356};
354 357
@@ -368,9 +371,29 @@ static void __init omap3_evm_init(void)
368 /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */ 371 /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
369 usb_nop_xceiv_register(); 372 usb_nop_xceiv_register();
370#endif 373#endif
374 if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
375 /* enable EHCI VBUS using GPIO22 */
376 omap_cfg_reg(AF9_34XX_GPIO22);
377 gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
378 gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
379 gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);
380
381 /* Select EHCI port on main board */
382 omap_cfg_reg(U3_34XX_GPIO61);
383 gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
384 gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
385 gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);
386
387 /* setup EHCI phy reset config */
388 omap_cfg_reg(AH14_34XX_GPIO21);
389 ehci_pdata.reset_gpio_port[1] = 21;
390
391 } else {
392 /* setup EHCI phy reset on MDC */
393 omap_cfg_reg(AF4_34XX_GPIO135_OUT);
394 ehci_pdata.reset_gpio_port[1] = 135;
395 }
371 usb_musb_init(); 396 usb_musb_init();
372 /* Setup EHCI phy reset padconfig */
373 omap_cfg_reg(AF4_34XX_GPIO135_OUT);
374 usb_ehci_init(&ehci_pdata); 397 usb_ehci_init(&ehci_pdata);
375 ads7846_dev_init(); 398 ads7846_dev_init();
376} 399}
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 83256d349444..c18a94eca641 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -559,6 +559,13 @@ MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
559MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0, 559MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0,
560 OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP | 560 OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
561 OMAP34XX_MUX_MODE0) 561 OMAP34XX_MUX_MODE0)
562/* EHCI GPIO's on OMAP3EVM (Rev >= E) */
563MUX_CFG_34XX("AH14_34XX_GPIO21", 0x5ea,
564 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
565MUX_CFG_34XX("AF9_34XX_GPIO22", 0x5ec,
566 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
567MUX_CFG_34XX("U3_34XX_GPIO61", 0x0c8,
568 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
562}; 569};
563 570
564#define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) 571#define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins)
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h
index f74331d4a9c3..ba77de601501 100644
--- a/arch/arm/plat-omap/include/plat/mux.h
+++ b/arch/arm/plat-omap/include/plat/mux.h
@@ -849,6 +849,11 @@ enum omap34xx_index {
849 849
850 /* SYS_NIRQ T2 INT1 */ 850 /* SYS_NIRQ T2 INT1 */
851 AF26_34XX_SYS_NIRQ, 851 AF26_34XX_SYS_NIRQ,
852
853 /* EHCI GPIO's for OMAP3EVM (Rev >= E) */
854 AH14_34XX_GPIO21,
855 AF9_34XX_GPIO22,
856 U3_34XX_GPIO61,
852}; 857};
853 858
854struct omap_mux_cfg { 859struct omap_mux_cfg {