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
This commit is contained in:
Dave Parker
2014-06-26 11:43:29 -07:00
committed by chrome-internal-fetch
parent 72cbe8882a
commit 9ab780d295

View File

@@ -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)