mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-12 02:45:33 +00:00
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>
This commit is contained in:
@@ -82,7 +82,22 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user