diff options
author | Keith Short <keithshort@chromium.org> | 2020-05-29 10:33:26 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-05 20:34:37 +0000 |
commit | 541b3b1c99479e74de72885d16d2bbb4650539d5 (patch) | |
tree | aaa1d4b7e4f48642754441dee90868f03283bc12 /baseboard | |
parent | 48f085562764cb00781a479322cf9f4328578a73 (diff) | |
download | chrome-ec-541b3b1c99479e74de72885d16d2bbb4650539d5.tar.gz |
volteer: add USB overcurrent notification to AP
Enable the USB C0 and USB C1 overcurrent signals to the AP.
BUG=b:140561826
BRANCH=none
TEST=make buildall
TEST=Force overcurrent event by manually setting PPC current limit below
PD contract.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I5eea4812c212496f1c483c4149697b2d53a16a37
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2222960
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r-- | baseboard/volteer/baseboard.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c index 2f2f3837fd..fd68b2049c 100644 --- a/baseboard/volteer/baseboard.c +++ b/baseboard/volteer/baseboard.c @@ -558,7 +558,15 @@ void board_set_charge_limit(int port, int supplier, int charge_ma, void board_overcurrent_event(int port, int is_overcurrented) { - /* TODO: b/140561826 - check correct operation for Volteer */ + /* Note that the level is inverted because the pin is active low. */ + switch (port) { + case USBC_PORT_C0: + gpio_set_level(GPIO_USB_C0_OC_ODL, !is_overcurrented); + break; + case USBC_PORT_C1: + gpio_set_level(GPIO_USB_C1_OC_ODL, !is_overcurrented); + break; + } } static void baseboard_init(void) |