diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2020-04-28 14:13:20 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-28 18:42:20 +0000 |
commit | bff373fdcdcfb67e52e8d9ef9223f2474adcb9f3 (patch) | |
tree | bd58f7b1f84b03c51b02443715c0ec608d87c95a | |
parent | 33b188b9843cd49d34e93c2e05bf4fbec21a35aa (diff) | |
download | chrome-ec-bff373fdcdcfb67e52e8d9ef9223f2474adcb9f3.tar.gz |
Ampton: assert RSMRST to PCH while force shutdown
This change was made to fix issue of PP3300_LDO dropped while
force shutdown. And the dropping will cause EC exception due
to EC's power rail is dropped.
BUG=b:144548329
BRANCH=none
TEST=On ampton, "apshutdown" can be run over 100 times and
no exception triggered.
Change-Id: I1b050b40bb91d123bb71a92261e98efd1db71628
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2142840
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Tested-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | baseboard/octopus/baseboard.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/baseboard/octopus/baseboard.c b/baseboard/octopus/baseboard.c index ceb32868a0..2577dbaf1a 100644 --- a/baseboard/octopus/baseboard.c +++ b/baseboard/octopus/baseboard.c @@ -166,6 +166,20 @@ DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, baseboard_chipset_shutdown, /* Called by APL power state machine when transitioning to G3. */ void chipset_do_shutdown(void) { +#ifdef VARIANT_OCTOPUS_EC_ITE8320 + /* + * We want the processor to be reset before dropping the PP3300_A rail + * below, otherwise the PP3300_LDO and PP3300_EC rails can be overloaded + */ + if (gpio_get_level(GPIO_PCH_SLP_S4_L)) { + /* assert RSMRST to PCH */ + gpio_set_level(GPIO_PCH_RSMRST_L, 0); + /* Wait SLP_S4 goes low; would rather watchdog than continue */ + while (gpio_get_level(GPIO_PCH_SLP_S4_L)) + ; + } +#endif + /* Disable PMIC */ gpio_set_level(GPIO_PMIC_EN, 0); |