diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-06-26 16:27:48 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-27 13:52:37 -0700 |
commit | 18e57ccbdad61867a241a5c44f56aa0e603b63c6 (patch) | |
tree | ac409089d6f485ece905c095b7dd23660eca8476 /board | |
parent | 1b8a99fc6d40d7eff7401abf1fb7b17ad2c386ef (diff) | |
download | chrome-ec-18e57ccbdad61867a241a5c44f56aa0e603b63c6.tar.gz |
nocturne: Remove internal pulls on PD interrupts.
On early revisions of nocturne, on board pullups were missing, therefore
the EC configured some internal pullups on the Type C interrupt pins.
On newer revisions, this has been fixed and external pullups are
stuffed.
This commit simply adds a board_quirks() function to remove the internal
pull up resistors on newer boards.
BUG=b:109937217
BRANCH=None
TEST=Change check to match current board revision, flash nocturne,
verify that internal pull ups were disabled.
Change-Id: I9a23b9c5b7a5d855368ab1a99cf0303b06b33596
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1115966
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/nocturne/board.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/board/nocturne/board.c b/board/nocturne/board.c index c7330e7a45..4d5ee9c2db 100644 --- a/board/nocturne/board.c +++ b/board/nocturne/board.c @@ -398,6 +398,19 @@ static void board_pmic_init(void) } DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_DEFAULT); +static void board_quirks(void) +{ + /* + * Newer board revisions have external pull ups stuffed, so remove the + * internal pulls. + */ + if (board_get_version() > 0) { + gpio_set_flags(GPIO_USB_C0_PD_INT_ODL, GPIO_INT_FALLING); + gpio_set_flags(GPIO_USB_C1_PD_INT_ODL, GPIO_INT_FALLING); + } +} +DECLARE_HOOK(HOOK_INIT, board_quirks, HOOK_PRIO_DEFAULT); + void board_overcurrent_event(int port) { /* Sanity check the port. */ |