diff options
author | Mary Ruthven <mruthven@chromium.org> | 2016-07-27 18:43:51 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-01 20:02:02 -0700 |
commit | b4a9135ffc66b44f60051d1fbc2d487ffff3948e (patch) | |
tree | 3d2ff740be111d6c2877a314a18a34d2219664b1 /chip | |
parent | 4b4baaf5526a470d7b8bed68a1ac68a94612de19 (diff) | |
download | chrome-ec-b4a9135ffc66b44f60051d1fbc2d487ffff3948e.tar.gz |
g: disable sps as a wake source in deep sleep
Cr50 cant retain the TPM state in deep sleep so it wont be enabled until
it knows that the AP is off. If the AP is off it wont be asserting
SPS_CS_L, but it may be low because the AP isn't pulling it up.
This change disables it as a wake source in deep sleep.
BUG=chrome-os-partner:54796
BRANCH=none
TEST=run 'idle d'. Make sure cr50 goes into deep sleep and only resumes
due to a rdd event or when sys_rst_l is asserted.
Change-Id: Idf3ded6b439b71a27ac7eb4682a65dcdd6342cb9
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/364864
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/g/idle.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chip/g/idle.c b/chip/g/idle.c index fe712323c5..23524aae15 100644 --- a/chip/g/idle.c +++ b/chip/g/idle.c @@ -82,8 +82,23 @@ static void prepare_to_sleep(void) GC_PMU_LOW_POWER_DIS_VDDXO_MASK | GC_PMU_LOW_POWER_DIS_JTR_RC_MASK; + /* + * Deep sleep should only be enabled when the AP is off otherwise the + * TPM state will lost. + * + * TODO(crosbug.com/p/55747): Enable deep sleep when the AP is shut + * down. Currently deep sleep is only enabled through the console. + */ if (idle_action == IDLE_DEEP_SLEEP) { /* + * Disable the i2c and spi slave wake sources since the TPM is + * not being used and reenable them in their init functions on + * resume. + */ + GWRITE_FIELD(PINMUX, EXITEN0, DIOA12, 0); /* SPS_CS_L */ + /* TODO remove i2cs wake event */ + + /* * Preserve some state prior to deep sleep. Pretty much all we * need is the device address, since everything else can be * reinitialized on resume. |