diff options
author | Frank Li <Frank.Li@freescale.com> | 2010-04-06 16:24:52 +0800 |
---|---|---|
committer | Frank Li <Frank.Li@freescale.com> | 2010-04-07 16:23:08 +0800 |
commit | 015c3d52b1cdbc17de8827ed9559ddd4cc3f79e5 (patch) | |
tree | 7269f1e64dbbc773a8b0f4aa729b64ecd50b86c4 | |
parent | 18068b2abc044ce7494e7a7d061e4112c71a7d5f (diff) |
ENGR00122127 iMX28 trun off usb0 vbus power defaultly.
Turn on usb0 vbus only usb host module inserted
Signed-off-by: Frank Li <Frank.Li@freescale.com>
-rw-r--r-- | arch/arm/mach-mx28/mx28evk_pins.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx28/usb_dr.c | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-mx28/mx28evk_pins.c b/arch/arm/mach-mx28/mx28evk_pins.c index 5ac477753265..8bb253607658 100644 --- a/arch/arm/mach-mx28/mx28evk_pins.c +++ b/arch/arm/mach-mx28/mx28evk_pins.c @@ -83,9 +83,9 @@ static struct pin_desc mx28evk_fixed_pins[] = { #endif { .name = "usb0", - .id = PINID_AUART2_TX, + .id = PINID_AUART2_TX, /* Power enable pin*/ .fun = PIN_GPIO, - .data = 1, + .data = 0, .output = 1, }, { diff --git a/arch/arm/mach-mx28/usb_dr.c b/arch/arm/mach-mx28/usb_dr.c index 0d43a65728d3..13344ef0e26f 100644 --- a/arch/arm/mach-mx28/usb_dr.c +++ b/arch/arm/mach-mx28/usb_dr.c @@ -22,8 +22,13 @@ #include <linux/io.h> #include <linux/platform_device.h> #include <linux/fsl_devices.h> +#include <linux/gpio.h> + #include <mach/irqs.h> #include "usb.h" +#include "mx28_pins.h" + +#define USB_POWER_ENABLE MXS_PIN_TO_GPIO(PINID_AUART2_TX) static void usb_host_phy_resume(struct fsl_usb2_platform_data *plat) { @@ -141,6 +146,11 @@ void fsl_phy_usb_utmi_uninit(struct fsl_xcvr_ops *this) void fsl_phy_set_power(struct fsl_xcvr_ops *this, struct fsl_usb2_platform_data *pdata, int on) { + /* USB_POWER_ENABLE_PIN have request at pin init*/ + if (pdata->phy_regs != USBPHY1_PHYS_ADDR) { + gpio_direction_output(USB_POWER_ENABLE, on); + gpio_set_value(USB_POWER_ENABLE, on); + } } #ifdef CONFIG_MXS_VBUS_CURRENT_DRAW |