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