diff options
author | Mary Ruthven <mruthven@chromium.org> | 2021-04-01 12:02:28 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-01 21:19:42 +0000 |
commit | 8adbe7927badca7c3a6eb46479333dd754e9bf79 (patch) | |
tree | 0c95de4113266a8acc463c2a087ef7c7577f5e42 | |
parent | 31ce1c0c9b926a4075b6036de7f9187ab61c695e (diff) | |
download | chrome-ec-8adbe7927badca7c3a6eb46479333dd754e9bf79.tar.gz |
ec-comm: make EC_PACKET_MODE_EN a wake source in all states
Enable EC_PACKET_MODE_EN wake on high in ec_comm_init_ instead of
board_configure_deep_sleep_wakepins, so cr50 will wake from regular
sleep and deep sleep when EC_PACKET_MODE_EN is asserted.
BUG=b:183611249
TEST=manual
# Verify EC-EFS after wake from deep sleep
# shutdown AP wait for cr50 to enter deep sleep
ec > reboot ap-off
# wait for cr50 to enter deep sleep.
# Verify cr50 wakes up from deep sleep and verifies EC hash.
ec > reboot ap-off
# Verify EC-EFS after wake from sleep
# keep AP off. Set the idle action to sleep
cr50 > idle s
# Disable TPM_RST_L wake to prevent that from constantly waking
# cr50.
cr50 > rw 0x40060284
read 0x40060284 = 0x00860008
cr50 > rw 0x40060284 0x00860000
# Verify cr50 wakes up from sleep and verifies EC hash.
ec > reboot ap-off
Change-Id: I7fc31154becaafaa536fc1ee6775a7723e49a469
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799447
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
-rw-r--r-- | board/cr50/board.c | 3 | ||||
-rw-r--r-- | common/ec_comm.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c index 1f5ad35e3b..4dc20f8b8c 100644 --- a/board/cr50/board.c +++ b/board/cr50/board.c @@ -619,9 +619,6 @@ void board_configure_deep_sleep_wakepins(void) * configure_board_specific_gpios(). */ gpio_set_wakepin(GPIO_TPM_RST_L, GPIO_HIB_WAKE_HIGH); - - if (board_has_ec_cr50_comm_support()) - gpio_set_wakepin(GPIO_EC_PACKET_MODE_EN, GPIO_HIB_WAKE_HIGH); } static void deferred_tpm_rst_isr(void); diff --git a/common/ec_comm.c b/common/ec_comm.c index ca41649d97..bedd9e34af 100644 --- a/common/ec_comm.c +++ b/common/ec_comm.c @@ -69,6 +69,9 @@ static void ec_comm_init_(void) CPRINTS("Initialization"); + /* Wake from sleep or deep sleep when EC_PACKET_MODE_EN is asserted. */ + gpio_set_wakepin(GPIO_EC_PACKET_MODE_EN, GPIO_HIB_WAKE_HIGH); + gpio_enable_interrupt(GPIO_EC_PACKET_MODE_EN); gpio_enable_interrupt(GPIO_EC_PACKET_MODE_DIS); |