From 5b071db517fb2d6abdf9471179b5c415c4bd5e27 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Thu, 1 Aug 2019 13:37:15 -0600 Subject: hatch: Add charger-related configs for low-battery booting When there is a battery that isn't communicating, the DUT should not boot the AP in order to avoid brown outs after the system jumps to RW and can begin PD negotiation. BUG=b:136970148 BRANCH=none TEST=Disable PD negotiation in RO, cutoff battery, plug in A/C, and verify that the DUT stays in G3, and doesn't attempt to boot the AP, because Hatch's battery is slow to come back from cutoff (>10 s). Change-Id: I6f53ce83e89520369e9761a64133839b3c162b91 Signed-off-by: Tim Wawrzynczak Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1731976 Reviewed-by: Scott Collyer --- baseboard/hatch/baseboard.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'baseboard/hatch') diff --git a/baseboard/hatch/baseboard.h b/baseboard/hatch/baseboard.h index e7853d14af..17f82f9167 100644 --- a/baseboard/hatch/baseboard.h +++ b/baseboard/hatch/baseboard.h @@ -90,6 +90,13 @@ #define CONFIG_CHARGER_SENSE_RESISTOR 10 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 #define CONFIG_CHARGER_V2 +/* + * Don't allow the system to boot to S0 when the battery is low and unable to + * communicate on locked systems (which haven't PD negotiated) + */ +#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT 15000 +#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC 1 +#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 15001 /* Common battery defines */ #define CONFIG_BATTERY_CUT_OFF -- cgit v1.2.1