summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kurtz <djkurtz@chromium.org>2018-04-18 17:57:09 -0600
committerMartin Roth <martinroth@google.com>2018-04-26 21:17:33 +0000
commitd648730fe8d2f7cae85c52f05cbad157a8b2f24d (patch)
tree19cae8bb5bfbec6c0000a9432264e6f987199966
parent75ed7781cc2a734ce1316f0b439e869ce9965338 (diff)
mainboard/google/kahlee: Enable EC wake on GPIO24
The grunt EC uses GPIO24 (EC_PCH_WAKE_L) to signal wake-up events to the AP. On Stoney, GPIO24 maps to GEVENT (GPE) 15. The kahlee EC uses GPIO2 (EC_PCH_WAKE_L) to signal wake-up events to the AP. On Stoney, GPIO2 maps to GEVENT (GPE) 8. BUG=b:78461678 TEST=powerd_dbus_suspend, tap any key on keyboard wakes from S3. TEST=sign in, EC: lidclose, EC: lidopen => system wakes from S3. Change-Id: Ib1809740837e686992ff70b81933159a5dff7595 Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-on: https://review.coreboot.org/25816 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/gpio.c9
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/include/baseboard/ec.h1
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h1
-rw-r--r--src/mainboard/google/kahlee/variants/kahlee/include/variant/gpio.h1
4 files changed, 12 insertions, 0 deletions
diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c
index 45f58fdd45..12b0e42c4c 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/gpio.c
+++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c
@@ -20,6 +20,7 @@
#include <soc/southbridge.h>
#include <stdlib.h>
#include <boardid.h>
+#include <variant/gpio.h>
/*
* As a rule of thumb, GPIO pins used by coreboot should be initialized at
@@ -498,6 +499,14 @@ static const struct sci_source gpe_table[] = {
.level = SMI_SCI_EDG,
},
+ /* EC_PCH_WAKE_L */
+ {
+ .scimap = EC_WAKE_GPI,
+ .gpe = EC_WAKE_GPI,
+ .direction = SMI_SCI_LVL_LOW,
+ .level = SMI_SCI_EDG,
+ },
+
/* H1_PCH_INT_ODL */
{
.scimap = 22,
diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/ec.h b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/ec.h
index c915ca77e0..7eef99d627 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/ec.h
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/ec.h
@@ -58,6 +58,7 @@
/* Enable LID switch */
#define EC_ENABLE_LID_SWITCH
+#define EC_ENABLE_WAKE_PIN EC_WAKE_GPI
/* Enable EC backed ALS device in ACPI */
#define EC_ENABLE_ALS_DEVICE
diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h
index 858e33eaf8..be1daa5b15 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h
@@ -42,5 +42,6 @@
/* These define the GPE, not the GPIO. */
#define EC_SCI_GPI 3 /* AGPIO 22 -> GPE 3 */
#define EC_SMI_GPI 10 /* AGPIO 6 -> GPE 10 */
+#define EC_WAKE_GPI 15 /* AGPIO 24 -> GPE 15 */
#endif /* __BASEBOARD_GPIO_H__ */
diff --git a/src/mainboard/google/kahlee/variants/kahlee/include/variant/gpio.h b/src/mainboard/google/kahlee/variants/kahlee/include/variant/gpio.h
index cf0eaf530a..361e1eb204 100644
--- a/src/mainboard/google/kahlee/variants/kahlee/include/variant/gpio.h
+++ b/src/mainboard/google/kahlee/variants/kahlee/include/variant/gpio.h
@@ -46,5 +46,6 @@
/* These define the GPE, not the GPIO. */
#define EC_SCI_GPI 3 /* AGPIO 22 -> GPE 3 */
#define EC_SMI_GPI 10 /* AGPIO 6 -> GPE 10 */
+#define EC_WAKE_GPI 8 /* AGPIO 2 -> GPE 8 */
#endif /* __VARIANT_GPIO_H__ */