Skip to content

Commit 04cce68

Browse files
committed
mainboard/novacustom/mtl-h/acpi: Add missing sleep functions
Signed-off-by: Michał Żygowski <[email protected]>
1 parent d674ae7 commit 04cce68

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

src/mainboard/novacustom/mtl-h/acpi/mainboard.asl

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <ec/dasharo/ec/acpi/ec.asl>
88

99
Scope (\_SB) {
10+
#include "sleep.asl"
1011
Scope (PCI0) {
1112
#include "backlight.asl"
1213
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
#include <intelblocks/gpio.h>
4+
5+
Method (PGPM, 1, Serialized)
6+
{
7+
For (Local0 = 0, Local0 < 6, Local0++)
8+
{
9+
\_SB.PCI0.CGPM (Local0, Arg0)
10+
}
11+
}
12+
13+
/*
14+
* Method called from _PTS prior to system sleep state entry
15+
* Enables dynamic clock gating for all 5 GPIO communities
16+
*/
17+
Method (MPTS, 1, Serialized)
18+
{
19+
PGPM (MISCCFG_GPIO_PM_CONFIG_BITS)
20+
21+
#if CONFIG(D3COLD_SUPPORT)
22+
/* Bring system out of TC cold before enter Sx */
23+
\_SB.PCI0.TCON ()
24+
25+
/* Bring TBT group 0 and 1 out of D3 cold if it is in D3 cold */
26+
\_SB.PCI0.TG0N ()
27+
\_SB.PCI0.TG1N ()
28+
#endif
29+
}
30+
31+
/*
32+
* Method called from _WAK prior to system sleep state wakeup
33+
* Disables dynamic clock gating for all 5 GPIO communities
34+
*/
35+
Method (MWAK, 1, Serialized)
36+
{
37+
PGPM (0)
38+
39+
If (CondRefOf (\_SB.PCI0.TXHC)) {
40+
\_SB.TCWK (Arg0)
41+
}
42+
}
43+
44+
/*
45+
* S0ix Entry/Exit Notifications
46+
* Called from \_SB.PEPD._DSM
47+
*/
48+
Method (MS0X, 1, Serialized)
49+
{
50+
If (Arg0 == 1) {
51+
/* S0ix Entry */
52+
PGPM (MISCCFG_GPIO_PM_CONFIG_BITS)
53+
} Else {
54+
/* S0ix Exit */
55+
PGPM (0)
56+
#if CONFIG(D3COLD_SUPPORT)
57+
/* Bring system out of TC cold */
58+
\_SB.PCI0.TCON ()
59+
60+
/* Bring TBT group 0 and 1 out of D3 cold if it is in D3 cold */
61+
\_SB.PCI0.TG0N ()
62+
\_SB.PCI0.TG1N ()
63+
#endif
64+
}
65+
}
66+
67+
/*
68+
* Display Notifications
69+
* Called from \_SB.PEPD._DSM
70+
*/
71+
Method (MSDX, 1, Serialized)
72+
{
73+
If (CondRefOf (\_SB.PCI0.IMNG))
74+
{
75+
\_SB.PCI0.IMNG (Arg0)
76+
}
77+
}

0 commit comments

Comments
 (0)