[coreboot-gerrit] New patch to review for coreboot: google/reef: Add wake-up from lid open

Shaunak Saha (shaunak.saha@intel.com) gerrit at coreboot.org
Wed Jul 13 08:48:52 CEST 2016


Shaunak Saha (shaunak.saha at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15643

-gerrit

commit 9e15b179f41ca61ad5bb256a32b92f98ea88ccd7
Author: Shaunak Saha <shaunak.saha at intel.com>
Date:   Tue Jul 12 23:46:35 2016 -0700

    google/reef: Add wake-up from lid open
    
    This patch adds support to wake up from S3 on lidopen.
    mainboard.asl has the _PRW defined for the wakeup support
    in S3.
    
    BUG = chrome-os-partner:53992
    TEST = Reef board wakes up from S3 on lidopen.
    
    Change-Id: Ic3bae26cea0642f98d938b3523d08f5902a1f4b5
    Signed-off-by: Shaunak Saha <shaunak.saha at intel.com>
---
 src/mainboard/google/reef/acpi/mainboard.asl | 1 +
 src/mainboard/google/reef/ec.h               | 8 ++++++++
 src/mainboard/google/reef/gpio.h             | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/mainboard/google/reef/acpi/mainboard.asl b/src/mainboard/google/reef/acpi/mainboard.asl
index 5b6e976..9665bb2 100644
--- a/src/mainboard/google/reef/acpi/mainboard.asl
+++ b/src/mainboard/google/reef/acpi/mainboard.asl
@@ -25,6 +25,7 @@ Scope (\_SB)
 		{
 			Return (\_SB.PCI0.LPCB.EC0.LIDS)
 		}
+		Name (_PRW, Package () { GPE_EC_WAKE, 0x3 })
 	}
 
 	Device (PWRB)
diff --git a/src/mainboard/google/reef/ec.h b/src/mainboard/google/reef/ec.h
index 3619c04..f76c5a8 100644
--- a/src/mainboard/google/reef/ec.h
+++ b/src/mainboard/google/reef/ec.h
@@ -24,6 +24,14 @@
  */
 #define EC_SCI_GPI	GPE0_DW1_11
 
+/*
+ * On lidopen/lidclose GPIO_22 from North Community gets toggled and
+ * is used in _PRW to wake up device from sleep. GPIO_22 maps to
+ * group GPIO_GPE_N_31_0 and the pad is configured as SCI with
+ * EDGE_SINGLE and INVERT.
+ */
+#define GPE_EC_WAKE	GPE0_DW1_22
+
 #define MAINBOARD_EC_SCI_EVENTS \
 	(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED)        |\
 	 EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN)          |\
diff --git a/src/mainboard/google/reef/gpio.h b/src/mainboard/google/reef/gpio.h
index 82a6a41..1685230 100644
--- a/src/mainboard/google/reef/gpio.h
+++ b/src/mainboard/google/reef/gpio.h
@@ -292,7 +292,7 @@ static const struct pad_config gpio_table[] = {
 	PAD_CFG_GPI(GPIO_19, UP_20K, DEEP),	 /* unused */
 	PAD_CFG_GPI_APIC(GPIO_20, UP_20K, DEEP, LEVEL, NONE), /* NFC IRQ */
 	PAD_CFG_GPI_APIC(GPIO_21, NONE, DEEP, LEVEL, NONE), /* Touch IRQ */
-	PAD_CFG_GPI_SCI(GPIO_22, NONE, DEEP, LEVEL, NONE), /* EC wake */
+	PAD_CFG_GPI_SCI(GPIO_22, NONE, DEEP, EDGE_SINGLE, INVERT), /* EC wake */
 	PAD_CFG_GPI(GPIO_23, UP_20K, DEEP),	 /* unused */
 	PAD_CFG_GPI(GPIO_24, UP_20K, DEEP),	 /* unused */
 	PAD_CFG_GPI(GPIO_25, UP_20K, DEEP),	 /* unused */



More information about the coreboot-gerrit mailing list