mb/google/bluey: Support RTC wake-up boot mode

Implement the logic to detect, set, and handle RTC wake-up events on
the Bluey mainboard.

Key changes:
- romstage: Use the new google_chromeec_is_rtc_event() API to set
  the boot mode to LB_BOOT_MODE_RTC_WAKE when an RTC alarm triggers
  the boot.
- mainboard: Update is_low_power_boot_with_charger() to include
  RTC_WAKE, ensuring the system follows the low-power initialization
  path (e.g., entering the charging applet).
- mainboard: Update display_startup() to skip display initialization
  during an RTC wake event to conserve power and maintain a "dark"
  wake-up state where appropriate.

BUG=b:493760057
BRANCH=none
TEST=Set an RTC alarm via the EC, verify the system boots into the
charging applet path and skips display initialization on Bluey.

Change-Id: Iaa9d1acffa0da014775e3397b877178c9c820ad5
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91765
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2026-03-19 19:04:52 +00:00
commit 444691603d
2 changed files with 7 additions and 3 deletions

View file

@ -70,7 +70,8 @@ static bool is_low_power_boot_with_charger(void)
bool ret = false;
enum boot_mode_t boot_mode = get_boot_mode();
if ((boot_mode == LB_BOOT_MODE_LOW_BATTERY_CHARGING) ||
(boot_mode == LB_BOOT_MODE_OFFMODE_CHARGING))
(boot_mode == LB_BOOT_MODE_OFFMODE_CHARGING) ||
(boot_mode == LB_BOOT_MODE_RTC_WAKE))
ret = true;
return ret;
@ -155,7 +156,8 @@ bool mainboard_needs_pcie_init(void)
static void display_startup(void)
{
if (!display_init_required() || (CONFIG(VBOOT_LID_SWITCH) && !get_lid_switch())) {
if ((get_boot_mode() == LB_BOOT_MODE_RTC_WAKE) || !display_init_required() ||
(CONFIG(VBOOT_LID_SWITCH) && !get_lid_switch())) {
printk(BIOS_INFO, "Skipping display init.\n");
return;
}

View file

@ -41,7 +41,9 @@ static enum boot_mode_t set_boot_mode(void)
enum boot_mode_t boot_mode_new;
if (is_off_mode() && google_chromeec_is_battery_present()) {
if (google_chromeec_is_rtc_event()) {
boot_mode_new = LB_BOOT_MODE_RTC_WAKE;
} else if (is_off_mode() && google_chromeec_is_battery_present()) {
boot_mode_new = LB_BOOT_MODE_OFFMODE_CHARGING;
} else if (google_chromeec_is_below_critical_threshold()) {
if (google_chromeec_is_charger_present())