summaryrefslogtreecommitdiff
path: root/src/mainboard/facebook/monolith/acpi/ec.asl
blob: d9a072952e6b9730557535103e6def8ba8c30acb (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
62
63
64
65
66
67
68
69
70
/* SPDX-License-Identifier: GPL-2.0-only */

/*
 * We only use the ERAM region to retrieve the CPU temperature. Otherwise the EC is not enabled
 * The _GPE is pointing to the correct pin but the EC events are not enabled in coreboot or the
 * EC.
 */

Device (EC0)
{
	Name (_HID, EisaId ("PNP0C09"))
	Name (_UID, 0)
	Name (_GPE, GPE0_DW0_22)

	Name (_CRS, ResourceTemplate () {
		IO (Decode16, 0x62, 0x62, 0, 1)
		IO (Decode16, 0x66, 0x66, 0, 1)
	})

	Method (_STA, 0, NotSerialized)
	{
		Return (0x0F)
	}

	Method (_REG, 2, NotSerialized)
	{
	}

	OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF)
	Field (ERAM, ByteAcc, NoLock, Preserve)
	{
		CPUT,   8,
	}

	Method (TSRD, 1, Serialized)
	{
		/* Prevent iasl remarks about unused parameters */
		Local0 = Arg0
		Arg0 = Local0
		Return (\_SB.DPTF.CTOK (CPUT))
	}

	/* Set Aux Trip Point 0 */
	Method (PAT0, 2, Serialized)
	{
		/* Prevent iasl remarks about unused parameters */
		Local0 = Arg0
		Arg0 = Local0
		Local0 = Arg1
		Arg1 = Local0
	}

	/* Set Aux Trip Point 1 */
	Method (PAT1, 2, Serialized)
	{
		/* Prevent iasl remarks about unused parameters */
		Local0 = Arg0
		Arg0 = Local0
		Local0 = Arg1
		Arg1 = Local0
	}

	/* Disable Aux Trip Point */
	Method (PATD, 1, Serialized)
	{
		/* Prevent iasl remarks about unused parameters */
		Local0 = Arg0
		Arg0 = Local0
	}
}