mb/google/corsola: Add new board variant Wyrdeer
[coreboot2.git] / src / soc / intel / braswell / acpi / southcluster.asl
blob7329096cf07a3ffae1f87e89e2233baa9c0c344d
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <soc/iomap.h>
4 #include <soc/irq.h>
6 Scope(\)
8         /* Intel Legacy Block */
9         OperationRegion(ILBS, SystemMemory, ILB_BASE_ADDRESS, ILB_BASE_SIZE)
10         Field (ILBS, AnyAcc, NoLock, Preserve)
11         {
12                 Offset (0x8),
13                 PRTA, 8,
14                 PRTB, 8,
15                 PRTC, 8,
16                 PRTD, 8,
17                 PRTE, 8,
18                 PRTF, 8,
19                 PRTG, 8,
20                 PRTH, 8,
21         }
24 External (\TOLM, IntObj)
26 Name(_HID,EISAID("PNP0A08"))    /* PCIe */
27 Name(_CID,EISAID("PNP0A03"))    /* PCI */
29 Name(_BBN, 0)
31 Method (_CRS, 0, Serialized)
33         Name (MCRS, ResourceTemplate()
34         {
35                 /* Bus Numbers */
36                 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
37                                 0x0000, 0x0000, 0x00ff, 0x0000, 0x0100,,, PB00)
39                 /* IO Region 0 */
40                 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
41                                 0x0000, 0x0000, 0x0cf7, 0x0000, 0x0cf8,,, PI00)
43                 /* PCI Config Space */
44                 Io (Decode16, 0x0cf8, 0x0cf8, 0x0001, 0x0008)
46                 /* IO Region 1 */
47                 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
48                                 0x0000, 0x0d00, 0xffff, 0x0000, 0xf300,,, PI01)
50                 /* VGA memory (0xa0000-0xbffff) */
51                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
52                                 Cacheable, ReadWrite,
53                                 0x00000000, 0x000a0000, 0x000bffff, 0x00000000,
54                                 0x00020000,,, ASEG)
56                 /* OPROM reserved (0xc0000-0xc3fff) */
57                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
58                                 Cacheable, ReadWrite,
59                                 0x00000000, 0x000c0000, 0x000c3fff, 0x00000000,
60                                 0x00004000,,, OPR0)
62                 /* OPROM reserved (0xc4000-0xc7fff) */
63                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
64                                 Cacheable, ReadWrite,
65                                 0x00000000, 0x000c4000, 0x000c7fff, 0x00000000,
66                                 0x00004000,,, OPR1)
68                 /* OPROM reserved (0xc8000-0xcbfff) */
69                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
70                                 Cacheable, ReadWrite,
71                                 0x00000000, 0x000c8000, 0x000cbfff, 0x00000000,
72                                 0x00004000,,, OPR2)
74                 /* OPROM reserved (0xcc000-0xcffff) */
75                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
76                                 Cacheable, ReadWrite,
77                                 0x00000000, 0x000cc000, 0x000cffff, 0x00000000,
78                                 0x00004000,,, OPR3)
80                 /* OPROM reserved (0xd0000-0xd3fff) */
81                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
82                                 Cacheable, ReadWrite,
83                                 0x00000000, 0x000d0000, 0x000d3fff, 0x00000000,
84                                 0x00004000,,, OPR4)
86                 /* OPROM reserved (0xd4000-0xd7fff) */
87                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
88                                 Cacheable, ReadWrite,
89                                 0x00000000, 0x000d4000, 0x000d7fff, 0x00000000,
90                                 0x00004000,,, OPR5)
92                 /* OPROM reserved (0xd8000-0xdbfff) */
93                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
94                                 Cacheable, ReadWrite,
95                                 0x00000000, 0x000d8000, 0x000dbfff, 0x00000000,
96                                 0x00004000,,, OPR6)
98                 /* OPROM reserved (0xdc000-0xdffff) */
99                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
100                                 Cacheable, ReadWrite,
101                                 0x00000000, 0x000dc000, 0x000dffff, 0x00000000,
102                                 0x00004000,,, OPR7)
104                 /* BIOS Extension (0xe0000-0xe3fff) */
105                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
106                                 Cacheable, ReadWrite,
107                                 0x00000000, 0x000e0000, 0x000e3fff, 0x00000000,
108                                 0x00004000,,, ESG0)
110                 /* BIOS Extension (0xe4000-0xe7fff) */
111                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
112                                 Cacheable, ReadWrite,
113                                 0x00000000, 0x000e4000, 0x000e7fff, 0x00000000,
114                                 0x00004000,,, ESG1)
116                 /* BIOS Extension (0xe8000-0xebfff) */
117                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
118                                 Cacheable, ReadWrite,
119                                 0x00000000, 0x000e8000, 0x000ebfff, 0x00000000,
120                                 0x00004000,,, ESG2)
122                 /* BIOS Extension (0xec000-0xeffff) */
123                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
124                                 Cacheable, ReadWrite,
125                                 0x00000000, 0x000ec000, 0x000effff, 0x00000000,
126                                 0x00004000,,, ESG3)
128                 /* System BIOS (0xf0000-0xfffff) */
129                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
130                                 Cacheable, ReadWrite,
131                                 0x00000000, 0x000f0000, 0x000fffff, 0x00000000,
132                                 0x00010000,,, FSEG)
134                 /* LPEA Memory Region (0x20000000-0x201FFFFF) */
135                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
136                                 Cacheable, ReadWrite,
137                                 0x00000000, 0x20000000, 0x201FFFFF, 0x00000000,
138                                 0x00200000,,, LMEM)
140                 /* PCI Memory Region (Top of memory-CONFIG_ECAM_MMCONF_BASE_ADDRESS) */
141                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
142                                 Cacheable, ReadWrite,
143                                 0x00000000, 0x00000000, 0x00000000, 0x00000000,
144                                 0x00000000,,, PMEM)
146                 /* TPM Area (0xfed40000-0xfed44fff) */
147                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
148                                 Cacheable, ReadWrite,
149                                 0x00000000, 0xfed40000, 0xfed44fff, 0x00000000,
150                                 0x00005000,,, TPMR)
151         })
153         /* Update LPEA resource area */
154         CreateDWordField (MCRS, LMEM._MIN, LMIN)
155         CreateDWordField (MCRS, LMEM._MAX, LMAX)
156         CreateDWordField (MCRS, LMEM._LEN, LLEN)
157         If (LPFW != 0 && LPEN == 1)
158         {
159                 LMIN = LPFW
160                 LMAX = LMIN + 0x001FFFFF
161                 LLEN = 0x00200000
162         }
163         Else
164         {
165                 LMIN = 0
166                 LMAX = 0
167                 LLEN = 0
168         }
170         /* Update PCI resource area */
171         CreateDwordField(MCRS, PMEM._MIN, PMIN)
172         CreateDwordField(MCRS, PMEM._MAX, PMAX)
173         CreateDwordField(MCRS, PMEM._LEN, PLEN)
175         /* TOLM is BMBOUND accessible from IOSF so is saved in NVS */
176         PMIN = \TOLM
177         PMAX = CONFIG_ECAM_MMCONF_BASE_ADDRESS - 1
178         PLEN = PMAX - PMIN + 1
180         Return (MCRS)
183 /* Device Resource Consumption */
184 Device (PDRC)
186         Name (_HID, EISAID("PNP0C02"))
187         Name (_UID, 1)
189         Name (PDRS, ResourceTemplate() {
190                 Memory32Fixed(ReadWrite, ABORT_BASE_ADDRESS, ABORT_BASE_SIZE)
191                 Memory32Fixed(ReadWrite, PMC_BASE_ADDRESS, PMC_BASE_SIZE)
192                 Memory32Fixed(ReadWrite, ILB_BASE_ADDRESS, ILB_BASE_SIZE)
193                 Memory32Fixed(ReadWrite, SPI_BASE_ADDRESS, SPI_BASE_SIZE)
194                 Memory32Fixed(ReadWrite, MPHY_BASE_ADDRESS, MPHY_BASE_SIZE)
195                 Memory32Fixed(ReadWrite, PUNIT_BASE_ADDRESS, PUNIT_BASE_SIZE)
196                 Memory32Fixed(ReadWrite, RCBA_BASE_ADDRESS, RCBA_BASE_SIZE)
197         })
199         /* Current Resource Settings */
200         Method (_CRS, 0, Serialized)
201         {
202                 Return(PDRS)
203         }
206 Method (_OSC, 4)
208         /* Check for proper GUID */
209         If (Arg0 == ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))
210         {
211                 /* Let OS control everything */
212                 Return (Arg3)
213         }
214         Else
215         {
216                 /* Unrecognized UUID */
217                 CreateDWordField (Arg3, 0, CDW1)
218                 CDW1 |= 4
219                 Return (Arg3)
220         }
223 /* IOSF MBI Interface for kernel access */
224 Device (IOSF)
226         Name (_HID, "INT33BD")
227         Name (_CID, "INT33BD")
228         Name (_UID, 1)
230         Name (RBUF, ResourceTemplate ()
231         {
232                 /* MCR / MDR / MCRX */
233                 Memory32Fixed (ReadWrite, 0, 12, RBAR)
234         })
236         Method (_CRS)
237         {
238                 CreateDwordField (^RBUF, ^RBAR._BAS, RBAS)
239                 RBAS = CONFIG_ECAM_MMCONF_BASE_ADDRESS + 0xD0
240                 Return (^RBUF)
241         }
243         Method (_STA)
244         {
245 #if CONFIG(CHROMEOS)
246                 Return (0xF)
247 #else
248                 Return (0x0)
249 #endif
250         }
253 /* LPC Bridge 0:1f.0 */
254 #include "lpc.asl"
256 /* USB XHCI 0:14.0 */
257 #include "xhci.asl"
259 /* IRQ routing for each PCI device */
260 #include "irqroute.asl"
262 Scope (\_SB)
264         /* GPIO Devices */
265         #include "gpio.asl"
268 Scope (\_SB.PCI0)
270         /* LPSS Devices */
271         #include "lpss.asl"
273         /* SCC Devices */
274         #include "scc.asl"
277 /* Integrated graphics 0:2.0 */
278 #include <drivers/intel/gma/acpi/gfx.asl>