diff options
author | Dave Parker <dparker@chromium.org> | 2014-06-26 11:43:29 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-07-17 00:39:36 +0000 |
commit | 9ab780d295da1268b7360552da295fae4e432e4b (patch) | |
tree | 8c4ae90d67cfe3004f4815b892d83bec3d819ec8 | |
parent | 72cbe8882af20ba4b6c683e3db9be39b8c3743bd (diff) | |
download | chrome-ec-9ab780d295da1268b7360552da295fae4e432e4b.tar.gz |
USB Power: Invert ILIM control line with 'smart simple' charging
The ILIM control line is inverted before reaching the USB charge
controllers when they are cross-connected to allow only one port
to deliver the HIGH current limit at a time.
BUG=chrome-os-partner:29053
BRANCH=ToT
TEST=Verify, with a multimeter, that ILIM (pin 4) on a TPS2546
is 3.3V when the chargemode is set to CDP
Change-Id: I2f720d04b959417ae96687d7e30ee60270eeccb9
Original-Change-Id: Idd89dcfc117f1f3393ded1887e8d1cb27ba367ad
Signed-off-by: Dave Parker <dparker@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/205811
Reviewed-by: Vic Yang <victoryang@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/208161
-rw-r--r-- | common/usb_port_power_smart.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/usb_port_power_smart.c b/common/usb_port_power_smart.c index 7e6fdeee80..76990fa8da 100644 --- a/common/usb_port_power_smart.c +++ b/common/usb_port_power_smart.c @@ -63,14 +63,14 @@ static void usb_charge_set_enabled(int port_id, int en) static void usb_charge_set_ilim(int port_id, int sel) { #ifdef CONFIG_USB_PORT_POWER_SMART_SIMPLE - /* ILIM_SEL signal is shared too */ - gpio_set_level(GPIO_USB_ILIM_SEL, sel); + /* ILIM_SEL signal is shared and inverted */ + gpio_set_level(GPIO_USB_ILIM_SEL, sel ? 0 : 1); #else if (port_id == 0) gpio_set_level(GPIO_USB1_ILIM_SEL, sel); else gpio_set_level(GPIO_USB2_ILIM_SEL, sel); -#endif +#endif /* CONFIG_USB_PORT_POWER_SMART_SIMPLE */ } static void usb_charge_all_ports_on(void) |