summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/falco/acpi/thermal.asl14
-rw-r--r--src/mainboard/google/falco/acpi_tables.c1
-rw-r--r--src/mainboard/google/falco/ec.h2
-rw-r--r--src/mainboard/google/falco/thermal.h3
4 files changed, 20 insertions, 0 deletions
diff --git a/src/mainboard/google/falco/acpi/thermal.asl b/src/mainboard/google/falco/acpi/thermal.asl
index adbc9ec4fb..f9173b78c0 100644
--- a/src/mainboard/google/falco/acpi/thermal.asl
+++ b/src/mainboard/google/falco/acpi/thermal.asl
@@ -21,6 +21,20 @@
Scope (\_TZ)
{
+ // Handler for throttle requests on this platform
+ // 0 = Stop throttling
+ // 1 = Start throttling
+ Method (THRT, 1, Serialized)
+ {
+ If (LEqual (Arg0, 0)) {
+ /* Disable Power Limit */
+ \_SB.PCI0.MCHC.CTLD ()
+ } Else {
+ /* Enable Power Limit */
+ \_SB.PCI0.MCHC.CTLE (\F0PW)
+ }
+ }
+
ThermalZone (THRM)
{
Name (_TC1, 0x02)
diff --git a/src/mainboard/google/falco/acpi_tables.c b/src/mainboard/google/falco/acpi_tables.c
index 34c4407628..ba084a11d9 100644
--- a/src/mainboard/google/falco/acpi_tables.c
+++ b/src/mainboard/google/falco/acpi_tables.c
@@ -48,6 +48,7 @@ static void acpi_update_thermal_table(global_nvs_t *gnvs)
gnvs->tcrt = CRITICAL_TEMPERATURE;
gnvs->tpsv = PASSIVE_TEMPERATURE;
gnvs->tmax = MAX_TEMPERATURE;
+ gnvs->f0pw = EC_THROTTLE_POWER_LIMIT;
gnvs->flvl = 1;
}
diff --git a/src/mainboard/google/falco/ec.h b/src/mainboard/google/falco/ec.h
index 11d2453837..c61d3da233 100644
--- a/src/mainboard/google/falco/ec.h
+++ b/src/mainboard/google/falco/ec.h
@@ -35,6 +35,8 @@
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |\
EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD) |\
EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_OVERLOAD) |\
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START) |\
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP) |\
EC_HOST_EVENT_MASK(EC_HOST_EVENT_USB_CHARGER))
#define MAINBOARD_EC_SMI_EVENTS \
diff --git a/src/mainboard/google/falco/thermal.h b/src/mainboard/google/falco/thermal.h
index cfda67d66c..9bd6ee64ce 100644
--- a/src/mainboard/google/falco/thermal.h
+++ b/src/mainboard/google/falco/thermal.h
@@ -22,6 +22,9 @@
#define TEMPERATURE_SENSOR_ID 0 /* PECI */
+/* Power level to set when EC requests throttle */
+#define EC_THROTTLE_POWER_LIMIT 12 /* 12W */
+
/* Temperature which OS will shutdown at */
#define CRITICAL_TEMPERATURE 104