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

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I075ff5c69676927db1c5e731294e18796884f97e </div>
<div style="display:none"> Gerrit-Change-Number: 21227 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>