summaryrefslogtreecommitdiff
path: root/src/mainboard/aopen/dxplplusu/acpi/power.asl
blob: c7b178a44fdfe2a0d14a9ad7db5aaeb66bf742db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* SPDX-License-Identifier: GPL-2.0-only */


/* Board powers on with button or PME# from on-board GbE wake-on-lan.
 * Board shuts down to S5/G2. Any other power management is untested.
 */

Name (\_S0, Package () { 0x00, 0x00, 0x00, 0x00 })
Name (\_S1, Package () { 0x01, 0x01, 0x00, 0x00 })
Name (\_S3, Package () { 0x05, 0x05, 0x00, 0x00 })
Name (\_S4, Package () { 0x06, 0x06, 0x00, 0x00 })
Name (\_S5, Package () { 0x07, 0x07, 0x00, 0x00 })

Scope (\_GPE)
{
	Method (_L03, 0, NotSerialized)
	{
		Notify (\_SB.PCI0.USB0, 0x02)
	}
	Method (_L04, 0, NotSerialized)
	{
		Notify (\_SB.PCI0.USB1, 0x02)
	}

	/* WOL header */
	Method (_L08, 0, NotSerialized)
	{
		Notify (\_SB.PCI0.PCI5, 0x02)
		Notify (\_SB.SLBT, 0x02)
	}

	/* PME# */
	Method (_L0B, 0, NotSerialized)
	{
		Notify (\_SB.LID0, 0x02)
	}

	Method (_L0C, 0, NotSerialized)
	{
		Notify (\_SB.PCI0.USB2, 0x02)
	}

	/* PME_B0_STS# */
	Method (_L0D, 0, NotSerialized)
	{
		Notify (\_SB.PCI0.USB3, 0x02)
	}
}

/* Clear power buttons */
Method (\_INI, 0, NotSerialized)
{
	\_SB.PCI0.ICH0.PS1H |= 9
	\_SB.PCI0.ICH0.PE1H |= 1
}

/* Prepare To Sleep */
Method (\_PTS, 1, NotSerialized)
{
	\_SB.PCI0.ICH0.GS0H |= 0x19
	\_SB.PCI0.ICH0.GS0L |= 0x11
}

/* System Wake */
Method (\_WAK, 1, NotSerialized)
{
	\_SB.PCI0.ICH0.GS0H |= 0x19
	\_SB.PCI0.ICH0.GS0L |= 0x11

	Return ( Package() { 0x0, 0x0 } )
}