summaryrefslogtreecommitdiff
path: root/board/nucleo-dartmonkey
diff options
context:
space:
mode:
authorCraig Hesling <hesling@chromium.org>2021-06-18 15:07:14 -0700
committerCommit Bot <commit-bot@chromium.org>2021-07-01 18:20:38 +0000
commit70cd860787c2663fb9fea28e7d0a4392c6fe82e2 (patch)
tree4b26a2333a1ab42a8cd037f2597233f1ab4f8b55 /board/nucleo-dartmonkey
parentdfe7ebd369d7ebab9ceda76ccfe47e3fe1de76d7 (diff)
downloadchrome-ec-70cd860787c2663fb9fea28e7d0a4392c6fe82e2.tar.gz
nucleo-dartmonkey: Rename sleep lines to be more generic
BRANCH=none BUG=b:175115925 TEST=make BOARD=nucleo-dartmonkey Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Id02e02087356b35c922a795df737979d7510efa6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2612006 Reviewed-by: Josie Nordrum <josienordrum@google.com>
Diffstat (limited to 'board/nucleo-dartmonkey')
-rw-r--r--board/nucleo-dartmonkey/board.c20
-rw-r--r--board/nucleo-dartmonkey/gpio.inc4
2 files changed, 15 insertions, 9 deletions
diff --git a/board/nucleo-dartmonkey/board.c b/board/nucleo-dartmonkey/board.c
index 9189fbcf29..a7851ec00b 100644
--- a/board/nucleo-dartmonkey/board.c
+++ b/board/nucleo-dartmonkey/board.c
@@ -27,13 +27,19 @@ int console_is_restricted(void)
static void ap_deferred(void)
{
/*
- * in S3: SLP_S3_L is 0 and SLP_S0_L is X.
- * in S0ix: SLP_S3_L is X and SLP_S0_L is 0.
- * in S0: SLP_S3_L is 1 and SLP_S0_L is 1.
+ * Behavior:
+ * AP Active (ex. Intel S0): SLP_L is 1
+ * AP Suspend (ex. Intel S0ix): SLP_L is 0
+ * The alternative SLP_ALT_L should be pulled high at all the times.
+ *
+ * Legacy Intel behavior:
+ * in S3: SLP_ALT_L is 0 and SLP_L is X.
+ * in S0ix: SLP_ALT_L is X and SLP_L is 0.
+ * in S0: SLP_ALT_L is 1 and SLP_L is 1.
* in S5/G3, the FP MCU should not be running.
*/
- int running = gpio_get_level(GPIO_PCH_SLP_S3_L)
- && gpio_get_level(GPIO_PCH_SLP_S0_L);
+ int running = gpio_get_level(GPIO_SLP_ALT_L)
+ && gpio_get_level(GPIO_SLP_L);
if (running) { /* S0 */
disable_sleep(SLEEP_MASK_AP_RUN);
@@ -87,8 +93,8 @@ static void board_init(void)
fp_transport_type_to_str(get_fp_transport_type()));
/* Enable interrupt on PCH power signals */
- gpio_enable_interrupt(GPIO_PCH_SLP_S3_L);
- gpio_enable_interrupt(GPIO_PCH_SLP_S0_L);
+ gpio_enable_interrupt(GPIO_SLP_ALT_L);
+ gpio_enable_interrupt(GPIO_SLP_L);
/*
* Enable the SPI slave interface if the PCH is up.
diff --git a/board/nucleo-dartmonkey/gpio.inc b/board/nucleo-dartmonkey/gpio.inc
index 2028add873..11709fe738 100644
--- a/board/nucleo-dartmonkey/gpio.inc
+++ b/board/nucleo-dartmonkey/gpio.inc
@@ -14,8 +14,8 @@
#include "base-gpio.inc"
/* Interrupts */
-GPIO_INT(PCH_SLP_S0_L, PIN(D, 13), GPIO_INT_BOTH, slp_event)
-GPIO_INT(PCH_SLP_S3_L, PIN(A, 11), GPIO_INT_BOTH, slp_event)
+GPIO_INT(SLP_L, PIN(D, 13), GPIO_INT_BOTH, slp_event)
+GPIO_INT(SLP_ALT_L, PIN(A, 11), GPIO_INT_BOTH, slp_event)
/* Output for User Presence */
GPIO(USER_PRES_L, PIN(C, 5), GPIO_ODR_HIGH)