blob: 5ca7cfb64b5641ac0c45e994cc35cfdc08a23c71 [file] [log] [blame]
Matt DeVillier1b25f1b2018-09-14 21:39:00 -05001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * 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 */
16
17Scope (\_SB.PCI0.I2C0)
18{
19 Device (RTEK)
20 {
21 Name (_HID, "10EC5650")
Matt DeVillierea58add2018-12-30 20:23:43 -060022 Name (_CID, "INTCCFFD")
Matt DeVillier1b25f1b2018-09-14 21:39:00 -050023 Name (_DDN, "RTEK Codec Controller ")
24 Name (_UID, 1)
25
26 Name (_CRS, ResourceTemplate()
27 {
28 I2cSerialBus (
29 0x1A, // SlaveAddress
30 ControllerInitiated, // SlaveMode
31 400000, // ConnectionSpeed
32 AddressingMode7Bit, // AddressingMode
33 "\\_SB.PCI0.I2C0", // ResourceSource
34 )
35
36 Interrupt (ResourceConsumer, Edge, ActiveLow){ 37 }
37 })
38
39 Method (_STA)
40 {
41 If (LEqual (\S1EN, 1)) {
42 Return (0xF)
43 } Else {
44 Return (0x0)
45 }
46 }
47 }
48}
49
50Scope (\_SB.PCI0.I2C1)
51{
52 Device (ETSA)
53 {
54 Name (_HID, "ELAN0001")
55 Name (_DDN, "Elan Touchscreen")
56 Name (_UID, 6)
57 Name (ISTP, 0) /* Touchscreen */
58
59 Name (_CRS, ResourceTemplate()
60 {
61 I2cSerialBus (
62 0x10, // SlaveAddress
63 ControllerInitiated, // SlaveMode
64 400000, // ConnectionSpeed
65 AddressingMode7Bit, // AddressingMode
66 "\\_SB.PCI0.I2C1", // ResourceSource
67 )
68 Interrupt (ResourceConsumer, Level, ActiveLow)
69 {
70 BOARD_TOUCHSCREEN_IRQ
71 }
72 })
73
74 Method (_STA)
75 {
76 If (LEqual (\S2EN, 1)) {
77 Return (0xF)
78 } Else {
79 Return (0x0)
80 }
81 }
82
83 Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
84
85 Method (_DSW, 3, NotSerialized)
86 {
87 Store (BOARD_TOUCHSCREEN_WAKE_GPIO, Local0)
88 If (LEqual (Arg0, 1)) {
89 // Enable GPIO as wake source
90 \_SB.PCI0.LPCB.GPIO.GWAK (Local0)
91 }
92 }
93
94 /* Allow device to power off in S0 */
95 Name (_S0W, 4)
96 }
97}
98
99/*
100 * LAN connected to Root Port 3, becomes Root Port 1 after coalesce
101 */
102Scope (\_SB.PCI0.RP01)
103{
104 Device (ETH0)
105 {
106 Name (_ADR, 0x00000000)
107 Name (_PRW, Package() { BUDDY_NIC_WAKE_GPIO, 3 })
108
109 Method (_DSW, 3, NotSerialized)
110 {
111 Store (BUDDY_NIC_WAKE_GPIO, Local0)
112
113 If (LEqual (Arg0, 1)) {
114 // Enable GPIO as wake source
115 \_SB.PCI0.LPCB.GPIO.GWAK (Local0)
116 }
117 }
118 }
119}