diff options
author | Wai-Hong Tam <waihong@google.com> | 2021-12-08 14:46:18 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-13 22:46:14 +0000 |
commit | ec2705f5a109f9c3ff0371ccade7f2159b9aeca2 (patch) | |
tree | 1d5bf9fef66fd558fa8f4553a09d3ee9b09c61d6 /common/charge_ramp.c | |
parent | a3d26f8c55a35ff59e1c00be33eff3cd519cfda7 (diff) | |
download | chrome-ec-ec2705f5a109f9c3ff0371ccade7f2159b9aeca2.tar.gz |
charge_ramp: Don't regulate the input voltage for USB-C chargers
The USB-C chargers don't need to be regulated their input voltage.
The USB-C spec strictly defines the voltage requirement. Their load
curves should not be below 4.75V @0A and 4V @3A. The existing input
voltage limit is too high >4V that limits their full power (can't
reach the max 3A). So we can't define the voltage regulation value
higher than 4V. If we define the voltage regulation value lower than
4V, their load curves will never be below the voltage regulation line.
Check go/charge_ramp_typec for detail.
BRANCH=None
BUG=b:206037915
TEST=Use an adapter which only supplies 4V. Check the battery charger
still operating.
Change-Id: I22d8b5fb4befac0c0b8c44b277176db2d40a1a4c
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3324684
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/charge_ramp.c')
-rw-r--r-- | common/charge_ramp.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/common/charge_ramp.c b/common/charge_ramp.c index a408771f40..32e0d21ddb 100644 --- a/common/charge_ramp.c +++ b/common/charge_ramp.c @@ -18,16 +18,29 @@ test_mockable int chg_ramp_allowed(int port, int supplier) return 0; switch (supplier) { - /* Use ramping for USB-C DTS suppliers (debug accessory eg suzy-q). */ + /* + * Use ramping for USB-C DTS suppliers (debug accessory eg suzy-q). + * The suzy-q simply passes through the VBUS. The power supplier behind + * may be a SDP/CDP which requires ramping. + */ case CHARGE_SUPPLIER_TYPEC_DTS: return 1; /* - * Use HW ramping for USB-C chargers. Don't use SW ramping since the - * slow ramp causes issues with auto power on (b/169634979). + * Don't regulate the input voltage for USB-C chargers. It is + * unnecessary as the USB-C compliant adapters should never trigger it + * active. + * + * The USB-C spec defines their load curves should not be below + * 4.75V @0A and 4V @3A. We can't define the voltage regulation value + * higher than 4V since it limits the current reaching its max 3A. If + * we define the voltage regulation value lower than 4V, their load + * curves will never be below the voltage regulation line. + * + * Check go/charge_ramp_typec for detail. */ case CHARGE_SUPPLIER_PD: case CHARGE_SUPPLIER_TYPEC: - return IS_ENABLED(CONFIG_CHARGE_RAMP_HW); + return 0; /* default: fall through */ } |