auron: add _PRW and _DSW methods to trackpad and touch screen

Auron/Peppy use GPIO 12 and GPIO 25 as wake up pins. GPIO_OWN,
GPIO_ROUTE, GPnCONFIG registers are setup if _DSW methods
are available.

Example capture after GPIO 12 and 25 are enabled for wake up:

GPIO Registers: GPIO_OWN_0    3dfbea0f GPIO_ROUTE_0  00000000
GPIO Registers: GPnCONFIGA_12 4000000d GPnCONFIGB_12 00000000
GPIO Registers: GPnCONFIGA_25 4000000d GPnCONFIGB_25 00000000

As Duncan suggested, I moved _PRW and _DSW to respective trackpad
and touch screen devices, and wake up worked with latest Chrome
image R39.6301.

Trackpad wake up is automatically enabled after boot. But touch
screen wake up is not enabled by powerd on boot.

BUG=chrome-os-partner:32047
TEST=check if trackpad can wake up board

Change-Id: Idd1e93dee8678044a6756cf36e8fdf4d27cd9676
Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/219906
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
Wenkai Du 2014-09-25 09:40:45 -07:00 committed by chrome-internal-fetch
commit 81621671aa

View file

@ -37,56 +37,6 @@ Scope (\_SB)
{
Name(_HID, EisaId("PNP0C0C"))
}
Device (TPAD)
{
Name (_ADR, 0x0)
Name (_UID, 1)
// Report as a Sleep Button device so Linux will
// automatically enable it as a wake source
Name (_HID, EisaId("PNP0C0E"))
Name (_CRS, ResourceTemplate()
{
Interrupt (ResourceConsumer, Edge, ActiveLow)
{
BOARD_TRACKPAD_IRQ
}
VendorShort (ADDR)
{
BOARD_TRACKPAD_I2C_ADDR
}
})
Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 })
}
Device (TSCR)
{
Name (_ADR, 0x0)
Name (_UID, 2)
// Report as a Sleep Button device so Linux will
// automatically enable it as a wake source
Name (_HID, EisaId("PNP0C0E"))
Name (_CRS, ResourceTemplate()
{
Interrupt (ResourceConsumer, Edge, ActiveLow)
{
BOARD_TOUCHSCREEN_IRQ
}
VendorShort (ADDR)
{
BOARD_TOUCHSCREEN_I2C_ADDR
}
})
Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
}
}
Scope (\_SB.PCI0.I2C0)
@ -122,6 +72,17 @@ Scope (\_SB.PCI0.I2C0)
}
}
Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 })
Method (_DSW, 3, NotSerialized)
{
Store (BOARD_TRACKPAD_WAKE_GPIO, Local0)
If (LEqual (Arg0, 1)) {
// Enable GPIO as wake source
\_SB.PCI0.LPCB.GPIO.GWAK (Local0)
}
}
/* Allow device to power off in S0 */
Name (_S0W, 4)
}
@ -157,6 +118,17 @@ Scope (\_SB.PCI0.I2C0)
}
}
Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 })
Method (_DSW, 3, NotSerialized)
{
Store (BOARD_TRACKPAD_WAKE_GPIO, Local0)
If (LEqual (Arg0, 1)) {
// Enable GPIO as wake source
\_SB.PCI0.LPCB.GPIO.GWAK (Local0)
}
}
/* Allow device to power off in S0 */
Name (_S0W, 4)
}
@ -172,7 +144,7 @@ Scope (\_SB.PCI0.I2C1)
Name (ISTP, 0) /* TouchScreen */
Name (_CRS, ResourceTemplate()
{
{
I2cSerialBus (
0x4a, // SlaveAddress
ControllerInitiated, // SlaveMode
@ -186,6 +158,17 @@ Scope (\_SB.PCI0.I2C1)
Interrupt (ResourceConsumer, Edge, ActiveLow) { 38 }
})
Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
Method (_DSW, 3, NotSerialized)
{
Store (BOARD_TOUCHSCREEN_WAKE_GPIO, Local0)
If (LEqual (Arg0, 1)) {
// Enable GPIO as wake source
\_SB.PCI0.LPCB.GPIO.GWAK (Local0)
}
}
Method (_STA)
{
If (LEqual (\S2EN, 1)) {