Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 2 | |
Angel Pons | 2aaf7c0 | 2020-09-24 18:03:18 +0200 | [diff] [blame] | 3 | /* Intel Lynx Point PCH support */ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 4 | |
Angel Pons | 59ea8ef | 2020-10-25 21:28:09 +0100 | [diff] [blame] | 5 | #if CONFIG(INTEL_LYNXPOINT_LP) |
| 6 | #define DEFAULT_PRW_VALUE 0x6d |
| 7 | #else |
| 8 | #define DEFAULT_PRW_VALUE 0x0d |
| 9 | #endif |
| 10 | |
Angel Pons | 2aaf7c0 | 2020-09-24 18:03:18 +0200 | [diff] [blame] | 11 | Scope (\) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 12 | { |
Angel Pons | 2aaf7c0 | 2020-09-24 18:03:18 +0200 | [diff] [blame] | 13 | // Root Complex Register Block |
Angel Pons | b70ff52 | 2021-01-28 14:27:46 +0100 | [diff] [blame] | 14 | OperationRegion (RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH) |
Angel Pons | 2aaf7c0 | 2020-09-24 18:03:18 +0200 | [diff] [blame] | 15 | Field (RCRB, DWordAcc, Lock, Preserve) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 16 | { |
Angel Pons | e53dfe0 | 2020-10-25 20:53:29 +0100 | [diff] [blame] | 17 | Offset (0x3404), // High Performance Timer Configuration |
Elyes HAOUAS | b0f1988 | 2018-06-09 11:59:00 +0200 | [diff] [blame] | 18 | HPAS, 2, // Address Select |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 19 | , 5, |
| 20 | HPTE, 1, // Address Enable |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 21 | } |
Angel Pons | 76653f6 | 2020-10-29 13:31:08 +0100 | [diff] [blame^] | 22 | |
| 23 | /* |
| 24 | * Check PCH type |
| 25 | * Return 1 if PCH is WildcatPoint |
| 26 | * Return 0 if PCH is LynxPoint |
| 27 | */ |
| 28 | #if CONFIG(INTEL_LYNXPOINT_LP) |
| 29 | Method (ISWP) |
| 30 | { |
| 31 | Local0 = \_SB.PCI0.LPCB.PDID & 0xfff0 |
| 32 | If (Local0 == 0x9cc0) { |
| 33 | Return (1) |
| 34 | } Else { |
| 35 | Return (0) |
| 36 | } |
| 37 | } |
| 38 | #else |
| 39 | Name (ISWP, 0) |
| 40 | #endif |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | // High Definition Audio (Azalia) 0:1b.0 |
| 44 | #include "audio.asl" |
| 45 | |
| 46 | // PCI Express Ports 0:1c.x |
Arthur Heymans | dff185a | 2018-12-30 12:59:39 +0100 | [diff] [blame] | 47 | #include <southbridge/intel/common/acpi/pcie.asl> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 48 | |
Angel Pons | a82f06cb | 2020-10-25 22:50:08 +0100 | [diff] [blame] | 49 | // USB EHCI 0:1d.0 and 0:1a.0 |
| 50 | #include "ehci.asl" |
| 51 | |
| 52 | // USB XHCI 0:14.0 |
| 53 | #include "xhci.asl" |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 54 | |
| 55 | // LPC Bridge 0:1f.0 |
| 56 | #include "lpc.asl" |
| 57 | |
| 58 | // SATA 0:1f.2, 0:1f.5 |
| 59 | #include "sata.asl" |
| 60 | |
| 61 | // SMBus 0:1f.3 |
Elyes HAOUAS | 085ab5a | 2019-10-31 10:12:02 +0100 | [diff] [blame] | 62 | #include <southbridge/intel/common/acpi/smbus.asl> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 63 | |
Duncan Laurie | b39ba2e | 2013-03-22 11:21:14 -0700 | [diff] [blame] | 64 | // Serial IO |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 65 | #if CONFIG(INTEL_LYNXPOINT_LP) |
Duncan Laurie | b39ba2e | 2013-03-22 11:21:14 -0700 | [diff] [blame] | 66 | #include "serialio.asl" |
| 67 | #endif |
| 68 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 69 | Method (_OSC, 4) |
| 70 | { |
| 71 | /* Check for proper GUID */ |
Angel Pons | e53dfe0 | 2020-10-25 20:53:29 +0100 | [diff] [blame] | 72 | If (Arg0 == ToUUID ("33DB4D5B-1FF7-401C-9657-7441C03DD766")) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 73 | { |
| 74 | /* Let OS control everything */ |
| 75 | Return (Arg3) |
| 76 | } |
| 77 | Else |
| 78 | { |
| 79 | /* Unrecognized UUID */ |
| 80 | CreateDWordField (Arg3, 0, CDW1) |
Angel Pons | e53dfe0 | 2020-10-25 20:53:29 +0100 | [diff] [blame] | 81 | CDW1 |= 4 |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 82 | Return (Arg3) |
| 83 | } |
| 84 | } |