blob: c26511c751d18ba78ecdc95e1e7b8517401f85d4 [file] [log] [blame]
Duncan Laurie430bf0d2013-12-10 14:37:42 -08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2013 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Duncan Laurie430bf0d2013-12-10 14:37:42 -080015 */
16
17Device (EMMC)
18{
19 Name (_HID, "80860F14")
20 Name (_CID, "PNP0D40")
21 Name (_UID, 1)
22 Name (_DDN, "eMMC Controller 4.5")
23
24 Name (RBUF, ResourceTemplate()
25 {
26 Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
27 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
28 {
29 SCC_EMMC_IRQ
30 }
31 })
32
33 Method (_CRS)
34 {
35 CreateDwordField (^RBUF, ^BAR0._BAS, RBAS)
36 Store (\C0B0, RBAS)
37 Return (^RBUF)
38 }
39
40 Method (_STA)
41 {
42 If (LEqual (\C0EN, 1)) {
43 Return (0xF)
44 } Else {
45 Return (0x0)
46 }
47 }
48
49 OperationRegion (KEYS, SystemMemory, C0B1, 0x100)
50 Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
51 {
52 Offset (0x84),
53 PSAT, 32,
54 }
55
56 Method (_PS3)
57 {
58 Or (PSAT, 0x00000003, PSAT)
59 Or (PSAT, 0x00000000, PSAT)
60 }
61
62 Method (_PS0)
63 {
64 And (PSAT, 0xfffffffc, PSAT)
65 Or (PSAT, 0x00000000, PSAT)
66 }
67
68 Device (EM45)
69 {
70 /* Slot 0, Function 8 */
71 Name (_ADR, 0x8)
72
73 Method (_RMV, 0, NotSerialized)
74 {
75 Return (0)
76 }
77 }
78}
79
80Device (SDIO)
81{
82 Name (_HID, "INT33BB")
83 Name (_CID, "PNP0D40")
84 Name (_UID, 2)
85 Name (_DDN, "SDIO Controller")
86
87 Name (RBUF, ResourceTemplate()
88 {
89 Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
90 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
91 {
92 SCC_SDIO_IRQ
93 }
94 })
95
96 Method (_CRS)
97 {
98 CreateDwordField (^RBUF, ^BAR0._BAS, RBAS)
99 Store (\C1B0, RBAS)
100 Return (^RBUF)
101 }
102
103 Method (_STA)
104 {
105 If (LEqual (\C1EN, 1)) {
106 Return (0xF)
107 } Else {
108 Return (0x0)
109 }
110 }
111
112 OperationRegion (KEYS, SystemMemory, C1B1, 0x100)
113 Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
114 {
115 Offset (0x84),
116 PSAT, 32,
117 }
118
119 Method (_PS3)
120 {
121 Or (PSAT, 0x00000003, PSAT)
122 Or (PSAT, 0x00000000, PSAT)
123 }
124
125 Method (_PS0)
126 {
127 And (PSAT, 0xfffffffc, PSAT)
128 Or (PSAT, 0x00000000, PSAT)
129 }
130}
131
132Device (SDCD)
133{
134 Name (_HID, "80860F16")
135 Name (_CID, "PNP0D40")
136 Name (_UID, 3)
137 Name (_DDN, "SD Card Controller")
138
139 Name (RBUF, ResourceTemplate()
140 {
141 Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
142 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
143 {
144 SCC_SD_IRQ
145 }
146 })
147
148 Method (_CRS)
149 {
150 CreateDwordField (^RBUF, ^BAR0._BAS, RBAS)
151 Store (\C2B0, RBAS)
152 Return (^RBUF)
153 }
154
155 Method (_STA)
156 {
157 If (LEqual (\C2EN, 1)) {
158 Return (0xF)
159 } Else {
160 Return (0x0)
161 }
162 }
163
164 OperationRegion (KEYS, SystemMemory, C2B1, 0x100)
165 Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
166 {
167 Offset (0x84),
168 PSAT, 32,
169 }
170
171 Method (_PS3)
172 {
173 Or (PSAT, 0x00000003, PSAT)
174 Or (PSAT, 0x00000000, PSAT)
175 }
176
177 Method (_PS0)
178 {
179 And (PSAT, 0xfffffffc, PSAT)
180 Or (PSAT, 0x00000000, PSAT)
181 }
182}