blob: 0dcac610215fd5d354a2dc4ec25be49a5ce64acc [file] [log] [blame]
Angel Ponsc3f58f62020-04-05 15:46:41 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Duncan Laurie430bf0d2013-12-10 14:37:42 -08002
3Device (EMMC)
4{
5 Name (_HID, "80860F14")
6 Name (_CID, "PNP0D40")
7 Name (_UID, 1)
8 Name (_DDN, "eMMC Controller 4.5")
9
10 Name (RBUF, ResourceTemplate()
11 {
12 Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
13 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
14 {
15 SCC_EMMC_IRQ
16 }
17 })
18
19 Method (_CRS)
20 {
21 CreateDwordField (^RBUF, ^BAR0._BAS, RBAS)
Felix Singer476fe6a2022-12-12 07:30:07 +010022 RBAS = \C0B0
Duncan Laurie430bf0d2013-12-10 14:37:42 -080023 Return (^RBUF)
24 }
25
26 Method (_STA)
27 {
Felix Singer26c76722022-12-11 21:15:05 +010028 If (\C0EN == 1) {
Duncan Laurie430bf0d2013-12-10 14:37:42 -080029 Return (0xF)
30 } Else {
31 Return (0x0)
32 }
33 }
34
35 OperationRegion (KEYS, SystemMemory, C0B1, 0x100)
36 Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
37 {
38 Offset (0x84),
39 PSAT, 32,
40 }
41
42 Method (_PS3)
43 {
Felix Singer86bc2e72022-12-16 04:40:39 +010044 PSAT |= 3
45 PSAT |= 0
Duncan Laurie430bf0d2013-12-10 14:37:42 -080046 }
47
48 Method (_PS0)
49 {
50 And (PSAT, 0xfffffffc, PSAT)
Felix Singer86bc2e72022-12-16 04:40:39 +010051 PSAT |= 0
Duncan Laurie430bf0d2013-12-10 14:37:42 -080052 }
53
54 Device (EM45)
55 {
56 /* Slot 0, Function 8 */
57 Name (_ADR, 0x8)
58
59 Method (_RMV, 0, NotSerialized)
60 {
61 Return (0)
62 }
63 }
64}
65
66Device (SDIO)
67{
68 Name (_HID, "INT33BB")
69 Name (_CID, "PNP0D40")
70 Name (_UID, 2)
71 Name (_DDN, "SDIO Controller")
72
73 Name (RBUF, ResourceTemplate()
74 {
75 Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
76 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
77 {
78 SCC_SDIO_IRQ
79 }
80 })
81
82 Method (_CRS)
83 {
84 CreateDwordField (^RBUF, ^BAR0._BAS, RBAS)
Felix Singer476fe6a2022-12-12 07:30:07 +010085 RBAS = \C1B0
Duncan Laurie430bf0d2013-12-10 14:37:42 -080086 Return (^RBUF)
87 }
88
89 Method (_STA)
90 {
Felix Singer26c76722022-12-11 21:15:05 +010091 If (\C1EN == 1) {
Duncan Laurie430bf0d2013-12-10 14:37:42 -080092 Return (0xF)
93 } Else {
94 Return (0x0)
95 }
96 }
97
98 OperationRegion (KEYS, SystemMemory, C1B1, 0x100)
99 Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
100 {
101 Offset (0x84),
102 PSAT, 32,
103 }
104
105 Method (_PS3)
106 {
Felix Singer86bc2e72022-12-16 04:40:39 +0100107 PSAT |= 3
108 PSAT |= 0
Duncan Laurie430bf0d2013-12-10 14:37:42 -0800109 }
110
111 Method (_PS0)
112 {
113 And (PSAT, 0xfffffffc, PSAT)
Felix Singer86bc2e72022-12-16 04:40:39 +0100114 PSAT |= 0
Duncan Laurie430bf0d2013-12-10 14:37:42 -0800115 }
116}
117
118Device (SDCD)
119{
120 Name (_HID, "80860F16")
121 Name (_CID, "PNP0D40")
122 Name (_UID, 3)
123 Name (_DDN, "SD Card Controller")
124
125 Name (RBUF, ResourceTemplate()
126 {
127 Memory32Fixed (ReadWrite, 0, 0x1000, BAR0)
128 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,)
129 {
130 SCC_SD_IRQ
131 }
132 })
133
134 Method (_CRS)
135 {
136 CreateDwordField (^RBUF, ^BAR0._BAS, RBAS)
Felix Singer476fe6a2022-12-12 07:30:07 +0100137 RBAS = \C2B0
Duncan Laurie430bf0d2013-12-10 14:37:42 -0800138 Return (^RBUF)
139 }
140
141 Method (_STA)
142 {
Felix Singer26c76722022-12-11 21:15:05 +0100143 If (\C2EN == 1) {
Duncan Laurie430bf0d2013-12-10 14:37:42 -0800144 Return (0xF)
145 } Else {
146 Return (0x0)
147 }
148 }
149
150 OperationRegion (KEYS, SystemMemory, C2B1, 0x100)
151 Field (KEYS, DWordAcc, NoLock, WriteAsZeros)
152 {
153 Offset (0x84),
154 PSAT, 32,
155 }
156
157 Method (_PS3)
158 {
Felix Singer86bc2e72022-12-16 04:40:39 +0100159 PSAT |= 3
160 PSAT |= 0
Duncan Laurie430bf0d2013-12-10 14:37:42 -0800161 }
162
163 Method (_PS0)
164 {
165 And (PSAT, 0xfffffffc, PSAT)
Felix Singer86bc2e72022-12-16 04:40:39 +0100166 PSAT |= 0
Duncan Laurie430bf0d2013-12-10 14:37:42 -0800167 }
168}