summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-07-29 12:09:55 -0700
committerCommit Bot <commit-bot@chromium.org>2020-07-30 04:42:14 +0000
commit8ff1717409b98f75f1b6b613e4b0fd1e1400a416 (patch)
tree26d065cda94a44727570cb449e0fce1fe9685c08 /power
parent1cef85d675613e6cf18a5408675cc33085586d8b (diff)
downloadchrome-ec-8ff1717409b98f75f1b6b613e4b0fd1e1400a416.tar.gz
sc7180: Enable the load switch during AP power-on
The QSIP_ON GPIO controls the load switch enable. The load switch is redundant and used for experiments. But leaving it off consumes power. Should enable it during AP power-on and disable it during AP power-off, such that it doesn't waste power. Add the QSIP_ON GPIO to the trogdor board. It was added since rev-1 (rev-0 is NC). BRANCH=None BUG=b:159999589 TEST=Checked AP power-on and power-off. Change-Id: Ia1ef6a0c2285b5adcc53b717f7f310b15eb1d941 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2327632 Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Jim Guerin <jguerin@google.com>
Diffstat (limited to 'power')
-rw-r--r--power/sc7180.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/power/sc7180.c b/power/sc7180.c
index 886f22078b..d31728bfc7 100644
--- a/power/sc7180.c
+++ b/power/sc7180.c
@@ -514,6 +514,9 @@ static void power_off(void)
set_system_power(0);
}
+ /* Turn off the load switch */
+ gpio_set_level(GPIO_QSIP_ON, 0);
+
/* Turn off the 3.3V and 5V rails. */
gpio_set_level(GPIO_EN_PP3300_A, 0);
#ifdef CONFIG_POWER_PP5000_CONTROL
@@ -565,6 +568,12 @@ static int power_on(void)
gpio_set_level(GPIO_EN_PP5000, 1);
#endif /* defined(CONFIG_POWER_PP5000_CONTROL) */
+ /*
+ * Enable the load switch. The load switch is redundant.
+ * But leaving it off consumes power.
+ */
+ gpio_set_level(GPIO_QSIP_ON, 1);
+
ret = set_system_power(1);
if (ret != EC_SUCCESS)
return ret;