From 794e0117d9930d57bf032b1eee2bfc180413a172 Mon Sep 17 00:00:00 2001 From: Dino Li Date: Wed, 20 Jun 2018 12:28:05 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1105689 Reviewed-by: Jett Rink Reviewed-by: Justin TerAvest --- chip/it83xx/registers.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'chip/it83xx/registers.h') diff --git a/chip/it83xx/registers.h b/chip/it83xx/registers.h index 4b6a702d15..e66aee6a22 100644 --- a/chip/it83xx/registers.h +++ b/chip/it83xx/registers.h @@ -1300,6 +1300,12 @@ enum usbpd_port { /* PUT_OOB data byte 0 - 79 */ #define IT83XX_ESPI_QUEUE_PUT_OOB(i) REG8(IT83XX_ESPI_QUEUE_BASE+0x80+(i)) +/* USB Controller */ +#define IT83XX_USB_BASE 0x00F02F00 + +#define IT83XX_USB_P0MCR REG8(IT83XX_USB_BASE+0xE4) +#define USB_DP_DM_PULL_DOWN_EN (1 << 4) + /* Wake pin definitions, defined at board-level */ extern const enum gpio_signal hibernate_wake_pins[]; extern const int hibernate_wake_pins_used; @@ -1313,6 +1319,5 @@ extern const int hibernate_wake_pins_used; #define IT83XX_DBGR_BASE 0x00F02500 #define IT83XX_OW_BASE 0x00F02A00 #define IT83XX_CEC_BASE 0x00F02E00 -#define IT83XX_USB_BASE 0x00F02F00 #endif /* __CROS_EC_REGISTERS_H */ -- cgit v1.2.1