blob: c7b178a44fdfe2a0d14a9ad7db5aaeb66bf742db [file] [log] [blame]
Kyösti Mälkki7b73e8522022-11-08 04:43:41 +00001/* SPDX-License-Identifier: GPL-2.0-only */
2
3
4/* Board powers on with button or PME# from on-board GbE wake-on-lan.
5 * Board shuts down to S5/G2. Any other power management is untested.
6 */
7
8Name (\_S0, Package () { 0x00, 0x00, 0x00, 0x00 })
9Name (\_S1, Package () { 0x01, 0x01, 0x00, 0x00 })
10Name (\_S3, Package () { 0x05, 0x05, 0x00, 0x00 })
11Name (\_S4, Package () { 0x06, 0x06, 0x00, 0x00 })
12Name (\_S5, Package () { 0x07, 0x07, 0x00, 0x00 })
13
14Scope (\_GPE)
15{
16 Method (_L03, 0, NotSerialized)
17 {
18 Notify (\_SB.PCI0.USB0, 0x02)
19 }
20 Method (_L04, 0, NotSerialized)
21 {
22 Notify (\_SB.PCI0.USB1, 0x02)
23 }
24
25 /* WOL header */
26 Method (_L08, 0, NotSerialized)
27 {
28 Notify (\_SB.PCI0.PCI5, 0x02)
29 Notify (\_SB.SLBT, 0x02)
30 }
31
32 /* PME# */
33 Method (_L0B, 0, NotSerialized)
34 {
35 Notify (\_SB.LID0, 0x02)
36 }
37
38 Method (_L0C, 0, NotSerialized)
39 {
40 Notify (\_SB.PCI0.USB2, 0x02)
41 }
42
43 /* PME_B0_STS# */
44 Method (_L0D, 0, NotSerialized)
45 {
46 Notify (\_SB.PCI0.USB3, 0x02)
47 }
48}
49
50/* Clear power buttons */
51Method (\_INI, 0, NotSerialized)
52{
Felix Singer86bc2e72022-12-16 04:40:39 +010053 \_SB.PCI0.ICH0.PS1H |= 9
54 \_SB.PCI0.ICH0.PE1H |= 1
Kyösti Mälkki7b73e8522022-11-08 04:43:41 +000055}
56
57/* Prepare To Sleep */
58Method (\_PTS, 1, NotSerialized)
59{
Felix Singer86bc2e72022-12-16 04:40:39 +010060 \_SB.PCI0.ICH0.GS0H |= 0x19
61 \_SB.PCI0.ICH0.GS0L |= 0x11
Kyösti Mälkki7b73e8522022-11-08 04:43:41 +000062}
63
64/* System Wake */
65Method (\_WAK, 1, NotSerialized)
66{
Felix Singer86bc2e72022-12-16 04:40:39 +010067 \_SB.PCI0.ICH0.GS0H |= 0x19
68 \_SB.PCI0.ICH0.GS0L |= 0x11
Kyösti Mälkki7b73e8522022-11-08 04:43:41 +000069
70 Return ( Package() { 0x0, 0x0 } )
71}