1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include "../include/soc/iomap.h"
5 Name(_HID,EISAID("PNP0A08")) // PCIe
6 Name(_CID,EISAID("PNP0A03")) // PCI
12 Name(_ADR, 0x00000000) // 0:0.0
14 OperationRegion(MCHP, PCI_Config, 0x00, 0x100)
15 Field (MCHP, DWordAcc, NoLock, Preserve)
17 Offset (0x48), // MCHBAR
22 Offset (0x60), // PCIe BAR
28 Offset (0xa8), // Top of Upper Memory
31 Offset (0xb8), // TSEGMB
34 Offset (0xbc), // Top of Low Used Memory
39 // Current Resource Settings
41 Name (MCRS, ResourceTemplate()
44 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
45 0x0000, 0x0000, 0x00ff, 0x0000, 0x0100,,, PB00)
48 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
49 0x0000, 0x0000, 0x0cf7, 0x0000, 0x0cf8,,, PI00)
52 Io (Decode16, 0x0cf8, 0x0cf8, 0x0001, 0x0008)
55 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
56 0x0000, 0x0d00, 0xffff, 0x0000, 0xf300,,, PI01)
58 // VGA memory (0xa0000-0xbffff)
59 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
61 0x00000000, 0x000a0000, 0x000bffff, 0x00000000,
64 // RAM (0xc0000-0xdffff)
65 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
67 0x00000000, 0x000c0000, 0x000dffff, 0x00000000,
70 // PCI Memory Region (Top of memory-PCIEXBAR)
71 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
72 NonCacheable, ReadWrite,
73 0x00000000, 0x00000000, 0xfebfffff, 0x00000000,
77 // TPM Area (0xfed40000-0xfed44fff)
78 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
80 0x00000000, 0xfed40000, 0xfed44fff, 0x00000000,
84 // PCI Memory Region (TOUUD - 64G)
85 QWORDMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
86 NonCacheable, ReadWrite,
87 0x00000000, 0x00000000, 0x1ffffffff, 0x00000000,
92 Method (_CRS, 0, Serialized)
94 // Find PCI resource area in MCRS
95 CreateDwordField(MCRS, ^PM01._MIN, PMIN)
96 CreateDwordField(MCRS, ^PM01._MAX, PMAX)
97 CreateDwordField(MCRS, ^PM01._LEN, PLEN)
99 // MMIO Low is saved in NVS
102 PLEN = PMAX - PMIN + 1
104 // Find PCI resource area in MCRS
105 CreateQWordField(MCRS, ^PM02._MIN, P2MN)
106 CreateQWordField(MCRS, ^PM02._MAX, P2MX)
107 CreateQWordField(MCRS, ^PM02._LEN, P2LN)
109 // MMIO High is saved in NVS
112 P2LN = P2MX - P2MN +1
117 /* PCI Device Resource Consumption */
120 Name (_HID, EISAID("PNP0C02"))
123 Name (PDRS, ResourceTemplate() {
125 Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, TSMB)
128 // Current Resource Settings
129 Method (_CRS, 0, Serialized)
131 // Fix up 32-bit TSEG
132 CreateDWordField(PDRS, ^TSMB._BAS, TSMN)
134 CreateDWordField(PDRS, ^TSMB._LEN, TSLN)
142 Name (_ADR, 0x00040000)
145 // Root Complex Event Collector
147 Name (_ADR, 0x00050000)
150 // Virtual root port 2
152 Name (_ADR, 0x00060000)