summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/yorp/board.c16
-rw-r--r--board/yorp/gpio.inc1
2 files changed, 17 insertions, 0 deletions
diff --git a/board/yorp/board.c b/board/yorp/board.c
index c1ddee08ca..c7a9a3e56c 100644
--- a/board/yorp/board.c
+++ b/board/yorp/board.c
@@ -140,6 +140,22 @@ static void chipset_pre_init(void)
}
DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT);
+/* Called on AP S3 -> S0 transition */
+static void board_chipset_resume(void)
+{
+ /* Enable Trackpad Power when chipset is in S0 */
+ gpio_set_level(GPIO_EN_P3300_TRACKPAD_ODL, 0);
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
+
+/* Called on AP S0 -> S3 transition */
+static void board_chipset_suspend(void)
+{
+ /* Disable Trackpad Power when chipset transitions to sleep state */
+ gpio_set_level(GPIO_EN_P3300_TRACKPAD_ODL, 1);
+}
+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
+
/* Called by APL power state machine when transitioning to G3. */
void chipset_do_shutdown(void)
{
diff --git a/board/yorp/gpio.inc b/board/yorp/gpio.inc
index 65a69600d0..fd095867e9 100644
--- a/board/yorp/gpio.inc
+++ b/board/yorp/gpio.inc
@@ -53,6 +53,7 @@ GPIO(PCH_PWRBTN_L, PIN(C, 1), GPIO_ODR_HIGH) /* GPIO_PCH_PWRBTN_L */
GPIO(EN_PP5000, PIN(7, 3), GPIO_OUT_LOW) /* EN_PP5000_A */
GPIO(PP5000_PG, PIN(C, 0), GPIO_INPUT) /* PP5000_PG_OD */
+GPIO(EN_P3300_TRACKPAD_ODL, PIN(3, 3), GPIO_ODR_HIGH)
GPIO(EN_PP3300, PIN(D, 4), GPIO_OUT_LOW) /* EN_PP3300_A */
GPIO(PP3300_PG, PIN(6, 0), GPIO_INPUT) /* PP3300_PG_OD */
GPIO(PMIC_EN, PIN(D, 7), GPIO_OUT_LOW) /* Enable A Rails via PMIC */