Enable i2c-hid interface for touchpad

This commit is contained in:
Jeremy Soller
2020-05-09 09:37:08 -06:00
parent 84ff4bbc2b
commit 419d23908a
3 changed files with 34 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ config BOARD_SPECIFIC_OPTIONS
def_bool y
select ADD_FSP_BINARIES
select BOARD_ROMSIZE_KB_16384
select DRIVERS_I2C_HID
select EC_ACPI
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES

View File

@@ -2,6 +2,11 @@ chip soc/intel/cannonlake
# Lock Down
register "common_soc_config" = "{
.chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
.i2c[0] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 80,
.fall_time_ns = 110,
},
}"
# Send an extra VR mailbox command for the PS4 exit issue
@@ -33,6 +38,22 @@ chip soc/intel/cannonlake
#register "enable_c6dram" = "1"
# FSP Silicon (soc/intel/cannonlake/fsp_params.c)
# Serial I/O
register "SerialIoDevMode" = "{
[PchSerialIoIndexI2C0] = PchSerialIoPci,
[PchSerialIoIndexI2C1] = PchSerialIoDisabled,
[PchSerialIoIndexI2C2] = PchSerialIoPci,
[PchSerialIoIndexI2C3] = PchSerialIoDisabled,
[PchSerialIoIndexI2C4] = PchSerialIoDisabled,
[PchSerialIoIndexI2C5] = PchSerialIoDisabled,
[PchSerialIoIndexSPI0] = PchSerialIoDisabled,
[PchSerialIoIndexSPI1] = PchSerialIoDisabled,
[PchSerialIoIndexSPI2] = PchSerialIoDisabled,
[PchSerialIoIndexUART0] = PchSerialIoDisabled,
[PchSerialIoIndexUART1] = PchSerialIoDisabled,
[PchSerialIoIndexUART2] = PchSerialIoPci,
}"
# SATA
register "SataMode" = "Sata_AHCI"
register "SataSalpSupport" = "0"
@@ -195,7 +216,16 @@ chip soc/intel/cannonlake
device pci 14.3 on end # CNVi wifi
#end
device pci 14.5 off end # SDCard
device pci 15.0 off end # I2C #0
device pci 15.0 on
chip drivers/i2c/hid
register "generic.hid" = ""PNP0C50""
register "generic.desc" = ""ELAN Touchpad""
register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_B3_IRQ)"
register "generic.probed" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 15 on end
end
end # I2C #0
device pci 15.1 off end # I2C #1
device pci 15.2 off end # I2C #2
device pci 15.3 off end # I2C #3

View File

@@ -152,8 +152,8 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_NC(GPP_B2),
// CPU Misc
// GPP_B3
_PAD_CFG_STRUCT(GPP_B3, 0x80100100, 0x0000),
// GPP_B3 (touchpad interrupt)
PAD_CFG_GPI_APIC(GPP_B3, NONE, PLTRST, EDGE_SINGLE, INVERT),
// NC
PAD_CFG_NC(GPP_B4),