aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake/acpi/scs.asl
blob: e993ddbbf9d1d859f2efe96b2860f3096e593c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * This file is part of the coreboot project.
 *
 * Copyright (C) 2017 Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 */

Scope (\_SB.PCI0) {
	/* EMMC */
	Device(PEMC) {
		Name(_ADR, 0x001A0000)

		OperationRegion(SCSR, PCI_Config, 0x00, 0x100)
		Field(SCSR, WordAcc, NoLock, Preserve) {
			Offset(0xA2),   // 0xA2, Device PG config
			, 2,
			PGEN, 1         // [BIT2] PGE - PG Enable
		}

		Method(_PS0, 0, Serialized) {
			Stall (50) // Sleep 50 ms
			Store(0, PGEN) // Disable PG
		}

		Method(_PS3, 0, Serialized) {
			Store(1, PGEN) // Enable PG
		}
	}

	/* SD CARD */
	Device (SDXC)
	{
		Name (_ADR, 0x00140005)

		OperationRegion (SDPC, PCI_Config, 0x00, 0x100)
		Field (SDPC, WordAcc, NoLock, Preserve)
		{
			Offset(0xA2),  /* Device Power Gate config */
			, 2,
			PGEN, 1 /* PGE - PG Enable */
		}

		Method (_PS0, 0, Serialized)
		{
			Store (0, PGEN) /* Disable PG */
		}

		Method (_PS3, 0, Serialized)
		{
			Store (1, PGEN) /* Enable PG */
		}
	} /* Device (SDXC) */
}