coreboot: add Cypress new trackpad device supported in auron platform
This patch adds Cypress gen5 trackpad device supported in auron platform. The new Cypress gen5 trackpad's I2C address is 0x24 which is different from the old trackpad device's I2C address 0x67. BRANCH=None BUG=None TEST=None Signed-off-by: Dudley Du <dudley.dulixin@gmail.com> Change-Id: I4a80d6a5b63b4ec3a0d38258886b1979a12377ea Reviewed-on: https://chromium-review.googlesource.com/230254 Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-by: Dudley Du <dudl@cypress.com> Tested-by: Dudley Du <dudl@cypress.com> Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
This commit is contained in:
parent
70f9cf6708
commit
d99baf2258
3 changed files with 57 additions and 1 deletions
|
|
@ -114,7 +114,53 @@ Scope (\_SB.PCI0.I2C0)
|
|||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\\_SB.PCI0.I2C0", // ResourceSource
|
||||
"\\_SB.PCI0.I2C0", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
BOARD_TRACKPAD_IRQ
|
||||
}
|
||||
})
|
||||
|
||||
Method (_STA)
|
||||
{
|
||||
If (LEqual (\S1EN, 1)) {
|
||||
Return (0xF)
|
||||
} Else {
|
||||
Return (0x0)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
Device (CTPB)
|
||||
{
|
||||
Name (_HID, "CYAP0001")
|
||||
Name (_DDN, "Cypress Touchpad")
|
||||
Name (_UID, 3)
|
||||
Name (ISTP, 1) /* Touchpad */
|
||||
|
||||
Name (_CRS, ResourceTemplate()
|
||||
{
|
||||
I2cSerialBus (
|
||||
0x24, // SlaveAddress
|
||||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\\_SB.PCI0.I2C0", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -156,6 +156,15 @@ static int mainboard_smbios_data(device_t dev, int *handle,
|
|||
0, /* device */
|
||||
0); /* function */
|
||||
|
||||
len += smbios_write_type41(
|
||||
current, handle,
|
||||
BOARD_TRACKPAD_NAME, /* name */
|
||||
BOARD_TRACKPAD_IRQ, /* instance */
|
||||
BOARD_TRACKPAD_I2C_BUS, /* segment */
|
||||
BOARD_TRACKPAD_GEN5_I2C_ADDR, /* bus */
|
||||
0, /* device */
|
||||
0); /* function */
|
||||
|
||||
len += smbios_write_type41(
|
||||
current, handle,
|
||||
BOARD_TOUCHSCREEN_NAME, /* name */
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#define BOARD_TRACKPAD_WAKE_GPIO 12 /* GPIO12 */
|
||||
#define BOARD_TRACKPAD_I2C_BUS 1 /* I2C0 */
|
||||
#define BOARD_TRACKPAD_I2C_ADDR 0x67
|
||||
#define BOARD_TRACKPAD_GEN5_I2C_ADDR 0x24
|
||||
|
||||
#define BOARD_TOUCHSCREEN_NAME "touchscreen"
|
||||
#define BOARD_TOUCHSCREEN_IRQ 38 /* PIRQW */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue