blob: db3e9fef4f112ddb69b453ea09f54c2c17de099f [file] [log] [blame]
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +01001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (c) 2011 Sven Schnelle <svens@stackframe.org>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +010015 */
16
17#include "smi.h"
18
19Scope (\_SB)
20{
21 Device(DOCK)
22 {
23 Name(_HID, "ACPI0003")
24 Name(_UID, 0x00)
25 Name(_PCL, Package() { \_SB } )
26
27 Method(_DCK, 1, NotSerialized)
28 {
29 if (Arg0) {
30 /* connect dock */
Vladimir Serbinenkof319ae42014-08-19 00:48:39 +020031 Store (1, \GP28)
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +010032 Store (1, \_SB.PCI0.LPCB.EC.DKR1)
33 Store (1, \_SB.PCI0.LPCB.EC.DKR2)
34 Store (1, \_SB.PCI0.LPCB.EC.DKR3)
35 } else {
36 /* disconnect dock */
Vladimir Serbinenkof319ae42014-08-19 00:48:39 +020037 Store (0, \GP28)
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +010038 Store (0, \_SB.PCI0.LPCB.EC.DKR1)
39 Store (0, \_SB.PCI0.LPCB.EC.DKR2)
40 Store (0, \_SB.PCI0.LPCB.EC.DKR3)
41 }
42 Xor(Arg0, \_SB.PCI0.LPCB.EC.DKR1, Local0)
43 Return (Local0)
44 }
45
46 Method(_STA, 0, NotSerialized)
47 {
48 Return (\_SB.PCI0.LPCB.EC.DKR1)
49 }
50 }
51}
52
53Scope(\_SB.PCI0.LPCB.EC)
54{
55 Method(_Q18, 0, NotSerialized)
56 {
57 Notify(\_SB.DOCK, 3)
58 }
59
60 Method(_Q45, 0, NotSerialized)
61 {
62 Notify(\_SB.DOCK, 3)
63 }
64
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +010065 Method(_Q58, 0, NotSerialized)
66 {
67 Notify(\_SB.DOCK, 0)
68 }
69
70 Method(_Q37, 0, NotSerialized)
71 {
72 Notify(\_SB.DOCK, 0)
73 }
74}