Angel Pons | 236c637 | 2020-04-03 01:21:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 2 | |
Elyes HAOUAS | 1194999 | 2019-03-12 10:40:08 +0100 | [diff] [blame] | 3 | #include <arch/ioapic.h> |
| 4 | |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 5 | Device (USB0) |
| 6 | { |
| 7 | Name (_ADR, 0x001D0000) |
| 8 | Name (_PRW, Package () { 0x03, 0x05 }) |
| 9 | |
| 10 | OperationRegion (USBS, PCI_Config, 0x00, 0x0100) |
| 11 | Field (USBS, ByteAcc, NoLock, Preserve) |
| 12 | { |
| 13 | Offset (0xC4), URES, 8 |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | Device (USB1) |
| 18 | { |
| 19 | Name (_ADR, 0x001D0001) |
| 20 | Name (_PRW, Package () { 0x04, 0x05 }) |
| 21 | OperationRegion (USBS, PCI_Config, 0x00, 0x0100) |
| 22 | Field (USBS, ByteAcc, NoLock, Preserve) |
| 23 | { |
| 24 | Offset (0xC4), URES, 8 |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | Device (USB2) |
| 29 | { |
| 30 | Name (_ADR, 0x001D0002) |
| 31 | Name (_PRW, Package () { 0x0C, 0x05 }) |
| 32 | OperationRegion (USBS, PCI_Config, 0x00, 0x0100) |
| 33 | Field (USBS, ByteAcc, NoLock, Preserve) |
| 34 | { |
| 35 | Offset (0xC4), URES, 8 |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | Device (USB3) |
| 40 | { |
| 41 | Name (_ADR, 0x001D0007) |
| 42 | Name (_PRW, Package () { 0x0D, 0x05 }) /* PME_B0_STS any 0:1d or 0:1f device */ |
| 43 | OperationRegion (USBS, PCI_Config, 0x00, 0x0100) |
| 44 | Field (USBS, ByteAcc, NoLock, Preserve) |
| 45 | { |
| 46 | Offset (0xC4), URES, 8 |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | Device(PCI5) |
| 51 | { |
| 52 | Name (_ADR, 0x001E0000) |
| 53 | Name (_PRW, Package () { 0x0B, 0x05 }) /* PME# _STS */ |
| 54 | Name (_PRT, Package() { |
| 55 | Package() { 0x0003ffff, 0, 0, 20 }, |
| 56 | Package() { 0x0003ffff, 1, 0, 21 }, |
| 57 | Package() { 0x0003ffff, 2, 0, 22 }, |
| 58 | Package() { 0x0003ffff, 3, 0, 23 }, |
| 59 | }) |
| 60 | } |
| 61 | |
| 62 | Device (ICH0) |
| 63 | { |
| 64 | Name (_ADR, 0x001F0000) |
| 65 | OperationRegion (D310, PCI_Config, 0x00, 0xFF) |
| 66 | Field (D310, ByteAcc, NoLock, Preserve) |
| 67 | { |
| 68 | Offset (0x40), PBAR, 16, |
| 69 | Offset (0x58), GBAR, 16, |
| 70 | } |
| 71 | |
| 72 | OperationRegion (ACPI, SystemIO, 0x0400, 0xC0) |
| 73 | Field (ACPI, ByteAcc, NoLock, Preserve) |
| 74 | { |
Elyes HAOUAS | 17fa9de | 2019-03-30 08:22:54 +0100 | [diff] [blame] | 75 | PS1L, 8, |
| 76 | PS1H, 8, |
| 77 | PE1L, 8, |
| 78 | PE1H, 8, |
| 79 | |
| 80 | Offset (0x28), |
| 81 | GS0L, 8, |
| 82 | GS0H, 8, |
| 83 | GSPL, 8, |
| 84 | GSPH, 8, |
| 85 | GE0L, 8, |
| 86 | GE0H, 8, |
| 87 | GEPL, 8, |
| 88 | GEPH, 8, |
| 89 | |
| 90 | Offset (0xB8), |
| 91 | GPLV, 8 |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | Name (MSBF, ResourceTemplate () |
| 95 | { |
| 96 | /* IOAPIC 0 */ |
Kyösti Mälkki | 3aff1a3 | 2012-04-11 12:19:03 +0300 | [diff] [blame] | 97 | Memory32Fixed (ReadWrite, IO_APIC_ADDR, 0x00001000,) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 98 | |
| 99 | IO (Decode16, 0x0, 0x0, 0x80, 0x0, PMIO) |
| 100 | IO (Decode16, 0x0, 0x0, 0x40, 0x0, GPIO) |
| 101 | |
| 102 | /* 8254 legacy irq */ |
| 103 | IO (Decode16, 0x04D0, 0x04D0, 0x02, 0x02,) |
| 104 | |
| 105 | /* reset generator */ |
| 106 | IO (Decode16, 0x0092, 0x0092, 0x01, 0x01, ) |
| 107 | }) |
| 108 | |
| 109 | Method (_CRS, 0, NotSerialized) |
| 110 | { |
| 111 | CreateWordField (MSBF, \_SB_.PCI0.ICH0.PMIO._MIN, IOA1) |
| 112 | CreateWordField (MSBF, \_SB_.PCI0.ICH0.PMIO._MAX, IOA2) |
| 113 | CreateByteField (MSBF, \_SB_.PCI0.ICH0.PMIO._LEN, IOAL) |
| 114 | |
| 115 | Store (PBAR, Local0) |
Felix Singer | 0a137cb | 2021-12-31 12:44:03 +0100 | [diff] [blame^] | 116 | If (Local0 && 1) |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 117 | { |
| 118 | And (Local0, 0xFFFE, Local0) |
| 119 | Store (Local0, IOA1) |
| 120 | Store (Local0, IOA2) |
| 121 | Store (0x80, IOAL) |
| 122 | } Else { |
| 123 | Store (0x00, IOAL) |
| 124 | } |
| 125 | |
| 126 | CreateWordField (MSBF, \_SB_.PCI0.ICH0.GPIO._MIN, IOS1) |
| 127 | CreateWordField (MSBF, \_SB_.PCI0.ICH0.GPIO._MAX, IOS2) |
| 128 | CreateByteField (MSBF, \_SB_.PCI0.ICH0.GPIO._LEN, IOSL) |
| 129 | |
| 130 | Store (GBAR, Local0) |
Felix Singer | 0a137cb | 2021-12-31 12:44:03 +0100 | [diff] [blame^] | 131 | If (Local0 && 1) { |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 132 | And (Local0, 0xFFFE, Local0) |
| 133 | Store (Local0, IOS1) |
| 134 | Store (Local0, IOS2) |
| 135 | Store (0x40, IOSL) |
| 136 | } Else { |
| 137 | Store (0x00, IOSL) |
| 138 | } |
| 139 | Return (MSBF) |
| 140 | } |
| 141 | |
| 142 | Device (FWH) |
| 143 | { |
| 144 | Name (_HID, EisaId ("PNP0C02")) |
| 145 | Name (_UID, 0x01) |
| 146 | |
| 147 | |
| 148 | Name (MSBG, ResourceTemplate () { |
| 149 | Memory32Fixed (ReadOnly, 0xFFF00000, 0x00080000,) |
| 150 | Memory32Fixed (ReadOnly, 0xFFF80000, 0x00080000,) |
| 151 | }) |
| 152 | |
| 153 | Method (_CRS, 0, NotSerialized) |
Elyes HAOUAS | 07662a6 | 2018-05-28 13:15:57 +0200 | [diff] [blame] | 154 | { |
Kyösti Mälkki | 9116270 | 2011-11-03 15:22:01 +0200 | [diff] [blame] | 155 | Return (MSBG) |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | Device (SMSC) |
| 160 | { |
| 161 | Name (_HID, EisaId ("PNP0C02")) |
| 162 | Name (_UID, 0x02) |
| 163 | #include "acpi/superio.asl" |
| 164 | } |
| 165 | |
| 166 | } |