summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-07-06 14:21:33 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-17 21:53:19 -0700
commita0312a81d7e15b6441673d96ae48d2741ac43175 (patch)
treeea0279f2cfe2ad10634db8660c3f0c6a8c8b414d
parentd73d3d2d97fc14d31fb133ee6bce367a9aa97d83 (diff)
downloadchrome-ec-a0312a81d7e15b6441673d96ae48d2741ac43175.tar.gz
Nami: Set boot power thresholds
This patch sets the required battery charge level to 3% and the required AC power to 27W. If both are below the thresholds, EC refuses to power on the AP. The OS has its own boot threshold, which should be high enough to prevent recovery mode from being terminated before completion. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:110908259,b:111446706 BRANCH=none TEST=Boot Vayne with a drained battery (1 ~ 3%) verify the system stays off or boots, respectively. Change-Id: Idbf5dcea7c5ee2c747c6c2a971629ed801c95d70 Reviewed-on: https://chromium-review.googlesource.com/1128322 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>
-rw-r--r--board/nami/board.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/board/nami/board.h b/board/nami/board.h
index f8d6f305ee..1649f6b335 100644
--- a/board/nami/board.h
+++ b/board/nami/board.h
@@ -91,7 +91,12 @@
#define CONFIG_CHARGER_ISL9238
#define CONFIG_CHARGER_DISCHARGE_ON_AC
#define CONFIG_CHARGER_INPUT_CURRENT 512
-#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 2
+/* 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
+/* AP's thresholds. */
+#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 3
+#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 27000
#define CONFIG_CHARGER_PROFILE_OVERRIDE
#define CONFIG_CHARGER_PSYS
#define CONFIG_CHARGER_SENSE_RESISTOR 10
@@ -99,8 +104,8 @@
#define CONFIG_CMD_CHARGER_ADC_AMON_BMON
#define CONFIG_CMD_PD_CONTROL
#define CONFIG_EXTPOWER_GPIO
-#undef CONFIG_EXTPOWER_DEBOUNCE_MS
-#define CONFIG_EXTPOWER_DEBOUNCE_MS 1000
+#undef CONFIG_EXTPOWER_DEBOUNCE_MS
+#define CONFIG_EXTPOWER_DEBOUNCE_MS 1000
#define CONFIG_POWER_BUTTON
#define CONFIG_POWER_BUTTON_X86
#define CONFIG_POWER_COMMON