blob: 1b36e3b923c3b950669fcd12c216cc62d2ac19f8 [file] [log] [blame]
Angel Pons236c6372020-04-03 01:21:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Kyösti Mälkki91162702011-11-03 15:22:01 +02003
4
5/* Board powers on with button or PME# from on-board GbE wake-on-lan.
6 * Board shuts down to S5/G2. Any other power management is untested.
7 */
8
9Name (\_S0, Package () { 0x00, 0x00, 0x00, 0x00 })
10Name (\_S1, Package () { 0x01, 0x01, 0x00, 0x00 })
11Name (\_S3, Package () { 0x05, 0x05, 0x00, 0x00 })
12Name (\_S4, Package () { 0x06, 0x06, 0x00, 0x00 })
13Name (\_S5, Package () { 0x07, 0x07, 0x00, 0x00 })
14
15Scope (\_GPE)
16{
17 Method (_L03, 0, NotSerialized)
18 {
19 Notify (\_SB.PCI0.USB0, 0x02)
20 }
21 Method (_L04, 0, NotSerialized)
22 {
23 Notify (\_SB.PCI0.USB1, 0x02)
24 }
25
26 /* WOL header */
27 Method (_L08, 0, NotSerialized)
28 {
29 Notify (\_SB.PCI0.PCI5, 0x02)
30 Notify (\_SB.SLBT, 0x02)
31 }
32
33 /* PME# */
34 Method (_L0B, 0, NotSerialized)
35 {
36#if 1
37 Notify (\_SB.LID0, 0x02)
38#else
39 Notify (\_SB.PCI0.HLIB.P64B.ETH0, 0x02)
40 Notify (\_SB.PCI0.HLIB.P64B, 0x02)
41 Notify (\_SB.PCI0.HLIB.P64A, 0x02)
42#endif
43 }
44
45 Method (_L0C, 0, NotSerialized)
46 {
47 Notify (\_SB.PCI0.USB2, 0x02)
48 }
49
50 /* PME_B0_STS# */
51 Method (_L0D, 0, NotSerialized)
52 {
53 Notify (\_SB.PCI0.USB3, 0x02)
54 }
55}
56
57/* Clear power buttons */
58Method (\_INI, 0, NotSerialized)
59{
60 Or (\_SB.PCI0.ICH0.PS1H, 0x09, \_SB.PCI0.ICH0.PS1H)
61 Or (\_SB.PCI0.ICH0.PE1H, 0x01, \_SB.PCI0.ICH0.PE1H)
62}
63
64/* Prepare To Sleep */
65Method (\_PTS, 1, NotSerialized)
66{
67 Or (\_SB.PCI0.ICH0.GS0H, 0x19, \_SB.PCI0.ICH0.GS0H)
68 Or (\_SB.PCI0.ICH0.GS0L, 0x11, \_SB.PCI0.ICH0.GS0L)
69}
70
71/* System Wake */
72Method (\_WAK, 1, NotSerialized)
73{
74 Or (\_SB.PCI0.ICH0.GS0H, 0x19, \_SB.PCI0.ICH0.GS0H)
75 Or (\_SB.PCI0.ICH0.GS0L, 0x11, \_SB.PCI0.ICH0.GS0L)
76
77 Return ( Package() { 0x0, 0x0 } )
78}