Debian Codegraph @

src/ec/google/chromeec/acpi/superio.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 /*
4 * ChromeOS Embedded Controller interface
5 *
6 * Constants that should be defined:
7 *
8 * SIO_EC_MEMMAP_ENABLE : Enable EC LPC memory map resources
9 * EC_LPC_ADDR_MEMMAP : Base address of memory map range
10 * EC_MEMMAP_SIZE : Size of memory map range
11 *
12 * SIO_EC_HOST_ENABLE : Enable EC host command interface resources
13 * EC_LPC_ADDR_HOST_DATA : EC host command interface data port
14 * EC_LPC_ADDR_HOST_CMD : EC host command interface command port
15 * EC_HOST_CMD_REGION0 : EC host command buffer
16 * EC_HOST_CMD_REGION1 : EC host command buffer
17 * EC_HOST_CMD_REGION_SIZE : EC host command buffer size
18 */
19
20 // Scope is \_SB.PCI0.LPCB
21
22 Device (SIO) {
23 Name (_UID, 0)
24 Name (_ADR, 0)
25
26 #ifdef SIO_EC_MEMMAP_ENABLE
27 Device (ECMM) {
28 Name (_HID, EISAID ("PNP0C02"))
29 Name (_UID, 4)
30
31 Method (_STA, 0, NotSerialized) {
32 Return (0x0F)
33 }
34
35 Name (_CRS, ResourceTemplate ()
36 {
37 IO (Decode16, EC_LPC_ADDR_MEMMAP, EC_LPC_ADDR_MEMMAP,
38 0x08, EC_MEMMAP_SIZE)
39 })
40 }
41 #endif
42
43 #ifdef SIO_EC_HOST_ENABLE
44 Device (ECUI) {
45 Name (_HID, EISAID ("PNP0C02"))
46 Name (_UID, 3)
47
48 Method (_STA, 0, NotSerialized) {
49 Return (0x0F)
50 }
51
52 Name (_CRS, ResourceTemplate ()
53 {
54 IO (Decode16,
55 EC_LPC_ADDR_HOST_DATA, EC_LPC_ADDR_HOST_DATA,
56 0x01, 0x01)
57 IO (Decode16,
58 EC_LPC_ADDR_HOST_CMD, EC_LPC_ADDR_HOST_CMD,
59 0x01, 0x01)
60 IO (Decode16,
61 EC_HOST_CMD_REGION0, EC_HOST_CMD_REGION0, 0x08,
62 EC_HOST_CMD_REGION_SIZE)
63 IO (Decode16,
64 EC_HOST_CMD_REGION1, EC_HOST_CMD_REGION1, 0x08,
65 EC_HOST_CMD_REGION_SIZE)
66 })
67 }
68 #endif
69
70 #ifdef SIO_EC_ENABLE_COM1
71 Device (COM1) {
72 Name (_HID, EISAID ("PNP0501"))
73 Name (_UID, 1)
74
75 Method (_STA, 0, NotSerialized) {
76 Return (0x0F)
77 }
78
79 Name (_CRS, ResourceTemplate ()
80 {
81 IO (Decode16, 0x03F8, 0x3F8, 0x08, 0x08)
82 IRQNoFlags () {4}
83 })
84 }
85 #endif
86 }
87
88 #ifdef SIO_EC_ENABLE_PS2K
89 Scope (\_SB.PCI0)
90 {
91 Device (PS2K) // Keyboard
92 {
93 Name (_UID, 0)
94 Name (_HID, "GOOG000A")
95 Name (_CID, Package() { EISAID("PNP0303"), EISAID("PNP030B") } )
96
97 Method (_STA, 0, NotSerialized) {
98 Return (0x0F)
99 }
100
101 Name (_CRS, ResourceTemplate()
102 {
103 IO (Decode16, 0x60, 0x60, 0x01, 0x01)
104 IO (Decode16, 0x64, 0x64, 0x01, 0x01)
105 #ifdef SIO_EC_PS2K_IRQ
106 SIO_EC_PS2K_IRQ
107 #else
108 IRQ (Edge, ActiveHigh, Exclusive) {1}
109 #endif
110 })
111 }
112 }
113 #endif
114
115 #ifdef SIO_EC_ENABLE_PS2M
116 Scope (\_SB.PCI0)
117 {
118 Device (PS2M) // Mouse
119 {
120 Name (_UID, 0)
121 Name (_HID, "GOOG0015")
122 Name (_CID, Package() { EISAID("PNP0F13") } )
123
124 Method (_STA, 0, NotSerialized) {
125 Return (0x0F)
126 }
127
128 Name (_CRS, ResourceTemplate()
129 {
130 IO (Decode16, 0x60, 0x60, 0x01, 0x01)
131 IO (Decode16, 0x64, 0x64, 0x01, 0x01)
132 #ifdef SIO_EC_PS2M_IRQ
133 SIO_EC_PS2M_IRQ
134 #else
135 IRQ (Edge, ActiveHigh, Exclusive) {12}
136 #endif
137 })
138 }
139 }
140 #endif