summaryrefslogtreecommitdiff
path: root/board/oak/board.h
diff options
context:
space:
mode:
authorBen Lok <ben.lok@mediatek.com>2015-09-17 13:31:51 +0800
committerchrome-bot <chrome-bot@chromium.org>2015-10-06 22:57:15 -0700
commit0596b551dfd45dd4af2e8f7a0baad1141d25bfb8 (patch)
tree3373a093cba91d4cbd3c6d87f75a4d0d736dc8f3 /board/oak/board.h
parent1c2bbee5c7a779cb22519e8710213a641b43eeff (diff)
downloadchrome-ec-0596b551dfd45dd4af2e8f7a0baad1141d25bfb8.tar.gz
mkbp_event: prevent AC power change events to wakeup AP.
It may use MKBP event to send PD power change events to AP via interrupt. According to the spec, AC power change events do not be allowed to wake up AP. In order to avoid it, define a white list in board level, only allow those events to wakeup the AP during S3 power state. BRANCH=none BUG=chrome-os-partner:45127 TEST=manual Plug PD power adapter to oak, if system is in S3/S5 and it should starts charging, but should not wake up system/AP at all. Change-Id: I2f86697d5d3bd24d7de840e21064b91e8841f0eb Signed-off-by: Ben Lok <ben.lok@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/300360 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/oak/board.h')
-rw-r--r--board/oak/board.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/oak/board.h b/board/oak/board.h
index d2a26f272e..e578b8a5ee 100644
--- a/board/oak/board.h
+++ b/board/oak/board.h
@@ -128,6 +128,15 @@
#define TIM_CLOCK32 2
#define TIM_WATCHDOG 4
+/* Define the MKBP events which are allowed to wakeup AP in S3. */
+#define CONFIG_MKBP_WAKEUP_MASK \
+ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) |\
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON) |\
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED) |\
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY) |\
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_FASTBOOT))
+
#include "gpio_signal.h"
enum power_signal {