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-07 17:25:27 +0000 |
commit | f27fddb2f4559ddf7ee39e1344bcff5c4954134f (patch) | |
tree | ed7367891a7429309bfe41dbc4af2c07c62b2c1d | |
parent | 8ce7b3cd334e3b7e257325822225143fafb5c916 (diff) | |
download | chrome-ec-f27fddb2f4559ddf7ee39e1344bcff5c4954134f.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: 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>
-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 89f72c7339..46de8661c7 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) |