blob: 45a0c64b19b00b44ffd0e2f2d948cabbc2be9e1c [file] [log] [blame]
Duncan Laurieddc3e422013-10-02 16:10:54 -07001/*
2 * This file is part of the coreboot project.
3 *
Duncan Laurie25c6f752014-05-22 08:25:36 -07004 * Copyright (C) 2014 Google Inc.
Duncan Laurieddc3e422013-10-02 16:10:54 -07005 *
Duncan Laurie25c6f752014-05-22 08:25:36 -07006 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
Duncan Laurieddc3e422013-10-02 16:10:54 -07009 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
Duncan Laurie25c6f752014-05-22 08:25:36 -070017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Duncan Laurieddc3e422013-10-02 16:10:54 -070018 */
19
Duncan Laurieddc3e422013-10-02 16:10:54 -070020Scope (\_SB)
21{
22 Device (LID0)
23 {
Duncan Laurie25c6f752014-05-22 08:25:36 -070024 Name (_HID, EisaId("PNP0C0D"))
25 Method (_LID, 0)
Duncan Laurieddc3e422013-10-02 16:10:54 -070026 {
Duncan Laurie25c6f752014-05-22 08:25:36 -070027 Return (\_SB.PCI0.LPCB.EC0.LIDS)
Duncan Laurieddc3e422013-10-02 16:10:54 -070028 }
29
Duncan Lauriebe19c542014-08-22 13:36:12 -070030 // EC wake is GPIO27 which is a special DeepSX wake pin
31 Name (_PRW, Package(){ 0x70, 5 }) // GP27_EN
Duncan Laurieddc3e422013-10-02 16:10:54 -070032 }
33
34 Device (PWRB)
35 {
36 Name(_HID, EisaId("PNP0C0C"))
37 }
38
39 Device (TPAD)
40 {
Duncan Laurieddc3e422013-10-02 16:10:54 -070041 Name (_HID, EisaId("PNP0C0E"))
Duncan Laurie25c6f752014-05-22 08:25:36 -070042 Name (_UID, 1)
43 Name (_PRW, Package() { 13, 0x3 }) // GPIO13
Duncan Laurieddc3e422013-10-02 16:10:54 -070044 }
45
46 Device (TSCR)
47 {
Duncan Laurieddc3e422013-10-02 16:10:54 -070048 Name (_HID, EisaId("PNP0C0E"))
Duncan Laurie25c6f752014-05-22 08:25:36 -070049 Name (_UID, 2)
50 Name (_PRW, Package() { 14, 0x3 }) // GPIO14
51 }
Duncan Laurie515d3d22014-07-15 13:36:52 -070052
53 // Keyboard Backlight interface via EC
54 Device (KBLT) {
55 Name (_HID, "GOOG0002")
56 Name (_UID, 1)
57
58 // Read current backlight value
59 Method (KBQC, 0)
60 {
61 Return (\_SB.PCI0.LPCB.EC0.KBLV)
62 }
63
64 // Write new backlight value
65 Method (KBCM, 1)
66 {
67 Store (Arg0, \_SB.PCI0.LPCB.EC0.KBLV)
68 }
69 }
Duncan Laurie25c6f752014-05-22 08:25:36 -070070}
71
Duncan Laurie17b78662014-08-11 08:06:04 -070072/*
73 * WLAN connected to Root Port 3, becomes Root Port 1 after coalesce
74 */
75Scope (\_SB.PCI0.RP01)
76{
77 Device (WLAN)
78 {
79 Name (_ADR, 0x00000000)
80
81 /* GPIO10 is PCH_WLAN_WAKE_L */
82 Name (GPIO, 10)
83
84 Name (_PRW, Package() { GPIO, 3 })
85
86 Method (_DSW, 3, NotSerialized)
87 {
88 If (LEqual (Arg0, 1)) {
89 // Enable GPIO as wake source
90 \_SB.PCI0.LPCB.GPIO.GWAK (^GPIO)
91 }
92 }
93 }
94}
95
Duncan Laurie25c6f752014-05-22 08:25:36 -070096Scope (\_SB.PCI0.I2C0)
97{
98 Device (ATPB)
99 {
100 Name (_HID, "ATML0000")
101 Name (_DDN, "Atmel Touchpad Bootloader")
102 Name (_UID, 1)
103 Name (_S0W, 4)
104 Name (ISTP, 1) /* Touchpad */
Duncan Laurieddc3e422013-10-02 16:10:54 -0700105
106 Name (_CRS, ResourceTemplate()
107 {
Duncan Laurie25c6f752014-05-22 08:25:36 -0700108 I2cSerialBus (
Duncan Lauriec2531892014-06-18 14:03:08 +0800109 0x26, // SlaveAddress
Duncan Laurie25c6f752014-05-22 08:25:36 -0700110 ControllerInitiated, // SlaveMode
111 400000, // ConnectionSpeed
112 AddressingMode7Bit, // AddressingMode
113 "\\_SB.PCI0.I2C0", // ResourceSource
114 )
Duncan Laurieddc3e422013-10-02 16:10:54 -0700115
Duncan Laurie25c6f752014-05-22 08:25:36 -0700116 // GPIO13 is PIRQL
117 Interrupt (ResourceConsumer, Edge, ActiveLow) { 27 }
Duncan Laurieddc3e422013-10-02 16:10:54 -0700118 })
Duncan Laurie25c6f752014-05-22 08:25:36 -0700119
120 Method (_STA)
121 {
122 If (LEqual (\S1EN, 1)) {
123 Return (0xF)
124 } Else {
125 Return (0x0)
126 }
127 }
128 }
129
130 Device (ATPA)
131 {
132 Name (_HID, "ATML0000")
133 Name (_DDN, "Atmel Touchpad")
134 Name (_UID, 2)
135 Name (_S0W, 4)
136 Name (ISTP, 1) /* Touchpad */
137
138 Name (_CRS, ResourceTemplate()
139 {
140 I2cSerialBus (
Duncan Lauriec2531892014-06-18 14:03:08 +0800141 0x4a, // SlaveAddress
Duncan Laurie25c6f752014-05-22 08:25:36 -0700142 ControllerInitiated, // SlaveMode
143 400000, // ConnectionSpeed
144 AddressingMode7Bit, // AddressingMode
145 "\\_SB.PCI0.I2C0", // ResourceSource
146 )
147
148 // GPIO13 is PIRQL
149 Interrupt (ResourceConsumer, Edge, ActiveLow) { 27 }
150 })
151
152 Method (_STA)
153 {
154 If (LEqual (\S1EN, 1)) {
155 Return (0xF)
156 } Else {
157 Return (0x0)
158 }
159 }
160 }
Kane Chen00aedc52014-07-11 16:24:39 -0700161
162 Device (CODC)
163 {
164 /*
165 * TODO(kane): Need official HID.
166 *
167 */
168 Name (_HID, "RT5677CE")
169 Name (_DDN, "RT5667 Codec")
170 Name (_UID, 1)
171 Name (_CRS, ResourceTemplate()
172 {
173 I2cSerialBus (
174 0x2c, // SlaveAddress
175 ControllerInitiated, // SlaveMode
176 400000, // ConnectionSpeed
177 AddressingMode7Bit, // AddressingMode
Paul Menzele0b6fbd2015-01-19 12:58:25 +0100178 "\\_SB.PCI0.I2C0", // ResourceSource
Kane Chen00aedc52014-07-11 16:24:39 -0700179 )
180 Interrupt (ResourceConsumer, Edge, ActiveLow){ 30 }
181 })
182 Method (_STA)
183 {
184 If (LEqual (\S1EN, 1)) {
185 Return (0xF)
186 } Else {
187 Return (0x0)
188 }
189 }
190 }
Duncan Lauriebe19c542014-08-22 13:36:12 -0700191
192 Device (HOTW)
193 {
194 Name (_HID, "PNP0A05")
195 Name (_DDN, "Hotword Wake")
196 Name (_UID, 1)
197 Name (GPIO, 46) /* HOTWORD_DET_L_3V3 */
198
199 Name (_PRW, Package() { GPIO, 3 })
200
201 Method (_DSW, 3, NotSerialized)
202 {
203 If (LEqual (Arg0, 1)) {
204 // Enable GPIO as wake source
205 \_SB.PCI0.LPCB.GPIO.GWAK (^GPIO)
206 }
207 }
208
209 Method (_STA)
210 {
211 Return (0xF)
212 }
213 }
Duncan Laurie25c6f752014-05-22 08:25:36 -0700214}
215
216Scope (\_SB.PCI0.I2C1)
217{
218 Device (ATSB)
219 {
220 Name (_HID, "ATML0001")
221 Name (_DDN, "Atmel Touchscreen Bootloader")
222 Name (_UID, 4)
223 Name (_S0W, 4)
224 Name (ISTP, 0) /* TouchScreen */
225
226 Name (_CRS, ResourceTemplate()
227 {
228 I2cSerialBus (
229 0x25, // SlaveAddress
230 ControllerInitiated, // SlaveMode
231 400000, // ConnectionSpeed
232 AddressingMode7Bit, // AddressingMode
233 "\\_SB.PCI0.I2C1", // ResourceSource
234 )
235
236 // GPIO14 is PIRQM
237 Interrupt (ResourceConsumer, Edge, ActiveLow) { 28 }
238 })
239
240 Method (_STA)
241 {
242 If (LEqual (\S2EN, 1)) {
243 Return (0xF)
244 } Else {
245 Return (0x0)
246 }
247 }
248 }
249
250 Device (ATSA)
251 {
252 Name (_HID, "ATML0001")
253 Name (_DDN, "Atmel Touchscreen")
254 Name (_UID, 5)
255 Name (_S0W, 4)
256 Name (ISTP, 0) /* TouchScreen */
257
258 Name (_CRS, ResourceTemplate()
259 {
260 I2cSerialBus (
261 0x4b, // SlaveAddress
262 ControllerInitiated, // SlaveMode
263 400000, // ConnectionSpeed
264 AddressingMode7Bit, // AddressingMode
265 "\\_SB.PCI0.I2C1", // ResourceSource
266 )
267
268 // GPIO14 is PIRQM
269 Interrupt (ResourceConsumer, Edge, ActiveLow) { 28 }
270 })
271
272 Method (_STA)
273 {
274 If (LEqual (\S2EN, 1)) {
275 Return (0xF)
276 } Else {
277 Return (0x0)
278 }
279 }
Duncan Laurieddc3e422013-10-02 16:10:54 -0700280 }
281}