Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 2 | |
| 3 | // Intel LPC Bus Device - 0:1f.0 |
| 4 | |
| 5 | Device (LPCB) |
| 6 | { |
| 7 | Name(_ADR, 0x001f0000) |
Stefan Reinauer | 109ab31 | 2009-08-12 16:08:05 +0000 | [diff] [blame] | 8 | |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 9 | OperationRegion(LPC0, PCI_Config, 0x00, 0x100) |
| 10 | Field (LPC0, AnyAcc, NoLock, Preserve) |
| 11 | { |
| 12 | Offset (0x40), |
| 13 | PMBS, 16, // PMBASE |
| 14 | Offset (0x60), // Interrupt Routing Registers |
| 15 | PRTA, 8, |
| 16 | PRTB, 8, |
| 17 | PRTC, 8, |
| 18 | PRTD, 8, |
| 19 | Offset (0x68), |
| 20 | PRTE, 8, |
| 21 | PRTF, 8, |
| 22 | PRTG, 8, |
| 23 | PRTH, 8, |
| 24 | |
| 25 | Offset (0x80), // IO Decode Ranges |
| 26 | IOD0, 8, |
| 27 | IOD1, 8, |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 28 | } |
| 29 | |
Angel Pons | e12de37 | 2020-07-07 01:33:00 +0200 | [diff] [blame] | 30 | #include <southbridge/intel/common/acpi/irqlinks.asl> |
Stefan Reinauer | 109ab31 | 2009-08-12 16:08:05 +0000 | [diff] [blame] | 31 | |
Stefan Reinauer | aca6ec6 | 2009-10-26 17:12:21 +0000 | [diff] [blame] | 32 | #include "acpi/ec.asl" |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 33 | |
| 34 | Device (DMAC) // DMA Controller |
| 35 | { |
| 36 | Name(_HID, EISAID("PNP0200")) |
| 37 | Name(_CRS, ResourceTemplate() |
| 38 | { |
| 39 | IO (Decode16, 0x00, 0x00, 0x01, 0x20) |
| 40 | IO (Decode16, 0x81, 0x81, 0x01, 0x11) |
| 41 | IO (Decode16, 0x93, 0x93, 0x01, 0x0d) |
| 42 | IO (Decode16, 0xc0, 0xc0, 0x01, 0x20) |
| 43 | DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 } |
| 44 | }) |
| 45 | } |
| 46 | |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 47 | Device (FWH) // Firmware Hub |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 48 | { |
| 49 | Name (_HID, EISAID("INT0800")) |
| 50 | Name (_CRS, ResourceTemplate() |
| 51 | { |
| 52 | Memory32Fixed(ReadOnly, 0xff000000, 0x01000000) |
| 53 | }) |
| 54 | } |
| 55 | |
| 56 | Device (HPET) |
| 57 | { |
| 58 | Name (_HID, EISAID("PNP0103")) |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 59 | Name (_CID, 0x010CD041) |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 60 | |
| 61 | Name(BUF0, ResourceTemplate() |
| 62 | { |
Elyes HAOUAS | 1644e48 | 2019-10-30 11:28:42 +0100 | [diff] [blame] | 63 | Memory32Fixed(ReadOnly, CONFIG_HPET_ADDRESS, 0x400, FED0) |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 64 | }) |
| 65 | |
| 66 | Method (_STA, 0) // Device Status |
| 67 | { |
Kyösti Mälkki | e173814 | 2020-12-29 09:04:30 +0200 | [diff] [blame^] | 68 | Return (\HPTS(HPTE)) |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 69 | } |
| 70 | |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 71 | Method (_CRS, 0, Serialized) // Current resources |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 72 | { |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 73 | If (HPTE) { |
| 74 | CreateDWordField(BUF0, \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0) |
Elyes HAOUAS | 08b5ef4 | 2020-09-10 21:06:40 +0200 | [diff] [blame] | 75 | If (HPAS == 1) { |
| 76 | HPT0 = CONFIG_HPET_ADDRESS + 0x1000 |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 77 | } |
| 78 | |
Elyes HAOUAS | 08b5ef4 | 2020-09-10 21:06:40 +0200 | [diff] [blame] | 79 | If (HPAS == 2) { |
| 80 | HPT0 = CONFIG_HPET_ADDRESS + 0x2000 |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 81 | } |
| 82 | |
Elyes HAOUAS | 08b5ef4 | 2020-09-10 21:06:40 +0200 | [diff] [blame] | 83 | If (HPAS == 3) { |
| 84 | HPT0 = CONFIG_HPET_ADDRESS + 0x3000 |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 85 | } |
| 86 | } |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 87 | |
| 88 | Return (BUF0) |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | Device(PIC) // 8259 Interrupt Controller |
| 93 | { |
| 94 | Name(_HID,EISAID("PNP0000")) |
| 95 | Name(_CRS, ResourceTemplate() |
| 96 | { |
| 97 | IO (Decode16, 0x20, 0x20, 0x01, 0x02) |
| 98 | IO (Decode16, 0x24, 0x24, 0x01, 0x02) |
| 99 | IO (Decode16, 0x28, 0x28, 0x01, 0x02) |
| 100 | IO (Decode16, 0x2c, 0x2c, 0x01, 0x02) |
| 101 | IO (Decode16, 0x30, 0x30, 0x01, 0x02) |
| 102 | IO (Decode16, 0x34, 0x34, 0x01, 0x02) |
| 103 | IO (Decode16, 0x38, 0x38, 0x01, 0x02) |
| 104 | IO (Decode16, 0x3c, 0x3c, 0x01, 0x02) |
| 105 | IO (Decode16, 0xa0, 0xa0, 0x01, 0x02) |
| 106 | IO (Decode16, 0xa4, 0xa4, 0x01, 0x02) |
| 107 | IO (Decode16, 0xa8, 0xa8, 0x01, 0x02) |
| 108 | IO (Decode16, 0xac, 0xac, 0x01, 0x02) |
| 109 | IO (Decode16, 0xb0, 0xb0, 0x01, 0x02) |
| 110 | IO (Decode16, 0xb4, 0xb4, 0x01, 0x02) |
| 111 | IO (Decode16, 0xb8, 0xb8, 0x01, 0x02) |
| 112 | IO (Decode16, 0xbc, 0xbc, 0x01, 0x02) |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 113 | IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02) |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 114 | IRQNoFlags () { 2 } |
| 115 | }) |
| 116 | } |
| 117 | |
| 118 | Device(MATH) // FPU |
| 119 | { |
| 120 | Name (_HID, EISAID("PNP0C04")) |
| 121 | Name (_CRS, ResourceTemplate() |
| 122 | { |
| 123 | IO (Decode16, 0xf0, 0xf0, 0x01, 0x01) |
| 124 | IRQNoFlags() { 13 } |
| 125 | }) |
| 126 | } |
| 127 | |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 128 | Device(LDRC) // LPC device: Resource consumption |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 129 | { |
| 130 | Name (_HID, EISAID("PNP0C02")) |
| 131 | Name (_UID, 2) |
| 132 | Name (_CRS, ResourceTemplate() |
| 133 | { |
| 134 | IO (Decode16, 0x2e, 0x2e, 0x1, 0x02) // First SuperIO |
| 135 | IO (Decode16, 0x4e, 0x4e, 0x1, 0x02) // Second SuperIO |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 136 | IO (Decode16, 0x61, 0x61, 0x1, 0x01) // NMI Status |
| 137 | IO (Decode16, 0x63, 0x63, 0x1, 0x01) // CPU Reserved |
| 138 | IO (Decode16, 0x65, 0x65, 0x1, 0x01) // CPU Reserved |
| 139 | IO (Decode16, 0x67, 0x67, 0x1, 0x01) // CPU Reserved |
| 140 | IO (Decode16, 0x80, 0x80, 0x1, 0x01) // Port 80 Post |
| 141 | IO (Decode16, 0x92, 0x92, 0x1, 0x01) // CPU Reserved |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 142 | IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) // SWSMI |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 143 | IO (Decode16, 0x800, 0x800, 0x1, 0x10) // ACPI I/O trap |
Angel Pons | ba04565 | 2020-07-07 01:22:57 +0200 | [diff] [blame] | 144 | IO (Decode16, DEFAULT_PMBASE, DEFAULT_PMBASE, 0x1, 0x80) // ICH ACPI |
| 145 | IO (Decode16, DEFAULT_GPIOBASE, DEFAULT_GPIOBASE, 0x1, 0x40) // ICH GPIO |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 146 | }) |
| 147 | } |
| 148 | |
| 149 | Device (RTC) // Real Time Clock |
| 150 | { |
| 151 | Name (_HID, EISAID("PNP0B00")) |
| 152 | Name (_CRS, ResourceTemplate() |
| 153 | { |
| 154 | IO (Decode16, 0x70, 0x70, 1, 8) |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 155 | }) |
| 156 | } |
| 157 | |
| 158 | Device (TIMR) // Intel 8254 timer |
| 159 | { |
| 160 | Name(_HID, EISAID("PNP0100")) |
| 161 | Name(_CRS, ResourceTemplate() |
| 162 | { |
| 163 | IO (Decode16, 0x40, 0x40, 0x01, 0x04) |
| 164 | IO (Decode16, 0x50, 0x50, 0x10, 0x04) |
| 165 | IRQNoFlags() {0} |
| 166 | }) |
| 167 | } |
| 168 | |
Stefan Reinauer | aca6ec6 | 2009-10-26 17:12:21 +0000 | [diff] [blame] | 169 | #include "acpi/superio.asl" |
| 170 | |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 171 | Device (PS2K) // Keyboard |
| 172 | { |
| 173 | Name(_HID, EISAID("PNP0303")) |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 174 | Name(_CID, EISAID("PNP030B")) |
| 175 | |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 176 | Name(_CRS, ResourceTemplate() |
| 177 | { |
| 178 | IO (Decode16, 0x60, 0x60, 0x01, 0x01) |
| 179 | IO (Decode16, 0x64, 0x64, 0x01, 0x01) |
| 180 | IRQ (Edge, ActiveHigh, Exclusive) { 0x01 } // IRQ 1 |
| 181 | }) |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 182 | |
| 183 | Method (_STA, 0) |
| 184 | { |
| 185 | Return (0xf) |
| 186 | } |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 187 | } |
| 188 | |
| 189 | Device (PS2M) // Mouse |
| 190 | { |
| 191 | Name(_HID, EISAID("PNP0F13")) |
| 192 | Name(_CRS, ResourceTemplate() |
| 193 | { |
| 194 | IRQ (Edge, ActiveHigh, Exclusive) { 0x0c } // IRQ 12 |
| 195 | }) |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 196 | |
| 197 | Method(_STA, 0) |
| 198 | { |
| 199 | Return (0xf) |
| 200 | } |
| 201 | } |
Stefan Reinauer | cc46e73 | 2009-03-13 00:44:09 +0000 | [diff] [blame] | 202 | } |