mb/google/brya: Create rull variant
[coreboot2.git] / src / mainboard / google / butterfly / acpi / thermal.asl
blobed381cdab95a5a399cdcf2378e37bf00c330936f
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, 0x05)
15                 // Thermal zone polling frequency: 10 seconds
16                 Name (_TZP, 100)
18                 // Thermal sampling period for passive cooling: 2 seconds
19                 Name (_TSP, 20)
21                 // Convert from Degrees C to 1/10 Kelvin for ACPI
22                 Method (CTOK, 1) {
23                         // 10th of Degrees C
24                         Local0 = Arg0 * 10
26                         // Convert to Kelvin
27                         Local0 += 2732
29                         Return (Local0)
30                 }
32                 // Threshold for OS to shutdown
33                 Method (_CRT, 0, Serialized)
34                 {
35                         Return (CTOK (\TCRT))
36                 }
38                 // Threshold for passive cooling
39                 Method (_PSV, 0, Serialized)
40                 {
41                         Return (CTOK (\TPSV))
42                 }
44                 // Processors used for passive cooling
45                 Method (_PSL, 0, Serialized)
46                 {
47                         Return (\PPKG ())
48                 }
50                 Method (_TMP, 0, Serialized)
51                 {
52                         // Get CPU Temperature from EC
53                         Local0 = \_SB.PCI0.LPCB.EC0.CTMP
55                         // Convert to 1/10 Kelvin
56                         Local0 *= 10
58                         // Adjust by offset to get Kelvin
59                         Local0 += 2732
61                         Return (Local0)
62                 }
64 // The EC does all fan control. There is no Active Cooling Fan control (_ACx).
65         }