diff options
author | Zumeng Chen <zumeng.chen@windriver.com> | 2012-06-20 11:14:51 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-07-06 10:34:26 +0200 |
commit | cb8ca5897b58f1820f44ac365c9740ba9986701b (patch) | |
tree | e0612e19a8465d5740d0e58e1ddddd884c4526d3 /arch/arm/mach-omap2/board-omap3evm.c | |
parent | ARM: OMAP3EVM: Adding USB internal LDOs board file (diff) | |
download | linux-cb8ca5897b58f1820f44ac365c9740ba9986701b.tar.xz linux-cb8ca5897b58f1820f44ac365c9740ba9986701b.zip |
ARM: omap3evm: enable VBUS switch for EHCI tranceiver
This was chosen by following the trace on the schematic from component U131
and U134 to the CPEN pin on the USB3320 device.
TWL4030.GPIO2-...->(T2_GPIO2_3V3)U131-..>nUSB2_EN-..>U134-..>EXP_nUSB2_1V8
which starts EHCI tranceiver USB3320.
This will set TWL4030.GPIO2 as output pin to drive EHCI tranceiver.
Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3evm.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 1bfbe42bbedd..0fd4ae2fbb20 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -360,6 +360,17 @@ static int omap3evm_twl_gpio_setup(struct device *dev, platform_device_register(&leds_gpio); + /* Enable VBUS switch by setting TWL4030.GPIO2DIR as output + * for starting USB tranceiver + */ + if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { + u8 val; + + twl_i2c_read_u8(TWL4030_MODULE_GPIO, &val, REG_GPIODATADIR1); + val |= 0x04; /* TWL4030.GPIO2DIR BIT at GPIODATADIR1(0x9B) */ + twl_i2c_write_u8(TWL4030_MODULE_GPIO, val, REG_GPIODATADIR1); + } + return 0; } |