summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2019-02-22 07:01:53 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-16 01:53:27 -0700
commit4c7a2805478b611228ec85dc4b3a5f3e088fce00 (patch)
treeb14dd0839f54c8c4d6dbeab31bd844d1e9ee540e /power
parent72975c79fc27c98a527c62f59dd1c526c136e182 (diff)
downloadchrome-ec-4c7a2805478b611228ec85dc4b3a5f3e088fce00.tar.gz
cometlake: Add PP5000_CONTROL config for PP5000_A rail
This CL adds the config option CONFIG_POWER_PP5000_CONTROL to the instances where PP5000_A is turned on or off as part of power sequencing. This option is used for cases where the PP5000_A rail may need to stay on for bc1.2 detection even with the AP is in G3. BUG=b:122265772 BRANCH=none TEST=Verified that AP power sequencing still behaves as expected. Change-Id: Ia1acd5a592f60973a3b852a987e93283f10d0ac0 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1503956 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/cometlake.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/power/cometlake.c b/power/cometlake.c
index 466aa4d6c5..0c6a8243f1 100644
--- a/power/cometlake.c
+++ b/power/cometlake.c
@@ -33,8 +33,13 @@ void chipset_force_shutdown(enum chipset_shutdown_reason reason)
/* Turn off A (except PP5000_A) rails*/
gpio_set_level(GPIO_EN_A_RAILS, 0);
+#ifdef CONFIG_POWER_PP5000_CONTROL
+ /* Issue a request to turn off the rail. */
+ power_5v_enable(task_get_current(), 0);
+#else
/* Turn off PP5000_A rail */
gpio_set_level(GPIO_EN_PP5000_A, 0);
+#endif
/* Need to wait a min of 10 msec before check for power good */
msleep(10);
@@ -78,15 +83,13 @@ enum power_state chipset_force_g3(void)
/* Called by APL power state machine when transitioning from G3 to S5 */
void chipset_pre_init_callback(void)
{
- /*
- * TODO (b/122265772): Need to use CONFIG_POWER_PP5000_CONTROL, but want
- * to do that after some refactoring so that more than 1 signal can be
- * tracked if necessary.
- */
-
/* Enable 5.0V and 3.3V rails, and wait for Power Good */
+#ifdef CONFIG_POWER_PP5000_CONTROL
+ power_5v_enable(task_get_current(), 1);
+#else
/* Turn on PP5000_A rail */
gpio_set_level(GPIO_EN_PP5000_A, 1);
+#endif
/* Turn on A (except PP5000_A) rails*/
gpio_set_level(GPIO_EN_A_RAILS, 1);