[coreboot-gerrit] Change in coreboot[master]: google/parrot: use a GNVS variable to specify trackpad inter...
Matt DeVillier (Code Review)
gerrit at coreboot.org
Wed Jun 7 20:06:45 CEST 2017
Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/20093
Change subject: google/parrot: use a GNVS variable to specify trackpad interrupt
......................................................................
google/parrot: use a GNVS variable to specify trackpad interrupt
Use a GNVS variable to store the trackpad interrupt, in order to
support both SNB and IVB variants from a single build.
Change-Id: I53df35fff41f52a7d142aea9b1b590c65195bcfd
Signed-off-by: Matt DeVillier <matt.devillier at gmail.com>
---
M src/mainboard/google/parrot/acpi/mainboard.asl
M src/mainboard/google/parrot/acpi_tables.c
2 files changed, 38 insertions(+), 20 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/20093/1
diff --git a/src/mainboard/google/parrot/acpi/mainboard.asl b/src/mainboard/google/parrot/acpi/mainboard.asl
index 98208e0..91623024 100644
--- a/src/mainboard/google/parrot/acpi/mainboard.asl
+++ b/src/mainboard/google/parrot/acpi/mainboard.asl
@@ -47,7 +47,7 @@
}
Device (TPAD)
- {
+ {
Name (_ADR, 0x0)
Name (_UID, 1)
@@ -58,25 +58,35 @@
// Trackpad Wake is GPIO12, wake from S3
Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 })
- Name(_CRS, ResourceTemplate()
- {
-
- // PIRQA -> GSI16
- Interrupt (ResourceConsumer, Level, ActiveLow)
- {
- BOARD_TRACKPAD_IRQ_DVT
- }
-
- // PIRQE -> GSI20
- Interrupt (ResourceConsumer, Edge, ActiveLow)
- {
- BOARD_TRACKPAD_IRQ_PVT
- }
-
- // SMBUS Address 0x67
- VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR }
- })
- }
+ Name (DCRS, ResourceTemplate ()
+ {
+ // PIRQA -> GSI16
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
+ {
+ BOARD_TRACKPAD_IRQ_DVT,
+ }
+ // SMBUS Address 0x67
+ VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR }
+ })
+ Name (PCRS, ResourceTemplate ()
+ {
+ // PIRQE -> GSI20
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
+ {
+ BOARD_TRACKPAD_IRQ_PVT,
+ }
+ // SMBUS Address 0x67
+ VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR }
+ })
+ Method (_CRS, 0, NotSerialized)
+ {
+ If (\TPIQ == 16){
+ Return (DCRS)
+ } Else {
+ Return (PCRS)
+ }
+ }
+ }
Device (MB) {
Name(_HID, EisaId("PNP0C01")) // System Board
diff --git a/src/mainboard/google/parrot/acpi_tables.c b/src/mainboard/google/parrot/acpi_tables.c
index 81008a5..6eb3e41 100644
--- a/src/mainboard/google/parrot/acpi_tables.c
+++ b/src/mainboard/google/parrot/acpi_tables.c
@@ -31,6 +31,7 @@
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"
+#include "onboard.h"
static void acpi_update_thermal_table(global_nvs_t *gnvs)
{
@@ -59,4 +60,11 @@
// the lid is open by default.
gnvs->lids = 1;
+
+ //set trackpad IRQ
+ if (parrot_rev() < 0x2) { /* DVT vs PVT */
+ gnvs->tpiq = BOARD_TRACKPAD_IRQ_DVT;
+ } else {
+ gnvs->tpiq = BOARD_TRACKPAD_IRQ_PVT;
+ }
}
--
To view, visit https://review.coreboot.org/20093
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I53df35fff41f52a7d142aea9b1b590c65195bcfd
Gerrit-Change-Number: 20093
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier at gmail.com>
More information about the coreboot-gerrit
mailing list