blob: 7ac35d693ff3f6cab2c4f69be1153cf05ecbdc76 [file] [log] [blame]
Angel Pons182dbde2020-04-02 23:49:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Aaron Durbin76c37002012-10-30 09:03:43 -05002
Angel Pons2aaf7c02020-09-24 18:03:18 +02003/* Intel Lynx Point PCH support */
Aaron Durbin76c37002012-10-30 09:03:43 -05004
Angel Pons59ea8ef2020-10-25 21:28:09 +01005#if CONFIG(INTEL_LYNXPOINT_LP)
6#define DEFAULT_PRW_VALUE 0x6d
7#else
8#define DEFAULT_PRW_VALUE 0x0d
9#endif
10
Angel Pons2aaf7c02020-09-24 18:03:18 +020011Scope (\)
Aaron Durbin76c37002012-10-30 09:03:43 -050012{
Angel Pons2aaf7c02020-09-24 18:03:18 +020013 // Root Complex Register Block
Angel Ponsb70ff522021-01-28 14:27:46 +010014 OperationRegion (RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
Angel Pons2aaf7c02020-09-24 18:03:18 +020015 Field (RCRB, DWordAcc, Lock, Preserve)
Aaron Durbin76c37002012-10-30 09:03:43 -050016 {
Angel Ponse53dfe02020-10-25 20:53:29 +010017 Offset (0x3404), // High Performance Timer Configuration
Elyes HAOUASb0f19882018-06-09 11:59:00 +020018 HPAS, 2, // Address Select
Aaron Durbin76c37002012-10-30 09:03:43 -050019 , 5,
20 HPTE, 1, // Address Enable
Aaron Durbin76c37002012-10-30 09:03:43 -050021 }
Angel Pons76653f62020-10-29 13:31:08 +010022
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 Durbin76c37002012-10-30 09:03:43 -050041}
42
43// High Definition Audio (Azalia) 0:1b.0
44#include "audio.asl"
45
46// PCI Express Ports 0:1c.x
Arthur Heymansdff185a2018-12-30 12:59:39 +010047#include <southbridge/intel/common/acpi/pcie.asl>
Aaron Durbin76c37002012-10-30 09:03:43 -050048
Angel Ponsa82f06cb2020-10-25 22:50:08 +010049// 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 Durbin76c37002012-10-30 09:03:43 -050054
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 HAOUAS085ab5a2019-10-31 10:12:02 +010062#include <southbridge/intel/common/acpi/smbus.asl>
Aaron Durbin76c37002012-10-30 09:03:43 -050063
Duncan Laurieb39ba2e2013-03-22 11:21:14 -070064// Serial IO
Julius Wernercd49cce2019-03-05 16:53:33 -080065#if CONFIG(INTEL_LYNXPOINT_LP)
Duncan Laurieb39ba2e2013-03-22 11:21:14 -070066#include "serialio.asl"
67#endif
68
Aaron Durbin76c37002012-10-30 09:03:43 -050069Method (_OSC, 4)
70{
71 /* Check for proper GUID */
Angel Ponse53dfe02020-10-25 20:53:29 +010072 If (Arg0 == ToUUID ("33DB4D5B-1FF7-401C-9657-7441C03DD766"))
Aaron Durbin76c37002012-10-30 09:03:43 -050073 {
74 /* Let OS control everything */
75 Return (Arg3)
76 }
77 Else
78 {
79 /* Unrecognized UUID */
80 CreateDWordField (Arg3, 0, CDW1)
Angel Ponse53dfe02020-10-25 20:53:29 +010081 CDW1 |= 4
Aaron Durbin76c37002012-10-30 09:03:43 -050082 Return (Arg3)
83 }
84}