summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/program/skyrim/frostflow/src/usb_mux_config.c4
-rw-r--r--zephyr/program/skyrim/src/power_signals.c12
2 files changed, 12 insertions, 4 deletions
diff --git a/zephyr/program/skyrim/frostflow/src/usb_mux_config.c b/zephyr/program/skyrim/frostflow/src/usb_mux_config.c
index b3d8c61f2e..99a665cadd 100644
--- a/zephyr/program/skyrim/frostflow/src/usb_mux_config.c
+++ b/zephyr/program/skyrim/frostflow/src/usb_mux_config.c
@@ -189,7 +189,7 @@ test_export_static void board_resume_change(struct ap_power_ev_callback *cb,
default:
return;
- case AP_POWER_RESUME:
+ case AP_POWER_STARTUP:
/* Any retimer tuning can be done after the retimer turns on */
hook_call_deferred(&baseboard_a1_retimer_setup_data, 20 * MSEC);
break;
@@ -201,7 +201,7 @@ void board_callback_init(void)
static struct ap_power_ev_callback cb;
/* Setup a resume callback */
- ap_power_ev_init_callback(&cb, board_resume_change, AP_POWER_RESUME);
+ ap_power_ev_init_callback(&cb, board_resume_change, AP_POWER_STARTUP);
ap_power_ev_add_callback(&cb);
}
DECLARE_HOOK(HOOK_INIT, board_callback_init, HOOK_PRIO_DEFAULT);
diff --git a/zephyr/program/skyrim/src/power_signals.c b/zephyr/program/skyrim/src/power_signals.c
index b0919ae5f4..8af2d6bbcf 100644
--- a/zephyr/program/skyrim/src/power_signals.c
+++ b/zephyr/program/skyrim/src/power_signals.c
@@ -60,9 +60,13 @@ static void baseboard_suspend_change(struct ap_power_ev_callback *cb,
return;
case AP_POWER_SUSPEND:
- /* Disable display backlight and retimer */
+ /* Disable display backlight */
gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_ec_disable_disp_bl),
1);
+ break;
+
+ case AP_POWER_SHUTDOWN:
+ /* Retimer disable */
ioex_set_level(IOEX_USB_A1_RETIMER_EN, 0);
break;
@@ -70,6 +74,9 @@ static void baseboard_suspend_change(struct ap_power_ev_callback *cb,
/* Enable retimer and display backlight */
gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_ec_disable_disp_bl),
0);
+ break;
+
+ case AP_POWER_STARTUP:
ioex_set_level(IOEX_USB_A1_RETIMER_EN, 1);
/* Any retimer tuning can be done after the retimer turns on */
break;
@@ -101,7 +108,8 @@ static void baseboard_init(void)
/* Setup a suspend/resume callback */
ap_power_ev_init_callback(&cb, baseboard_suspend_change,
- AP_POWER_RESUME | AP_POWER_SUSPEND);
+ AP_POWER_STARTUP | AP_POWER_SHUTDOWN |
+ AP_POWER_RESUME | AP_POWER_SUSPEND);
ap_power_ev_add_callback(&cb);
/* Enable Power Group interrupts. */
gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_pg_groupc_s0));