mb/google/fatcat: config GPP_F23 as ISH gpio pin
[coreboot.git] / src / soc / intel / common / acpi / dptf / dptf.asl
blob77eb0efc26c06a0ad04da77c9bb8027ef840d87e
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* Include common dptf ASL files */
4 #include <soc/intel/common/acpi/dptf_common.asl>
6 Device (DPTF)
8         Name (_HID, DPTF_DPTF_DEVICE)
10         Name (_UID, 0)
12         Name (IDSP, Package()
13         {
14                 /* DPPM Passive Policy 1.0 */
15                 ToUUID ("42A441D6-AE6A-462B-A84B-4A8CE79027D3"),
17                 /* DPPM Critical Policy */
18                 ToUUID ("97C68AE7-15FA-499c-B8C9-5DA81D606E0A"),
20                 /* DPPM Cooling Policy */
21                 ToUUID ("16CAF1B7-DD38-40ED-B1C1-1B8A1913D531"),
23 #ifdef DPTF_ENABLE_FAN_CONTROL
24                 /* DPPM Active Policy */
25                 ToUUID ("3A95C389-E4B8-4629-A526-C52C88626BAE"),
26 #endif
27         })
29         Method (_STA)
30         {
31                 If (\DPTE == 1) {
32                         Return (0xF)
33                 } Else {
34                         Return (0x0)
35                 }
36         }
38         /*
39          * Arg0: Buffer containing UUID
40          * Arg1: Integer containing Revision ID of buffer format
41          * Arg2: Integer containing count of entries in Arg3
42          * Arg3: Buffer containing list of DWORD capabilities
43          * Return: Buffer containing list of DWORD capabilities
44          */
45         Method (_OSC, 4, Serialized)
46         {
47                 /* Check for Passive Policy UUID */
48                 If (DeRefOf (IDSP[0]) == Arg0) {
49                         /* Initialize Thermal Devices */
50                         ^TINI ()
52 #ifdef DPTF_ENABLE_CHARGER
53                         /* Initialize Charger Device */
54                         ^TCHG.INIT ()
55 #endif
56                 }
58                 Return (Arg3)
59         }
61         /* Priority based _TRT */
62         Name (TRTR, 1)
64         Method (_TRT)
65         {
66                 Return (\_SB.DTRT)
67         }
69 #ifdef DPTF_ENABLE_FAN_CONTROL
70         Method (_ART)
71         {
72                 Return (\_SB.DART)
73         }
74 #endif
76         /* Convert from Degrees C to 1/10 Kelvin for ACPI */
77         Method (CTOK, 1) {
78                 /* 10th of Degrees C */
79                 Local0 = Arg0 * 10
81                 /* Convert to Kelvin */
82                 Local0 += 2732
84                 Return (Local0)
85         }
87         /* Convert from 1/10 Kelvin to Degrees C for ACPI */
88         Method (KTOC, 1) {
89                 If (Arg0 <= 2732) {
90                         Return (0)
91                 }
93                 /* Convert to Celsius */
94                 Local0 = Arg0 - 2732
96                 /* Convert from 10th of degrees */
97                 Local0 /= 10
99                 Return (Local0)
100         }
102         /* Include Thermal Participants */
103         #include "thermal.asl"
105 #ifdef DPTF_ENABLE_CHARGER
106         /* Include Charger Participant */
107         #include "charger.asl"
108 #endif
110 #ifdef DPTF_ENABLE_FAN_CONTROL
111         /* Include Fan Participant */
112         #include "fan.asl"
113 #endif
117 Scope (\_SB.PCI0)
119         #include "cpu.asl"