blob: 4a7c85426182d3d02c1742e39f42c7098579efa0 [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 Shevchenkoacce6852020-05-28 12:17:34 +030013 Name (_UID, Zero)
Andy Shevchenko15a76b12019-08-26 09:48:15 +080014 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
Andy Shevchenko859fe482021-09-11 21:27:42 +0300100 Device (SDHB)
101 {
102 Name (_ADR, 0x00010002)
103 Name (_DEP, Package ()
104 {
105 GPIO
106 })
107
108 Name (RBUF, ResourceTemplate()
109 {
110 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
111 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 77 }
112 })
113
114 Method (_CRS, 0, Serialized)
115 {
116 Return (RBUF)
117 }
118
119 Name (_DSD, Package () {
120 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
121 Package () {
122 Package () { "cd-gpios", Package () { ^SDHB, 0, 0, 0 } },
123 }
124 })
125
Andy Shevchenko041f9272021-10-20 15:51:18 +0300126 Name (_STA, STA_VISIBLE)
Andy Shevchenko859fe482021-09-11 21:27:42 +0300127 }
128
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300129 Device (SDHC)
130 {
131 Name (_ADR, 0x00010003)
132 Name (_DEP, Package (0x01)
133 {
134 GPIO
135 })
136 Name (PSTS, Zero)
137
Andy Shevchenko041f9272021-10-20 15:51:18 +0300138 Name (_STA, STA_VISIBLE)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300139
140 Method (_PS3, 0, NotSerialized)
141 {
142 }
143
144 Method (_PS0, 0, NotSerialized)
145 {
146 If (PSTS == Zero)
147 {
148 If (^^GPIO.AVBL == One)
149 {
150 ^^GPIO.WFD3 = One
151 PSTS = One
152 }
153 }
154 }
155
156 /* BCM43340 */
157 Device (BRC1)
158 {
159 Name (_ADR, 0x01)
160 Name (_DEP, Package (0x01)
161 {
162 GPIO
163 })
164
Andy Shevchenko041f9272021-10-20 15:51:18 +0300165 Name (_STA, STA_VISIBLE)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300166
167 Method (_RMV, 0, NotSerialized)
168 {
169 Return (Zero)
170 }
171
172 Method (_PS3, 0, NotSerialized)
173 {
174 If (^^^GPIO.AVBL == One)
175 {
176 ^^^GPIO.WFD3 = Zero
177 PSTS = Zero
178 }
179 }
180
181 Method (_PS0, 0, NotSerialized)
182 {
183 If (PSTS == Zero)
184 {
185 If (^^^GPIO.AVBL == One)
186 {
187 ^^^GPIO.WFD3 = One
188 PSTS = One
189 }
190 }
191 }
192 }
193
194 Device (BRC2)
195 {
196 Name (_ADR, 0x02)
Andy Shevchenko041f9272021-10-20 15:51:18 +0300197
198 Name (_STA, STA_VISIBLE)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300199
200 Method (_RMV, 0, NotSerialized)
201 {
202 Return (Zero)
203 }
204 }
205 }
206
207 Device (SPI5)
208 {
209 Name (_ADR, 0x00070001)
210 Name (RBUF, ResourceTemplate()
211 {
212 GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200213 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 110 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300214 GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200215 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 111 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300216 GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200217 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 112 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300218 GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200219 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 113 }
Andy Shevchenko77406e52019-02-26 13:43:14 +0200220
221 FixedDMA(0x000d, 0x0002, Width32bit, )
222 FixedDMA(0x000c, 0x0003, Width32bit, )
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300223 })
224
225 Method (_CRS, 0, NotSerialized)
226 {
227 Return (RBUF)
228 }
229
230 /*
231 * See
232 * http://www.kernel.org/doc/Documentation/acpi/gpio-properties.txt
233 * for more information about GPIO bindings.
234 */
235 Name (_DSD, Package () {
236 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
237 Package () {
238 Package () {
239 "cs-gpios", Package () {
240 ^SPI5, 0, 0, 0,
241 ^SPI5, 1, 0, 0,
242 ^SPI5, 2, 0, 0,
243 ^SPI5, 3, 0, 0,
244 },
245 },
246 }
247 })
248
Andy Shevchenko041f9272021-10-20 15:51:18 +0300249 Name (_STA, STA_VISIBLE)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300250 }
251
252 Device (I2C1)
253 {
254 Name (_ADR, 0x00080000)
255
Andy Shevchenko041f9272021-10-20 15:51:18 +0300256 Name (_STA, STA_VISIBLE)
Andy Shevchenko98625c52019-02-26 13:43:15 +0200257
Andy Shevchenkoddf61992020-03-20 19:59:21 +0200258 Name (SSCN, Package ()
259 {
260 0x02F8, 0x037B, Zero,
261 })
262
263 Name (FMCN, Package ()
264 {
265 0x0087, 0x010A, Zero,
266 })
267
268 Name (HSCN, Package ()
269 {
270 0x0008, 0x0020, Zero,
271 })
272
Andy Shevchenko98625c52019-02-26 13:43:15 +0200273 Name (RBUF, ResourceTemplate()
274 {
275 FixedDMA(0x0009, 0x0000, Width32bit, )
276 FixedDMA(0x0008, 0x0001, Width32bit, )
277 })
278
279 Method (_CRS, 0, NotSerialized)
280 {
281 Return (RBUF)
282 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300283 }
284
Georgii Staroselskii418c2462018-09-11 13:31:09 +0300285 Device (I2C6)
286 {
287 Name (_ADR, 0x00090001)
288
Andy Shevchenko041f9272021-10-20 15:51:18 +0300289 Name (_STA, STA_VISIBLE)
Andy Shevchenkoddf61992020-03-20 19:59:21 +0200290
291 Name (SSCN, Package ()
292 {
293 0x02F8, 0x037B, Zero,
294 })
295
296 Name (FMCN, Package ()
297 {
298 0x0087, 0x010A, Zero,
299 })
300
301 Name (HSCN, Package ()
302 {
303 0x0008, 0x0020, Zero,
304 })
Georgii Staroselskii418c2462018-09-11 13:31:09 +0300305 }
306
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300307 Device (GPIO)
308 {
309 Name (_ADR, 0x000c0000)
310
Andy Shevchenko041f9272021-10-20 15:51:18 +0300311 Name (_STA, STA_VISIBLE)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300312
313 Name (AVBL, Zero)
314 Method (_REG, 2, NotSerialized)
315 {
316 If (Arg0 == 0x08)
317 {
318 AVBL = Arg1
319 }
320 }
321
322 OperationRegion (GPOP, GeneralPurposeIo, 0, 1)
323 Field (GPOP, ByteAcc, NoLock, Preserve)
324 {
325 Connection (
326 GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
Andy Shevchenko7ec92432018-01-04 18:40:12 +0200327 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 96 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300328 ),
329 WFD3, 1,
330 }
331 }
332
Andy Shevchenko38c93d12020-03-26 12:33:36 +0200333 Device (DWC3)
334 {
335 Name (_ADR, 0x00110000)
336 Name (_DEP, Package ()
337 {
338 ^IPC1.PMIC
339 })
340
Andy Shevchenko041f9272021-10-20 15:51:18 +0300341 Name (_STA, STA_VISIBLE)
Andy Shevchenko38c93d12020-03-26 12:33:36 +0200342
343 Device (RHUB)
344 {
345 Name (_ADR, Zero)
346
Andy Shevchenkoa0732872020-05-28 12:17:33 +0300347 Name (PCKG, Package () {
348 Buffer (0x14) {}
349 })
350
Andy Shevchenko38c93d12020-03-26 12:33:36 +0200351 /* GPLD: Generate Port Location Data (PLD) */
352 Method (GPLD, 1, Serialized) {
Andy Shevchenko38c93d12020-03-26 12:33:36 +0200353 /* REV: Revision 0x02 for ACPI 5.0 */
354 CreateField (DerefOf (Index (PCKG, Zero)), Zero, 0x07, REV)
355 Store (0x0002, REV)
356
357 /* VISI: Port visibility to user per port */
358 CreateField (DerefOf (Index (PCKG, Zero)), 0x40, One, VISI)
359 Store (Arg0, VISI)
360
361 /* VOFF: Vertical offset is not supplied */
362 CreateField (DerefOf (Index (PCKG, Zero)), 0x80, 0x10, VOFF)
363 Store (0xFFFF, VOFF)
364
365 /* HOFF: Horizontal offset is not supplied */
366 CreateField (DerefOf (Index (PCKG, Zero)), 0x90, 0x10, HOFF)
367 Store (0xFFFF, HOFF)
368
369 Return (PCKG)
370 }
371
372 Device (HS01) { Name (_ADR, 1) }
373 Device (SS01) { Name (_ADR, 2) }
374 }
375 }
376
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300377 Device (PWM0)
378 {
379 Name (_ADR, 0x00170000)
380
Andy Shevchenko041f9272021-10-20 15:51:18 +0300381 Name (_STA, STA_VISIBLE)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300382 }
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200383
384 Device (HSU0)
385 {
386 Name (_ADR, 0x00040001)
387
Andy Shevchenko041f9272021-10-20 15:51:18 +0300388 Name (_STA, STA_VISIBLE)
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200389
390 Device (BTH0)
391 {
392 Name (_HID, "BCM2E95")
393 Name (_DEP, Package ()
394 {
395 GPIO,
396 HSU0
397 })
398
Andy Shevchenko041f9272021-10-20 15:51:18 +0300399 Name (_STA, STA_VISIBLE)
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200400
Andy Shevchenkoa0732872020-05-28 12:17:33 +0300401 Name (RBUF, ResourceTemplate()
402 {
403 UartSerialBus(0x0001C200, DataBitsEight, StopBitsOne,
404 0xFC, LittleEndian, ParityTypeNone, FlowControlHardware,
405 0x20, 0x20, "\\_SB.PCI0.HSU0", 0, ResourceConsumer, , )
406 GpioInt(Level, ActiveHigh, Exclusive, PullNone, 0,
407 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 185 }
408 GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
409 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 184 }
410 GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
411 "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 71 }
412 })
413
Andy Shevchenko6b07d362018-01-10 18:07:26 +0200414 Method (_CRS, 0, Serialized)
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200415 {
Andy Shevchenko565b4ca2018-01-04 18:40:13 +0200416 Return (RBUF)
417 }
418
419 Name (_DSD, Package () {
420 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
421 Package () {
422 Package () { "host-wakeup-gpios", Package () { ^BTH0, 0, 0, 0 } },
423 Package () { "device-wakeup-gpios", Package () { ^BTH0, 1, 0, 0 } },
424 Package () { "shutdown-gpios", Package () { ^BTH0, 2, 0, 0 } },
425 }
426 })
427 }
428 }
Andy Shevchenkoe1aa27b2019-02-05 13:06:57 +0200429
430 Device (IPC1)
431 {
432 Name (_ADR, 0x00130000)
433
Andy Shevchenko041f9272021-10-20 15:51:18 +0300434 Name (_STA, STA_VISIBLE)
Andy Shevchenkoe1aa27b2019-02-05 13:06:57 +0200435
436 Device (PMIC)
437 {
Andy Shevchenkoe1aa27b2019-02-05 13:06:57 +0200438 Name (_HID, "INTC100E")
439 Name (_CID, "INTC100E")
440 Name (_DDN, "Basin Cove PMIC")
441 Name (_DEP, Package ()
442 {
443 IPC1
444 })
445
Andy Shevchenko041f9272021-10-20 15:51:18 +0300446 Name (_STA, STA_VISIBLE)
Andy Shevchenkoe1aa27b2019-02-05 13:06:57 +0200447
Andy Shevchenkoa0732872020-05-28 12:17:33 +0300448 Name (RBUF, ResourceTemplate()
449 {
450 /*
451 * Shadow registers in SRAM for PMIC:
452 * SRAM PMIC register
453 * --------------------
454 * 0x00- Unknown
455 * 0x03 THRMIRQ (0x04)
456 * 0x04 BCUIRQ (0x05)
457 * 0x05 ADCIRQ (0x06)
458 * 0x06 CHGRIRQ0 (0x07)
459 * 0x07 CHGRIRQ1 (0x08)
460 * 0x08- Unknown
461 * 0x0a PBSTATUS (0x27)
462 * 0x0b- Unknown
463 */
464 Memory32Fixed(ReadWrite, 0xFFFFF610, 0x00000010)
465 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 30 }
466 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 23 }
467 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 52 }
468 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 51 }
469 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 50 }
470 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 27 }
471 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 49 }
472 })
473
Andy Shevchenkoe1aa27b2019-02-05 13:06:57 +0200474 Method (_CRS, 0, Serialized)
475 {
Andy Shevchenkoe1aa27b2019-02-05 13:06:57 +0200476 Return (RBUF)
477 }
478
479 OperationRegion (PMOP, 0x8D, Zero, 0x0100)
480 Field (PMOP, DWordAcc, NoLock, Preserve)
481 {
482 SEL1, 32,
483 SEL2, 32,
484 VCCL, 32,
485 VNNL, 32,
486 AONL, 32,
487 CNTC, 32,
488 CNTN, 32,
489 AONN, 32,
490 CNT1, 32,
491 CNT2, 32,
492 CNT3, 32,
493 FLEX, 32,
494 PRG1, 32,
495 PRG2, 32,
496 PRG3, 32,
497 VLDO, 32,
498 }
499
500 Name (AVBL, Zero)
501 Method (_REG, 2, NotSerialized)
502 {
503 If ((Arg0 == 0x8D))
504 {
505 AVBL = Arg1
506 }
507 }
508 }
509 }
Andy Shevchenkobbbfe912019-07-14 19:23:58 +0300510
511 Device (GDMA)
512 {
513 Name (_ADR, 0x00150000)
Andy Shevchenkobbbfe912019-07-14 19:23:58 +0300514 Name (_UID, Zero)
515
Andy Shevchenko041f9272021-10-20 15:51:18 +0300516 Name (_STA, STA_VISIBLE)
Andy Shevchenkobbbfe912019-07-14 19:23:58 +0300517
Andy Shevchenkoa0732872020-05-28 12:17:33 +0300518 Name (RBUF, ResourceTemplate ()
519 {
520 Memory32Fixed(ReadWrite, 0xFF192000, 0x00001000)
521 Interrupt(ResourceConsumer, Level, ActiveHigh, Shared, ,, ) { 32 }
522 })
523
Andy Shevchenkobbbfe912019-07-14 19:23:58 +0300524 Method (_CRS, 0, Serialized)
525 {
Andy Shevchenkobbbfe912019-07-14 19:23:58 +0300526 Return (RBUF)
527 }
528 }
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300529}
530
531Device (FLIS)
532{
Andy Shevchenko42574572017-12-12 19:02:42 +0200533 Name (_HID, "INTC1002")
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300534 Name (_DDN, "Intel Merrifield Family-Level Interface Shim")
535 Name (RBUF, ResourceTemplate()
536 {
Andy Shevchenko6a211b62018-11-10 17:37:02 +0200537 Memory32Fixed(ReadWrite, 0xFF0C0000, 0x00008000)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300538 PinGroup("spi5", ResourceProducer, ) { 90, 91, 92, 93, 94, 95, 96 }
539 PinGroup("uart0", ResourceProducer, ) { 115, 116, 117, 118 }
540 PinGroup("uart1", ResourceProducer, ) { 119, 120, 121, 122 }
541 PinGroup("uart2", ResourceProducer, ) { 123, 124, 125, 126 }
542 PinGroup("pwm0", ResourceProducer, ) { 144 }
543 PinGroup("pwm1", ResourceProducer, ) { 145 }
544 PinGroup("pwm2", ResourceProducer, ) { 132 }
545 PinGroup("pwm3", ResourceProducer, ) { 133 }
546 })
547
548 Method (_CRS, 0, NotSerialized)
549 {
550 Return (RBUF)
551 }
552
Andy Shevchenko041f9272021-10-20 15:51:18 +0300553 Name (_STA, STA_VISIBLE)
Andy Shevchenko286e77f2017-10-03 14:55:07 +0300554}