blob: eb4a16a88f7dd905524e3a2352fd3a13a896c243 [file] [log] [blame]
Lee Leahy77ff0b12015-05-05 15:07:29 -07001/*
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 Leahy77ff0b12015-05-05 15:07:29 -070016 */
17
Lee Leahy32471722015-04-20 15:20:28 -070018/* Intel LPC Bus Device - 0:1f.0 */
Lee Leahy77ff0b12015-05-05 15:07:29 -070019
20Device (LPCB)
21{
22 Name(_ADR, 0x001f0000)
23
24 #include "irqlinks.asl"
25
26 #include "acpi/ec.asl"
27
Lee Leahy32471722015-04-20 15:20:28 -070028 Device (DMAC) /* DMA Controller */
Lee Leahy77ff0b12015-05-05 15:07:29 -070029 {
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 Leahy32471722015-04-20 15:20:28 -070041 Device (FWH) /* Firmware Hub */
Lee Leahy77ff0b12015-05-05 15:07:29 -070042 {
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 Leahy32471722015-04-20 15:20:28 -070055 Method (_STA, 0) /* Device Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -070056 {
Lee Leahy32471722015-04-20 15:20:28 -070057 Return (0xf) /* Enable and show device */
Lee Leahy77ff0b12015-05-05 15:07:29 -070058 }
59
60 Name(_CRS, ResourceTemplate()
61 {
62 Memory32Fixed(ReadOnly, 0xfed00000, 0x400)
63 })
64 }
65
Lee Leahy32471722015-04-20 15:20:28 -070066 Device(PIC) /* 8259 Interrupt Controller */
Lee Leahy77ff0b12015-05-05 15:07:29 -070067 {
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 Leahy32471722015-04-20 15:20:28 -070092 Device(LDRC) /* LPC device: Resource consumption */
Lee Leahy77ff0b12015-05-05 15:07:29 -070093 {
94 Name (_HID, EISAID("PNP0C02"))
95 Name (_UID, 2)
96
97 Name (RBUF, ResourceTemplate()
98 {
Lee Leahy32471722015-04-20 15:20:28 -070099 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 Leahy77ff0b12015-05-05 15:07:29 -0700106 })
107
108 Method (_CRS, 0, NotSerialized)
109 {
110 Return (RBUF)
111 }
112 }
113
Lee Leahy32471722015-04-20 15:20:28 -0700114 Device (RTC) /* Real Time Clock */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700115 {
116 Name (_HID, EISAID("PNP0B00"))
117 Name (_CRS, ResourceTemplate()
118 {
119 IO (Decode16, 0x70, 0x70, 1, 8)
Lee Leahy32471722015-04-20 15:20:28 -0700120/*
121 * Disable as Windows doesn't like it, and systems don't seem to use it.
122 * IRQNoFlags() { 8 }
123 */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700124 })
125 }
126
Lee Leahy32471722015-04-20 15:20:28 -0700127 Device (TIMR) /* Intel 8254 timer */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700128 {
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 Leahy32471722015-04-20 15:20:28 -0700138 /* Include mainboard's superio.asl file. */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700139 #include "acpi/superio.asl"
140
Matt DeVillier59bd6a42017-01-14 19:23:34 -0600141#if IS_ENABLED(CONFIG_LPC_TPM)
Lee Leahy32471722015-04-20 15:20:28 -0700142 Device (TPM) /* Trusted Platform Module */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700143 {
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 Leahy77ff0b12015-05-05 15:07:29 -0700160 })
161 }
162#endif
163}