blob: ef119541a5191bffa650c3d53bdb276e0cfb5d2f [file] [log] [blame]
Lee Leahyc4210412015-06-29 11:37:56 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 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 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#define KUNIMITSU_TRACKPAD_IRQ 0x33
22#define KUNIMITSU_TOUCH_IRQ 0x1f
23
24#define BOARD_TRACKPAD_NAME "trackpad"
25#define BOARD_TRACKPAD_IRQ KUNIMITSU_TRACKPAD_IRQ
26#define BOARD_TRACKPAD_I2C_BUS 1
27#define BOARD_TRACKPAD_I2C_ADDR 0x15
28
29#define BOARD_TOUCHSCREEN_NAME "touchscreen"
30#define BOARD_TOUCHSCREEN_IRQ KUNIMITSU_TOUCH_IRQ
31#define BOARD_TOUCHSCREEN_I2C_BUS 0
32#define BOARD_TOUCHSCREEN_I2C_ADDR 0x4b
33
34Scope (\_SB)
35{
36 Device (LID0)
37 {
38 Name (_HID, EisaId("PNP0C0D"))
39 Method (_LID, 0)
40 {
41 Return (\_SB.PCI0.LPCB.EC0.LIDS)
42 }
43 }
44
45 Device (PWRB)
46 {
47 Name(_HID, EisaId("PNP0C0C"))
48 }
49}
50/*
51 * LPC Trusted Platform Module
52 */
53Scope (\_SB.PCI0.LPCB)
54{
55 #include <drivers/pc80/tpm/acpi/tpm.asl>
56}
57Scope (\_SB.PCI0.I2C0)
58{
59 Device (ATSB)
60 {
61 Name (_HID, "ATML0001")
62 Name (_DDN, "Atmel Touchscreen Bootloader")
63 Name (_UID, 4)
64 Name (_S0W, 4)
65 Name (ISTP, 0) /* TouchScreen */
66 Name (_CRS, ResourceTemplate()
67 {
68 I2cSerialBus (
69 0x27, // SlaveAddress
70 ControllerInitiated, // SlaveMode
71 400000, // ConnectionSpeed
72 AddressingMode7Bit, // AddressingMode
73 "\\_SB.PCI0.I2C0", // ResourceSource
74 )
75 Interrupt (ResourceConsumer, Edge, ActiveLow) { 28 }
76 })
77 Method (_STA)
78 {
79 Return (0xF)
80 }
81 }
82 Device (ATSA)
83 {
84 Name (_HID, "ATML0001")
85 Name (_DDN, "Atmel Touchscreen")
86 Name (_UID, 5)
87 Name (_S0W, 4)
88 Name (ISTP, 0) /* TouchScreen */
89 Name (_CRS, ResourceTemplate()
90 {
91 I2cSerialBus (
92 BOARD_TOUCHSCREEN_I2C_ADDR, // SlaveAddress
93 ControllerInitiated, // SlaveMode
94 400000, // ConnectionSpeed
95 AddressingMode7Bit, // AddressingMode
96 "\\_SB.PCI0.I2C0", // ResourceSource
97 )
98 Interrupt (ResourceConsumer, Edge, ActiveLow)
99 {
100 BOARD_TOUCHSCREEN_IRQ
101 }
102 })
103 Method (_STA, 0, NotSerialized)
104 {
105 Return (0xF)
106 }
107 }
108}
109Scope (\_SB.PCI0.I2C1)
110{
111 Device (ELAN)
112 {
113 Name (_HID, "ELAN0000")
114 Name (_DDN, "Elan Touchpad")
115 Name (_UID, 3)
116 Name (_S0W, 4)
117 Name (ISTP, 1) /* TouchPad */
118 Name (_CRS, ResourceTemplate()
119 {
120 I2cSerialBus (
121 BOARD_TRACKPAD_I2C_ADDR, /* SlaveAddress */
122 ControllerInitiated, /* SlaveMode */
123 400000, /* ConnectionSpeed */
124 AddressingMode7Bit, /* AddressingMode */
125 "\\_SB.PCI0.I2C1", /* ResourceSource */
126 )
127 Interrupt (ResourceConsumer, Edge, ActiveLow)
128 {
129 KUNIMITSU_TRACKPAD_IRQ
130 }
131 })
132 Method (_STA)
133 {
134 Return (0xF)
135 }
136 }
137}