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 Cougar Point PCH support */ |
Patrick Rudolph | da9302a | 2019-03-24 17:01:41 +0100 | [diff] [blame] | 4 | #include <southbridge/intel/bd82x6x/pch.h> |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 5 | |
| 6 | Scope(\) |
| 7 | { |
| 8 | // IO-Trap at 0x800. This is the ACPI->SMI communication interface. |
| 9 | |
| 10 | OperationRegion(IO_T, SystemIO, 0x800, 0x10) |
| 11 | Field(IO_T, ByteAcc, NoLock, Preserve) |
| 12 | { |
| 13 | Offset(0x8), |
| 14 | TRP0, 8 // IO-Trap at 0x808 |
| 15 | } |
| 16 | |
| 17 | // PCH Power Management Registers, located at PMBASE (0x1f.0 0x40.l) |
| 18 | OperationRegion(PMIO, SystemIO, DEFAULT_PMBASE, 0x80) |
| 19 | Field(PMIO, ByteAcc, NoLock, Preserve) |
| 20 | { |
| 21 | Offset(0x20), // GPE0_STS |
| 22 | , 16, |
| 23 | GS00, 1, // GPIO00 SCI/Wake Status |
| 24 | GS01, 1, // GPIO01 SCI/Wake Status |
| 25 | GS02, 1, // GPIO02 SCI/Wake Status |
| 26 | GS03, 1, // GPIO03 SCI/Wake Status |
| 27 | GS04, 1, // GPIO04 SCI/Wake Status |
| 28 | GS05, 1, // GPIO05 SCI/Wake Status |
| 29 | GS06, 1, // GPIO06 SCI/Wake Status |
| 30 | GS07, 1, // GPIO07 SCI/Wake Status |
| 31 | GS08, 1, // GPIO08 SCI/Wake Status |
| 32 | GS09, 1, // GPIO09 SCI/Wake Status |
| 33 | GS10, 1, // GPIO10 SCI/Wake Status |
| 34 | GS11, 1, // GPIO11 SCI/Wake Status |
| 35 | GS12, 1, // GPIO12 SCI/Wake Status |
| 36 | GS13, 1, // GPIO13 SCI/Wake Status |
| 37 | GS14, 1, // GPIO14 SCI/Wake Status |
| 38 | GS15, 1, // GPIO15 SCI/Wake Status |
| 39 | Offset(0x28), // GPE0_EN |
| 40 | , 16, |
| 41 | GE00, 1, // GPIO00 SCI/Wake Enable |
| 42 | GE01, 1, // GPIO01 SCI/Wake Enable |
| 43 | GE02, 1, // GPIO02 SCI/Wake Enable |
| 44 | GE03, 1, // GPIO03 SCI/Wake Enable |
| 45 | GE04, 1, // GPIO04 SCI/Wake Enable |
| 46 | GE05, 1, // GPIO05 SCI/Wake Enable |
| 47 | GE06, 1, // GPIO06 SCI/Wake Enable |
| 48 | GE07, 1, // GPIO07 SCI/Wake Enable |
| 49 | GE08, 1, // GPIO08 SCI/Wake Enable |
| 50 | GE09, 1, // GPIO09 SCI/Wake Enable |
| 51 | GE10, 1, // GPIO10 SCI/Wake Enable |
| 52 | GE11, 1, // GPIO11 SCI/Wake Enable |
| 53 | GE12, 1, // GPIO12 SCI/Wake Enable |
| 54 | GE13, 1, // GPIO13 SCI/Wake Enable |
| 55 | GE14, 1, // GPIO14 SCI/Wake Enable |
| 56 | GE15, 1, // GPIO15 SCI/Wake Enable |
| 57 | Offset(0x42), // General Purpose Control |
| 58 | , 1, // skip 1 bit |
| 59 | GPEC, 1, // SWGPE_CTRL |
| 60 | } |
| 61 | |
| 62 | // GPIO IO mapped registers (0x1f.0 reg 0x48.l) |
| 63 | OperationRegion(GPIO, SystemIO, DEFAULT_GPIOBASE, 0x6c) |
| 64 | Field(GPIO, ByteAcc, NoLock, Preserve) |
| 65 | { |
Elyes HAOUAS | 48a6c01 | 2020-07-08 09:22:13 +0200 | [diff] [blame] | 66 | GU00, 8, // GPIO Use Select |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 67 | GU01, 8, |
| 68 | GU02, 8, |
| 69 | GU03, 8, |
| 70 | Offset(0x04), // GPIO IO Select |
| 71 | GIO0, 8, |
| 72 | GIO1, 8, |
| 73 | GIO2, 8, |
| 74 | GIO3, 8, |
| 75 | Offset(0x0c), // GPIO Level |
Arthur Heymans | 5493b45 | 2018-12-23 18:40:15 +0100 | [diff] [blame] | 76 | GP00, 1, |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 77 | GP01, 1, |
| 78 | GP02, 1, |
Paul Menzel | eb4920d | 2014-04-10 19:50:58 +0200 | [diff] [blame] | 79 | GP03, 1, |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 80 | GP04, 1, |
| 81 | GP05, 1, |
| 82 | GP06, 1, |
| 83 | GP07, 1, |
| 84 | GP08, 1, |
| 85 | GP09, 1, |
| 86 | GP10, 1, |
| 87 | GP11, 1, |
| 88 | GP12, 1, |
| 89 | GP13, 1, |
| 90 | GP14, 1, |
| 91 | GP15, 1, |
| 92 | GP16, 1, |
| 93 | GP17, 1, |
| 94 | GP18, 1, |
| 95 | GP19, 1, |
| 96 | GP20, 1, |
| 97 | GP21, 1, |
| 98 | GP22, 1, |
| 99 | GP23, 1, |
| 100 | GP24, 1, |
| 101 | GP25, 1, |
| 102 | GP26, 1, |
| 103 | GP27, 1, |
| 104 | GP28, 1, |
| 105 | GP29, 1, |
| 106 | GP30, 1, |
| 107 | GP31, 1, |
| 108 | Offset(0x18), // GPIO Blink |
| 109 | GB00, 8, |
| 110 | GB01, 8, |
| 111 | GB02, 8, |
| 112 | GB03, 8, |
| 113 | Offset(0x2c), // GPIO Invert |
| 114 | GIV0, 8, |
| 115 | GIV1, 8, |
| 116 | GIV2, 8, |
| 117 | GIV3, 8, |
| 118 | Offset(0x30), // GPIO Use Select 2 |
| 119 | GU04, 8, |
| 120 | GU05, 8, |
| 121 | GU06, 8, |
| 122 | GU07, 8, |
| 123 | Offset(0x34), // GPIO IO Select 2 |
| 124 | GIO4, 8, |
| 125 | GIO5, 8, |
| 126 | GIO6, 8, |
| 127 | GIO7, 8, |
| 128 | Offset(0x38), // GPIO Level 2 |
| 129 | GP32, 1, |
| 130 | GP33, 1, |
| 131 | GP34, 1, |
| 132 | GP35, 1, |
| 133 | GP36, 1, |
| 134 | GP37, 1, |
| 135 | GP38, 1, |
| 136 | GP39, 1, |
| 137 | GP40, 1, |
| 138 | GP41, 1, |
| 139 | GP42, 1, |
| 140 | GP43, 1, |
| 141 | GP44, 1, |
| 142 | GP45, 1, |
| 143 | GP46, 1, |
| 144 | GP47, 1, |
| 145 | GP48, 1, |
| 146 | GP49, 1, |
| 147 | GP50, 1, |
| 148 | GP51, 1, |
| 149 | GP52, 1, |
| 150 | GP53, 1, |
| 151 | GP54, 1, |
| 152 | GP55, 1, |
| 153 | GP56, 1, |
| 154 | GP57, 1, |
| 155 | GP58, 1, |
| 156 | GP59, 1, |
| 157 | GP60, 1, |
| 158 | GP61, 1, |
| 159 | GP62, 1, |
| 160 | GP63, 1, |
| 161 | Offset(0x40), // GPIO Use Select 3 |
| 162 | GU08, 8, |
| 163 | GU09, 4, |
| 164 | Offset(0x44), // GPIO IO Select 3 |
| 165 | GIO8, 8, |
| 166 | GIO9, 4, |
| 167 | Offset(0x48), // GPIO Level 3 |
| 168 | GP64, 1, |
| 169 | GP65, 1, |
| 170 | GP66, 1, |
| 171 | GP67, 1, |
| 172 | GP68, 1, |
| 173 | GP69, 1, |
| 174 | GP70, 1, |
| 175 | GP71, 1, |
| 176 | GP72, 1, |
| 177 | GP73, 1, |
| 178 | GP74, 1, |
| 179 | GP75, 1, |
| 180 | } |
| 181 | |
| 182 | |
| 183 | // ICH7 Root Complex Register Block. Memory Mapped through RCBA) |
Angel Pons | b70ff52 | 2021-01-28 14:27:46 +0100 | [diff] [blame^] | 184 | OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 185 | Field(RCRB, DWordAcc, Lock, Preserve) |
| 186 | { |
| 187 | Offset(0x0000), // Backbone |
| 188 | Offset(0x1000), // Chipset |
| 189 | Offset(0x3000), // Legacy Configuration Registers |
| 190 | Offset(0x3404), // High Performance Timer Configuration |
Elyes HAOUAS | b0f1988 | 2018-06-09 11:59:00 +0200 | [diff] [blame] | 191 | HPAS, 2, // Address Select |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 192 | , 5, |
| 193 | HPTE, 1, // Address Enable |
| 194 | Offset(0x3418), // FD (Function Disable) |
Duncan Laurie | c323036 | 2012-04-27 09:55:45 -0700 | [diff] [blame] | 195 | , 1, // Reserved |
| 196 | PCID, 1, // PCI bridge disable |
| 197 | SA1D, 1, // SATA1 disable |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 198 | SMBD, 1, // SMBUS disable |
| 199 | HDAD, 1, // Azalia disable |
Duncan Laurie | c323036 | 2012-04-27 09:55:45 -0700 | [diff] [blame] | 200 | , 8, // Reserved |
| 201 | EH2D, 1, // EHCI #2 disable |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 202 | LPBD, 1, // LPC bridge disable |
Duncan Laurie | c323036 | 2012-04-27 09:55:45 -0700 | [diff] [blame] | 203 | EH1D, 1, // EHCI #1 disable |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 204 | RP1D, 1, // Root Port 1 disable |
| 205 | RP2D, 1, // Root Port 2 disable |
| 206 | RP3D, 1, // Root Port 3 disable |
Duncan Laurie | c323036 | 2012-04-27 09:55:45 -0700 | [diff] [blame] | 207 | RP4D, 1, // Root Port 4 disable |
| 208 | RP5D, 1, // Root Port 5 disable |
| 209 | RP6D, 1, // Root Port 6 disable |
| 210 | RP7D, 1, // Root Port 7 disable |
| 211 | RP8D, 1, // Root Port 8 disable |
| 212 | TTRD, 1, // Thermal sensor registers disable |
| 213 | SA2D, 1, // SATA2 disable |
| 214 | Offset(0x3428), // FD2 (Function Disable 2) |
| 215 | BDFD, 1, // Display BDF |
| 216 | ME1D, 1, // ME Interface 1 disable |
| 217 | ME2D, 1, // ME Interface 2 disable |
| 218 | IDRD, 1, // IDE redirect disable |
| 219 | KTCT, 1, // Keyboard Text redirect disable |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 220 | } |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | // High Definition Audio (Azalia) 0:1b.0 |
| 224 | #include "audio.asl" |
| 225 | |
| 226 | // PCI Express Ports 0:1c.x |
Arthur Heymans | cd36634 | 2018-12-30 12:49:21 +0100 | [diff] [blame] | 227 | #include <southbridge/intel/common/acpi/pcie.asl> |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 228 | |
Marc Jones | e7ae96f | 2012-11-13 15:07:45 -0700 | [diff] [blame] | 229 | // USB EHCI 0:1d.0 and 0:1a.0, XHCI 0:14.0 |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 230 | #include "usb.asl" |
| 231 | |
| 232 | // LPC Bridge 0:1f.0 |
| 233 | #include "lpc.asl" |
| 234 | |
| 235 | // SATA 0:1f.2, 0:1f.5 |
| 236 | #include "sata.asl" |
| 237 | |
| 238 | // SMBus 0:1f.3 |
Elyes HAOUAS | 085ab5a | 2019-10-31 10:12:02 +0100 | [diff] [blame] | 239 | #include <southbridge/intel/common/acpi/smbus.asl> |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 240 | |
| 241 | Method (_OSC, 4) |
| 242 | { |
Martin Roth | a34b5bc | 2018-05-06 21:06:18 -0500 | [diff] [blame] | 243 | /* |
| 244 | * Arg0 - A Buffer containing a UUID |
| 245 | * Arg1 - An Integer containing a Revision ID of the buffer format |
| 246 | * Arg2 - An Integer containing a count of entries in Arg3 |
| 247 | * Arg3 - A Buffer containing a list of DWORD capabilities |
| 248 | */ |
Marc Jones | e7ae96f | 2012-11-13 15:07:45 -0700 | [diff] [blame] | 249 | /* Check for XHCI */ |
| 250 | If (LEqual (Arg0, ToUUID("7c9512a9-1705-4cb4-af7d-506a2423ab71"))) |
| 251 | { |
Martin Roth | a34b5bc | 2018-05-06 21:06:18 -0500 | [diff] [blame] | 252 | Return (^XHC.POSC(Arg2, Arg3)) |
Marc Jones | e7ae96f | 2012-11-13 15:07:45 -0700 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | /* Check for PCIe */ |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 256 | If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) |
| 257 | { |
| 258 | /* Let OS control everything */ |
| 259 | Return (Arg3) |
| 260 | } |
Marc Jones | e7ae96f | 2012-11-13 15:07:45 -0700 | [diff] [blame] | 261 | |
| 262 | /* Else Return Unrecognized UUID */ |
| 263 | CreateDWordField (Arg3, 0, CDW1) |
| 264 | Or (CDW1, 4, CDW1) |
| 265 | Return (Arg3) |
| 266 | |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 267 | } |