diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2018-06-20 12:28:05 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-21 04:45:57 -0700 |
commit | 794e0117d9930d57bf032b1eee2bfc180413a172 (patch) | |
tree | 20642a5bf12481156925e15e81313d8b6514c95c /chip/it83xx/gpio.c | |
parent | dcec7f8a88c9522e45eab1539d3dd5edb53fae83 (diff) | |
download | chrome-ec-794e0117d9930d57bf032b1eee2bfc180413a172.tar.gz |
it83xx: gpio: disable default pull-down of USB controller
At default, there is a 15K pull-down resistor on both D-/D+
pins(GPH5/GPH6).
We disable these two pull-down resistors so these two pins will work
properly in GPIO mode.
BRANCH=none
BUG=b:110237505
TEST=on EVB, add a 100K pull-up resistor on GPH5 and measuring the
voltage is around 3.3V if this pin is configured as input.
Change-Id: I5fe3599eff3ea458cd964c95386f922cf2d3bcee
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/1105689
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'chip/it83xx/gpio.c')
-rw-r--r-- | chip/it83xx/gpio.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/it83xx/gpio.c b/chip/it83xx/gpio.c index 134d5b3472..8cd80a1d94 100644 --- a/chip/it83xx/gpio.c +++ b/chip/it83xx/gpio.c @@ -464,6 +464,14 @@ void gpio_pre_init(void) } #endif +#ifndef CONFIG_USB + /* + * Disable default pull-down of USB controller (GPH5 and GPH6) if we + * don't use this module. + */ + IT83XX_USB_P0MCR &= ~USB_DP_DM_PULL_DOWN_EN; +#endif + for (i = 0; i < GPIO_COUNT; i++, g++) { flags = g->flags; |