diff options
author | Justin Waters <justin.waters@timesys.com> | 2008-05-20 16:39:42 -0400 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2008-05-20 16:57:09 -0400 |
commit | 68bfb81f26a08b79c3e2e08a1e85b1b69f887009 (patch) | |
tree | 0ccc13a6d98ab67dcd5767ce000bc432b9677dba | |
parent | 8063d396638e4dad0d713bd7abbc1dd7ad190e1a (diff) |
Update pin configuration for USB Host 2 on the Lite Kit.
The USB Host 2 on the MX27 Litekit uses the USB_POWER and USB_OC_B pins for
power and overcurrent detect, respectively. In order to make them function
properly, we need to assign those pins to the Host 2 driver and change the
H2PM field of the USB_CTRL register on the i.MX27.
Signed-off-by: Justin Waters <justin.waters@timesys.com>
-rw-r--r-- | arch/arm/mach-mx27/mx27lite_gpio.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-mxc/usb_common.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-mx27/mx27lite_gpio.c b/arch/arm/mach-mx27/mx27lite_gpio.c index 395517e1f55a..b4734635af49 100644 --- a/arch/arm/mach-mx27/mx27lite_gpio.c +++ b/arch/arm/mach-mx27/mx27lite_gpio.c @@ -244,7 +244,9 @@ int gpio_usbh2_active(void) gpio_request_mux(MX27_PIN_CSPI2_SCLK, GPIO_MUX_ALT) || gpio_request_mux(MX27_PIN_CSPI2_MISO, GPIO_MUX_ALT) || gpio_request_mux(MX27_PIN_CSPI2_MOSI, GPIO_MUX_ALT) || - gpio_request_mux(MX27_PIN_CSPI1_SS2, GPIO_MUX_ALT)) + gpio_request_mux(MX27_PIN_CSPI1_SS2, GPIO_MUX_ALT) || + gpio_request_mux(MX27_PIN_USB_OC_B, GPIO_MUX_PRIMARY) || + gpio_request_mux(MX27_PIN_USB_PWR, GPIO_MUX_PRIMARY)) return -EINVAL; //__raw_writew(PBC_BCTRL3_HSH_EN, PBC_BCTRL3_CLEAR_REG); @@ -278,6 +280,9 @@ void gpio_usbh2_inactive(void) gpio_set_puen(MX27_PIN_CSPI2_MISO, 1); gpio_set_puen(MX27_PIN_CSPI2_MOSI, 1); gpio_set_puen(MX27_PIN_CSPI1_SS2, 1); + + gpio_free_mux(MX27_PIN_USB_OC_B); + gpio_free_mux(MX27_PIN_USB_PWR); //__raw_writew(PBC_BCTRL3_HSH_EN, PBC_BCTRL3_SET_REG); } diff --git a/arch/arm/plat-mxc/usb_common.c b/arch/arm/plat-mxc/usb_common.c index 73781aa705fa..f56392fba3f6 100644 --- a/arch/arm/plat-mxc/usb_common.c +++ b/arch/arm/plat-mxc/usb_common.c @@ -320,10 +320,18 @@ static void usbh2_set_ulpi_xcvr(void) { pr_debug("%s\n", __FUNCTION__); USBCTRL &= ~(UCTRL_H2SIC_MASK | UCTRL_BPE); /* disable bypass mode */ + +#if defined(CONFIG_MACH_MX27LITE) + USBCTRL |= UCTRL_H2WIE | /* wakeup intr enable */ + UCTRL_H2UIE | /* ULPI intr enable */ + UCTRL_H2DT | /* disable H2 TLL */ + !UCTRL_H2PM; /* power mask */ +#else USBCTRL |= UCTRL_H2WIE | /* wakeup intr enable */ UCTRL_H2UIE | /* ULPI intr enable */ UCTRL_H2DT | /* disable H2 TLL */ UCTRL_H2PM; /* power mask */ +#endif UH2_PORTSC1 &= ~PORTSC_PTS_MASK; /* set ULPI xcvr */ UH2_PORTSC1 |= PORTSC_PTS_ULPI; |