Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 2 | |
| 3 | // Intel LPC Bus Device - 0:1f.0 |
| 4 | |
| 5 | Device (LPCB) |
| 6 | { |
| 7 | Name(_ADR, 0x001f0000) |
| 8 | |
| 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, |
| 28 | |
| 29 | Offset (0xb8), // GPIO Routing Control |
| 30 | GR00, 2, |
| 31 | GR01, 2, |
| 32 | GR02, 2, |
| 33 | GR03, 2, |
| 34 | GR04, 2, |
| 35 | GR05, 2, |
| 36 | GR06, 2, |
| 37 | GR07, 2, |
| 38 | GR08, 2, |
| 39 | GR09, 2, |
| 40 | GR10, 2, |
| 41 | GR11, 2, |
| 42 | GR12, 2, |
| 43 | GR13, 2, |
| 44 | GR14, 2, |
| 45 | GR15, 2, |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 46 | } |
| 47 | |
Angel Pons | dd46dfa | 2020-07-07 02:38:04 +0200 | [diff] [blame] | 48 | #include <southbridge/intel/common/acpi/irqlinks.asl> |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 49 | |
| 50 | #include "acpi/ec.asl" |
| 51 | |
| 52 | Device (DMAC) // DMA Controller |
| 53 | { |
| 54 | Name(_HID, EISAID("PNP0200")) |
| 55 | Name(_CRS, ResourceTemplate() |
| 56 | { |
| 57 | IO (Decode16, 0x00, 0x00, 0x01, 0x20) |
| 58 | IO (Decode16, 0x81, 0x81, 0x01, 0x11) |
| 59 | IO (Decode16, 0x93, 0x93, 0x01, 0x0d) |
| 60 | IO (Decode16, 0xc0, 0xc0, 0x01, 0x20) |
| 61 | DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 } |
| 62 | }) |
| 63 | } |
| 64 | |
| 65 | Device (FWH) // Firmware Hub |
| 66 | { |
| 67 | Name (_HID, EISAID("INT0800")) |
| 68 | Name (_CRS, ResourceTemplate() |
| 69 | { |
| 70 | Memory32Fixed(ReadOnly, 0xff000000, 0x01000000) |
| 71 | }) |
| 72 | } |
| 73 | |
| 74 | Device (HPET) |
| 75 | { |
| 76 | Name (_HID, EISAID("PNP0103")) |
| 77 | Name (_CID, 0x010CD041) |
| 78 | |
| 79 | Name(BUF0, ResourceTemplate() |
| 80 | { |
Elyes HAOUAS | 1644e48 | 2019-10-30 11:28:42 +0100 | [diff] [blame] | 81 | Memory32Fixed(ReadOnly, CONFIG_HPET_ADDRESS, 0x400, FED0) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 82 | }) |
| 83 | |
| 84 | Method (_STA, 0) // Device Status |
| 85 | { |
Kyösti Mälkki | 5053203 | 2021-01-15 11:51:02 +0200 | [diff] [blame] | 86 | Return (\HPTS(HPTE)) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | Method (_CRS, 0, Serialized) // Current resources |
| 90 | { |
| 91 | If (HPTE) { |
| 92 | CreateDWordField(BUF0, \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0) |
| 93 | If (Lequal(HPAS, 1)) { |
Felix Singer | 3d778c3 | 2021-12-30 03:07:29 +0100 | [diff] [blame] | 94 | HPT0 = CONFIG_HPET_ADDRESS + 0x1000 |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | If (Lequal(HPAS, 2)) { |
Felix Singer | 3d778c3 | 2021-12-30 03:07:29 +0100 | [diff] [blame] | 98 | HPT0 = CONFIG_HPET_ADDRESS + 0x2000 |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | If (Lequal(HPAS, 3)) { |
Felix Singer | 3d778c3 | 2021-12-30 03:07:29 +0100 | [diff] [blame] | 102 | HPT0 = CONFIG_HPET_ADDRESS + 0x3000 |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 103 | } |
| 104 | } |
| 105 | |
| 106 | Return (BUF0) |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | Device(PIC) // 8259 Interrupt Controller |
| 111 | { |
| 112 | Name(_HID,EISAID("PNP0000")) |
| 113 | Name(_CRS, ResourceTemplate() |
| 114 | { |
| 115 | IO (Decode16, 0x20, 0x20, 0x01, 0x02) |
| 116 | IO (Decode16, 0x24, 0x24, 0x01, 0x02) |
| 117 | IO (Decode16, 0x28, 0x28, 0x01, 0x02) |
| 118 | IO (Decode16, 0x2c, 0x2c, 0x01, 0x02) |
| 119 | IO (Decode16, 0x30, 0x30, 0x01, 0x02) |
| 120 | IO (Decode16, 0x34, 0x34, 0x01, 0x02) |
| 121 | IO (Decode16, 0x38, 0x38, 0x01, 0x02) |
| 122 | IO (Decode16, 0x3c, 0x3c, 0x01, 0x02) |
| 123 | IO (Decode16, 0xa0, 0xa0, 0x01, 0x02) |
| 124 | IO (Decode16, 0xa4, 0xa4, 0x01, 0x02) |
| 125 | IO (Decode16, 0xa8, 0xa8, 0x01, 0x02) |
| 126 | IO (Decode16, 0xac, 0xac, 0x01, 0x02) |
| 127 | IO (Decode16, 0xb0, 0xb0, 0x01, 0x02) |
| 128 | IO (Decode16, 0xb4, 0xb4, 0x01, 0x02) |
| 129 | IO (Decode16, 0xb8, 0xb8, 0x01, 0x02) |
| 130 | IO (Decode16, 0xbc, 0xbc, 0x01, 0x02) |
| 131 | IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02) |
| 132 | IRQNoFlags () { 2 } |
| 133 | }) |
| 134 | } |
| 135 | |
| 136 | Device(MATH) // FPU |
| 137 | { |
| 138 | Name (_HID, EISAID("PNP0C04")) |
| 139 | Name (_CRS, ResourceTemplate() |
| 140 | { |
| 141 | IO (Decode16, 0xf0, 0xf0, 0x01, 0x01) |
| 142 | IRQNoFlags() { 13 } |
| 143 | }) |
| 144 | } |
| 145 | |
| 146 | Device(LDRC) // LPC device: Resource consumption |
| 147 | { |
| 148 | Name (_HID, EISAID("PNP0C02")) |
| 149 | Name (_UID, 2) |
| 150 | Name (_CRS, ResourceTemplate() |
| 151 | { |
| 152 | IO (Decode16, 0x2e, 0x2e, 0x1, 0x02) // First SuperIO |
| 153 | IO (Decode16, 0x4e, 0x4e, 0x1, 0x02) // Second SuperIO |
| 154 | IO (Decode16, 0x61, 0x61, 0x1, 0x01) // NMI Status |
| 155 | IO (Decode16, 0x63, 0x63, 0x1, 0x01) // CPU Reserved |
| 156 | IO (Decode16, 0x65, 0x65, 0x1, 0x01) // CPU Reserved |
| 157 | IO (Decode16, 0x67, 0x67, 0x1, 0x01) // CPU Reserved |
| 158 | IO (Decode16, 0x80, 0x80, 0x1, 0x01) // Port 80 Post |
| 159 | IO (Decode16, 0x92, 0x92, 0x1, 0x01) // CPU Reserved |
| 160 | IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) // SWSMI |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 161 | IO (Decode16, DEFAULT_PMBASE, DEFAULT_PMBASE, 0x1, 0x80) // ICH7-M ACPI |
| 162 | IO (Decode16, DEFAULT_GPIOBASE, DEFAULT_GPIOBASE, 0x1, 0x40) // ICH7-M GPIO |
| 163 | }) |
| 164 | } |
| 165 | |
| 166 | Device (RTC) // Real Time Clock |
| 167 | { |
| 168 | Name (_HID, EISAID("PNP0B00")) |
| 169 | Name (_CRS, ResourceTemplate() |
| 170 | { |
| 171 | IO (Decode16, 0x70, 0x70, 1, 8) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 172 | }) |
| 173 | } |
| 174 | |
| 175 | Device (TIMR) // Intel 8254 timer |
| 176 | { |
| 177 | Name(_HID, EISAID("PNP0100")) |
| 178 | Name(_CRS, ResourceTemplate() |
| 179 | { |
| 180 | IO (Decode16, 0x40, 0x40, 0x01, 0x04) |
| 181 | IO (Decode16, 0x50, 0x50, 0x10, 0x04) |
| 182 | IRQNoFlags() {0} |
| 183 | }) |
| 184 | } |
| 185 | |
| 186 | #include "acpi/superio.asl" |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 187 | } |