[coreboot-gerrit] New patch to review for coreboot: 5a9c081 falco: Add ACPI code to describe the I2C touchpad device
Duncan Laurie (dlaurie@google.com)
gerrit at coreboot.org
Tue Feb 11 19:47:14 CET 2014
Duncan Laurie (dlaurie at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5194
-gerrit
commit 5a9c0814ff5d2064e17f4696ac05ab6dce8404aa
Author: Duncan Laurie <dlaurie at chromium.org>
Date: Tue Feb 11 10:43:21 2014 -0800
falco: Add ACPI code to describe the I2C touchpad device
If the SerialIO devices are put into ACPI mode then it is possible
to use ACPI to instantiate the touchpad in the kernel without
needing to have a platform level driver to do the binding.
This is the "new way" of describing on-board I2C devices and the
upstream kernel is starting to add ACPI IDs to drivers so they can
be used in this fashion. For the Cypress touchpad use a generic
ACPI ID of "CYPA0000" to describe it.
In order to support the proper scoping of the touchpad device under
the appropriate I2C controller device the mainboard.asl file needs
to be included after pch.asl so the I2C device exists.
Change-Id: I81e053d27be478f3a19b6f9b13cd2b4fabcb88c0
Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
---
src/mainboard/google/falco/acpi/mainboard.asl | 34 +++++++++++++++++++++++++++
src/mainboard/google/falco/dsdt.asl | 4 +++-
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/google/falco/acpi/mainboard.asl b/src/mainboard/google/falco/acpi/mainboard.asl
index 84e8a25..8d27cb9 100644
--- a/src/mainboard/google/falco/acpi/mainboard.asl
+++ b/src/mainboard/google/falco/acpi/mainboard.asl
@@ -108,3 +108,37 @@ Scope (\_SB)
}
}
}
+
+Scope (\_SB.PCI0.I2C0)
+{
+ Device (CYPA)
+ {
+ Name (_HID, "CYPA0000")
+ Name (_DDN, "Cypress Touchpad")
+ Name (_UID, 1)
+
+ Name (_CRS, ResourceTemplate()
+ {
+ I2cSerialBus (
+ BOARD_TRACKPAD_I2C_ADDR, // SlaveAddress
+ ControllerInitiated, // SlaveMode
+ 400000, // ConnectionSpeed
+ AddressingMode7Bit, // AddressingMode
+ "\\_SB.PCI0.I2C0", // ResourceSource
+ )
+ Interrupt (ResourceConsumer, Edge, ActiveLow)
+ {
+ BOARD_TRACKPAD_IRQ
+ }
+ })
+
+ Method (_STA)
+ {
+ If (LEqual (\S1EN, 1)) {
+ Return (0xF)
+ } Else {
+ Return (0x0)
+ }
+ }
+ }
+}
diff --git a/src/mainboard/google/falco/dsdt.asl b/src/mainboard/google/falco/dsdt.asl
index 1316ebf..718d515 100644
--- a/src/mainboard/google/falco/dsdt.asl
+++ b/src/mainboard/google/falco/dsdt.asl
@@ -31,7 +31,6 @@ DefinitionBlock(
{
// Some generic macros
#include "acpi/platform.asl"
- #include "acpi/mainboard.asl"
// global NVS and variables
#include <southbridge/intel/lynxpoint/acpi/globalnvs.asl>
@@ -50,6 +49,9 @@ DefinitionBlock(
}
}
+ // Mainboard specific
+ #include "acpi/mainboard.asl"
+
// Thermal handler
#include "acpi/thermal.asl"
More information about the coreboot-gerrit
mailing list