2 * This file is part of the coreboot project.
4 * Copyright (C) 2015 Google Inc.
5 * Copyright (C) 2015 Intel Corporation.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
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.
17 /* Intel Storage Controllers */
21 Name (_ADR, 0x001E0004)
22 Name (_DDN, "eMMC Controller")
24 OperationRegion (EMCR, PCI_Config, 0x00, 0x100)
25 Field (EMCR, DWordAcc, NoLock, Preserve)
27 Offset (0x84), /* PMECTRLSTATUS */
28 D0D3, 2, /* POWERSTATE */
29 Offset (0xa2), /* PG_CONFIG */
31 PGEN, 1, /* PG_ENABLE */
34 Method (_PS0, 0, Serialized)
36 /* Disable Power Gate */
39 /* Clear bits 31, 6, 2, 0 */
40 ^^PCRA (PID_SCS, 0x600, 0x7FFFFFBA)
43 /* Set bits 31, 6, 2, 0 */
44 ^^PCRO (PID_SCS, 0x600, 0x80000045)
46 /* Set Power State to D0 */
52 Method (_PS3, 0, Serialized)
54 /* Enable Power Gate */
57 /* Set Power State to D0 */
65 Name (_ADR, 0x00000008)
66 Method (_RMV, 0, NotSerialized)
75 Name (_ADR, 0x001E0006)
76 Name (_DDN, "SD Controller")
78 OperationRegion (SDCR, PCI_Config, 0x00, 0x100)
79 Field (SDCR, DWordAcc, NoLock, Preserve)
81 Offset (0x84), /* PMECTRLSTATUS */
82 D0D3, 2, /* POWERSTATE */
83 Offset (0xa2), /* PG_CONFIG */
85 PGEN, 1, /* PG_ENABLE */
88 Method (_PS0, 0, Serialized)
90 /* Disable Power Gate */
93 /* Clear bits 8, 7, 2, 0 */
94 ^^PCRA (PID_SCS, 0x600, 0xFFFFFE7A)
97 /* Set bits 31, 6, 2, 0 */
98 ^^PCRO (PID_SCS, 0x600, 0x00000185)
100 /* Set Power State to D0 */
102 Store (Local0, ^D0D3)
103 Store (^D0D3, Local0)
106 Method (_PS3, 0, Serialized)
108 /* Enable Power Gate */
111 /* Set Power State to D0 */
113 Store (Local0, ^D0D3)
114 Store (^D0D3, Local0)
119 Name (_ADR, 0x00000008)
120 Method (_RMV, 0, NotSerialized)