summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2019-07-02 11:03:07 -0700
committerCommit Bot <commit-bot@chromium.org>2019-07-17 23:58:21 +0000
commit3cc417a240ce917e0e5f55aadcd5a4cbccc8f47c (patch)
treee52abe90911570274028c8cf484f50e8a856289d /include
parentf8d6179a26bf512c43638d0916fde0fc966cc3fb (diff)
downloadchrome-ec-3cc417a240ce917e0e5f55aadcd5a4cbccc8f47c.tar.gz
mkbp_event: Add CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT.
MKBP was recently refactored to offer choice in the MKBP notification method. However, if a board is using a GPIO to notify the AP of a MKBP event, and the AP cannot wake from the GPIO, the MKBP event cannot wake the system up from suspend as is. This commit simply adds a new config option, CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT such that MKBP events can wake the system from suspend. Note that the board will have to add MKBP events to the host event sleep mask in coreboot. Typically on ARM devices, EC_INT_L is already a wake pin, but on Intel devices it is not; there's actually a different pin, PCH_WAKE_L which is set via sending a host event and wakes the system. BUG=b:136272898,chromium:786721 BRANCH=None TEST=Enable config option on nocturne, flash nocturne, suspend DUT, verify that MKBP events can wake the AP. Change-Id: If5026bfe3efacbc051f99a180e061c6fd679ce5a Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685786 Reviewed-by: Jett Rink <jettrink@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 3eb6d671d6..a798f0eac1 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2674,6 +2674,20 @@
/* MKBP events are sent by using GPIO */
#undef CONFIG_MKBP_USE_GPIO
+/*
+ * MKBP events are notified by using both a GPIO and a host event.
+ *
+ * You should use this if you are using a GPIO to notify the AP of an MKBP
+ * event, and you need an MKBP event to wake the AP in suspend and the AP cannot
+ * wake from the GPIO. Since you are using both a GPIO and a hostevent for the
+ * notification, make sure that the S0 hostevent mask does NOT include MKBP
+ * events. Otherwise, you will have multiple consumers for a single event.
+ * However, make sure to configure the host event *sleep* mask in coreboot to
+ * include MKBP events. In order to prevent all MKBP events from waking the AP,
+ * use CONFIG_MKBP_EVENT_WAKEUP_MASK to filter the events.
+ */
+#undef CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT
+
/* MKBP events are sent by using HECI on an ISH */
#undef CONFIG_MKBP_USE_HECI
@@ -4380,6 +4394,7 @@
#if !defined(CONFIG_MKBP_USE_CUSTOM) && \
!defined(CONFIG_MKBP_USE_HOST_EVENT) && \
!defined(CONFIG_MKBP_USE_GPIO) && \
+ !defined(CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT) && \
!defined(CONFIG_MKBP_USE_HECI)
#error Please define one of CONFIG_MKBP_USE_* macro.
#endif