1 /* SPDX-License-Identifier: GPL-2.0-only */
3 // Intel Serial IO Devices in ACPI Mode
5 // Serial IO Device BAR0 and BAR1 is 4KB
6 #define SIO_BAR_LEN 0x1000
8 // This is defined in SSDT2 which is generated at boot based
9 // on whether or not the device is enabled in ACPI mode.
19 // Serial IO Resource Consumption for BAR1
22 Name (_HID, EISAID ("PNP0C02"))
25 Name (RBUF, ResourceTemplate ()
27 // Serial IO BAR1 (PCI config space) resources
28 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D0) // SDMA
29 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D1) // I2C0
30 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D2) // I2C1
31 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D3) // SPI0
32 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D4) // SPI1
33 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D5) // UART0
34 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D6) // UART1
35 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D7) // SDIO
38 // Update BAR1 address and length if set in NVS
39 Method (_CRS, 0, NotSerialized)
43 CreateDwordField (^RBUF, ^B1D0._BAS, B0AD)
44 CreateDwordField (^RBUF, ^B1D0._LEN, B0LN)
51 CreateDwordField (^RBUF, ^B1D1._BAS, B1AD)
52 CreateDwordField (^RBUF, ^B1D1._LEN, B1LN)
59 CreateDwordField (^RBUF, ^B1D2._BAS, B2AD)
60 CreateDwordField (^RBUF, ^B1D2._LEN, B2LN)
67 CreateDwordField (^RBUF, ^B1D3._BAS, B3AD)
68 CreateDwordField (^RBUF, ^B1D3._LEN, B3LN)
75 CreateDwordField (^RBUF, ^B1D4._BAS, B4AD)
76 CreateDwordField (^RBUF, ^B1D4._LEN, B4LN)
83 CreateDwordField (^RBUF, ^B1D5._BAS, B5AD)
84 CreateDwordField (^RBUF, ^B1D5._LEN, B5LN)
91 CreateDwordField (^RBUF, ^B1D6._BAS, B6AD)
92 CreateDwordField (^RBUF, ^B1D6._LEN, B6LN)
99 CreateDwordField (^RBUF, ^B1D7._BAS, B7AD)
100 CreateDwordField (^RBUF, ^B1D7._LEN, B7LN)
111 // Serial IO DMA Controller
112 Name (_HID, "INTL9C60")
115 // BAR0 is assigned during PCI enumeration and saved into NVS
116 Name (RBUF, ResourceTemplate ()
118 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
119 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
122 Method (_CRS, 0, NotSerialized)
124 // Update BAR0 address and length if set in NVS
126 CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
127 CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
135 Method (_STA, 0, NotSerialized)
147 // Serial IO I2C0 Controller
148 Name (_HID, "INT33C2")
149 Name (_CID, "INT33C2")
152 Name (SSCN, Package () { 432, 507, 30 })
153 Name (FMCN, Package () { 72, 160, 30 })
155 // BAR0 is assigned during PCI enumeration and saved into NVS
156 Name (RBUF, ResourceTemplate ()
158 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
159 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
162 // DMA channels are only used if Serial IO DMA controller is enabled
163 Name (DBUF, ResourceTemplate ()
165 FixedDMA (0x18, 4, Width32Bit, DMA1) // Tx
166 FixedDMA (0x19, 5, Width32Bit, DMA2) // Rx
169 Method (_CRS, 0, NotSerialized)
171 // Update BAR0 address and length if set in NVS
173 CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
174 CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
179 // Check if Serial IO DMA Controller is enabled
180 If (\_SB.PCI0.SDMA._STA != 0) {
181 Return (ConcatenateResTemplate (RBUF, DBUF))
187 Method (_STA, 0, NotSerialized)
196 // Access to PCI Config in ACPI mode
197 OperationRegion (KEYS, SystemMemory, \S1B1, 0x100)
198 Field (KEYS, DWordAcc, NoLock, Preserve)
204 // Put controller in D0 state
205 Method (_PS0, 0, Serialized)
208 Local0 = ^PSAT // Read back after writing
210 // Use Local0 to avoid iasl warning: Method Local is set but never used
214 // Put controller in D3Hot state
215 Method (_PS3, 0, Serialized)
218 Local0 = ^PSAT // Read back after writing
220 // Use Local0 to avoid iasl warning: Method Local is set but never used
227 // Serial IO I2C1 Controller
228 Name (_HID, "INT33C3")
229 Name (_CID, "INT33C3")
232 Name (SSCN, Package () { 432, 507, 30 })
233 Name (FMCN, Package () { 72, 160, 30 })
235 // BAR0 is assigned during PCI enumeration and saved into NVS
236 Name (RBUF, ResourceTemplate ()
238 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
239 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
242 // DMA channels are only used if Serial IO DMA controller is enabled
243 Name (DBUF, ResourceTemplate ()
245 FixedDMA (0x1A, 6, Width32Bit, DMA1) // Tx
246 FixedDMA (0x1B, 7, Width32Bit, DMA2) // Rx
249 Method (_CRS, 0, NotSerialized)
251 // Update BAR0 address and length if set in NVS
253 CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
254 CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
259 // Check if Serial IO DMA Controller is enabled
260 If (\_SB.PCI0.SDMA._STA != 0) {
261 Return (ConcatenateResTemplate (RBUF, DBUF))
267 Method (_STA, 0, NotSerialized)
276 // Access to PCI Config in ACPI mode
277 OperationRegion (KEYS, SystemMemory, \S2B1, 0x100)
278 Field (KEYS, DWordAcc, NoLock, Preserve)
284 // Put controller in D0 state
285 Method (_PS0, 0, Serialized)
288 Local0 = ^PSAT // Read back after writing
290 // Use Local0 to avoid iasl warning: Method Local is set but never used
294 // Put controller in D3Hot state
295 Method (_PS3, 0, Serialized)
298 Local0 = ^PSAT // Read back after writing
300 // Use Local0 to avoid iasl warning: Method Local is set but never used
307 // Serial IO SPI0 Controller
308 Name (_HID, "INT33C0")
309 Name (_CID, "INT33C0")
312 // BAR0 is assigned during PCI enumeration and saved into NVS
313 Name (RBUF, ResourceTemplate ()
315 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
316 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
319 Method (_CRS, 0, NotSerialized)
321 // Update BAR0 address and length if set in NVS
323 CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
324 CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
332 Method (_STA, 0, NotSerialized)
344 // Serial IO SPI1 Controller
345 Name (_HID, "INT33C1")
346 Name (_CID, "INT33C1")
349 // BAR0 is assigned during PCI enumeration and saved into NVS
350 Name (RBUF, ResourceTemplate ()
352 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
353 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
356 // DMA channels are only used if Serial IO DMA controller is enabled
357 Name (DBUF, ResourceTemplate ()
359 FixedDMA (0x10, 0, Width32Bit, DMA1) // Tx
360 FixedDMA (0x11, 1, Width32Bit, DMA2) // Rx
363 Method (_CRS, 0, NotSerialized)
365 // Update BAR0 address and length if set in NVS
367 CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
368 CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
373 // Check if Serial IO DMA Controller is enabled
374 If (\_SB.PCI0.SDMA._STA != 0) {
375 Return (ConcatenateResTemplate (RBUF, DBUF))
381 Method (_STA, 0, NotSerialized)
393 // Serial IO UART0 Controller
394 Name (_HID, "INT33C4")
395 Name (_CID, "INT33C4")
398 // BAR0 is assigned during PCI enumeration and saved into NVS
399 Name (RBUF, ResourceTemplate ()
401 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
402 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {13}
405 // DMA channels are only used if Serial IO DMA controller is enabled
406 Name (DBUF, ResourceTemplate ()
408 FixedDMA (0x16, 2, Width32Bit, DMA1) // Tx
409 FixedDMA (0x17, 3, Width32Bit, DMA2) // Rx
412 Method (_CRS, 0, NotSerialized)
414 // Update BAR0 address and length if set in NVS
416 CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
417 CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
422 // Check if Serial IO DMA Controller is enabled
423 If (\_SB.PCI0.SDMA._STA != 0) {
424 Return (ConcatenateResTemplate (RBUF, DBUF))
430 Method (_STA, 0, NotSerialized)
442 // Serial IO UART1 Controller
443 Name (_HID, "INT33C5")
444 Name (_CID, "INT33C5")
447 // BAR0 is assigned during PCI enumeration and saved into NVS
448 Name (RBUF, ResourceTemplate ()
450 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
451 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {13}
454 Method (_CRS, 0, NotSerialized)
456 // Update BAR0 address and length if set in NVS
458 CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
459 CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
467 Method (_STA, 0, NotSerialized)
479 // Serial IO SDIO Controller
480 Name (_HID, "INT33C6")
481 Name (_CID, "PNP0D40")
484 // BAR0 is assigned during PCI enumeration and saved into NVS
485 Name (RBUF, ResourceTemplate ()
487 Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
488 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {5}
491 Method (_CRS, 0, NotSerialized)
493 // Update BAR0 address and length if set in NVS
495 CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
496 CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
504 Method (_STA, 0, NotSerialized)