From 1cd577fa390d15919cee520c8655b2e08251a88d Mon Sep 17 00:00:00 2001 From: Diana Z Date: Wed, 5 Jun 2019 15:36:59 -0600 Subject: Casta: Adjust power button init timeout for no battery boots Bluebird units may need some additional time to complete PD negotiation when booting without a battery, so allow an extra second during power button init. This additional time is due to the fact that they do not have a TCPC on port 1, so the PD1 task will take longer to attempt to communicate with the TCPC before suspending. BRANCH=octopus BUG=b:134462099 TEST=removed battery on bluebird unit and verified it could reliably automatically power-on when AC was inserted Change-Id: I769e10db7bbf223a5d174bae3ec1b7a4b9f542c4 Signed-off-by: Diana Z Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1646992 Reviewed-by: Jett Rink --- board/casta/board.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'board/casta') diff --git a/board/casta/board.h b/board/casta/board.h index 8cf02cd1d8..7f934dc4c6 100644 --- a/board/casta/board.h +++ b/board/casta/board.h @@ -27,13 +27,23 @@ /* * 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) + * 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 +/* + * Allow an additional second during power button init to let PD negotiation + * complete when we have no battery and need to meet + * CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON. SKUs which do not have a TCPC on + * port 1 will take slightly longer to complete negotiation while the PD1 task + * attempts to communicate with its TCPC before suspending. + */ +#undef CONFIG_POWER_BUTTON_INIT_TIMEOUT +#define CONFIG_POWER_BUTTON_INIT_TIMEOUT 2 + /* Keyboard Backlight is unconnected in casta proto */ #undef CONFIG_PWM #undef CONFIG_PWM_KBLIGHT -- cgit v1.2.1