soc/intel/skylake: Add support for mode-aware DPTF
This change adds support for: 1. Handling thermal trip points change event handler based on device mode. 2. Returning thermal trip point temperatures based on the device mode. BUG=b:72554519 Change-Id: Ife48af76ceb7a39abd1fac8ef1f77db7e65ab43e Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/23462 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
This commit is contained in:
committed by
Furquan Shaikh
parent
c96ad868d4
commit
cb58683ef5
@ -57,7 +57,50 @@ Method (TINI)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Thermal Trip Points Change Event Handler */
|
||||||
|
Method (TPET)
|
||||||
|
{
|
||||||
#ifdef DPTF_TSR0_SENSOR_ID
|
#ifdef DPTF_TSR0_SENSOR_ID
|
||||||
|
Notify (^TSR0, 0x81)
|
||||||
|
#endif
|
||||||
|
#ifdef DPTF_TSR1_SENSOR_ID
|
||||||
|
Notify (^TSR1, 0x81)
|
||||||
|
#endif
|
||||||
|
#ifdef DPTF_TSR2_SENSOR_ID
|
||||||
|
Notify (^TSR2, 0x81)
|
||||||
|
#endif
|
||||||
|
#ifdef DPTF_TSR3_SENSOR_ID
|
||||||
|
Notify (^TSR3, 0x81)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Method to return trip temperature value depending upon the device mode.
|
||||||
|
* Arg0 --> Value to return when device is in tablet mode
|
||||||
|
* Arg1 --> Value to return when device is not in tablet mode.
|
||||||
|
*/
|
||||||
|
Method (DTRP, 2, Serialized)
|
||||||
|
{
|
||||||
|
#ifdef EC_ENABLE_TABLET_EVENT
|
||||||
|
If (LEqual (\_SB.PCI0.LPCB.EC0.RCTM, One)) {
|
||||||
|
Return (CTOK (Arg0))
|
||||||
|
} Else {
|
||||||
|
#endif
|
||||||
|
Return (CTOK (Arg1))
|
||||||
|
#ifdef EC_ENABLE_TABLET_EVENT
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DPTF_TSR0_SENSOR_ID
|
||||||
|
|
||||||
|
#ifndef DPTF_TSR0_TABLET_PASSIVE
|
||||||
|
#define DPTF_TSR0_TABLET_PASSIVE DPTF_TSR0_PASSIVE
|
||||||
|
#endif
|
||||||
|
#ifndef DPTF_TSR0_TABLET_CRITICAL
|
||||||
|
#define DPTF_TSR0_TABLET_CRITICAL DPTF_TSR0_CRITICAL
|
||||||
|
#endif
|
||||||
|
|
||||||
Device (TSR0)
|
Device (TSR0)
|
||||||
{
|
{
|
||||||
Name (_HID, EISAID ("INT3403"))
|
Name (_HID, EISAID ("INT3403"))
|
||||||
@ -83,12 +126,12 @@ Device (TSR0)
|
|||||||
|
|
||||||
Method (_PSV)
|
Method (_PSV)
|
||||||
{
|
{
|
||||||
Return (CTOK (DPTF_TSR0_PASSIVE))
|
Return (DTRP (DPTF_TSR0_TABLET_PASSIVE, DPTF_TSR0_PASSIVE))
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_CRT)
|
Method (_CRT)
|
||||||
{
|
{
|
||||||
Return (CTOK (DPTF_TSR0_CRITICAL))
|
Return (DTRP (DPTF_TSR0_TABLET_CRITICAL, DPTF_TSR0_CRITICAL))
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (PATC, 2)
|
Name (PATC, 2)
|
||||||
@ -151,6 +194,14 @@ Device (TSR0)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DPTF_TSR1_SENSOR_ID
|
#ifdef DPTF_TSR1_SENSOR_ID
|
||||||
|
|
||||||
|
#ifndef DPTF_TSR1_TABLET_PASSIVE
|
||||||
|
#define DPTF_TSR1_TABLET_PASSIVE DPTF_TSR1_PASSIVE
|
||||||
|
#endif
|
||||||
|
#ifndef DPTF_TSR1_TABLET_CRITICAL
|
||||||
|
#define DPTF_TSR1_TABLET_CRITICAL DPTF_TSR1_CRITICAL
|
||||||
|
#endif
|
||||||
|
|
||||||
Device (TSR1)
|
Device (TSR1)
|
||||||
{
|
{
|
||||||
Name (_HID, EISAID ("INT3403"))
|
Name (_HID, EISAID ("INT3403"))
|
||||||
@ -176,12 +227,12 @@ Device (TSR1)
|
|||||||
|
|
||||||
Method (_PSV)
|
Method (_PSV)
|
||||||
{
|
{
|
||||||
Return (CTOK (DPTF_TSR1_PASSIVE))
|
Return (DTRP (DPTF_TSR1_TABLET_PASSIVE, DPTF_TSR1_PASSIVE))
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_CRT)
|
Method (_CRT)
|
||||||
{
|
{
|
||||||
Return (CTOK (DPTF_TSR1_CRITICAL))
|
Return (DTRP (DPTF_TSR1_TABLET_CRITICAL, DPTF_TSR1_CRITICAL))
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (PATC, 2)
|
Name (PATC, 2)
|
||||||
@ -207,6 +258,14 @@ Device (TSR1)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DPTF_TSR2_SENSOR_ID
|
#ifdef DPTF_TSR2_SENSOR_ID
|
||||||
|
|
||||||
|
#ifndef DPTF_TSR2_TABLET_PASSIVE
|
||||||
|
#define DPTF_TSR2_TABLET_PASSIVE DPTF_TSR2_PASSIVE
|
||||||
|
#endif
|
||||||
|
#ifndef DPTF_TSR2_TABLET_CRITICAL
|
||||||
|
#define DPTF_TSR2_TABLET_CRITICAL DPTF_TSR2_CRITICAL
|
||||||
|
#endif
|
||||||
|
|
||||||
Device (TSR2)
|
Device (TSR2)
|
||||||
{
|
{
|
||||||
Name (_HID, EISAID ("INT3403"))
|
Name (_HID, EISAID ("INT3403"))
|
||||||
@ -232,12 +291,12 @@ Device (TSR2)
|
|||||||
|
|
||||||
Method (_PSV)
|
Method (_PSV)
|
||||||
{
|
{
|
||||||
Return (CTOK (DPTF_TSR2_PASSIVE))
|
Return (DTRP (DPTF_TSR2_TABLET_PASSIVE, DPTF_TSR2_PASSIVE))
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_CRT)
|
Method (_CRT)
|
||||||
{
|
{
|
||||||
Return (CTOK (DPTF_TSR2_CRITICAL))
|
Return (DTRP (DPTF_TSR2_TABLET_CRITICAL, DPTF_TSR2_CRITICAL))
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (PATC, 2)
|
Name (PATC, 2)
|
||||||
@ -263,6 +322,14 @@ Device (TSR2)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DPTF_TSR3_SENSOR_ID
|
#ifdef DPTF_TSR3_SENSOR_ID
|
||||||
|
|
||||||
|
#ifndef DPTF_TSR3_TABLET_PASSIVE
|
||||||
|
#define DPTF_TSR3_TABLET_PASSIVE DPTF_TSR3_PASSIVE
|
||||||
|
#endif
|
||||||
|
#ifndef DPTF_TSR3_TABLET_CRITICAL
|
||||||
|
#define DPTF_TSR3_TABLET_CRITICAL DPTF_TSR3_CRITICAL
|
||||||
|
#endif
|
||||||
|
|
||||||
Device (TSR3)
|
Device (TSR3)
|
||||||
{
|
{
|
||||||
Name (_HID, EISAID ("INT3403"))
|
Name (_HID, EISAID ("INT3403"))
|
||||||
@ -288,12 +355,12 @@ Device (TSR3)
|
|||||||
|
|
||||||
Method (_PSV)
|
Method (_PSV)
|
||||||
{
|
{
|
||||||
Return (CTOK (DPTF_TSR3_PASSIVE))
|
Return (DTRP (DPTF_TSR3_TABLET_PASSIVE, DPTF_TSR3_PASSIVE))
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_CRT)
|
Method (_CRT)
|
||||||
{
|
{
|
||||||
Return (CTOK (DPTF_TSR3_CRITICAL))
|
Return (DTRP (DPTF_TSR3_TABLET_CRITICAL, DPTF_TSR3_CRITICAL))
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (PATC, 2)
|
Name (PATC, 2)
|
||||||
|
Reference in New Issue
Block a user