From 208f28fac1c24ed9c673ebfe29f1190edece57c9 Mon Sep 17 00:00:00 2001 From: Chris Zhong Date: Mon, 10 Nov 2014 00:57:15 -0800 Subject: Jerry: modify gpio config, hibernate Added hibernate wakeup pin(EC_WAKE) that covers both AC_PRESENT and LID_OPEN. It pulses a rising edge when either of them have a rising edge. The power button was also inverted to handle hibernation better, now it's low except when pressed it temporarly goes high. BRANCH=None BUG=chrome-os-partner:33269 chrome-os-partner:32782 TEST=make BOARD=jerry Try hibernating, all wakeup sources should work, it shouldn't stay hibernated. All signals(AC, lid, power button) should work equally well as in pinky. Change-Id: I894135bdfd5600919296f7510dc9cd1acd567ddc Signed-off-by: Chris Zhong Signed-off-by: Alexandru M Stan Reviewed-on: https://chromium-review.googlesource.com/228763 --- board/jerry/board.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'board/jerry/board.h') diff --git a/board/jerry/board.h b/board/jerry/board.h index 398a56b62a..5a05393717 100644 --- a/board/jerry/board.h +++ b/board/jerry/board.h @@ -28,6 +28,7 @@ #define CONFIG_LOW_POWER_IDLE #define CONFIG_LOW_POWER_S0 #define CONFIG_POWER_BUTTON +#define CONFIG_POWER_BUTTON_ACTIVE_STATE 1 #define CONFIG_POWER_COMMON #define CONFIG_PWM #define CONFIG_SPI @@ -35,6 +36,8 @@ #define CONFIG_VBOOT_HASH #undef CONFIG_WATCHDOG_HELP +#define CONFIG_HIBERNATE_WAKEUP_PINS (STM32_PWR_CSR_EWUP1 | STM32_PWR_CSR_EWUP6) + #ifndef __ASSEMBLER__ /* 48 MHz SYSCLK clock frequency */ @@ -57,7 +60,6 @@ enum power_signal { RK_POWER_GOOD = 0, RK_SUSPEND_ASSERTED, - /* Number of power signals */ POWER_SIGNAL_COUNT }; -- cgit v1.2.1