aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/baytrail/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/baytrail/acpi')
-rw-r--r--src/soc/intel/baytrail/acpi/dptf/charger.asl43
-rw-r--r--src/soc/intel/baytrail/acpi/dptf/cpu.asl5
-rw-r--r--src/soc/intel/baytrail/acpi/dptf/dptf.asl5
-rw-r--r--src/soc/intel/baytrail/acpi/lpe.asl2
4 files changed, 43 insertions, 12 deletions
diff --git a/src/soc/intel/baytrail/acpi/dptf/charger.asl b/src/soc/intel/baytrail/acpi/dptf/charger.asl
index 7560f139be..7c7f62fb57 100644
--- a/src/soc/intel/baytrail/acpi/dptf/charger.asl
+++ b/src/soc/intel/baytrail/acpi/dptf/charger.asl
@@ -14,23 +14,46 @@ Device (TCHG)
}
}
- Name (PPSS, Package ()
+ /* Return charger performance states defined by mainboard */
+ Method (PPSS)
{
- Package () { 0, 0, 0, 0, 0, 0x880, "mA", 0 }, /* 2.1A */
- Package () { 0, 0, 0, 0, 1, 0x800, "mA", 0 }, /* 2.0A */
- Package () { 0, 0, 0, 0, 2, 0x600, "mA", 0 }, /* 1.5A */
- Package () { 0, 0, 0, 0, 3, 0x400, "mA", 0 }, /* 1.0A */
- Package () { 0, 0, 0, 0, 4, 0x200, "mA", 0 }, /* 0.5A */
- Package () { 0, 0, 0, 0, 5, 0x000, "mA", 0 }, /* 0.0A */
- })
+ Return (\_SB.CHPS)
+ }
+ /* Return maximum charger current limit */
Method (PPPC)
{
+ /* Convert size of PPSS table to index */
+ Store (SizeOf (\_SB.CHPS), Local0)
+ Decrement (Local0)
+
+ /* Check if charging is disabled (AC removed) */
+ If (LEqual (\PWRS, Zero)) {
+ /* Return last power state */
+ Return (Local0)
+ } Else {
+ /* Return highest power state */
+ Return (0)
+ }
+
Return (0)
}
- Method (SPPC, 1, Serialized)
+ /* Set charger current limit */
+ Method (SPPC, 1)
+ {
+ /* Retrieve Control (index 4) for specified PPSS level */
+ Store (DeRefOf (Index (DeRefOf (Index
+ (\_SB.CHPS, ToInteger (Arg0))), 4)), Local0)
+
+ /* Pass Control value to EC to limit charging */
+ \_SB.PCI0.LPCB.EC0.CHGS (Local0)
+ }
+
+ /* Initialize charger participant */
+ Method (INIT)
{
- /* TODO: Tell EC to limit battery charging */
+ /* Disable charge limit */
+ \_SB.PCI0.LPCB.EC0.CHGD ()
}
}
diff --git a/src/soc/intel/baytrail/acpi/dptf/cpu.asl b/src/soc/intel/baytrail/acpi/dptf/cpu.asl
index 93d434b8b4..89f9b8b02a 100644
--- a/src/soc/intel/baytrail/acpi/dptf/cpu.asl
+++ b/src/soc/intel/baytrail/acpi/dptf/cpu.asl
@@ -115,7 +115,10 @@ Device (TCPU)
Method (_PDL)
{
- If (CondRefOf (\_PR.CPU0._PSS)) {
+ /* Check for mainboard specific _PDL override */
+ If (CondRefOf (\_SB.MPDL)) {
+ Return (\_SB.MPDL)
+ } ElseIf (CondRefOf (\_PR.CPU0._PSS)) {
Store (SizeOf (\_PR.CPU0._PSS ()), Local0)
Decrement (Local0)
Return (Local0)
diff --git a/src/soc/intel/baytrail/acpi/dptf/dptf.asl b/src/soc/intel/baytrail/acpi/dptf/dptf.asl
index a54478cd05..9ebfb8c9ce 100644
--- a/src/soc/intel/baytrail/acpi/dptf/dptf.asl
+++ b/src/soc/intel/baytrail/acpi/dptf/dptf.asl
@@ -36,6 +36,11 @@ Device (DPTF)
If (LEqual (DeRefOf (Index (IDSP, 0)), Arg0)) {
/* Initialize Thermal Devices */
^TINI ()
+
+#ifdef DPTF_ENABLE_CHARGER
+ /* Initialize Charger Device */
+ ^TCHG.INIT ()
+#endif
}
Return (Arg3)
diff --git a/src/soc/intel/baytrail/acpi/lpe.asl b/src/soc/intel/baytrail/acpi/lpe.asl
index 71a2746533..dfa555c834 100644
--- a/src/soc/intel/baytrail/acpi/lpe.asl
+++ b/src/soc/intel/baytrail/acpi/lpe.asl
@@ -74,7 +74,7 @@ Device (LPEA)
/* Append any Mainboard defined GPIOs */
If (CondRefOf (^GBUF, Local0)) {
- ConcatenateResTemplate (^RBUF, Local0, Local1)
+ ConcatenateResTemplate (^RBUF, ^GBUF, Local1)
Return (Local1)
}