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@gmail.com> Reviewed-on: https://review.coreboot.org/20093 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
aff9b30851
commit
d3b15c7821
|
@ -58,24 +58,36 @@ Scope (\_SB) {
|
|||
// Trackpad Wake is GPIO12, wake from S3
|
||||
Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 })
|
||||
|
||||
Name(_CRS, ResourceTemplate()
|
||||
Name (DCRS, ResourceTemplate ()
|
||||
{
|
||||
|
||||
// PIRQA -> GSI16
|
||||
Interrupt (ResourceConsumer, Level, ActiveLow)
|
||||
Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
|
||||
{
|
||||
BOARD_TRACKPAD_IRQ_DVT
|
||||
BOARD_TRACKPAD_IRQ_DVT,
|
||||
}
|
||||
|
||||
// PIRQE -> GSI20
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
BOARD_TRACKPAD_IRQ_PVT
|
||||
}
|
||||
|
||||
// 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 == BOARD_TRACKPAD_IRQ_DVT){
|
||||
Return (DCRS)
|
||||
} Else {
|
||||
Return (PCRS)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Device (MB) {
|
||||
|
|
|
@ -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 @@ void acpi_create_gnvs(global_nvs_t *gnvs)
|
|||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue