ec: Enable deep sleep mode when the host is using stm32 rtc alarm. |
||||||||
Issue descriptionFor boards using stm32 rtc, we disable deep sleep mode if the host is using RTC alarm: https://chromium-review.googlesource.com/#/c/chromiumos/platform/ec/+/674054/3/chip/stm32/clock-stm32f0.c@318 As discussed in the CL, since we plan to use rtc for the host in lucid sleep mode, we should figure out how to enable deep sleep mode when the host is using stm32 rtc alarm.
,
Sep 27 2017
,
Sep 27 2017
That link doesn't work for me. This does: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/674054/3/chip/stm32/clock-stm32f0.c
,
Oct 5 2017
Are you able to just keep track of both alarms and just program whichever one is sooner?
,
Oct 6 2017
,
Oct 18
The CL looks like it got abandoned a while ago: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/706537 Not sure the reason, maybe it looks like a errata for the chip? How accurate do we need our host rtc alarms to be? could we just make a task that wakes the EC every 1 second and check if the rtc alarm should have triggered? Sort of like a soft RTC alarm? This way we don't have to mux the rtc hardware alarm for 2 things.
,
Oct 29
,
Jan 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/edb881c3dded700075a7f0cda5465ccd4a96dcc4 commit edb881c3dded700075a7f0cda5465ccd4a96dcc4 Author: Philip Chen <philipchen@google.com> Date: Sat Jan 05 22:52:12 2019 chip/stm32/clock: Cleanly clear pending RTC alarm IRQ We want to reset RTC alarm and clear pending IRQ when EC wakes up from deep sleep mode. Unfortunately, RTC alarm IRQ is still latched and pending in NVIC unless we explicitly clear the flag in ICPR register. BUG= chromium:769503 BRANCH=scarlet TEST=confirm RTC alarm irq is not fired after EC exits deep sleep mode Change-Id: If6b9815337fbd24a0337116ef9c5fa1521671a93 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/1390947 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> [modify] https://crrev.com/edb881c3dded700075a7f0cda5465ccd4a96dcc4/chip/stm32/clock-f.c
,
Jan 8
To support lucid sleep mode in the future, the work for this issue has resumed. Please review the latest patch set: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/706537
,
Jan 9
,
Jan 11
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/2d4116498333af946497ef9445f721d8a3e82e9e commit 2d4116498333af946497ef9445f721d8a3e82e9e Author: Philip Chen <philipchen@google.com> Date: Fri Jan 11 17:47:59 2019 chip/stm32/clock: Enable STOP mode when the host sets wake alarm BUG= chromium:769503 BRANCH=scarlet TEST=make buildall -j TEST=On scarlet: 1) 'powerd_dbus_suspend --wakeup_timeout=10' on AP console. 2) When AP is in S3, confirm ec enters STOP mode by 'idlestat'. 3) Confirm AP still wakes up at the right time. Change-Id: I0ce60cc6c33cb475b3311de83c35fe73ff92641b Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/706537 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> [modify] https://crrev.com/2d4116498333af946497ef9445f721d8a3e82e9e/chip/stm32/clock-stm32f0.c [modify] https://crrev.com/2d4116498333af946497ef9445f721d8a3e82e9e/chip/stm32/clock-f.c [modify] https://crrev.com/2d4116498333af946497ef9445f721d8a3e82e9e/board/zinger/runtime.c [modify] https://crrev.com/2d4116498333af946497ef9445f721d8a3e82e9e/chip/stm32/clock-f.h
,
Jan 11
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/72650f3577a040ee89fe31f2b23c34cd4d2fb95d commit 72650f3577a040ee89fe31f2b23c34cd4d2fb95d Author: Philip Chen <philipchen@google.com> Date: Fri Jan 11 18:40:32 2019 chip/stm32/clock: Enable STOP mode when the host sets wake alarm BUG= chromium:769503 BRANCH=scarlet TEST=make buildall -j TEST=On scarlet: 1) 'powerd_dbus_suspend --wakeup_timeout=10' on AP console. 2) When AP is in S3, confirm ec enters STOP mode by 'idlestat'. 3) Confirm AP still wakes up at the right time. Change-Id: I0ce60cc6c33cb475b3311de83c35fe73ff92641b Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/706537 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> (cherry picked from commit 2d4116498333af946497ef9445f721d8a3e82e9e) Reviewed-on: https://chromium-review.googlesource.com/c/1407231 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Trybot-Ready: Philip Chen <philipchen@chromium.org> [modify] https://crrev.com/72650f3577a040ee89fe31f2b23c34cd4d2fb95d/chip/stm32/clock-stm32f0.c [modify] https://crrev.com/72650f3577a040ee89fe31f2b23c34cd4d2fb95d/chip/stm32/clock-f.c [modify] https://crrev.com/72650f3577a040ee89fe31f2b23c34cd4d2fb95d/board/zinger/runtime.c [modify] https://crrev.com/72650f3577a040ee89fe31f2b23c34cd4d2fb95d/chip/stm32/clock-f.h
,
Jan 11
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/f6805af8796784818697d4575fdf12000388e4af commit f6805af8796784818697d4575fdf12000388e4af Author: Philip Chen <philipchen@google.com> Date: Fri Jan 11 18:40:34 2019 chip/stm32/clock: Cleanly clear pending RTC alarm IRQ We want to reset RTC alarm and clear pending IRQ when EC wakes up from deep sleep mode. Unfortunately, RTC alarm IRQ is still latched and pending in NVIC unless we explicitly clear the flag in ICPR register. BUG= chromium:769503 BRANCH=scarlet TEST=confirm RTC alarm irq is not fired after EC exits deep sleep mode Change-Id: If6b9815337fbd24a0337116ef9c5fa1521671a93 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/1392408 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Trybot-Ready: Philip Chen <philipchen@chromium.org> [modify] https://crrev.com/f6805af8796784818697d4575fdf12000388e4af/chip/stm32/clock-f.c
,
Jan 11
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by philipchen@chromium.org
, Sep 27 2017