1 /* SPDX-License-Identifier: GPL-2.0-only */
5 External (\PPKG, MethodObj)
7 #define HAVE_THERMALZONE
12 // Thermal zone polling frequency: 5 seconds
15 // Convert from Degrees C to 1/10 Kelvin for ACPI
26 // Threshold for OS to shutdown
27 Method (_CRT, 0, Serialized)
32 Method (_TMP, 0, Serialized)
34 // Get CPU Temperature from TIN9/PECI via EC
35 Local0 = \_SB.PCI0.LPCB.EC0.TIN9
37 // Check for sensor not calibrated
38 If (Local0 == \_SB.PCI0.LPCB.EC0.TNCA) {
42 // Check for sensor not present
43 If (Local0 == \_SB.PCI0.LPCB.EC0.TNPR) {
47 // Check for sensor not powered
48 If (Local0 == \_SB.PCI0.LPCB.EC0.TNOP) {
52 // Check for sensor bad reading
53 If (Local0 == \_SB.PCI0.LPCB.EC0.TBAD) {
57 // Adjust by offset to get Kelvin
58 Local0 += \_SB.PCI0.LPCB.EC0.TOFS
60 // Convert to 1/10 Kelvin
71 // Thermal zone polling frequency: 10 seconds
74 // Thermal sampling period for passive cooling: 2 seconds
77 // Convert from Degrees C to 1/10 Kelvin for ACPI
88 // Threshold for OS to shutdown
89 Method (_CRT, 0, Serialized)
94 // Threshold for passive cooling
95 Method (_PSV, 0, Serialized)
100 // Processors used for passive cooling
101 Method (_PSL, 0, Serialized)
106 Method (_TMP, 0, Serialized)
108 // Get Temperature from TIN# set in NVS
109 Local0 = \_SB.PCI0.LPCB.EC0.TINS (TMPS)
111 // Check for sensor not present
112 If (Local0 == \_SB.PCI0.LPCB.EC0.TNPR) {
116 // Check for sensor not powered
117 If (Local0 == \_SB.PCI0.LPCB.EC0.TNOP) {
121 // Check for sensor bad reading
122 If (Local0 == \_SB.PCI0.LPCB.EC0.TBAD) {
126 // Adjust by offset to get Kelvin
127 Local0 += \_SB.PCI0.LPCB.EC0.TOFS
129 // Convert to 1/10 Kelvin
137 Return (CTOK (\F0OF))
139 Return (CTOK (\F0ON))
146 Return (CTOK (\F1OF))
148 Return (CTOK (\F1ON))
152 Name (_AL0, Package () { TDP0 })
153 Name (_AL1, Package () { TDP1 })
155 PowerResource (TNP0, 0, 0)
166 \_SB.PCI0.MCHC.STND ()
167 Notify (\_TZ.THRM, 0x81)
171 \_SB.PCI0.MCHC.STDN ()
172 Notify (\_TZ.THRM, 0x81)
176 PowerResource (TNP1, 0, 0)
187 Notify (\_TZ.THRM, 0x81)
191 Notify (\_TZ.THRM, 0x81)
197 Name (_HID, EISAID ("PNP0C0B"))
199 Name (_PR0, Package () { TNP0 })
204 Name (_HID, EISAID ("PNP0C0B"))
206 Name (_PR0, Package () { TNP1 })