summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/baytrail/acpi/dptf/dptf.asl22
-rw-r--r--src/soc/intel/baytrail/acpi/dptf/thermal.asl147
2 files changed, 68 insertions, 101 deletions
diff --git a/src/soc/intel/baytrail/acpi/dptf/dptf.asl b/src/soc/intel/baytrail/acpi/dptf/dptf.asl
index 6aebddc6a6..a54478cd05 100644
--- a/src/soc/intel/baytrail/acpi/dptf/dptf.asl
+++ b/src/soc/intel/baytrail/acpi/dptf/dptf.asl
@@ -6,13 +6,13 @@ Device (DPTF)
Name (IDSP, Package()
{
/* DPPM Passive Policy 1.0 */
- ToUUID("42A441D6-AE6A-462B-A84B-4A8CE79027D3"),
+ ToUUID ("42A441D6-AE6A-462B-A84B-4A8CE79027D3"),
/* DPPM Critical Policy */
- ToUUID("97C68AE7-15FA-499c-B8C9-5DA81D606E0A"),
+ ToUUID ("97C68AE7-15FA-499c-B8C9-5DA81D606E0A"),
/* DPPM Cooling Policy */
- ToUUID("16CAF1B7-DD38-40ED-B1C1-1B8A1913D531"),
+ ToUUID ("16CAF1B7-DD38-40ED-B1C1-1B8A1913D531"),
})
Method (_STA)
@@ -24,12 +24,26 @@ Device (DPTF)
}
}
+ /* Arg0: Buffer containing UUID
+ * Arg1: Integer containing Revision ID of buffer format
+ * Arg2: Integer containing count of entries in Arg3
+ * Arg3: Buffer containing list of DWORD capabilities
+ * Return: Buffer containing list of DWORD capabilities
+ */
Method (_OSC, 4, Serialized)
{
- /* TODO: Enable/Disable EC control of thermals/charging */
+ /* Check for Passive Policy UUID */
+ If (LEqual (DeRefOf (Index (IDSP, 0)), Arg0)) {
+ /* Initialize Thermal Devices */
+ ^TINI ()
+ }
+
Return (Arg3)
}
+ /* Priority based _TRT */
+ Name (TRTR, 1)
+
Method (_TRT)
{
Return (\_SB.DTRT)
diff --git a/src/soc/intel/baytrail/acpi/dptf/thermal.asl b/src/soc/intel/baytrail/acpi/dptf/thermal.asl
index 33ec207b70..7113215cd3 100644
--- a/src/soc/intel/baytrail/acpi/dptf/thermal.asl
+++ b/src/soc/intel/baytrail/acpi/dptf/thermal.asl
@@ -1,18 +1,37 @@
/* Thermal Threshold Event Handler */
-Method (TEVT, 1, Serialized)
+Method (TEVT, 1, NotSerialized)
{
- Switch (ToInteger (Arg0))
- {
+ Store (ToInteger (Arg0), Local0)
+
#ifdef DPTF_TSR0_SENSOR_ID
- Case (DPTF_TSR0_SENSOR_ID) { Notify (^TSR0, 0x90) }
+ If (LEqual (Local0, DPTF_TSR0_SENSOR_ID)) {
+ Notify (^TSR0, 0x90)
+ }
#endif
#ifdef DPTF_TSR1_SENSOR_ID
- Case (DPTF_TSR1_SENSOR_ID) { Notify (^TSR1, 0x90) }
+ If (LEqual (Local0, DPTF_TSR1_SENSOR_ID)) {
+ Notify (^TSR1, 0x90)
+ }
#endif
#ifdef DPTF_TSR2_SENSOR_ID
- Case (DPTF_TSR2_SENSOR_ID) { Notify (^TSR2, 0x90) }
-#endif
+ If (LEqual (Local0, DPTF_TSR2_SENSOR_ID)) {
+ Notify (^TSR2, 0x90)
}
+#endif
+}
+
+/* Thermal device initialization - Disable Aux Trip Points */
+Method (TINI)
+{
+#ifdef DPTF_TSR0_SENSOR_ID
+ ^TSR0.PATD ()
+#endif
+#ifdef DPTF_TSR1_SENSOR_ID
+ ^TSR1.PATD ()
+#endif
+#ifdef DPTF_TSR2_SENSOR_ID
+ ^TSR2.PATD ()
+#endif
}
#ifdef DPTF_TSR0_SENSOR_ID
@@ -24,9 +43,6 @@ Device (TSR0)
Name (TMPI, DPTF_TSR0_SENSOR_ID)
Name (_STR, Unicode (DPTF_TSR0_SENSOR_NAME))
Name (GTSH, 20) /* 2 degree hysteresis */
- Name (NTTH, 5) /* 5 degree notification threshold */
- Name (LTM0, 0) /* Last recorded temperature */
- Name (CTYP, 0) /* Cooling policy */
Method (_STA)
{
@@ -47,34 +63,9 @@ Device (TSR0)
Return (^^CTOK (DPTF_TSR0_PASSIVE))
}
- /* Set Cooling Policy
- * Arg0 - Cooling policy mode, 1=active, 0=passive
- * Arg1 - Acoustic Limit
- * Arg2 - Power Limit
- */
- Method (_SCP, 3, Serialized)
+ Method (_CRT)
{
- If (LEqual (Arg0, 0)) {
- Store (0, CTYP)
- } Else {
- Store (1, CTYP)
- }
-
- /* DPTF Thermal Trip Points Changed Event */
- Notify (TSR0, 0x91)
- }
-
- /* Device Temperature Indication */
- Method (_DTI, 1)
- {
- Store (Arg0, LTM0)
- Notify (TSR0, 0x91)
- }
-
- /* Notification Temperature Threshold */
- Method (_NTT)
- {
- Return (^^CTOK (NTTH))
+ Return (^^CTOK (DPTF_TSR0_CRITICAL))
}
Name (PATC, 2)
@@ -90,6 +81,12 @@ Device (TSR0)
{
\_SB.PCI0.LPCB.EC0.PAT1 (TMPI, Arg0)
}
+
+ /* Disable Aux Trip Point */
+ Method (PATD, 0, Serialized)
+ {
+ \_SB.PCI0.LPCB.EC0.PATD (TMPI)
+ }
}
#endif
@@ -102,9 +99,6 @@ Device (TSR1)
Name (TMPI, DPTF_TSR1_SENSOR_ID)
Name (_STR, Unicode (DPTF_TSR1_SENSOR_NAME))
Name (GTSH, 20) /* 2 degree hysteresis */
- Name (NTTH, 5) /* 5 degree notification threshold */
- Name (LTM1, 0)
- Name (CTYP, 0) /* Cooling policy */
Method (_STA)
{
@@ -125,34 +119,9 @@ Device (TSR1)
Return (^^CTOK (DPTF_TSR1_PASSIVE))
}
- /* Set Cooling Policy
- * Arg0 - Cooling policy mode, 1=active, 0=passive
- * Arg1 - Acoustic Limit
- * Arg2 - Power Limit
- */
- Method (_SCP, 3, Serialized)
- {
- If (LEqual (Arg0, 0)) {
- Store (0, CTYP)
- } Else {
- Store (1, CTYP)
- }
-
- /* DPTF Thermal Trip Points Changed Event */
- Notify (TSR1, 0x91)
- }
-
- /* Device Temperature Indication */
- Method (_DTI, 1)
+ Method (_CRT)
{
- Store (Arg0, LTM1)
- Notify (TSR1, 0x91)
- }
-
- /* Notification Temperature Threshold */
- Method (_NTT)
- {
- Return (^^CTOK (NTTH))
+ Return (^^CTOK (DPTF_TSR1_CRITICAL))
}
Name (PATC, 2)
@@ -168,6 +137,12 @@ Device (TSR1)
{
\_SB.PCI0.LPCB.EC0.PAT1 (TMPI, Arg0)
}
+
+ /* Disable Aux Trip Point */
+ Method (PATD, 0, Serialized)
+ {
+ \_SB.PCI0.LPCB.EC0.PATD (TMPI)
+ }
}
#endif
@@ -180,9 +155,6 @@ Device (TSR2)
Name (TMPI, DPTF_TSR2_SENSOR_ID)
Name (_STR, Unicode (DPTF_TSR2_SENSOR_NAME))
Name (GTSH, 20) /* 2 degree hysteresis */
- Name (NTTH, 5) /* 5 degree notification threshold */
- Name (LTM2, 0)
- Name (CTYP, 0) /* Cooling policy */
Method (_STA)
{
@@ -203,34 +175,9 @@ Device (TSR2)
Return (^^CTOK (DPTF_TSR2_PASSIVE))
}
- /* Set Cooling Policy
- * Arg0 - Cooling policy mode, 1=active, 0=passive
- * Arg1 - Acoustic Limit
- * Arg2 - Power Limit
- */
- Method (_SCP, 3, Serialized)
+ Method (_CRT)
{
- If (LEqual (Arg0, 0)) {
- Store (0, CTYP)
- } Else {
- Store (1, CTYP)
- }
-
- /* DPTF Thermal Trip Points Changed Event */
- Notify (TSR2, 0x91)
- }
-
- /* Device Temperature Indication */
- Method (_DTI, 1)
- {
- Store (Arg0, LTM2)
- Notify (TSR2, 0x91)
- }
-
- /* Notification Temperature Threshold */
- Method (_NTT)
- {
- Return (^^CTOK (NTTH))
+ Return (^^CTOK (DPTF_TSR2_CRITICAL))
}
Name (PATC, 2)
@@ -246,5 +193,11 @@ Device (TSR2)
{
\_SB.PCI0.LPCB.EC0.PAT1 (TMPI, Arg0)
}
+
+ /* Disable Aux Trip Point */
+ Method (PATD, 0, Serialized)
+ {
+ \_SB.PCI0.LPCB.EC0.PATD (TMPI)
+ }
}
#endif