summaryrefslogtreecommitdiff
path: root/board/quackingstick
diff options
context:
space:
mode:
authorSue Chen <sue.chen@quanta.corp-partner.google.com>2021-12-22 15:37:19 +0800
committerCommit Bot <commit-bot@chromium.org>2022-01-08 01:34:04 +0000
commit596a6254a87227b57abd22c835b543b77e7cd882 (patch)
treee1e5964eea08a4cd02dbc9f187b9f30752e91423 /board/quackingstick
parente904f4224392fa96c630252e904985a361c1ad50 (diff)
downloadchrome-ec-596a6254a87227b57abd22c835b543b77e7cd882.tar.gz
Quackingstick: fix hibernate behavior for rev1
The power of hall sensor and the LID_OPEN_EC on rev1 are different, and it cause LID_OPEN_EC wake the EC immediately when EC enter hibernate. Remove GPIO_LID_OPEN from hibernate_wake_pins for board_id <= 1 to let rev1 dut can enter hibernate. Rev1 needs the workaround for ACOK can't go High to wake EC up. Set GPIO_HIBERNATE_L always open-drain. BUG=none BRANCH=trogdor TEST=Rev1 dut can enter hibernate Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: Idc533cb9e216b9e220bb9b2dcc5b2f98975c40d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3353051 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Bob Moragues <moragues@chromium.org> Commit-Queue: Bob Moragues <moragues@chromium.org>
Diffstat (limited to 'board/quackingstick')
-rw-r--r--board/quackingstick/board.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/board/quackingstick/board.c b/board/quackingstick/board.c
index d0552b9f05..749bcdc4fd 100644
--- a/board/quackingstick/board.c
+++ b/board/quackingstick/board.c
@@ -393,13 +393,15 @@ void motion_interrupt(enum gpio_signal signal)
static void board_init(void)
{
/*
- * The rev-1 hardware doesn't have the external pull-up fix for the bug
- * b/177611071. It requires rework to stuff the resistor. For people who
- * has difficulty to do the rework, this is a workaround, which makes
- * the GPIO push-pull, instead of open-drain.
+ * The rev-1 hardware use PP1800_SENSORS as the power of the hall IC,
+ * it cause the LID_OPEN_EC wake EC immediately when EC enter hibernate.
*/
- if (system_get_board_version() == 1)
- gpio_set_flags(GPIO_HIBERNATE_L, GPIO_OUTPUT);
+ if (system_get_board_version() <= 1) {
+ hibernate_wake_pins[0] = GPIO_AC_PRESENT;
+ hibernate_wake_pins[1] = GPIO_POWER_BUTTON_L;
+ hibernate_wake_pins[2] = GPIO_EC_RST_ODL;
+ hibernate_wake_pins_used = 3;
+ }
/* Enable BC1.2 interrupts */
gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_L);
@@ -469,7 +471,7 @@ void board_hibernate(void)
* Board rev 1+ has the hardware fix. Don't need the following
* workaround.
*/
- if (system_get_board_version() >= 1)
+ if (system_get_board_version() > 1)
return;
/*