diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2022-04-07 10:02:14 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-07 07:00:05 +0000 |
commit | c971ef6ceebc97444dc5eed9131ab186055826e6 (patch) | |
tree | fa8c7ec8695f4a58944cb94b4fa28d55d0219fe2 /driver/bc12 | |
parent | 372648e2dcb2bf5e1e8b5258c7b012b33a2f0931 (diff) | |
download | chrome-ec-c971ef6ceebc97444dc5eed9131ab186055826e6.tar.gz |
pi3usb9201: set DCP current limit 1500mA
We follow the BC1.2 specification, so the ramping is not necessary for
DCP. We set DCP limit as USB_CHARGER_MAX_CURR_MA (fixed 1500mA).
BUG=b:211363424
TEST=on kingler, ectool usbpdpower 0; see DCP limit 1500mA
BRANCH=none
Change-Id: I3b80dc7113dd0e77e2d16ca797ff0eff0b595444
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573808
Tested-by: Parker Lin <parkerlin@google.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Tested-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'driver/bc12')
-rw-r--r-- | driver/bc12/pi3usb9201.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/driver/bc12/pi3usb9201.c b/driver/bc12/pi3usb9201.c index 2a9986f823..ac88e5c310 100644 --- a/driver/bc12/pi3usb9201.c +++ b/driver/bc12/pi3usb9201.c @@ -52,18 +52,7 @@ static const struct bc12_status bc12_chg_limits[] = { [CHG_RESERVED] = {CHARGE_SUPPLIER_NONE, 0}, [CHG_CDP] = {CHARGE_SUPPLIER_BC12_CDP, USB_CHARGER_MAX_CURR_MA}, [CHG_SDP] = {CHARGE_SUPPLIER_BC12_SDP, 500}, -#if defined(CONFIG_CHARGE_RAMP_SW) || defined(CONFIG_CHARGE_RAMP_HW) - /* - * If ramping is supported, then for DCP set the current limit to be the - * max supported for the port by the board or 1.5A (whichever is lower). - * Although, the BC 1.2 specification allows DCP suppliers to ramp to - * much higher currents, the USB Type-C specification limits the - * maximum current allowed for BC 1.2 suppliers to 1.5A. - */ [CHG_DCP] = {CHARGE_SUPPLIER_BC12_DCP, USB_CHARGER_MAX_CURR_MA}, -#else - [CHG_DCP] = {CHARGE_SUPPLIER_BC12_DCP, 500}, -#endif }; static inline int raw_read8(int port, int offset, int *value) @@ -368,6 +357,7 @@ static int pi3usb9201_ramp_allowed(int supplier) /* Don't allow ramp if charge supplier is OTHER, SDP, or NONE */ return !(supplier == CHARGE_SUPPLIER_OTHER || supplier == CHARGE_SUPPLIER_BC12_SDP || + supplier == CHARGE_SUPPLIER_BC12_DCP || supplier == CHARGE_SUPPLIER_NONE); } |