summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2019-06-06 11:34:35 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-11 23:20:53 +0000
commit8214b2c6e4130acbe7b8d9185b71b1a48cae55ed (patch)
tree72f04830c006b504668180692a5e186d56414180 /power
parent86202bd0303c6b63d7ef44c803212687b560f13a (diff)
downloadchrome-ec-8214b2c6e4130acbe7b8d9185b71b1a48cae55ed.tar.gz
icelake: Add option to turn-off 5V-rail in power sequencing
Need to enable or disable the 5V-rail in power sequencing to support boards with 5V-rail. This CL is a derivative of Cometlake CL. Change-Id: Ia1acd5a592f60973a3b852a987e93283f10d0ac0 Reviewed-on: https://chromium-review.googlesource.com/1503956 BUG=b:134688223 BRANCH=none TEST=Able to control 5V-rail of ICLRVP Change-Id: Iefaa1091e863c1c431ea784d2e02478ce67f8911 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1647369 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/icelake.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/power/icelake.c b/power/icelake.c
index 04b734c213..86f0f7e459 100644
--- a/power/icelake.c
+++ b/power/icelake.c
@@ -39,6 +39,13 @@ void chipset_force_shutdown(enum chipset_shutdown_reason reason)
/* Turn off DSW load switch. */
gpio_set_level(GPIO_EN_PP3300_A, 0);
+ /* Turn off PP5000 rail */
+#ifdef CONFIG_POWER_PP5000_CONTROL
+ power_5v_enable(task_get_current(), 0);
+#else
+ gpio_set_level(GPIO_EN_PP5000, 0);
+#endif
+
/*
* TODO(b/111810925): Replace this wait with
* power_wait_signals_timeout()
@@ -98,6 +105,13 @@ enum power_state power_handle_state(enum power_state state)
switch (state) {
case POWER_G3S5:
+ /* Turn on PP5000 rail */
+#ifdef CONFIG_POWER_PP5000_CONTROL
+ power_5v_enable(task_get_current(), 1);
+#else
+ gpio_set_level(GPIO_EN_PP5000, 1);
+#endif
+
/*
* TODO(b/111121615): Should modify this to wait until the
* common power state machine indicates that it's ok to try an