Alexandru Gagniuc (mr.nuke.me@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5549
-gerrit
commit 6be6f7cc3864450e723913dca7ad42c10b4572b8 Author: Alexandru Gagniuc mr.nuke.me@gmail.com Date: Fri Apr 18 21:29:59 2014 -0500
hp/pavilion_m6_1035dx: Suspend/resume on lid close/open with ACPI
This patch completes ACPI support for the lid switch. The lid SCI now notifies the OSPM of the status change when the lid is closed or opened, allowing system to suspend. The wake source is also declares, and the system wakes when the lid is opened.
The system resumes successfully, but the display still does not come back on.
Change-Id: I803c4fc64e15f8d1a90791ec246af66604646d8b Signed-off-by: Alexandru Gagniuc mr.nuke.me@gmail.com --- src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl | 9 +++++++++ src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl | 17 +++++++++++++++++ src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl | 2 ++ 3 files changed, 28 insertions(+)
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl b/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl index 89c002a..7a78485 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl +++ b/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl @@ -54,6 +54,15 @@ Scope(_GPE) { /* Start Scope GPE */ /* DBGO("\_GPE\_L11\n") */ }
+ /* Lid switch opened or closed */ + Method(_L16) { + Store("Lid status changed", Debug) + /* Flip trigger polarity */ + Not(LPOL, LPOL) + /* Notify lid object of status change */ + Notify(_SB.LID, 0x80) + } + /* GPIO0 or GEvent8 event */ Method(_L18) { /* DBGO("\_GPE\_L18\n") */ diff --git a/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl b/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl index 5700e86..4171700 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl +++ b/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl @@ -57,6 +57,14 @@ GE22, 1, /* General event 22 - connected to lid switch */ }
+ /* SMI/SCI control block -- hardcoded to 0xfed80200 by AGESA */ + OperationRegion (SMIX, SystemMemory, 0xfed80200, 0x100) + Field (SMIX, AnyAcc, NoLock, Preserve) { + Offset (0x08), /* SCI level: 0 = active low, 1 = active high */ + , 22, + LPOL, 1, /* SCI22 trigger polarity - lid switch */ + } + /* * Used by EC code on certain events * @@ -75,10 +83,19 @@ Scope (_SB) { Device (LID) { Name(_HID, EisaId("PNP0C0D")) + Name(_PRW, Package () {EC_LID_GPE, 0x04}) /* wake from S1-S4 */ Method(_LID, 0) { Return (GE22) /* GE pin 22 */ } + + Method (_INI, 0) + { + /* Make sure lid trigger polarity is set so that we + * trigger an SCI when lid status changes. + */ + Not(GE22, LPOL) + } }
Device (MB) { diff --git a/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl b/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl index c1f1933..4783394 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl +++ b/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include "mainboard.h" + /* DefinitionBlock Statement */ DefinitionBlock ( "DSDT.AML", /* Output filename */