mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / google / stout / acpi / thermal.asl
blobde5a7ef9260151ac5694f5b03aa9a66d751ce283
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 // Thermal Zone
5 External (\PPKG, MethodObj)
7 #define HAVE_THERMALZONE
8 Scope (\_TZ)
10         ThermalZone (THRM)
11         {
12                 Name (_TC1, 0x02)
13                 Name (_TC2, 0x03)
15                 // Thermal zone polling frequency: 10 seconds
16                 Name (_TZP, 100)
18                 // Thermal sampling period for passive cooling: 10 seconds
19                 Name (_TSP, 100)
21                 // Convert from Degrees C to 1/10 Kelvin for ACPI
22                 Method (CTOK, 1)
23                 {
24                         // 10th of Degrees C
25                         Local0 = Arg0 * 10
27                         // Convert to Kelvin
28                         Local0 += 2732
30                         Return (Local0)
31                 }
33                 // Threshold for OS to shutdown
34                 Method (_CRT, 0, Serialized)
35                 {
36                         Return (CTOK (\TCRT))
37                 }
39                 // Threshold for passive cooling
40                 Method (_PSV, 0, Serialized)
41                 {
42                         Return (CTOK (\TPSV))
43                 }
45                 // Processors used for passive cooling
46                 Method (_PSL, 0, Serialized)
47                 {
48                         Return (\PPKG ())
49                 }
51                 Method (_TMP, 0, Serialized)
52                 {
53                         // Returns Higher of the two readings for CPU & VGA Temperature
54                         If (\_SB.PCI0.LPCB.EC0.TMP2 > \_SB.PCI0.LPCB.EC0.TMP1)
55                         {
56                                 // CPU high temperature
57                                 Local0 = \_SB.PCI0.LPCB.EC0.TMP2
58                         }
59                         Else
60                         {
61                                 // VGA high temperature
62                                 Local0 = \_SB.PCI0.LPCB.EC0.TMP1
63                         }
65                         // If temp less 35 or great then 115, set default 35
66                         If ((Local0 < 35) | (Local0 > 115))
67                         {
68                                 Local0 = 35
69                         }
71                         Return (CTOK (Local0))
72                 }
73         }