Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/21227
Change subject: ec/lenovo/h8/acpi/thermal: Add ACPI fan control ......................................................................
ec/lenovo/h8/acpi/thermal: Add ACPI fan control
Disengage the fan 10 degree below passive threshold as the automatic EC fan control does not engage the FAN even when CPU starts melting ...
Tested on Lenovo T430: The fan disengages at 80°C and keeps running at full speed until temperature drops below 80°C.
Change-Id: I075ff5c69676927db1c5e731294e18796884f97e Signed-off-by: Patrick Rudolph siro@das-labor.org --- M src/ec/lenovo/h8/acpi/ec.asl M src/ec/lenovo/h8/acpi/thermal.asl 2 files changed, 53 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/21227/1
diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl index eed0e16..78ce2da 100644 --- a/src/ec/lenovo/h8/acpi/ec.asl +++ b/src/ec/lenovo/h8/acpi/ec.asl @@ -39,6 +39,10 @@ DKR2, 1, /* Dock register 2 */ Offset (0x2a), EVNT, 8, /* write will trigger EC event */ + Offset (0x2f), + , 6, + FAND, 1, /* Fan disengage */ + FANA, 1, /* Fan automatic mode enable */ Offset (0x30), , 6, ALMT, 1, /* Audio Mute + LED */ diff --git a/src/ec/lenovo/h8/acpi/thermal.asl b/src/ec/lenovo/h8/acpi/thermal.asl index fe765c6..0c72a5b 100644 --- a/src/ec/lenovo/h8/acpi/thermal.asl +++ b/src/ec/lenovo/h8/acpi/thermal.asl @@ -81,6 +81,55 @@ #endif Return (C2K(_SB.PCI0.LPCB.EC.TMP0)) } + + Method (_AC0) { + Store (\TPSV, Local0) + if (LLessEqual(Local0, Zero)) { + Store (95, Local0) + } + + /* Active fan 10 degree below passive threshold */ + Subtract (Local0, 10, Local0) + + If (LGreater (_SB.PCI0.LPCB.EC.FAND, Zero)) { + /* Turn of 5 degree below trip point */ + Subtract (Local0, 5, Local0) + } + + Return (C2K (Local0)) + } + + Name (_AL0, Package () { TDP0 }) + + PowerResource (TNP0, 0, 0) + { + Method (_STA) { + If (LLessEqual (_SB.PCI0.LPCB.EC.FAND, 0)) { + Return (Zero) + } Else { + Return (One) + } + } + + Method (_ON) { + Store (One, _SB.PCI0.LPCB.EC.FAND) + Store (Zero, _SB.PCI0.LPCB.EC.FANA) + Notify (_TZ.THM0, 0x81) + } + + Method (_OFF) { + Store (Zero, _SB.PCI0.LPCB.EC.FAND) + Store (One, _SB.PCI0.LPCB.EC.FANA) + Notify (_TZ.THM0, 0x81) + } + } + + Device (TDP0) + { + Name (_HID, EISAID ("PNP0C0B")) + Name (_UID, 0) + Name (_PR0, Package () { TNP0 }) + } }
ThermalZone(THM1)