summaryrefslogtreecommitdiff
path: root/board/cerise/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cerise/board.c')
-rw-r--r--board/cerise/board.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/board/cerise/board.c b/board/cerise/board.c
index 2f9fa19eda..a4fcc7490f 100644
--- a/board/cerise/board.c
+++ b/board/cerise/board.c
@@ -306,6 +306,9 @@ static void board_init(void)
/* Enable BC12 interrupt */
gpio_enable_interrupt(GPIO_BC12_EC_INT_ODL);
+
+ /* Enable USM mode */
+ ioex_set_level(IOEX_5V_DC_DC_MODE_CTRL, 1);
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
@@ -429,6 +432,22 @@ static void board_chipset_shutdown(void)
}
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT);
+/* Called on AP S3 -> S0 transition, 5V DC-DC ctrl */
+static void board_chipset_resume(void)
+{
+ /* Enable USM mode */
+ ioex_set_level(IOEX_5V_DC_DC_MODE_CTRL, 1);
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
+
+/* Called on AP S0 -> S3 transition */
+static void board_chipset_suspend(void)
+{
+ /* Enable Normal mode */
+ ioex_set_level(IOEX_5V_DC_DC_MODE_CTRL, 0);
+}
+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
+
int board_get_charger_i2c(void)
{
/* TODO(b:138415463): confirm the bus allocation for future builds */