summaryrefslogtreecommitdiff
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/cpu.asl35
-rw-r--r--src/soc/intel/baytrail/acpi/globalnvs.asl1
-rw-r--r--src/soc/intel/baytrail/acpi/lpe.asl119
-rw-r--r--src/soc/intel/baytrail/acpi/lpss.asl42
-rw-r--r--src/soc/intel/baytrail/acpi/platform.asl6
-rw-r--r--src/soc/intel/baytrail/acpi/southcluster.asl3
6 files changed, 206 insertions, 0 deletions
diff --git a/src/soc/intel/baytrail/acpi/dptf/cpu.asl b/src/soc/intel/baytrail/acpi/dptf/cpu.asl
index f82c348961..93d434b8b4 100644
--- a/src/soc/intel/baytrail/acpi/dptf/cpu.asl
+++ b/src/soc/intel/baytrail/acpi/dptf/cpu.asl
@@ -123,4 +123,39 @@ Device (TCPU)
Return (0)
}
}
+
+ Name (PPCC, Package ()
+ {
+ 0x2, // Revision
+ Package () { // Power Limit 1
+ 0, // PowerLimitIndex, 0 for Power Limit 1
+ 1600, // PowerLimitMinimum
+ 6200, // PowerLimitMaximum
+ 1000, // TimeWindowMinimum
+ 1000, // TimeWindowMaximum
+ 200 // StepSize
+ },
+ Package () { // Power Limit 2
+ 1, // PowerLimitIndex, 1 for Power Limit 2
+ 8000, // PowerLimitMinimum
+ 8000, // PowerLimitMaximum
+ 1000, // TimeWindowMinimum
+ 1000, // TimeWindowMaximum
+ 1000 // StepSize
+ }
+ })
+
+#ifdef DPTF_CPU_CRITICAL
+ Method (_CRT)
+ {
+ Return (^^CTOK (DPTF_CPU_CRITICAL))
+ }
+#endif
+
+#ifdef DPTF_CPU_PASSIVE
+ Method (_PSV)
+ {
+ Return (^^CTOK (DPTF_CPU_PASSIVE))
+ }
+#endif
}
diff --git a/src/soc/intel/baytrail/acpi/globalnvs.asl b/src/soc/intel/baytrail/acpi/globalnvs.asl
index b384cea1ec..a201c03d50 100644
--- a/src/soc/intel/baytrail/acpi/globalnvs.asl
+++ b/src/soc/intel/baytrail/acpi/globalnvs.asl
@@ -52,6 +52,7 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
TPMP, 8, // 0x12 - TPM Present and Enabled
TLVL, 8, // 0x13 - Throttle Level
PPCM, 8, // 0x14 - Maximum P-state usable by OS
+ PM1I, 32, // 0x15 - System Wake Source - PM1 Index
/* Device Config */
Offset (0x20),
diff --git a/src/soc/intel/baytrail/acpi/lpe.asl b/src/soc/intel/baytrail/acpi/lpe.asl
new file mode 100644
index 0000000000..71a2746533
--- /dev/null
+++ b/src/soc/intel/baytrail/acpi/lpe.asl
@@ -0,0 +1,119 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of
+ * the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+Device (LPEA)
+{
+ Name (_HID, "80860F28")
+ Name (_CID, "80860F28")
+ Name (_UID, 1)
+ Name (_DDN, "Low Power Audio Controller")
+ Name (_PR0, Package () { PLPE })
+
+ Name (RBUF, ResourceTemplate()
+ {
+ Memory32Fixed (ReadWrite, 0, 0x00200000, BAR0)
+ Memory32Fixed (ReadWrite, 0, 0x00001000, BAR1)
+ Memory32Fixed (ReadWrite, 0, 0x00100000, BAR2)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
+ {
+ LPE_DMA0_IRQ
+ }
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
+ {
+ LPE_DMA1_IRQ
+ }
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
+ {
+ LPE_SSP0_IRQ
+ }
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
+ {
+ LPE_SSP1_IRQ
+ }
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
+ {
+ LPE_SSP2_IRQ
+ }
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
+ {
+ LPE_IPC2HOST_IRQ
+ }
+ })
+
+ Method (_CRS)
+ {
+ /* Update BAR0 from NVS */
+ CreateDwordField (^RBUF, ^BAR0._BAS, BAS0)
+ Store (\LPB0, BAS0)
+
+ /* Update BAR1 from NVS */
+ CreateDwordField (^RBUF, ^BAR1._BAS, BAS1)
+ Store (\LPB1, BAS1)
+
+ /* Update LPE FW from NVS */
+ CreateDwordField (^RBUF, ^BAR2._BAS, BAS2)
+ Store (\LPFW, BAS2)
+
+ /* Append any Mainboard defined GPIOs */
+ If (CondRefOf (^GBUF, Local0)) {
+ ConcatenateResTemplate (^RBUF, Local0, Local1)
+ Return (Local1)
+ }
+
+ Return (^RBUF)
+ }
+
+ Method (_STA)
+ {
+ If (LEqual (\LPEN, 1)) {
+ Return (0xF)
+ } Else {
+ Return (0x0)
+ }
+ }
+
+ OperationRegion (KEYS, SystemMemory, LPB1, 0x100)
+ Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
+ {
+ Offset (0x84),
+ PSAT, 32,
+ }
+
+ PowerResource (PLPE, 0, 0)
+ {
+ Method (_STA)
+ {
+ Return (1)
+ }
+
+ Method (_OFF)
+ {
+ Or (PSAT, 0x00000003, PSAT)
+ Or (PSAT, 0x00000000, PSAT)
+ }
+
+ Method (_ON)
+ {
+ And (PSAT, 0xfffffffc, PSAT)
+ Or (PSAT, 0x00000000, PSAT)
+ }
+ }
+}
diff --git a/src/soc/intel/baytrail/acpi/lpss.asl b/src/soc/intel/baytrail/acpi/lpss.asl
index f56c6a87b8..0f8f7465f9 100644
--- a/src/soc/intel/baytrail/acpi/lpss.asl
+++ b/src/soc/intel/baytrail/acpi/lpss.asl
@@ -89,6 +89,12 @@ Device (I2C1)
Name (_UID, 1)
Name (_DDN, "I2C Controller #1")
+ /* Standard Mode: HCNT, LCNT, SDA Hold Time */
+ Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+
+ /* Fast Mode: HCNT, LCNT, SDA Hold Time */
+ Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+
Name (RBUF, ResourceTemplate()
{
Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
@@ -142,6 +148,12 @@ Device (I2C2)
Name (_UID, 2)
Name (_DDN, "I2C Controller #2")
+ /* Standard Mode: HCNT, LCNT, SDA Hold Time */
+ Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+
+ /* Fast Mode: HCNT, LCNT, SDA Hold Time */
+ Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+
Name (RBUF, ResourceTemplate()
{
Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
@@ -195,6 +207,12 @@ Device (I2C3)
Name (_UID, 3)
Name (_DDN, "I2C Controller #3")
+ /* Standard Mode: HCNT, LCNT, SDA Hold Time */
+ Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+
+ /* Fast Mode: HCNT, LCNT, SDA Hold Time */
+ Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+
Name (RBUF, ResourceTemplate()
{
Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
@@ -248,6 +266,12 @@ Device (I2C4)
Name (_UID, 4)
Name (_DDN, "I2C Controller #4")
+ /* Standard Mode: HCNT, LCNT, SDA Hold Time */
+ Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+
+ /* Fast Mode: HCNT, LCNT, SDA Hold Time */
+ Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+
Name (RBUF, ResourceTemplate()
{
Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
@@ -301,6 +325,12 @@ Device (I2C5)
Name (_UID, 5)
Name (_DDN, "I2C Controller #5")
+ /* Standard Mode: HCNT, LCNT, SDA Hold Time */
+ Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+
+ /* Fast Mode: HCNT, LCNT, SDA Hold Time */
+ Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+
Name (RBUF, ResourceTemplate()
{
Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
@@ -354,6 +384,12 @@ Device (I2C6)
Name (_UID, 6)
Name (_DDN, "I2C Controller #6")
+ /* Standard Mode: HCNT, LCNT, SDA Hold Time */
+ Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+
+ /* Fast Mode: HCNT, LCNT, SDA Hold Time */
+ Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+
Name (RBUF, ResourceTemplate()
{
Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
@@ -407,6 +443,12 @@ Device (I2C7)
Name (_UID, 7)
Name (_DDN, "I2C Controller #7")
+ /* Standard Mode: HCNT, LCNT, SDA Hold Time */
+ Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+
+ /* Fast Mode: HCNT, LCNT, SDA Hold Time */
+ Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+
Name (RBUF, ResourceTemplate()
{
Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
diff --git a/src/soc/intel/baytrail/acpi/platform.asl b/src/soc/intel/baytrail/acpi/platform.asl
index e6aaf75952..e32880ef9b 100644
--- a/src/soc/intel/baytrail/acpi/platform.asl
+++ b/src/soc/intel/baytrail/acpi/platform.asl
@@ -70,3 +70,9 @@ Method(_WAK,1)
{
Return(Package(){0,0})
}
+
+Method (_SWS)
+{
+ /* Index into PM1 for device that caused wake */
+ Return (\PM1I)
+}
diff --git a/src/soc/intel/baytrail/acpi/southcluster.asl b/src/soc/intel/baytrail/acpi/southcluster.asl
index 61642a59a9..fac252f6fb 100644
--- a/src/soc/intel/baytrail/acpi/southcluster.asl
+++ b/src/soc/intel/baytrail/acpi/southcluster.asl
@@ -268,4 +268,7 @@ Scope (\_SB)
// SCC Devices
#include "scc.asl"
+
+ // LPE Device
+ #include "lpe.asl"
}