Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2013 Google Inc. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; version 2 of |
| 10 | * the License. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 16 | */ |
| 17 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 18 | /* Intel LPC Bus Device - 0:1f.0 */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 19 | |
| 20 | Device (LPCB) |
| 21 | { |
| 22 | Name(_ADR, 0x001f0000) |
| 23 | |
| 24 | #include "irqlinks.asl" |
| 25 | |
| 26 | #include "acpi/ec.asl" |
| 27 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 28 | Device (DMAC) /* DMA Controller */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 29 | { |
| 30 | Name(_HID, EISAID("PNP0200")) |
| 31 | Name(_CRS, ResourceTemplate() |
| 32 | { |
| 33 | IO (Decode16, 0x00, 0x00, 0x01, 0x20) |
| 34 | IO (Decode16, 0x81, 0x81, 0x01, 0x11) |
| 35 | IO (Decode16, 0x93, 0x93, 0x01, 0x0d) |
| 36 | IO (Decode16, 0xc0, 0xc0, 0x01, 0x20) |
| 37 | DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 } |
| 38 | }) |
| 39 | } |
| 40 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 41 | Device (FWH) /* Firmware Hub */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 42 | { |
| 43 | Name (_HID, EISAID("INT0800")) |
| 44 | Name (_CRS, ResourceTemplate() |
| 45 | { |
| 46 | Memory32Fixed(ReadOnly, 0xff000000, 0x01000000) |
| 47 | }) |
| 48 | } |
| 49 | |
| 50 | Device (HPET) |
| 51 | { |
| 52 | Name (_HID, EISAID("PNP0103")) |
| 53 | Name (_CID, 0x010CD041) |
| 54 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 55 | Method (_STA, 0) /* Device Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 56 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 57 | Return (0xf) /* Enable and show device */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | Name(_CRS, ResourceTemplate() |
| 61 | { |
| 62 | Memory32Fixed(ReadOnly, 0xfed00000, 0x400) |
| 63 | }) |
| 64 | } |
| 65 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 66 | Device(PIC) /* 8259 Interrupt Controller */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 67 | { |
| 68 | Name(_HID,EISAID("PNP0000")) |
| 69 | Name(_CRS, ResourceTemplate() |
| 70 | { |
| 71 | IO (Decode16, 0x20, 0x20, 0x01, 0x02) |
| 72 | IO (Decode16, 0x24, 0x24, 0x01, 0x02) |
| 73 | IO (Decode16, 0x28, 0x28, 0x01, 0x02) |
| 74 | IO (Decode16, 0x2c, 0x2c, 0x01, 0x02) |
| 75 | IO (Decode16, 0x30, 0x30, 0x01, 0x02) |
| 76 | IO (Decode16, 0x34, 0x34, 0x01, 0x02) |
| 77 | IO (Decode16, 0x38, 0x38, 0x01, 0x02) |
| 78 | IO (Decode16, 0x3c, 0x3c, 0x01, 0x02) |
| 79 | IO (Decode16, 0xa0, 0xa0, 0x01, 0x02) |
| 80 | IO (Decode16, 0xa4, 0xa4, 0x01, 0x02) |
| 81 | IO (Decode16, 0xa8, 0xa8, 0x01, 0x02) |
| 82 | IO (Decode16, 0xac, 0xac, 0x01, 0x02) |
| 83 | IO (Decode16, 0xb0, 0xb0, 0x01, 0x02) |
| 84 | IO (Decode16, 0xb4, 0xb4, 0x01, 0x02) |
| 85 | IO (Decode16, 0xb8, 0xb8, 0x01, 0x02) |
| 86 | IO (Decode16, 0xbc, 0xbc, 0x01, 0x02) |
| 87 | IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02) |
| 88 | IRQNoFlags () { 2 } |
| 89 | }) |
| 90 | } |
| 91 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 92 | Device(LDRC) /* LPC device: Resource consumption */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 93 | { |
| 94 | Name (_HID, EISAID("PNP0C02")) |
| 95 | Name (_UID, 2) |
| 96 | |
| 97 | Name (RBUF, ResourceTemplate() |
| 98 | { |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 99 | IO (Decode16, 0x61, 0x61, 0x1, 0x01) /* NMI Status */ |
| 100 | IO (Decode16, 0x63, 0x63, 0x1, 0x01) /* CPU Reserved */ |
| 101 | IO (Decode16, 0x65, 0x65, 0x1, 0x01) /* CPU Reserved */ |
| 102 | IO (Decode16, 0x67, 0x67, 0x1, 0x01) /* CPU Reserved */ |
| 103 | IO (Decode16, 0x80, 0x80, 0x1, 0x01) /* Port 80 Post */ |
| 104 | IO (Decode16, 0x92, 0x92, 0x1, 0x01) /* CPU Reserved */ |
| 105 | IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) /* SWSMI */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 106 | }) |
| 107 | |
| 108 | Method (_CRS, 0, NotSerialized) |
| 109 | { |
| 110 | Return (RBUF) |
| 111 | } |
| 112 | } |
| 113 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 114 | Device (RTC) /* Real Time Clock */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 115 | { |
| 116 | Name (_HID, EISAID("PNP0B00")) |
| 117 | Name (_CRS, ResourceTemplate() |
| 118 | { |
| 119 | IO (Decode16, 0x70, 0x70, 1, 8) |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 120 | /* |
| 121 | * Disable as Windows doesn't like it, and systems don't seem to use it. |
| 122 | * IRQNoFlags() { 8 } |
| 123 | */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 124 | }) |
| 125 | } |
| 126 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 127 | Device (TIMR) /* Intel 8254 timer */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 128 | { |
| 129 | Name(_HID, EISAID("PNP0100")) |
| 130 | Name(_CRS, ResourceTemplate() |
| 131 | { |
| 132 | IO (Decode16, 0x40, 0x40, 0x01, 0x04) |
| 133 | IO (Decode16, 0x50, 0x50, 0x10, 0x04) |
| 134 | IRQNoFlags() {0} |
| 135 | }) |
| 136 | } |
| 137 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 138 | /* Include mainboard's superio.asl file. */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 139 | #include "acpi/superio.asl" |
| 140 | |
Matt DeVillier | 59bd6a4 | 2017-01-14 19:23:34 -0600 | [diff] [blame] | 141 | #if IS_ENABLED(CONFIG_LPC_TPM) |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 142 | Device (TPM) /* Trusted Platform Module */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 143 | { |
| 144 | Name(_HID, EISAID("IFX0102")) |
| 145 | Name(_CID, 0x310cd041) |
| 146 | Name(_UID, 1) |
| 147 | |
| 148 | Method(_STA, 0) |
| 149 | { |
| 150 | If (TPMP) { |
| 151 | Return (0xf) |
| 152 | } |
| 153 | Return (0x0) |
| 154 | } |
| 155 | |
| 156 | Name(_CRS, ResourceTemplate() { |
| 157 | IO (Decode16, 0x2e, 0x2e, 0x01, 0x02) |
| 158 | IO (Decode16, 0x6f0, 0x6f0, 0x01, 0x10) |
| 159 | Memory32Fixed (ReadWrite, 0xfed40000, 0x5000) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 160 | }) |
| 161 | } |
| 162 | #endif |
| 163 | } |