From a25bcc8e944d467583c4ff3e7380c095fd3e93e0 Mon Sep 17 00:00:00 2001 From: Marius Schilder Date: Tue, 30 May 2017 13:55:20 -0700 Subject: [PATCH] cr50: add option to have no pinhold during deep sleep On some boards it is not desirable or necessary to hold I/O pins steady. Default behavior is unchanged; board configs can opt in to have no hold. BRANCH=none BUG=none Change-Id: I944cdc65adbb35b96b95afe71dc89d1456af080c Reviewed-on: https://chromium-review.googlesource.com/518343 Reviewed-by: Marius Schilder Reviewed-by: Vadim Bendebury Tested-by: Marius Schilder Trybot-Ready: Marius Schilder Commit-Queue: Marius Schilder --- chip/g/idle.c | 2 ++ include/config.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/chip/g/idle.c b/chip/g/idle.c index a3501973de..f2bd6fe3bd 100644 --- a/chip/g/idle.c +++ b/chip/g/idle.c @@ -128,8 +128,10 @@ static void prepare_to_sleep(void) GREG32(PMU, PWRDN_SCRATCH17) = GREG32(PMU, PWRDN_SCRATCH17) + 1; +#ifndef CONFIG_NO_PINHOLD /* Latch the pinmux values */ GREG32(PINMUX, HOLD) = 1; +#endif /* Clamp the USB pins and shut the PHY down. We have to do this * in three separate steps, or Bad Things happen. */ diff --git a/include/config.h b/include/config.h index 5ba4205cf2..038b8cf75f 100644 --- a/include/config.h +++ b/include/config.h @@ -1730,6 +1730,9 @@ /* Support memory protection unit (MPU) */ #undef CONFIG_MPU +/* Do not try hold I/O pins at frozen level during deep sleep */ +#undef CONFIG_NO_PINHOLD + /* Support one-wire interface */ #undef CONFIG_ONEWIRE