From 1f7961e69334ac0b34ba4c55d88ca4088060d72f Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Fri, 3 Apr 2015 11:50:57 -0700 Subject: ryu: workaround MAX77620 shutdown issue When shutting down the MAX77620 PMIC by asseting its SHDN pin, the EN_PP3300 output of the PMIC (GPIO3) is not going off keeping the PP3300 rail up. Workaround that issue by removing the pull-up on EN_PP3300 when we assert SHDN. Signed-off-by: Vincent Palatin BRANCH=none BUG=chrome-os-partner:38689 TEST=on a P5 board, type "apshutdown" and see the power state machine going to S5, type "powerbtn" and see it going back to S0. Change-Id: I0e5fba6da118d931b07fff58088604ee00a6bcdd Reviewed-on: https://chromium-review.googlesource.com/263958 Trybot-Ready: Vincent Palatin Tested-by: Vincent Palatin Reviewed-by: Alec Berg Commit-Queue: Vincent Palatin --- power/tegra.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/power/tegra.c b/power/tegra.c index 5efd41e61d..2bdba8b5f9 100644 --- a/power/tegra.c +++ b/power/tegra.c @@ -144,6 +144,11 @@ static void set_ap_reset(int asserted) */ static void set_pmic_pwron(int asserted) { +#ifdef BOARD_RYU + /* TODO(crosbug.com/p/38689) Workaround for MAX77620 PMIC issue */ + if (asserted) + gpio_set_flags(GPIO_EN_PP3300_RSVD, GPIO_INPUT | GPIO_PULL_UP); +#endif /* BOARD_RYU */ /* Signal is active-low */ gpio_set_level(GPIO_PMIC_PWRON_L, asserted ? 0 : 1); } @@ -158,6 +163,11 @@ static void set_pmic_therm(int asserted) { /* Signal is active-low */ gpio_set_level(GPIO_PMIC_THERM_L, asserted ? 0 : 1); +#ifdef BOARD_RYU + /* TODO(crosbug.com/p/38689) Workaround for MAX77620 PMIC issue */ + if (asserted) + gpio_set_flags(GPIO_EN_PP3300_RSVD, GPIO_INPUT); +#endif /* BOARD_RYU */ } /** -- cgit v1.2.1