summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2018-02-21 20:38:09 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-02-27 20:17:35 -0800
commit0f80ec94747db28e592c3a08b2568bc87cc5f295 (patch)
tree739802ae19a69451c8bd27d6986dfd7cfa90c03a
parent284c0c35893ff40a2023d52f58670d3b92172a59 (diff)
downloadchrome-ec-0f80ec94747db28e592c3a08b2568bc87cc5f295.tar.gz
scarlet: Keep VBAT on for the fuel gauge
The fuel gauge (max17055) on Scarlet is powered by VBAT. To use max17055 to detect batttery presence, we want to keep it alive even if battery is disconnected. BUG=b:72697658 BRANCH=scarlet TEST=boot scarlet rev3 w/o battery on AC and don't see VBAT drops Change-Id: Ice27384ded257be75ee29a28c0ada9f73b173f6c Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/930572 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: David Schneider <dnschneid@chromium.org>
-rw-r--r--board/scarlet/board.c8
-rw-r--r--board/scarlet/board.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/board/scarlet/board.c b/board/scarlet/board.c
index a1d384765a..97b4e9110d 100644
--- a/board/scarlet/board.c
+++ b/board/scarlet/board.c
@@ -158,10 +158,14 @@ int board_set_active_charge_port(int charge_port)
/* Don't charge from a source port */
if (board_vbus_source_enabled(charge_port))
return -1;
- rt946x_enable_charger_boost(1);
break;
case CHARGE_PORT_NONE:
- rt946x_enable_charger_boost(0);
+ /*
+ * To ensure the fuel gauge (max17055) is always powered
+ * even when battery is disconnected, keep VBAT rail on but
+ * set the charging current to minimum.
+ */
+ charger_set_current(0);
break;
default:
panic("Invalid charge port\n");
diff --git a/board/scarlet/board.h b/board/scarlet/board.h
index 9958eadd4d..437dc45cd7 100644
--- a/board/scarlet/board.h
+++ b/board/scarlet/board.h
@@ -71,7 +71,6 @@
#define CONFIG_CHARGER
#define CONFIG_CHARGER_RT9467
#define CONFIG_CHARGER_INPUT_CURRENT 512
-#define CONFIG_CHARGER_MAINTAIN_VBAT
#define CONFIG_CHARGER_V2
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 2
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 2