blob: adabaaadea0d6dd43e14288f7aaae7458f065fca [file] [log] [blame]
Angel Ponsc3f58f62020-04-05 15:46:41 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Martin Rothebabfad2016-04-10 11:09:16 -06002
Duncan Lauriead8d9132013-12-10 07:41:33 -08003Device (DPTF)
4{
5 Name (_HID, EISAID ("INT3400"))
6 Name (_UID, 0)
7
8 Name (IDSP, Package()
9 {
10 /* DPPM Passive Policy 1.0 */
Duncan Laurieb376ea62014-01-09 10:10:15 -080011 ToUUID ("42A441D6-AE6A-462B-A84B-4A8CE79027D3"),
Duncan Lauriead8d9132013-12-10 07:41:33 -080012
Duncan Lauriea36d60a2014-01-06 12:33:59 -080013 /* DPPM Critical Policy */
Duncan Laurieb376ea62014-01-09 10:10:15 -080014 ToUUID ("97C68AE7-15FA-499c-B8C9-5DA81D606E0A"),
Duncan Lauriead8d9132013-12-10 07:41:33 -080015
16 /* DPPM Cooling Policy */
Duncan Laurieb376ea62014-01-09 10:10:15 -080017 ToUUID ("16CAF1B7-DD38-40ED-B1C1-1B8A1913D531"),
Duncan Lauriead8d9132013-12-10 07:41:33 -080018 })
19
20 Method (_STA)
21 {
Felix Singer7b8ac002022-12-26 08:45:56 +010022 If (\DPTE == 1) {
Duncan Lauriead8d9132013-12-10 07:41:33 -080023 Return (0xF)
24 } Else {
25 Return (0x0)
26 }
27 }
28
Angel Pons26b49cc2020-07-07 17:17:51 +020029 /*
30 * Arg0: Buffer containing UUID
Duncan Laurieb376ea62014-01-09 10:10:15 -080031 * Arg1: Integer containing Revision ID of buffer format
32 * Arg2: Integer containing count of entries in Arg3
33 * Arg3: Buffer containing list of DWORD capabilities
34 * Return: Buffer containing list of DWORD capabilities
35 */
Duncan Lauriead8d9132013-12-10 07:41:33 -080036 Method (_OSC, 4, Serialized)
37 {
Duncan Laurieb376ea62014-01-09 10:10:15 -080038 /* Check for Passive Policy UUID */
Elyes Haouasf451bfb2022-12-25 06:29:39 +010039 If (DeRefOf (IDSP[0]) == Arg0) {
Duncan Laurieb376ea62014-01-09 10:10:15 -080040 /* Initialize Thermal Devices */
41 ^TINI ()
Aaron Durbin4177db52014-02-05 14:55:26 -060042
43#ifdef DPTF_ENABLE_CHARGER
44 /* Initialize Charger Device */
45 ^TCHG.INIT ()
46#endif
Duncan Laurieb376ea62014-01-09 10:10:15 -080047 }
48
Duncan Lauriead8d9132013-12-10 07:41:33 -080049 Return (Arg3)
50 }
51
Duncan Laurieb376ea62014-01-09 10:10:15 -080052 /* Priority based _TRT */
53 Name (TRTR, 1)
54
Duncan Lauriead8d9132013-12-10 07:41:33 -080055 Method (_TRT)
56 {
57 Return (\_SB.DTRT)
58 }
59
Duncan Lauriea36d60a2014-01-06 12:33:59 -080060 /* Convert from Degrees C to 1/10 Kelvin for ACPI */
61 Method (CTOK, 1) {
62 /* 10th of Degrees C */
Felix Singer447c3992022-12-12 01:36:53 +010063 Local0 = Arg0 * 10
Duncan Lauriea36d60a2014-01-06 12:33:59 -080064
65 /* Convert to Kelvin */
Felix Singere4c30042022-12-12 00:46:05 +010066 Local0 += 2732
Duncan Lauriea36d60a2014-01-06 12:33:59 -080067
68 Return (Local0)
Duncan Lauriead8d9132013-12-10 07:41:33 -080069 }
70
71 /* Include CPU Participant */
72 #include "cpu.asl"
73
74 /* Include Thermal Participants */
75 #include "thermal.asl"
76
Duncan Lauriea36d60a2014-01-06 12:33:59 -080077#ifdef DPTF_ENABLE_CHARGER
Duncan Lauriead8d9132013-12-10 07:41:33 -080078 /* Include Charger Participant */
79 #include "charger.asl"
Duncan Lauriea36d60a2014-01-06 12:33:59 -080080#endif
Duncan Lauriead8d9132013-12-10 07:41:33 -080081}