blob: c622783f44cdbb3d8e873aae54c4b6bdc3f1e19d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Andy Shevchenko286e77f2017-10-03 14:55:07 +03002/*
3 * Copyright (c) 2017 Intel Corporation
4 *
5 * Partially based on southcluster.asl for other x86 platforms
Andy Shevchenko286e77f2017-10-03 14:55:07 +03006 */
7
8Device (PCI0)
9{
10 Name (_HID, EISAID("PNP0A08")) /* PCIe */
11 Name (_CID, EISAID("PNP0A03")) /* PCI */
12
Andy Shevchenko15a76b12019-08-26 09:48:15 +080013 Name (_ADR, Zero)
14 Name (_BBN, Zero)
Andy Shevchenko286e77f2017-10-03 14:55:07 +030015
16 Name (MCRS, ResourceTemplate()
17 {
18 /* Bus Numbers */
19 WordBusNumber(ResourceProducer, MinFixed, MaxFixed, PosDecode,
20 0x0000, 0x0000, 0x00ff, 0x0000, 0x0100, , , PB00)
21
22 /* IO Region 0 */
23 WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
24 0x0000, 0x0000, 0x0cf7, 0x0000, 0x0cf8, , , PI00)
25
26 /* PCI Config Space */
27 IO(Decode16, 0x0cf8, 0x0cf8, 0x0001, 0x0008)
28
29 /* IO Region 1 */
30 WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
31 0x0000, 0x0d00, 0xffff, 0x0000, 0xf300, , , PI01)
32
33 /* GPIO Low Memory Region */
34 DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
35 Cacheable, ReadWrite,
36 0x00000000, 0x000ddcc0, 0x000ddccf, 0x00000000,
37 0x00000010, , , GP00)
38
39 /* PSH Memory Region 0 */
40 DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
41 Cacheable, ReadWrite,
42 0x00000000, 0x04819000, 0x04898fff, 0x00000000,
43 0x00080000, , , PSH0)
44
45 /* PSH Memory Region 1 */
46 DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
47 Cacheable, ReadWrite,
48 0x00000000, 0x04919000, 0x04920fff, 0x00000000,
49 0x00008000, , , PSH1)
50
51 /* SST Memory Region */
52 DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
53 Cacheable, ReadWrite,
54 0x00000000, 0x05e00000, 0x05ffffff, 0x00000000,
55 0x00200000, , , SST0)
56
57 /* PCI Memory Region */
58 DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed,
59 Cacheable, ReadWrite,
60 0x00000000, 0x80000000, 0xffffffff, 0x00000000,
61 0x80000000, , , PMEM)
62 })
63
64 Method (_CRS, 0, Serialized)
65 {
66 Return (MCRS)
67 }
68
Andy Shevchenkob04ef3b2019-08-29 17:04:19 +030069 /* Device Resource Consumption */
70 Device (PDRC)
71 {
72 Name (_HID, EISAID("PNP0C02"))
73 Name (_UID, One)
74
75 Name (PDRS, ResourceTemplate()
76 {
77 Memory32Fixed(ReadWrite, MCFG_BASE_ADDRESS, MCFG_BASE_SIZE)
78 })
79
80 Method (_CRS, 0, Serialized)
81 {
82 Return (PDRS)
83 }
84 }
85
Andy Shevchenko286e77f2017-10-03 14:55:07 +030086 Method (_OSC, 4)
87 {
88 /* Check for proper GUID */
89 If (LEqual(Arg0, ToUUID("33db4d5b-1ff7-401c-9657-7441c03dd766"))) {
90 /* Let OS control everything */
91 Return (Arg3)
92 } Else {
93 /* Unrecognized UUID */
94 CreateDWordField(Arg3, 0, CDW1)
95 Or(CDW1, 4, CDW1)
96 Return (Arg3)
97 }
98 }
99
100 Device (SDHC)
101 {
102 Name (_ADR, 0x00010003)
103 Name (_DEP, Package (0x01)
104 {
105 GPIO
106 })
107 Name (PSTS, Zero)
108
109 Method (_STA)
110 {
111 Return (STA_VISIBLE)
112 }
113
114 Method (_PS3, 0, NotSerialized)
115 {
116 }
117
118 Method (_PS0, 0, NotSerialized)
119 {
120 If (PSTS == Zero)
121 {
122 If (^^GPIO.AVBL == One)
123 {
124 ^^GPIO.WFD3 = One
125 PSTS = One
126 }
127 }
128 }
129
130 /* BCM43340 */
131 Device (BRC1)
132 {
133 Name (_ADR, 0x01)
134 Name (_DEP, Package (0x01)
135 {
136 GPIO
137 })
138
139 Method (_STA)
140 {
141 Return (STA_VISIBLE)
142 }
143
144 Method (_RMV, 0, NotSerialized)
145 {
146 Return (Zero)
147 }
148
149 Method (_PS3, 0, NotSerialized)
150 {
151 If (^^^GPIO.AVBL == One)
152 {
153 ^^^GPIO.WFD3 = Zero
154 PSTS = Zero
155 }
156 }
157
158 Method (_PS0, 0, NotSerialized)
159 {
160 If (PSTS == Zero)
161 {
162 If (^^^GPIO.AVBL == One)
163 {
164 ^^^GPIO.WFD3 = One
165 PSTS = One
166 }
167 }
168 }
169 }
170
171 Device (BRC2)
172 {
173 Name (_ADR, 0x02)
174 Method (_STA, 0, NotSerialized)
175 {
176 Return (STA_VISIBLE)
177 }
178
179 Method (_RMV, 0, NotSerialized)
180 {
181 Return (Zero)
182 }
183 }
184 }
185
186 Device (SPI5)
187 {
188 Name (_ADR, 0x00070001)
189 Name (RBUF, ResourceTemplate()
190 {
191 GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200192 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 110 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300193 GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200194 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 111 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300195 GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200196 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 112 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300197 GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200198 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 113 }
Andy Shevchenko77406e52019-02-26 13:43:14 +0200199
200 FixedDMA(0x000d, 0x0002, Width32bit, )
201 FixedDMA(0x000c, 0x0003, Width32bit, )
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300202 })
203
204 Method (_CRS, 0, NotSerialized)
205 {
206 Return (RBUF)
207 }
208
209 /*
210 * See
211 * http://www.kernel.org/doc/Documentation/acpi/gpio-properties.txt
212 * for more information about GPIO bindings.
213 */
214 Name (_DSD, Package () {
215 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
216 Package () {
217 Package () {
218 "cs-gpios", Package () {
219 ^SPI5, 0, 0, 0,
220 ^SPI5, 1, 0, 0,
221 ^SPI5, 2, 0, 0,
222 ^SPI5, 3, 0, 0,
223 },
224 },
225 }
226 })
227
228 Method (_STA, 0, NotSerialized)
229 {
230 Return (STA_VISIBLE)
231 }
232 }
233
234 Device (I2C1)
235 {
236 Name (_ADR, 0x00080000)
237
238 Method (_STA, 0, NotSerialized)
239 {
240 Return (STA_VISIBLE)
241 }
Andy Shevchenko98625c52019-02-26 13:43:15 +0200242
243 Name (RBUF, ResourceTemplate()
244 {
245 FixedDMA(0x0009, 0x0000, Width32bit, )
246 FixedDMA(0x0008, 0x0001, Width32bit, )
247 })
248
249 Method (_CRS, 0, NotSerialized)
250 {
251 Return (RBUF)
252 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300253 }
254
Georgii Staroselskii418c2462018-09-11 13:31:09 +0300255 Device (I2C6)
256 {
257 Name (_ADR, 0x00090001)
258
259 Method (_STA, 0, NotSerialized)
260 {
261 Return (STA_VISIBLE)
262 }
263 }
264
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300265 Device (GPIO)
266 {
267 Name (_ADR, 0x000c0000)
268
269 Method (_STA)
270 {
271 Return (STA_VISIBLE)
272 }
273
274 Name (AVBL, Zero)
275 Method (_REG, 2, NotSerialized)
276 {
277 If (Arg0 == 0x08)
278 {
279 AVBL = Arg1
280 }
281 }
282
283 OperationRegion (GPOP, GeneralPurposeIo, 0, 1)
284 Field (GPOP, ByteAcc, NoLock, Preserve)
285 {
286 Connection (
287 GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200288 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 96 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300289 ),
290 WFD3, 1,
291 }
292 }
293
294 Device (PWM0)
295 {
296 Name (_ADR, 0x00170000)
297
298 Method (_STA, 0, NotSerialized)
299 {
300 Return (STA_VISIBLE)
301 }
302 }
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200303
304 Device (HSU0)
305 {
306 Name (_ADR, 0x00040001)
307
308 Method (_STA, 0, NotSerialized)
309 {
310 Return (STA_VISIBLE)
311 }
312
313 Device (BTH0)
314 {
315 Name (_HID, "BCM2E95")
316 Name (_DEP, Package ()
317 {
318 GPIO,
319 HSU0
320 })
321
322 Method (_STA, 0, NotSerialized)
323 {
324 Return (STA_VISIBLE)
325 }
326
Andy Shevchenko6b07d362018-01-10 18:07:26 +0200327 Method (_CRS, 0, Serialized)
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200328 {
Andy Shevchenko6a211b62018-11-10 17:37:02 +0200329 Name (RBUF, ResourceTemplate()
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200330 {
Andy Shevchenko6a211b62018-11-10 17:37:02 +0200331 UartSerialBus(0x0001C200, DataBitsEight, StopBitsOne,
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200332 0xFC, LittleEndian, ParityTypeNone, FlowControlHardware,
333 0x20, 0x20, "\\_SB.PCI0.HSU0", 0, ResourceConsumer, , )
Andy Shevchenko6a211b62018-11-10 17:37:02 +0200334 GpioInt(Level, ActiveHigh, Exclusive, PullNone, 0,
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200335 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 185 }
Andy Shevchenko6a211b62018-11-10 17:37:02 +0200336 GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200337 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 184 }
Andy Shevchenko6a211b62018-11-10 17:37:02 +0200338 GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200339 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 71 }
340 })
341 Return (RBUF)
342 }
343
344 Name (_DSD, Package () {
345 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
346 Package () {
347 Package () { "host-wakeup-gpios", Package () { ^BTH0, 0, 0, 0 } },
348 Package () { "device-wakeup-gpios", Package () { ^BTH0, 1, 0, 0 } },
349 Package () { "shutdown-gpios", Package () { ^BTH0, 2, 0, 0 } },
350 }
351 })
352 }
353 }
Andy Shevchenkoe1aa27b2019-02-05 13:06:57 +0200354
355 Device (IPC1)
356 {
357 Name (_ADR, 0x00130000)
358
359 Method (_STA, 0, NotSerialized)
360 {
361 Return (STA_VISIBLE)
362 }
363
364 Device (PMIC)
365 {
366 Name (_ADR, Zero)
367 Name (_HID, "INTC100E")
368 Name (_CID, "INTC100E")
369 Name (_DDN, "Basin Cove PMIC")
370 Name (_DEP, Package ()
371 {
372 IPC1
373 })
374
375 Method (_STA, 0, NotSerialized)
376 {
377 Return (STA_VISIBLE)
378 }
379
380 Method (_CRS, 0, Serialized)
381 {
382 Name (RBUF, ResourceTemplate()
383 {
384 /*
Andy Shevchenko864816a2019-08-29 17:04:21 +0300385 * Shadow registers in SRAM for PMIC:
386 * SRAM PMIC register
387 * --------------------
388 * 0x00- Unknown
389 * 0x03 THRMIRQ (0x04)
390 * 0x04 BCUIRQ (0x05)
391 * 0x05 ADCIRQ (0x06)
392 * 0x06 CHGRIRQ0 (0x07)
393 * 0x07 CHGRIRQ1 (0x08)
394 * 0x08- Unknown
395 * 0x0a PBSTATUS (0x27)
396 * 0x0b- Unknown
397 */
Andy Shevchenkoe1aa27b2019-02-05 13:06:57 +0200398 Memory32Fixed(ReadWrite, 0xFFFFF610, 0x00000010)
399 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 30 }
400 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 23 }
401 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 52 }
402 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 51 }
403 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 50 }
404 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 27 }
405 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 49 }
406 })
407 Return (RBUF)
408 }
409
410 OperationRegion (PMOP, 0x8D, Zero, 0x0100)
411 Field (PMOP, DWordAcc, NoLock, Preserve)
412 {
413 SEL1, 32,
414 SEL2, 32,
415 VCCL, 32,
416 VNNL, 32,
417 AONL, 32,
418 CNTC, 32,
419 CNTN, 32,
420 AONN, 32,
421 CNT1, 32,
422 CNT2, 32,
423 CNT3, 32,
424 FLEX, 32,
425 PRG1, 32,
426 PRG2, 32,
427 PRG3, 32,
428 VLDO, 32,
429 }
430
431 Name (AVBL, Zero)
432 Method (_REG, 2, NotSerialized)
433 {
434 If ((Arg0 == 0x8D))
435 {
436 AVBL = Arg1
437 }
438 }
439 }
440 }
Andy Shevchenkobbbfe912019-07-14 19:23:58 +0300441
442 Device (GDMA)
443 {
444 Name (_ADR, 0x00150000)
445 Name (_HID, "808611A2")
446 Name (_UID, Zero)
447
448 Method (_STA, 0, NotSerialized)
449 {
450 Return (STA_VISIBLE)
451 }
452
453 Method (_CRS, 0, Serialized)
454 {
455 Name (RBUF, ResourceTemplate ()
456 {
457 Memory32Fixed(ReadWrite, 0xFF192000, 0x00001000)
458 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 32 }
459 })
460 Return (RBUF)
461 }
462 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300463}
464
465Device (FLIS)
466{
Andy Shevchenko42574572017-12-12 19:02:42 +0200467 Name (_HID, "INTC1002")
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300468 Name (_DDN, "Intel Merrifield Family-Level Interface Shim")
469 Name (RBUF, ResourceTemplate()
470 {
Andy Shevchenko6a211b62018-11-10 17:37:02 +0200471 Memory32Fixed(ReadWrite, 0xFF0C0000, 0x00008000)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300472 PinGroup("spi5", ResourceProducer, ) { 90, 91, 92, 93, 94, 95, 96 }
473 PinGroup("uart0", ResourceProducer, ) { 115, 116, 117, 118 }
474 PinGroup("uart1", ResourceProducer, ) { 119, 120, 121, 122 }
475 PinGroup("uart2", ResourceProducer, ) { 123, 124, 125, 126 }
476 PinGroup("pwm0", ResourceProducer, ) { 144 }
477 PinGroup("pwm1", ResourceProducer, ) { 145 }
478 PinGroup("pwm2", ResourceProducer, ) { 132 }
479 PinGroup("pwm3", ResourceProducer, ) { 133 }
480 })
481
482 Method (_CRS, 0, NotSerialized)
483 {
484 Return (RBUF)
485 }
486
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300487 Method (_STA, 0, NotSerialized)
488 {
489 Return (STA_VISIBLE)
490 }
491}