New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 777596 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

ec: charge_manager: Fix low/no battery port + charge selection

Project Member Reported by sha...@chromium.org, Oct 23 2017

Issue description

We have various workarounds in board_set_charge_limit() and board_set_active_charge_port() to not de-select a charge port and not set ILIM too low when the battery can't provide sufficient power. Let's implement a charge_manager "safe mode", which will alter port / ilim selection when the battery can't provide sufficient power. charge_manager will remain in safe_mode at boot until asked to leave by the charger task, when the battery looks fine (eg. SOC high enough + disconnected).
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/2f127f3081be00dc318b4e0b9a9947c68b24849d

commit 2f127f3081be00dc318b4e0b9a9947c68b24849d
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Fri Nov 03 06:21:52 2017

charge_manager: Enter safe mode at boot

Charge port / current selection often needs to be significantly altered
when a battery cannot provide sufficient charge, so have charge_manager
initially enter safe mode. After a battery with sufficient capacity has
been identified, charge manager will leave safe mode, and port / current
selection will return to standard rules.

BUG= chromium:777596 
BRANCH=None
TEST=Pass charge_manager unit tests. On kevin, remove battery, attach
Apple PD charger, verify safe mode is not exited and device does not
brown out. Hot-plug battery and verify safe mode is exited. Next,
remove battery, attach to Samus, verify safe mode is not exited and
device doesn't brown out. Hot-plug battery, verify that safe mode is
exited and no active charge port, due to dual-role exclusion.

Change-Id: I7784865750087a037aad8dbbac058b22c77ba6d4
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/733954
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>

[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/include/charge_manager.h
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/eve/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/elm/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/test/charge_manager.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/reef/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/include/config.h
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/nautilus/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/reef_it8320/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/poppy/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/zoombini/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/rowan/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/samus_pd/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/samus_pd/board.h
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/grunt/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/common/charge_state_v2.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/coral/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/nefario/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/scarlet/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/common/charge_manager.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/kahlee/board.c
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/fizz/board.h
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/servo_v4/board.h
[modify] https://crrev.com/2f127f3081be00dc318b4e0b9a9947c68b24849d/board/kevin/board.c

Status: Verified (was: Untriaged)

Sign in to add a comment