diff options
author | Vic Yang <victoryang@chromium.org> | 2014-10-21 14:48:22 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-22 02:23:31 +0000 |
commit | 93aa23c6856b8b78f2c6a980ad0e82cb802afc3c (patch) | |
tree | 198e6d4eb6a37c1b32c8937decb7913681769998 /chip/stm32/usb.c | |
parent | 7198d0303c19291c6f4925fe19c54c6627dd4b4d (diff) | |
download | chrome-ec-93aa23c6856b8b78f2c6a980ad0e82cb802afc3c.tar.gz |
ryu_p2: Set alternate function for USB D+/D- pins
Unlike STM32F0, we need to configure alternate function for USB module
on STM32F373. Adds the pin configuration for ryu_p2 and also adds the
proper configuration step in USB module.
BRANCH=None
BUG=chrome-os-partner:32660
TEST=With changes to enable USB on ryu_p2, see the device enumerated
Change-Id: I5e2cb7cfc44a1bb88bae69804021c783c8d17968
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224789
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip/stm32/usb.c')
-rw-r--r-- | chip/stm32/usb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/stm32/usb.c b/chip/stm32/usb.c index a43c63905b..b9f69ec848 100644 --- a/chip/stm32/usb.c +++ b/chip/stm32/usb.c @@ -272,6 +272,9 @@ void usb_init(void) /* we need a proper 48MHz clock */ clock_enable_module(MODULE_USB, 1); + /* configure the pinmux */ + gpio_config_module(MODULE_USB, 1); + /* power on sequence */ /* keep FRES (USB reset) and remove PDWN (power down) */ @@ -326,6 +329,9 @@ void usb_release(void) /* disable interrupt handlers */ task_disable_irq(STM32_IRQ_USB_LP); + /* unset pinmux */ + gpio_config_module(MODULE_USB, 0); + /* disable 48MHz clock */ clock_enable_module(MODULE_USB, 0); |