summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-08-27 16:11:55 +0200
committerPatrick Rudolph <siro@das-labor.org>2017-11-04 17:23:19 +0000
commit3ab13a8691cbe0e96c0741cb9bdf0e0acfa6efaf (patch)
tree6d02aa6adee9c63fee19b5a5cea5eba8554836b9 /src
parent8b59b315143756c1a237215ad0caeaa9b5ba73e6 (diff)
ec/lenovo/h8/acpi/thermal: Add support for passive cooling
The ACPI spec requires _TSP, _TC1, _TC2 and _PSL for passive cooling. _TSP already has been added in a previous commit. Copy the coefficients used on google devices to activate the feature. Tested on Lenovo T430: The CPU is throttled once the passive threshold has been reached. Tested on Lenovo T500: The CPU is throttled once the passive threshold has been reached. Change-Id: I922923a9029de77158988ac254bab4aad9536935 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/21223 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Vasya Boytsov <vasiliy.boytsov@phystech.edu> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/ec/lenovo/h8/acpi/thermal.asl48
1 files changed, 37 insertions, 11 deletions
diff --git a/src/ec/lenovo/h8/acpi/thermal.asl b/src/ec/lenovo/h8/acpi/thermal.asl
index 84e23f9675..d43e3c6fbd 100644
--- a/src/ec/lenovo/h8/acpi/thermal.asl
+++ b/src/ec/lenovo/h8/acpi/thermal.asl
@@ -40,20 +40,36 @@ Scope(\_TZ)
/* Thermal sampling period for passive cooling: 10 seconds */
Name (_TSP, 100)
- Method(_CRT, 0, NotSerialized) {
+ /* Coefficients for passive cooling */
+ Name (_TC1, 0x02)
+ Name (_TC2, 0x05)
+
+#if !IS_ENABLED(CONFIG_CPU_INTEL_MODEL_206AX) && \
+ !IS_ENABLED(CONFIG_CPU_INTEL_MODEL_2065X) && \
+ !IS_ENABLED(CONFIG_CPU_INTEL_MODEL_306AX)
+ /* Generated by acpigen */
+External (\PPKG, MethodObj)
+#endif
+ /* Processors used for passive cooling */
+ Method (_PSL, 0, Serialized)
+ {
+ Return (\PPKG ())
+ }
+
+ Method (_CRT, 0, NotSerialized) {
Store (\TCRT, Local0)
- if (LGreater(Local0, Zero)) {
- Return (C2K(Local0))
+ if (LGreater (Local0, 0)) {
+ Return (C2K (Local0))
}
- Return (C2K(127))
+ Return (C2K (127))
}
- Method(_PSV, 0, NotSerialized) {
+ Method (_PSV, 0, NotSerialized) {
Store (\TPSV, Local0)
- if (LGreater(Local0, Zero)) {
+ if (LGreater (Local0, 0)) {
Return (C2K(Local0))
}
- Return (C2K(95))
+ Return (C2K (95))
}
Method(_TMP) {
@@ -76,12 +92,22 @@ Scope(\_TZ)
/* Thermal sampling period for passive cooling: 10 seconds */
Name (_TSP, 100)
- Method(_CRT, 0, NotSerialized) {
- Return (C2K(99))
+ /* Coefficients for passive cooling */
+ Name (_TC1, 0x02)
+ Name (_TC2, 0x05)
+
+ /* Processors used for passive cooling */
+ Method (_PSL, 0, Serialized)
+ {
+ Return (\PPKG ())
+ }
+
+ Method (_CRT, 0, NotSerialized) {
+ Return (C2K (99))
}
- Method(_PSV, 0, NotSerialized) {
- Return (C2K(94))
+ Method (_PSV, 0, NotSerialized) {
+ Return (C2K (94))
}
Method(_TMP) {