1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <arch/x86/acpi/statdef.asl>
7 #if defined(EC_LENOVO_H8_ME_WORKAROUND)
12 Method(C2K, 1, NotSerialized)
28 /* Thermal zone polling frequency: 10 seconds */
31 /* Thermal sampling period for passive cooling: 10 seconds */
34 /* Coefficients for passive cooling */
38 /* Generated by acpigen */
39 External (\PPKG, MethodObj)
41 /* Processors used for passive cooling */
42 Method (_PSL, 0, Serialized)
47 /* Get critical temperature in degree celsius */
48 Method (GCRT, 0, NotSerialized) {
56 /* Get passive temperature in degree celsius */
57 Method (GPSV, 0, NotSerialized) {
65 Method (_CRT, 0, NotSerialized) {
66 Return (C2K (GCRT ()))
69 Method (_PSV, 0, NotSerialized) {
70 Return (C2K (GPSV ()))
74 #if defined(EC_LENOVO_H8_ME_WORKAROUND)
75 /* Avoid tripping alarm if ME isn't booted at all yet */
76 If (!MEB1 && \_SB.PCI0.LPCB.EC.TMP0 == 128) {
81 Return (C2K(\_SB.PCI0.LPCB.EC.TMP0))
87 /* Active fan 10 degree below passive threshold */
91 /* Turn of 5 degree below trip point */
98 Name (_AL0, Package () { FAN })
100 PowerResource (FPwR, 0, 0)
103 * WINDOWS BUG: Don't read from EmbeddedControl
104 * in PowerResources. Use system-memory instead!
111 * WINDOWS BUG: Don't write to FIELD elements located
112 * in another ACPI scope. Call a method that does it!
115 \_SB.PCI0.LPCB.EC.FANE(1)
117 Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG)
121 \_SB.PCI0.LPCB.EC.FANE(0)
123 Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG)
129 Name (_HID, EISAID ("PNP0C0B"))
130 Name (_PR0, Package () { FPwR })
136 /* Thermal zone polling frequency: 10 seconds */
139 /* Thermal sampling period for passive cooling: 10 seconds */
142 /* Coefficients for passive cooling */
146 /* Processors used for passive cooling */
147 Method (_PSL, 0, Serialized)
152 Method (_CRT, 0, NotSerialized) {
156 Method (_PSV, 0, NotSerialized) {
161 #if defined(EC_LENOVO_H8_ME_WORKAROUND)
162 /* Avoid tripping alarm if ME isn't booted at all yet */
163 If (!MEB2 && \_SB.PCI0.LPCB.EC.TMP1 == 128) {
168 Return (C2K(\_SB.PCI0.LPCB.EC.TMP1))