hp/pavilion_m6_1035dx: Add ACPI support for reading battery level
Hook in the EC ASL code. This provides just enough information for the OS to be able to read the battery information. EC notifications (_Qxx) do not yet work, and it is unclear if the issue is in the ACPI code, or if the EC is not set up properly. Thus, the OS must boot with the battery inserted in order to be able to read its status. The _L03 ACPI method is also removed, as the EC SCI uses this event. Change-Id: I85cbaeb9c77e60bd1c68d928412f897de50c6329 Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/5445 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
parent
1a3872f7a4
commit
f0504352b1
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Alexandru Gagniuc <mr.nuke.me@gmail.com>
|
||||||
|
* Subject to the GNU GPL v2, or (at your option) any later version.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EC bits specific to the mainboard
|
||||||
|
*/
|
||||||
|
#define EC_SCI 3
|
||||||
|
/* TODO: We do not yet know how the LID is connected to the platform */
|
||||||
|
#define EC_ACPI_LID_SWITCH_OBJECT Zero
|
||||||
|
|
||||||
|
/* ACPI code for EC functions */
|
||||||
|
#include <ec/compal/ene932/acpi/ec.asl>
|
|
@ -19,12 +19,6 @@
|
||||||
|
|
||||||
Scope(\_GPE) { /* Start Scope GPE */
|
Scope(\_GPE) { /* Start Scope GPE */
|
||||||
|
|
||||||
/* General event 3 */
|
|
||||||
Method(_L03) {
|
|
||||||
/* DBGO("\\_GPE\\_L00\n") */
|
|
||||||
Notify(\_SB.PCI0.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Legacy PM event */
|
/* Legacy PM event */
|
||||||
Method(_L08) {
|
Method(_L08) {
|
||||||
/* DBGO("\\_GPE\\_L08\n") */
|
/* DBGO("\\_GPE\\_L08\n") */
|
||||||
|
|
|
@ -35,9 +35,28 @@
|
||||||
Name(OSV, Ones) /* Assume nothing */
|
Name(OSV, Ones) /* Assume nothing */
|
||||||
Name(PMOD, One) /* Assume APIC */
|
Name(PMOD, One) /* Assume APIC */
|
||||||
|
|
||||||
|
/* Variables used by EC */
|
||||||
|
/* TODO: These may belong in global non-volatile storage */
|
||||||
|
Name(PWRS, Zero)
|
||||||
|
Name(LIDS, Zero)
|
||||||
|
|
||||||
/* AcpiGpe0Blk */
|
/* AcpiGpe0Blk */
|
||||||
OperationRegion(GP0B, SystemMemory, 0xfed80814, 0x04)
|
OperationRegion(GP0B, SystemMemory, 0xfed80814, 0x04)
|
||||||
Field(GP0B, ByteAcc, NoLock, Preserve) {
|
Field(GP0B, ByteAcc, NoLock, Preserve) {
|
||||||
, 11,
|
, 11,
|
||||||
USBS, 1,
|
USBS, 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Used by EC code on certain events
|
||||||
|
*
|
||||||
|
* From ec/compal/ene932/acpi/ec.asl:
|
||||||
|
* The mainboard must define a PNOT method to handle power state
|
||||||
|
* notifications and Notify CPU device objects to re-evaluate their
|
||||||
|
* _PPC and _CST tables.
|
||||||
|
*/
|
||||||
|
Method (PNOT)
|
||||||
|
{
|
||||||
|
Store("Received PNOT call (probably from EC)", Debug)
|
||||||
|
/* TODO: Implement this */
|
||||||
|
}
|
||||||
|
|
|
@ -69,6 +69,10 @@ DefinitionBlock (
|
||||||
|
|
||||||
} /* End Scope(_SB) */
|
} /* End Scope(_SB) */
|
||||||
|
|
||||||
|
Scope(\_SB.PCI0.LIBR) {
|
||||||
|
#include "acpi/ec.asl"
|
||||||
|
}
|
||||||
|
|
||||||
/* Describe SMBUS for the Southbridge */
|
/* Describe SMBUS for the Southbridge */
|
||||||
#include <southbridge/amd/agesa/hudson/acpi/smbus.asl>
|
#include <southbridge/amd/agesa/hudson/acpi/smbus.asl>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue