Angel Pons | ba38f37 | 2020-04-05 15:46:45 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 2 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 3 | /* Intel LPC Bus Device - 0:1f.0 */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 4 | |
| 5 | Device (LPCB) |
| 6 | { |
| 7 | Name(_ADR, 0x001f0000) |
| 8 | |
| 9 | #include "irqlinks.asl" |
| 10 | |
| 11 | #include "acpi/ec.asl" |
| 12 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 13 | Device (DMAC) /* DMA Controller */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 14 | { |
| 15 | Name(_HID, EISAID("PNP0200")) |
| 16 | Name(_CRS, ResourceTemplate() |
| 17 | { |
| 18 | IO (Decode16, 0x00, 0x00, 0x01, 0x20) |
| 19 | IO (Decode16, 0x81, 0x81, 0x01, 0x11) |
| 20 | IO (Decode16, 0x93, 0x93, 0x01, 0x0d) |
| 21 | IO (Decode16, 0xc0, 0xc0, 0x01, 0x20) |
| 22 | DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 } |
| 23 | }) |
| 24 | } |
| 25 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 26 | Device (FWH) /* Firmware Hub */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 27 | { |
| 28 | Name (_HID, EISAID("INT0800")) |
Frans Hendriks | 6665da8 | 2019-04-25 11:17:05 +0200 | [diff] [blame] | 29 | Name (RBUF, ResourceTemplate() |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 30 | { |
Frans Hendriks | 6665da8 | 2019-04-25 11:17:05 +0200 | [diff] [blame] | 31 | Memory32Fixed(ReadOnly, 0, 0, FBAR) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 32 | }) |
Frans Hendriks | 6665da8 | 2019-04-25 11:17:05 +0200 | [diff] [blame] | 33 | |
| 34 | Method (_CRS) |
| 35 | { |
| 36 | CreateDwordField (^RBUF, ^FBAR._BAS, FBAS) |
| 37 | CreateDwordField (^RBUF, ^FBAR._LEN, FLEN) |
| 38 | Multiply(CONFIG_COREBOOT_ROMSIZE_KB, 1024, Local0) |
| 39 | Store(Local0, FLEN) |
| 40 | Add(Subtract(0xffffffff, Local0), 1, FBAS) |
| 41 | Return (^RBUF) |
| 42 | } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 43 | } |
| 44 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 45 | #if !CONFIG(DISABLE_HPET) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 46 | Device (HPET) |
| 47 | { |
| 48 | Name (_HID, EISAID("PNP0103")) |
| 49 | Name (_CID, 0x010CD041) |
| 50 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 51 | Method (_STA, 0) /* Device Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 52 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 53 | Return (0xf) /* Enable and show device */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | Name(_CRS, ResourceTemplate() |
| 57 | { |
Elyes HAOUAS | 1644e48 | 2019-10-30 11:28:42 +0100 | [diff] [blame] | 58 | Memory32Fixed(ReadOnly, CONFIG_HPET_ADDRESS, 0x400) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 59 | }) |
| 60 | } |
Frans Hendriks | f2af702 | 2018-11-16 12:08:41 +0100 | [diff] [blame] | 61 | #endif |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 62 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 63 | Device(PIC) /* 8259 Interrupt Controller */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 64 | { |
| 65 | Name(_HID,EISAID("PNP0000")) |
| 66 | Name(_CRS, ResourceTemplate() |
| 67 | { |
| 68 | IO (Decode16, 0x20, 0x20, 0x01, 0x02) |
| 69 | IO (Decode16, 0x24, 0x24, 0x01, 0x02) |
| 70 | IO (Decode16, 0x28, 0x28, 0x01, 0x02) |
| 71 | IO (Decode16, 0x2c, 0x2c, 0x01, 0x02) |
| 72 | IO (Decode16, 0x30, 0x30, 0x01, 0x02) |
| 73 | IO (Decode16, 0x34, 0x34, 0x01, 0x02) |
| 74 | IO (Decode16, 0x38, 0x38, 0x01, 0x02) |
| 75 | IO (Decode16, 0x3c, 0x3c, 0x01, 0x02) |
| 76 | IO (Decode16, 0xa0, 0xa0, 0x01, 0x02) |
| 77 | IO (Decode16, 0xa4, 0xa4, 0x01, 0x02) |
| 78 | IO (Decode16, 0xa8, 0xa8, 0x01, 0x02) |
| 79 | IO (Decode16, 0xac, 0xac, 0x01, 0x02) |
| 80 | IO (Decode16, 0xb0, 0xb0, 0x01, 0x02) |
| 81 | IO (Decode16, 0xb4, 0xb4, 0x01, 0x02) |
| 82 | IO (Decode16, 0xb8, 0xb8, 0x01, 0x02) |
| 83 | IO (Decode16, 0xbc, 0xbc, 0x01, 0x02) |
| 84 | IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02) |
| 85 | IRQNoFlags () { 2 } |
| 86 | }) |
| 87 | } |
| 88 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 89 | Device(LDRC) /* LPC device: Resource consumption */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 90 | { |
| 91 | Name (_HID, EISAID("PNP0C02")) |
| 92 | Name (_UID, 2) |
| 93 | |
| 94 | Name (RBUF, ResourceTemplate() |
| 95 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 96 | IO (Decode16, 0x61, 0x61, 0x1, 0x01) /* NMI Status */ |
| 97 | IO (Decode16, 0x63, 0x63, 0x1, 0x01) /* CPU Reserved */ |
| 98 | IO (Decode16, 0x65, 0x65, 0x1, 0x01) /* CPU Reserved */ |
| 99 | IO (Decode16, 0x67, 0x67, 0x1, 0x01) /* CPU Reserved */ |
| 100 | IO (Decode16, 0x80, 0x80, 0x1, 0x01) /* Port 80 Post */ |
| 101 | IO (Decode16, 0x92, 0x92, 0x1, 0x01) /* CPU Reserved */ |
| 102 | IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) /* SWSMI */ |
Frans Hendriks | f01a159 | 2018-10-31 10:07:11 +0100 | [diff] [blame] | 103 | IO (Decode16, ACPI_BASE_ADDRESS, ACPI_BASE_ADDRESS, |
| 104 | 0x1, ACPI_BASE_SIZE) /* ACPI Base */ |
| 105 | IO (Decode16, GPIO_BASE_ADDRESS, GPIO_BASE_ADDRESS, |
| 106 | 0x1, 0xff) /* GPIO Base */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 107 | }) |
| 108 | |
| 109 | Method (_CRS, 0, NotSerialized) |
| 110 | { |
| 111 | Return (RBUF) |
| 112 | } |
| 113 | } |
| 114 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 115 | Device (RTC) /* Real Time Clock */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 116 | { |
| 117 | Name (_HID, EISAID("PNP0B00")) |
| 118 | Name (_CRS, ResourceTemplate() |
| 119 | { |
| 120 | IO (Decode16, 0x70, 0x70, 1, 8) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 121 | }) |
| 122 | } |
| 123 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 124 | Device (TIMR) /* Intel 8254 timer */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 125 | { |
| 126 | Name(_HID, EISAID("PNP0100")) |
| 127 | Name(_CRS, ResourceTemplate() |
| 128 | { |
| 129 | IO (Decode16, 0x40, 0x40, 0x01, 0x04) |
| 130 | IO (Decode16, 0x50, 0x50, 0x10, 0x04) |
| 131 | IRQNoFlags() {0} |
| 132 | }) |
| 133 | } |
| 134 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 135 | /* Include mainboard's superio.asl file. */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 136 | #include "acpi/superio.asl" |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 137 | } |