summaryrefslogtreecommitdiff
path: root/baseboard/zork/baseboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'baseboard/zork/baseboard.c')
-rw-r--r--baseboard/zork/baseboard.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c
index 0d289120e7..4a482a42cb 100644
--- a/baseboard/zork/baseboard.c
+++ b/baseboard/zork/baseboard.c
@@ -328,3 +328,23 @@ __override int isl9241_update_learn_mode(int chgnum, int enable)
return isl9241_write(chgnum, ISL9241_REG_CONTROL1, reg);
}
+
+/*
+ * b/164921478: On G3->S5, wait for RSMRST_L to be deasserted before asserting
+ * PWRBTN_L.
+ */
+void board_pwrbtn_to_pch(int level)
+{
+ /* Add delay for G3 exit if asserting PWRBTN_L and S5_PGOOD is low. */
+ if (!level && !gpio_get_level(GPIO_S5_PGOOD)) {
+ /*
+ * From measurement, wait 80 ms for RSMRST_L to rise after
+ * S5_PGOOD.
+ */
+ msleep(80);
+
+ if (!gpio_get_level(GPIO_S5_PGOOD))
+ ccprints("Error: pwrbtn S5_PGOOD low");
+ }
+ gpio_set_level(GPIO_PCH_PWRBTN_L, level);
+}