blob: 6168fbbca3c52f6dc53250c995d9cee129dc3d33 [file] [log] [blame]
Hannah Williamsd59f62b2017-05-05 16:39:21 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2017 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15 Scope (\_SB.PCI0.I2C4)
16 {
17 Device (TPAD)
18 {
19 Name(_ADR, One)
20 Name (_HID, "ALPS0001")
21 Name (_CID, "PNP0C50")
22 Name (_DDN, "ALPS Touchpad")
23 Name (_UID, 1)
24 Name (ISTP, 1) /* Touchpad */
25 Name (_CRS, ResourceTemplate()
26 {
27 I2cSerialBus (
28 0x2C, // SlaveAddress
29 ControllerInitiated, // SlaveMode
30 400000, // ConnectionSpeed
31 AddressingMode7Bit, // AddressingMode
32 "\\_SB.PCI0.I2C4", // ResourceSource
33 )
34 Interrupt (ResourceConsumer, Level, ActiveLow)
35 {
36 GPIO_18_IRQ
37 }
38 GpioInt (Level, ActiveLow, ExclusiveAndWake, PullUp, 0x0000, "\\_SB.GPO1", 0x00, ResourceConsumer, ,)
39 {
40 18
41 }
42 })
43
44 Method (_STA)
45 {
46 Return (0xF)
47 }
48 Method(_DSM, 0x4, NotSerialized)
49 {
50 // DSM UUID for HIDI2C - HID driver does not load without DSM
51 If(LEqual(Arg0, ToUUID("3CDFF6F7-4267-4555-AD05-B30A3D8938DE")))
52 {
53 // Function 0 : Query Function
54 If(LEqual(Arg2, Zero))
55 {
56 // Revision 1
57 If(LEqual(Arg1, One))
58 {
59 Return (Buffer (One) {0x03})
60 }
61 Else
62 {
63 Return (Buffer (One) {0x00})
64 }
65 } ElseIf (LEqual(Arg2, One)) { // Function 1 : HID Function
66 // HID Descriptor Address (IHV Specific)
67 Return(0x0020)
68 } Else {
69 Return (Buffer (One) {0x00})
70 }
71 } Else {
72 Return (Buffer (One) {0x00})
73 }
74 }
75 }
76}