tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / soc / intel / skylake / acpi / scs.asl
blob52eeefe314d6f52f3cf2ba2f4226645227cc70fa
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2015 Google Inc.
5  * Copyright (C) 2015 Intel Corporation.
6  *
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.
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.
15  */
17 /* Intel Storage Controllers */
19 Device (EMMC)
21         Name (_ADR, 0x001E0004)
22         Name (_DDN, "eMMC Controller")
24         OperationRegion (EMCR, PCI_Config, 0x00, 0x100)
25         Field (EMCR, DWordAcc, NoLock, Preserve)
26         {
27                 Offset (0x84),  /* PMECTRLSTATUS */
28                 D0D3, 2,        /* POWERSTATE */
29                 Offset (0xa2),  /* PG_CONFIG */
30                 , 2,
31                 PGEN, 1,        /* PG_ENABLE */
32         }
34         Method (_PS0, 0, Serialized)
35         {
36                 /* Disable Power Gate */
37                 Store (0, ^PGEN)
39                 /* Clear bits 31, 6, 2, 0 */
40                 ^^PCRA (PID_SCS, 0x600, 0x7FFFFFBA)
41                 Sleep (2)
43                 /* Set bits 31, 6, 2, 0 */
44                 ^^PCRO (PID_SCS, 0x600, 0x80000045)
46                 /* Set Power State to D0 */
47                 Store (Zero, Local0)
48                 Store (Local0, ^D0D3)
49                 Store (^D0D3, Local0)
50         }
52         Method (_PS3, 0, Serialized)
53         {
54                 /* Enable Power Gate */
55                 Store (1, ^PGEN)
57                 /* Set Power State to D0 */
58                 Store (3, Local0)
59                 Store (Local0, ^D0D3)
60                 Store (^D0D3, Local0)
61         }
63         Device (CARD)
64         {
65                 Name (_ADR, 0x00000008)
66                 Method (_RMV, 0, NotSerialized)
67                 {
68                         Return (0)
69                 }
70         }
73 Device (SDXC)
75         Name (_ADR, 0x001E0006)
76         Name (_DDN, "SD Controller")
78         OperationRegion (SDCR, PCI_Config, 0x00, 0x100)
79         Field (SDCR, DWordAcc, NoLock, Preserve)
80         {
81                 Offset (0x84),  /* PMECTRLSTATUS */
82                 D0D3, 2,        /* POWERSTATE */
83                 Offset (0xa2),  /* PG_CONFIG */
84                 , 2,
85                 PGEN, 1,        /* PG_ENABLE */
86         }
88         Method (_PS0, 0, Serialized)
89         {
90                 /* Disable Power Gate */
91                 Store (0, ^PGEN)
93                 /* Clear bits 8, 7, 2, 0 */
94                 ^^PCRA (PID_SCS, 0x600, 0xFFFFFE7A)
95                 Sleep (2)
97                 /* Set bits 31, 6, 2, 0 */
98                 ^^PCRO (PID_SCS, 0x600, 0x00000185)
100                 /* Set Power State to D0 */
101                 Store (Zero, Local0)
102                 Store (Local0, ^D0D3)
103                 Store (^D0D3, Local0)
104         }
106         Method (_PS3, 0, Serialized)
107         {
108                 /* Enable Power Gate */
109                 Store (1, ^PGEN)
111                 /* Set Power State to D0 */
112                 Store (3, Local0)
113                 Store (Local0, ^D0D3)
114                 Store (^D0D3, Local0)
115         }
117         Device (CARD)
118         {
119                 Name (_ADR, 0x00000008)
120                 Method (_RMV, 0, NotSerialized)
121                 {
122                         Return (1)
123                 }
124         }