summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Brandmeyer <jbrandmeyer@chromium.org>2018-08-17 15:08:42 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-08-31 05:23:10 -0700
commit54ad833b4101fd814979a62f7d4e010fead82c9a (patch)
tree4f4f82c616f25709cb81bc076e65b06791475135
parent1c2206858913b12b64db7df6de2fe95a1737e31e (diff)
downloadchrome-ec-54ad833b4101fd814979a62f7d4e010fead82c9a.tar.gz
grunt: Complete PD negotiation before kernel start.
BRANCH=none BUG=b:111214767 TEST=boot grunt with artificially locked RO firmware. Observe that depthcharge holds and waits on the firmware. Manually sysjump to rw, and observe that PD negotiation takes place and depthcharge is released. Change-Id: Id6add9fb7b3a40a67a945742a2e8df848233bc47 Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1180402 Reviewed-by: Edward Hill <ecgh@chromium.org>
-rw-r--r--baseboard/grunt/baseboard.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/baseboard/grunt/baseboard.h b/baseboard/grunt/baseboard.h
index 90c5c3365e..fcc5f60371 100644
--- a/baseboard/grunt/baseboard.h
+++ b/baseboard/grunt/baseboard.h
@@ -69,7 +69,6 @@
*/
#define CONFIG_CHARGER_INPUT_CURRENT 512
#define CONFIG_CHARGER_ISL9238
-#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 1
#define CONFIG_CHARGER_SENSE_RESISTOR 10
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 20
#define CONFIG_CHARGE_RAMP_HW
@@ -134,6 +133,21 @@
#define PD_MAX_CURRENT_MA 3000
#define PD_MAX_VOLTAGE_MV 20000
+/*
+ * Minimum conditions to start AP and perform swsync. Note that when the
+ * charger is connected via USB-PD analog signaling, the boot will proceed
+ * regardless.
+ */
+#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 3
+
+/*
+ * Require PD negotiation to be complete when we are in a low-battery condition
+ * prior to releasing depthcharge to the kernel.
+ */
+#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 15001
+#define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 3
+
+
#define I2C_PORT_BATTERY I2C_PORT_POWER
#define I2C_PORT_CHARGER I2C_PORT_POWER
#define I2C_PORT_POWER NPCX_I2C_PORT0_0