• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/* SPDX-License-Identifier: GPL-2.0-only */
2
3/* Intel LPC/eSPI Bus Device  - 0:1f.0 */
4#include <arch/hpet.h>
5#include <soc/iomap.h>
6
7Device (LPCB)
8{
9	Name (_ADR, 0x001f0000)
10	Name (_DDN, "LPC Bus Device")
11
12	/* DMA Controller */
13	Device (DMAC)
14	{
15		Name (_HID, EISAID("PNP0200"))
16		Name (_CRS, ResourceTemplate()
17		{
18			IO (Decode16, 0x00, 0x00, 0x01, 0x20)
19			IO (Decode16, 0x81, 0x81, 0x01, 0x11)
20			IO (Decode16, 0x93, 0x93, 0x01, 0x0d)
21			IO (Decode16, 0xc0, 0xc0, 0x01, 0x20)
22			DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 }
23		})
24	}
25
26	/* Firmware Hub */
27	Device (FWH)
28	{
29		Name (_HID, EISAID ("INT0800"))
30		Name (_DDN, "Firmware Hub")
31		Name (_CRS, ResourceTemplate ()
32		{
33			Memory32Fixed (ReadOnly, 0xff000000, 0x01000000)
34		})
35	}
36
37	/* High Precision Event Timer */
38	Device (HPET)
39	{
40		Name (_HID, EISAID ("PNP0103"))
41		Name (_CID, 0x010CD041)
42		Name (_DDN, "High Precision Event Timer")
43		Name (_CRS, ResourceTemplate ()
44		{
45			Memory32Fixed (ReadWrite, HPET_BASE_ADDRESS, 0x400)
46		})
47		Method (_STA, 0)
48		{
49			Return (0xF)
50		}
51	}
52
53	/* FPU */
54	Device(MATH)
55	{
56		Name (_HID, EISAID("PNP0C04"))
57		Name (_CRS, ResourceTemplate()
58		{
59			IO (Decode16, 0xf0, 0xf0, 0x01, 0x01)
60			IRQNoFlags() { 13 }
61		})
62	}
63
64	/* AT Interrupt Controller */
65	Device (PIC)
66	{
67		Name (_HID, EISAID ("PNP0000"))
68		Name (_DDN, "8259 Interrupt Controller")
69		Name (_CRS, ResourceTemplate()
70		{
71			IO (Decode16, 0x20, 0x20, 0x01, 0x02)
72			IO (Decode16, 0x24, 0x24, 0x01, 0x02)
73			IO (Decode16, 0x28, 0x28, 0x01, 0x02)
74			IO (Decode16, 0x2c, 0x2c, 0x01, 0x02)
75			IO (Decode16, 0x30, 0x30, 0x01, 0x02)
76			IO (Decode16, 0x34, 0x34, 0x01, 0x02)
77			IO (Decode16, 0x38, 0x38, 0x01, 0x02)
78			IO (Decode16, 0x3c, 0x3c, 0x01, 0x02)
79			IO (Decode16, 0xa0, 0xa0, 0x01, 0x02)
80			IO (Decode16, 0xa4, 0xa4, 0x01, 0x02)
81			IO (Decode16, 0xa8, 0xa8, 0x01, 0x02)
82			IO (Decode16, 0xac, 0xac, 0x01, 0x02)
83			IO (Decode16, 0xb0, 0xb0, 0x01, 0x02)
84			IO (Decode16, 0xb4, 0xb4, 0x01, 0x02)
85			IO (Decode16, 0xb8, 0xb8, 0x01, 0x02)
86			IO (Decode16, 0xbc, 0xbc, 0x01, 0x02)
87			IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02)
88			IRQNoFlags () { 2 }
89		})
90	}
91
92	/* LPC device: Resource consumption */
93	Device (LDRC)
94	{
95		Name (_HID, EISAID ("PNP0C02"))
96		Name (_UID, 2)
97		Name (_DDN, "Legacy Device Resources")
98		Name (_CRS, ResourceTemplate ()
99		{
100			IO (Decode16, 0x2e, 0x2e, 0x1, 0x02) // First SuperIO
101			IO (Decode16, 0x4e, 0x4e, 0x1, 0x02) // Second SuperIO
102			IO (Decode16, 0x61, 0x61, 0x1, 0x01) // NMI Status
103			IO (Decode16, 0x63, 0x63, 0x1, 0x01) // CPU Reserved
104			IO (Decode16, 0x65, 0x65, 0x1, 0x01) // CPU Reserved
105			IO (Decode16, 0x67, 0x67, 0x1, 0x01) // CPU Reserved
106			IO (Decode16, 0x80, 0x80, 0x1, 0x01) // Port 80 Post
107			IO (Decode16, 0x92, 0x92, 0x1, 0x01) // CPU Reserved
108			IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) // SWSMI
109			IO (Decode16, ACPI_BASE_ADDRESS, ACPI_BASE_ADDRESS,
110			    0x1, 0xff)
111		})
112	}
113
114	/* Real Time Clock Device */
115	Device (RTC)
116	{
117		Name (_HID, EISAID ("PNP0B00"))
118		Name (_DDN, "Real Time Clock")
119		Name (_CRS, ResourceTemplate ()
120		{
121			IO (Decode16, 0x70, 0x70, 1, 8)
122		})
123	}
124
125	/* Timer */
126	Device (TIMR)
127	{
128		Name (_HID, EISAID ("PNP0100"))
129		Name (_DDN, "8254 Timer")
130		Name (_CRS, ResourceTemplate ()
131		{
132			IO (Decode16, 0x40, 0x40, 0x01, 0x04)
133			IO (Decode16, 0x50, 0x50, 0x10, 0x04)
134			IRQNoFlags () {0}
135		})
136	}
137}
138