From 1bb906bd86286fc254e06d940b05223b1f269358 Mon Sep 17 00:00:00 2001 From: Wai-Hong Tam Date: Mon, 27 Aug 2018 16:17:42 -0700 Subject: cheza: Turn off 3.3V rail on S5 Once the hardware bug is fixed, we can turn off the 3.3V rail on S5 to save power. BRANCH=none BUG=b:110988793 TEST=Tested the EC UART work properly in S5 on a r3 board. Change-Id: I5d1dfcf8a6887e962d761b93e25722de66f61d62 Signed-off-by: Wai-Hong Tam Reviewed-on: https://chromium-review.googlesource.com/1194345 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Stephen Boyd --- board/cheza/gpio.inc | 3 +-- power/sdm845.c | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/board/cheza/gpio.inc b/board/cheza/gpio.inc index 6a229d741c..863ee9d91e 100644 --- a/board/cheza/gpio.inc +++ b/board/cheza/gpio.inc @@ -52,8 +52,7 @@ GPIO(AP_SUSPEND_L, PIN(5, 7), GPIO_INPUT | GPIO_SEL_1P8V) /* Suspen /* Power enables */ GPIO(SWITCHCAP_ON_L, PIN(D, 5), GPIO_OUT_LOW) /* Enable switch cap. XXX: It's active-high */ GPIO(VBOB_EN, PIN(9, 5), GPIO_OUT_LOW) /* Enable VBOB */ -/* TODO(b/110988793): Default it to LOW and make it a S3 rail once the bug is fixed. */ -GPIO(EN_PP3300_A, PIN(A, 6), GPIO_OUT_HIGH) /* Enable PP3300 */ +GPIO(EN_PP3300_A, PIN(A, 6), GPIO_OUT_LOW) /* Enable PP3300 */ GPIO(EN_PP5000, PIN(6, 7), GPIO_OUT_LOW) /* EN_PP5000_A: Enable PP5000 */ GPIO(ENABLE_BACKLIGHT, PIN(B, 6), GPIO_OUT_LOW) /* EC_BL_DISABLE_L: Backlight disable signal from EC */ diff --git a/power/sdm845.c b/power/sdm845.c index 5b59e8cab9..6c5f033b44 100644 --- a/power/sdm845.c +++ b/power/sdm845.c @@ -394,7 +394,8 @@ static void power_off(void) /* If it is forced down, wait to ensure POWER_GOOD down */ wait_pmic_pwron(0, FORCE_OFF_RESPONSE_TIMEOUT); - /* Turn off the 5V rail. */ + /* Turn off the 3.3V and 5V rails. */ + gpio_set_level(GPIO_EN_PP3300_A, 0); #ifdef CONFIG_POWER_PP5000_CONTROL power_5v_enable(task_get_current(), 0); #else /* !defined(CONFIG_POWER_PP5000_CONTROL) */ @@ -447,7 +448,8 @@ static void power_on(void) */ hook_notify(HOOK_CHIPSET_PRE_INIT); - /* Enable the 5V rail. */ + /* Enable the 3.3V and 5V rail. */ + gpio_set_level(GPIO_EN_PP3300_A, 1); #ifdef CONFIG_POWER_PP5000_CONTROL power_5v_enable(task_get_current(), 1); #else /* !defined(CONFIG_POWER_PP5000_CONTROL) */ -- cgit v1.2.1