diff options
author | Peter Marheine <pmarheine@chromium.org> | 2022-11-10 16:37:09 +1100 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-23 03:58:51 +0000 |
commit | b75dc90677f29424e6f0d63f294dce4b39782135 (patch) | |
tree | 17002ffbd6b6f660b1a5a1a1e1911e741fa4ac73 /docs/low_battery_startup.md | |
parent | f1b563c350acf6a1b687c682f07770aa8210dc01 (diff) | |
download | chrome-ec-b75dc90677f29424e6f0d63f294dce4b39782135.tar.gz |
Add CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT
This splits the dual use of CONFIG_CHARGER_INPUT_CURRENT into two
different symbols, changing the uses of that which are used to set a
minimum current limit to be CONFIG_CHARGER_MAX_INPUT_CURRENT_LIMIT.
Most boards implement this in the same way within either the board or
baseboard, so handling of the new option is moved into
charge_set_input_current_limit (which is called by every user of the
option) and every board which repeated this pattern has the new symbol
set to the same value as the old one, with the duplicated code deleted.
One functional change to the charge manager is made: when charging
stops, the input current limit is set to the default value
(CONFIG_CHARGER_INPUT_CURRENT) rather than 0. This captures the intent
that the default current is appropriate at any time, which was previously
configured by individual boards' implementation of board_set_charge_limit()
while still allowing the limit to be set lower as needed.
To verify that all changes are appropriate, the following has been
manually checked:
* All boards with a change to a .c file also have a .h change
* All boards without a changed .h file have a changed baseboard.h
* For Zephyr projects, those with a changed .c file have config added
for the minimum limit and others (only corsola) are unchanged to
leave it off.
This is intended to verify that each board that duplicated the MAX()
logic has its configuration updated to use the shared copy, and that
boards with that code in the baseboard also update their configuration.
BUG=b:163093572
TEST=make buildall; zmake build -a
BRANCH=none
LOW_COVERAGE_REASON=added lines will soon be deleted
Change-Id: Ia460a16293c1fb82aac3784fd9be57ba0985f2fe
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4019703
Reviewed-by: Keith Short <keithshort@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'docs/low_battery_startup.md')
-rw-r--r-- | docs/low_battery_startup.md | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/docs/low_battery_startup.md b/docs/low_battery_startup.md index 48f9c28f49..83aae054b5 100644 --- a/docs/low_battery_startup.md +++ b/docs/low_battery_startup.md @@ -77,8 +77,7 @@ analog signaling alone. Via digital communication in the PD protocol, much higher power states may be negotiated. However, higher power states also usually run at a higher voltage state as well. Any time the voltage level is changing, the power sink (the ChromeOS device) must lower its power consumption during the -transient. The standby current level is governed by -`CONFIG_CHARGER_INPUT_CURRENT`. +transient. PD port partners are capable of both soft and hard resets. Hard resets will cause a dead-bus state for a brief interval before PD can renegotiate, from @@ -341,13 +340,23 @@ Example configuration: Required. -The lowest current limit programmed into the charger. This determines both the -default level used on startup, and the value used during the voltage transients -in PD negotiation. +The default charger current limit used on startup and for inactive ports. It +should not be higher than 512 mA unless the device ships with a discrete power +supply. Raising this term above 512 mA is contrary to USB-PD. It may be lowered +in order to improve compatibility with marginal BC1.2 chargers. -It should not be higher than 512 mA unless the device ships with a discrete -power supply. Raising this term above 512 mA is contrary to USB-PD. It may be -lowered in order to improve compatibility with marginal BC1.2 chargers. +### `CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT` + +Optional. + +If set, charger input current limits will never be set lower than this value. +Historically most boards used the same value as `CONFIG_CHARGER_INPUT_CURRENT`, +but doing so violates USB-PD standby power requirements when voltages greater +than 5V are used with the default 512 mA value. Configuring this option to a +nonzero value may be useful if a board needs extra headroom (possibly at the +cost of drawing excess standby power), but boards should prefer to +override `board_set_charge_limit()` instead to limit situations with excess +power draw to only occur when that extra power is needed. ### `CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON` |