summaryrefslogtreecommitdiff
path: root/src/mainboard/aopen/dxplplusu/acpi/i82801db.asl
blob: 20400c38eed53a6f58f8a8124b379532058fcbca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/* SPDX-License-Identifier: GPL-2.0-only */

#include <arch/ioapic.h>

Device (USB0)
{
	Name (_ADR, 0x001D0000)
	Name (_PRW, Package () { 0x03, 0x05 })

	OperationRegion (USBS, PCI_Config, 0x00, 0x0100)
	Field (USBS, ByteAcc, NoLock, Preserve)
	{
		Offset (0xC4),  URES,   8
	}
}

Device (USB1)
{
	Name (_ADR, 0x001D0001)
	Name (_PRW, Package () { 0x04, 0x05 })
	OperationRegion (USBS, PCI_Config, 0x00, 0x0100)
	Field (USBS, ByteAcc, NoLock, Preserve)
	{
		Offset (0xC4),  URES,   8
	}
}

Device (USB2)
{
	Name (_ADR, 0x001D0002)
	Name (_PRW, Package () { 0x0C, 0x05 })
	OperationRegion (USBS, PCI_Config, 0x00, 0x0100)
	Field (USBS, ByteAcc, NoLock, Preserve)
	{
		Offset (0xC4),  URES,   8
	}
}

Device (USB3)
{
	Name (_ADR, 0x001D0007)
	Name (_PRW, Package () { 0x0D, 0x05 })  /* PME_B0_STS any 0:1d or 0:1f device */
	OperationRegion (USBS, PCI_Config, 0x00, 0x0100)
	Field (USBS, ByteAcc, NoLock, Preserve)
	{
		Offset (0xC4),  URES,   8
	}
}

Device(PCI5)
{
	Name (_ADR, 0x001E0000)
	Name (_PRW, Package () { 0x0B, 0x05 })    /* PME# _STS */
	Name (_PRT, Package() {
		Package() { 0x0003ffff, 0, 0, 20 },
		Package() { 0x0003ffff, 1, 0, 21 },
		Package() { 0x0003ffff, 2, 0, 22 },
		Package() { 0x0003ffff, 3, 0, 23 },
	})
}

Device (ICH0)
{
	Name (_ADR, 0x001F0000)
	OperationRegion (D310, PCI_Config, 0x00, 0xFF)
	Field (D310, ByteAcc, NoLock, Preserve)
	{
		Offset (0x40),   PBAR,   16,
		Offset (0x58),   GBAR,   16,
	}

	OperationRegion (ACPI, SystemIO, 0x0400, 0xC0)
	Field (ACPI, ByteAcc, NoLock, Preserve)
	{
		PS1L,	8,
		PS1H,	8,
		PE1L,	8,
		PE1H,	8,

		Offset (0x28),
		GS0L,	8,
		GS0H,	8,
		GSPL,	8,
		GSPH,	8,
		GE0L,	8,
		GE0H,	8,
		GEPL,	8,
		GEPH,	8,

		Offset (0xB8),
		GPLV,	8
	}

	Name (MSBF, ResourceTemplate ()
	{
		/* IOAPIC 0  */
		Memory32Fixed (ReadWrite, IO_APIC_ADDR, 0x00001000,)

		IO (Decode16, 0x0, 0x0, 0x80, 0x0, PMIO)
		IO (Decode16, 0x0, 0x0, 0x40, 0x0, GPIO)

		/* 8254 legacy irq */
		IO (Decode16, 0x04D0, 0x04D0, 0x02, 0x02,)

		/* reset generator */
		IO (Decode16, 0x0092, 0x0092, 0x01, 0x01, )
	})

	Method (_CRS, 0, NotSerialized)
	{
		CreateWordField (MSBF, \_SB_.PCI0.ICH0.PMIO._MIN, IOA1)
		CreateWordField (MSBF, \_SB_.PCI0.ICH0.PMIO._MAX, IOA2)
		CreateByteField (MSBF, \_SB_.PCI0.ICH0.PMIO._LEN, IOAL)

		Store (PBAR, Local0)
		If ( Land(Local0, 0x01) )
		{
			And (Local0, 0xFFFE, Local0)
			Store (Local0, IOA1)
			Store (Local0, IOA2)
			Store (0x80, IOAL)
		} Else {
			Store (0x00, IOAL)
		}

		CreateWordField (MSBF, \_SB_.PCI0.ICH0.GPIO._MIN, IOS1)
		CreateWordField (MSBF, \_SB_.PCI0.ICH0.GPIO._MAX, IOS2)
		CreateByteField (MSBF, \_SB_.PCI0.ICH0.GPIO._LEN, IOSL)

		Store (GBAR, Local0)
		If ( Land(Local0, 0x01) ) {
			And (Local0, 0xFFFE, Local0)
			Store (Local0, IOS1)
			Store (Local0, IOS2)
			Store (0x40, IOSL)
		} Else {
			Store (0x00, IOSL)
		}
		Return (MSBF)
	}

	Device (FWH)
	{
		Name (_HID, EisaId ("PNP0C02"))
		Name (_UID, 0x01)


		Name (MSBG, ResourceTemplate () {
			Memory32Fixed (ReadOnly, 0xFFF00000, 0x00080000,)
			Memory32Fixed (ReadOnly, 0xFFF80000, 0x00080000,)
	        })

	        Method (_CRS, 0, NotSerialized)
		{
			Return (MSBG)
		}
	}

	Device (SMSC)
	{
		Name (_HID, EisaId ("PNP0C02"))
		Name (_UID, 0x02)
		#include "acpi/superio.asl"
	}

}