2 * This file is part of the coreboot project.
4 * Copyright (C) 2014 Google Inc.
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.
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.
16 #undef ENABLE_TOUCH_WAKE
22 Name (_HID, EisaId("PNP0C0D"))
25 Return (\_SB.PCI0.LPCB.EC0.LIDS)
28 // EC wake is GPIO27 which is a special DeepSX wake pin
29 Name (_PRW, Package(){ 0x70, 5 }) // GP27_EN
34 Name(_HID, EisaId("PNP0C0C"))
39 * LPC Trusted Platform Module
41 Scope (\_SB.PCI0.LPCB)
43 #include <drivers/pc80/tpm/acpi/tpm.asl>
47 * WLAN connected to Root Port 3, becomes Root Port 1 after coalesce
49 Scope (\_SB.PCI0.RP01)
53 Name (_ADR, 0x00000000)
55 /* GPIO10 is PCH_WLAN_WAKE_L */
58 Name (_PRW, Package() { GPIO, 3 })
60 Method (_DSW, 3, NotSerialized)
62 If (LEqual (Arg0, 1)) {
63 // Enable GPIO as wake source
64 \_SB.PCI0.LPCB.GPIO.GWAK (^GPIO)
70 Scope (\_SB.PCI0.I2C0)
74 Name (_HID, "ATML0000")
75 Name (_DDN, "Atmel Touchpad Bootloader")
78 Name (ISTP, 1) /* Touchpad */
80 Name (_CRS, ResourceTemplate()
84 ControllerInitiated, // SlaveMode
85 400000, // ConnectionSpeed
86 AddressingMode7Bit, // AddressingMode
87 "\\_SB.PCI0.I2C0", // ResourceSource
91 Interrupt (ResourceConsumer, Edge, ActiveLow) { 27 }
96 If (LEqual (\S1EN, 1)) {
106 Name (_HID, "ATML0000")
107 Name (_DDN, "Atmel Touchpad")
110 Name (ISTP, 1) /* Touchpad */
111 Name (GPIO, 9) /* TRACKPAD_INT_L (WAKE) */
113 Name (_CRS, ResourceTemplate()
116 0x4a, // SlaveAddress
117 ControllerInitiated, // SlaveMode
118 400000, // ConnectionSpeed
119 AddressingMode7Bit, // AddressingMode
120 "\\_SB.PCI0.I2C0", // ResourceSource
124 Interrupt (ResourceConsumer, Edge, ActiveLow) { 27 }
127 Name (_PRW, Package() { GPIO, 3 })
129 Method (_DSW, 3, NotSerialized)
131 If (LEqual (Arg0, 1)) {
132 // Enable GPIO as wake source
133 \_SB.PCI0.LPCB.GPIO.GWAK (^GPIO)
139 If (LEqual (\S1EN, 1)) {
150 * TODO(kane): Need official HID.
153 Name (_HID, "RT5677CE")
154 Name (_DDN, "RT5667 Codec")
156 Name (WAKE, 45) /* DSP_INT (use as codec wake) */
158 Name (MB1, 1) /* MICBIAS1 = 2.970V */
159 Name (DACR, 1) /* Use codec internal 1.8V as DACREF source */
160 Name (DCLK, 0) /* RT5677_DMIC_CLK1 */
161 Name (PCLK, 1) /* RT5677_PDM_CLK_DIV2 (~3MHz) */
162 Name (IN1, 1) /* IN1 differential */
163 Name (IN2, 0) /* IN2 not differential */
164 Name (OUT1, 1) /* LOUT1 differential */
165 Name (OUT2, 1) /* LOUT2 differential */
166 Name (OUT3, 0) /* LOUT3 differential */
167 Name (ASRC, 1) /* Enable I2S1 ASRC */
168 Name (JD1, 0) /* JackDetect1 is not used */
169 Name (JD2, 2) /* Use GPIO5 as JackDetect2 */
170 Name (JD3, 3) /* Use GPIO6 as JackDetect3 */
172 /* Add DT style bindings with _DSD */
173 Name (_DSD, Package () {
174 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
176 Package () { "realtek,micbias1", 1 },
177 Package () { "realtek,internal-dacref-en", 1 },
178 Package () { "realtek,in1-differential", 1 },
179 Package () { "realtek,in2-differential", 0 },
180 Package () { "realtek,lout1-differential", 1 },
181 Package () { "realtek,lout2-differential", 1 },
182 Package () { "realtek,lout3-differential", 0 },
183 Package () { "realtek,pdm_clk_div", 1 },
184 Package () { "realtek,dmic2_clk_pin", 0 },
185 Package () { "realtek,asrc-en", 1 },
186 Package () { "realtek,jd1-gpio", 0 },
187 Package () { "realtek,jd2-gpio", 2 },
188 Package () { "realtek,jd3-gpio", 3 },
189 Package () { "realtek,gpio-config",
190 Package () { 0, 0, 0, 0, 0, 2 } },
194 Name (_CRS, ResourceTemplate()
197 0x2c, // SlaveAddress
198 ControllerInitiated, // SlaveMode
199 400000, // ConnectionSpeed
200 AddressingMode7Bit, // AddressingMode
201 "\\_SB.PCI0.I2C0", // ResourceSource
204 /* GPIO46 is PIRQO (use HOTWORD_DET as codec IRQ) */
205 Interrupt (ResourceConsumer, Edge, ActiveHigh) { 30 }
208 * Codec GPIOs are 1-based in the schematic
210 * [0] = Jack Detect (INPUT)
211 * [1] = Mic Present (INPUT)
212 * [2] = Interrupt to the host (OUTPUT)
213 * [3] = Interrupt to the host (OUTPUT)
214 * [4] = Headphone amp control (OUTPUT)
217 /* Index 0: Jack Detect - PLUG_DET is GPIO5 */
218 GpioIo (Exclusive, PullUp, , , IoRestrictionInputOnly,
219 "\\_SB.PCI0.I2C0.CODC") { 4 }
221 /* Index 1: Mic Present - MIC_PRESENT_L is GPIO6 */
222 GpioIo (Exclusive, PullUp, , , IoRestrictionInputOnly,
223 "\\_SB.PCI0.I2C0.CODC") { 5 }
225 /* Index 2: Codec IRQ - HOTWORD_DET_L is GPIO1 */
226 GpioIo (Exclusive, PullUp, , , IoRestrictionOutputOnly,
227 "\\_SB.PCI0.I2C0.CODC") { 0 }
229 /* Index 3: Codec Wake - DSP_INT is GPIO4 */
230 GpioIo (Exclusive, PullUp, , , IoRestrictionOutputOnly,
231 "\\_SB.PCI0.I2C0.CODC") { 3 }
233 /* Index 4: Headphone amp - HP_AMP_SHDN_L is GPIO2 */
234 GpioIo (Exclusive, PullDown, , , IoRestrictionOutputOnly,
235 "\\_SB.PCI0.I2C0.CODC") { 1 }
238 Name (_PRW, Package() { WAKE, 3 })
240 Method (_DSW, 3, NotSerialized)
242 If (LEqual (Arg0, 1)) {
243 // Enable GPIO as wake source
244 \_SB.PCI0.LPCB.GPIO.GWAK (^WAKE)
250 If (LEqual (\S1EN, 1)) {
259 Scope (\_SB.PCI0.I2C1)
263 Name (_HID, "ATML0001")
264 Name (_DDN, "Atmel Touchscreen Bootloader")
267 Name (ISTP, 0) /* TouchScreen */
269 Name (_CRS, ResourceTemplate()
272 0x27, // SlaveAddress
273 ControllerInitiated, // SlaveMode
274 400000, // ConnectionSpeed
275 AddressingMode7Bit, // AddressingMode
276 "\\_SB.PCI0.I2C1", // ResourceSource
280 Interrupt (ResourceConsumer, Edge, ActiveLow) { 28 }
285 If (LEqual (\S2EN, 1)) {
295 Name (_HID, "ATML0001")
296 Name (_DDN, "Atmel Touchscreen")
299 Name (ISTP, 0) /* TouchScreen */
300 Name (GPIO, 14) /* TOUCH_INT_L */
302 Name (_CRS, ResourceTemplate()
305 0x4b, // SlaveAddress
306 ControllerInitiated, // SlaveMode
307 400000, // ConnectionSpeed
308 AddressingMode7Bit, // AddressingMode
309 "\\_SB.PCI0.I2C1", // ResourceSource
313 Interrupt (ResourceConsumer, Edge, ActiveLow) { 28 }
316 #ifdef ENABLE_TOUCH_WAKE
317 Name (_PRW, Package() { GPIO, 3 })
319 Method (_DSW, 3, NotSerialized)
321 If (LEqual (Arg0, 1)) {
322 // Enable GPIO as wake source
323 \_SB.PCI0.LPCB.GPIO.GWAK (^GPIO)
330 If (LEqual (\S2EN, 1)) {
339 Scope (\_SB.PCI0.SPI0)
343 // TODO: Need official HID.
344 Name (_HID, "RT5677AA")
346 Name (_CRS, ResourceTemplate ()
349 0, // DeviceSelection (CS0?)
350 PolarityLow, // DeviceSelectionPolarity
351 FourWireMode, // WireMode
353 ControllerInitiated, // SlaveMode
354 1000000, // ConnectionSpeed (1MHz)
355 ClockPolarityLow, // ClockPolarity
356 ClockPhaseFirst, // ClockPhase
357 "\\_SB.PCI0.SPI0", // ResourceSource
358 0, // ResourceSourceIndex
359 ResourceConsumer, // ResourceUsage