diff options
author | Craig Hesling <hesling@chromium.org> | 2021-04-25 14:42:01 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-30 20:56:03 +0000 |
commit | caab3a60b0403e7059f83bbcc1deb09fa565beb7 (patch) | |
tree | cd0dc67c6f0af50d33ffe0afb4c1f5ffac9acbbe /board/hatch_fp | |
parent | 17938ae62c59bb9c79e5ae7ad4b1f5fbe11b96e1 (diff) | |
download | chrome-ec-caab3a60b0403e7059f83bbcc1deb09fa565beb7.tar.gz |
dartmonkey,bloonchipper: Rename sleep lines to be more generic
Note that this cannot change the sleep line names in RO FW
that is already installed on devices.
This means that running "ectool gpioget" when the FPPMCU is
still in RO, you will see the old sleep gpio names.
BRANCH=none
BUG=b:175115925, b:179946521
TEST=make BOARD=dartmonkey
TEST=make BOARD=bloonchipper
TEST=./util/ide-config.sh vscode all:RW all:RO \
| tee .vscode/c_cpp_properties.json
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: Iec3bebd87fe4f806389f78d7dfd8c29cebeb807f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2612005
Commit-Queue: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'board/hatch_fp')
-rw-r--r-- | board/hatch_fp/board_rw.c | 24 | ||||
-rw-r--r-- | board/hatch_fp/gpio_rw.inc | 4 |
2 files changed, 17 insertions, 11 deletions
diff --git a/board/hatch_fp/board_rw.c b/board/hatch_fp/board_rw.c index 40ab5092a7..74794647cf 100644 --- a/board/hatch_fp/board_rw.c +++ b/board/hatch_fp/board_rw.c @@ -23,18 +23,24 @@ * Some platforms have a broken SLP_S0_L signal (stuck to 0 in S0) * if set, ignore it and only uses SLP_S3_L for the AP state. */ -static bool broken_slp_s0; +static bool broken_slp; static void ap_deferred(void) { /* - * in S3: SLP_S3_L is 0 and SLP_S0_L is X. - * in S0ix: SLP_S3_L is 1 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 1 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) || broken_slp_s0); + int running = gpio_get_level(GPIO_SLP_ALT_L) && + (gpio_get_level(GPIO_SLP_L) || broken_slp); if (running) { /* S0 */ disable_sleep(SLEEP_MASK_AP_RUN); @@ -85,15 +91,15 @@ void board_init_rw(void) * TODO(b/174695987) once the RW AP firmware has been updated * on all those machines, remove this workaround. */ - broken_slp_s0 = true; + broken_slp = true; } /* Configure and enable SPI as master for FP sensor */ configure_fp_sensor_spi(); /* 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 */ hook_call_deferred(&ap_deferred_data, 0); diff --git a/board/hatch_fp/gpio_rw.inc b/board/hatch_fp/gpio_rw.inc index 50d1e76f50..fdc6428b3a 100644 --- a/board/hatch_fp/gpio_rw.inc +++ b/board/hatch_fp/gpio_rw.inc @@ -10,8 +10,8 @@ /* Interrupts */ GPIO_INT(FPS_INT, PIN(A, 0), GPIO_INT_RISING, fps_event) -GPIO_INT(PCH_SLP_S0_L, PIN(A, 8), GPIO_INT_BOTH, slp_event) -GPIO_INT(PCH_SLP_S3_L, PIN(B, 6), GPIO_INT_BOTH, slp_event) +GPIO_INT(SLP_L, PIN(A, 8), GPIO_INT_BOTH, slp_event) +GPIO_INT(SLP_ALT_L, PIN(B, 6), GPIO_INT_BOTH, slp_event) /* Inputs */ GPIO(FP_SENSOR_SEL, PIN(B, 0), GPIO_INPUT) |