diff options
author | Tom Wai-Hong Tam <waihong@google.com> | 2018-04-27 13:11:43 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-09 14:40:02 -0700 |
commit | aafc4f5d1aa5ee0f67cf0e391acc68309eaa8c92 (patch) | |
tree | e23bf05ac731090beb01e907096ec332f034e96a /common | |
parent | 52726d7f7f6948626f2481e999afc9aa5246166b (diff) | |
download | chrome-ec-aafc4f5d1aa5ee0f67cf0e391acc68309eaa8c92.tar.gz |
cheza: Support PD and charging
Port 0:
TCPC: ANX3429
PPC: SN5S330
BC1.2: PI3USB9281
Port 1:
TCPC: PS8751
Power switch (sink): NX5P3290
Power switch (source): NX20P5090
BC1.2: PI3USB9281
Charger: ISL9238
BRANCH=none
BUG=b:74395451
TEST=make buildall -j
TEST=Did "gpioset EN_PP5000_A 1" before the folllowing tests:
* Plugged adapter to port-0/port-1/both and saw charging
* Plugged USB device to port-0/port-1/both and saw sourcing VBUS
* Plugged adapter to one port and USB device to another port
* Plugged USB disk to port-0 and booted into kernel
* When AP off, not sourcing VBUS to USB device
* Rebooting AP still works
Change-Id: Icde5e24c2cda3d0f2046486528a210af84befcca
Signed-off-by: Tom Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/969701
Commit-Ready: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/usb_charger.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/usb_charger.c b/common/usb_charger.c index 010485afa3..1533dc3167 100644 --- a/common/usb_charger.c +++ b/common/usb_charger.c @@ -40,7 +40,9 @@ static void update_vbus_supplier(int port, int vbus_level) } } -#ifdef CONFIG_USBC_PPC +#ifdef CONFIG_USB_PD_5V_EN_CUSTOM +#define USB_5V_EN(port) board_is_sourcing_vbus(port) +#elif defined(CONFIG_USBC_PPC) #define USB_5V_EN(port) ppc_is_sourcing_vbus(port) #elif defined(CONFIG_USB_PD_5V_CHARGER_CTRL) #define USB_5V_EN(port) charger_is_sourcing_otg_power(port) |