summaryrefslogtreecommitdiff
path: root/board/nami
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-08-13 15:53:42 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-08-17 11:17:47 -0700
commit986a7f2288ff8fee458013d4b96fe0323d9e2d90 (patch)
tree7abb08573bdf7979ee7dfd85b206666fa1041053 /board/nami
parent7f3f8308afb350e6d35cce707ca220d87a8aad21 (diff)
downloadchrome-ec-986a7f2288ff8fee458013d4b96fe0323d9e2d90.tar.gz
chgstv2: Use lower charge threshold for boot if AC power is present
If one of the following conditions is met, EC boots AP: 1. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 2. AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 3. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC and AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT This reduces users' wait time significantly when a battery is drained. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:112172032 BRANCH=Nami TEST=Verified Akali and Sona boot and perform soft sync successfully. The power consumption is measured during boot and verified even worn out battery can supply enough power to sustain the system together with a 15W charger. Change-Id: I3220b4660a1b50ba5ead8f570cb6992c0a30e390 Reviewed-on: https://chromium-review.googlesource.com/1177722 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/nami')
-rw-r--r--board/nami/board.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/nami/board.h b/board/nami/board.h
index a1af0d5644..54603d8f5b 100644
--- a/board/nami/board.h
+++ b/board/nami/board.h
@@ -98,8 +98,10 @@
#define CONFIG_CHARGER_DISCHARGE_ON_AC
#define CONFIG_CHARGER_INPUT_CURRENT 512
/* EC's thresholds. 3%: boot, 2%: no boot. Required for soft sync. */
-#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 3
-#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 27000
+#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 3
+#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC 1
+#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 27000
+#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT 15000
/* AP's thresholds. */
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 3
#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 27000