summaryrefslogtreecommitdiff
path: root/power/cometlake.c
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2019-01-10 21:46:26 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-04 22:49:19 -0800
commitce8939ec86a348c25af32a0e07aadd6054f510a8 (patch)
tree9bebeacee3638acda9e33e750991151cbf641478 /power/cometlake.c
parentfe59e6140d7ff8ee90359d3144bffb6fbcf4e053 (diff)
downloadchrome-ec-ce8939ec86a348c25af32a0e07aadd6054f510a8.tar.gz
cometlake: Guard passing RSMRST_L to PCH by PP5000_A rail
RSMRST_L gets passed along to the AP by EC when it changes state. For low to high transitions the EC needs to ensure that the PP5000_A rail is up prior to passing the RSMRST_L transition to the AP. This CL adds a check to prevent calling common_intel_x86_handle_rsmrst() when RSMRST_L is high if the PP5000_A rail is not up. Since PP5000_PG signal will float high when the regulator is not powered at all, both the enable and power good signals are used to verify that PP5000_A rail is powered. BRANCH=none BUG=b:122631914 TEST=Verified on scope that RSMRST_L to PCH rising edge happens after PP5000_A rail rising. Change-Id: Icfd4dabbdfaf6ae76b3cdcbc6f75a5188a21ff51 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1406497 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'power/cometlake.c')
-rw-r--r--power/cometlake.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/power/cometlake.c b/power/cometlake.c
index 27b78efa32..bf27b50dab 100644
--- a/power/cometlake.c
+++ b/power/cometlake.c
@@ -99,7 +99,21 @@ enum power_state power_handle_state(enum power_state state)
int all_sys_pwrgd_in;
int all_sys_pwrgd_out;
- common_intel_x86_handle_rsmrst(state);
+ /*
+ * Check if RSMRST_L signal state has changed and if so, pass the new
+ * value along to the PCH. However, if the new transition of RSMRST_L
+ * from the Sielgo is from low to high, then gate this transition to the
+ * AP by the PP5000_A rail. If the new transition is from high to low,
+ * then pass that through regardless of the PP5000_A value.
+ *
+ * The PP5000_A power good signal will float high if the
+ * regulator is not powered, so checking both that the EN and the PG
+ * signals are high.
+ */
+ if ((gpio_get_level(GPIO_PP5000_A_PG_OD) &&
+ gpio_get_level(GPIO_EN_PP5000_A)) ||
+ gpio_get_level(GPIO_PCH_RSMRST_L))
+ common_intel_x86_handle_rsmrst(state);
switch (state) {