mb/system76/lemp9: enable I2C HID touchpad
Enable the I2C HID driver, configure I2C bus 0 and add the touchpad device to the devicetree. Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2. Signed-off-by: Jeremy Soller <jeremy@system76.com> Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b Reviewed-on: https://review.coreboot.org/c/coreboot/+/43623 Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Michael Niewöhner
parent
e83d30bb5a
commit
2d28c4cff4
@@ -3,6 +3,7 @@ if BOARD_SYSTEM76_LEMP9
|
|||||||
config BOARD_SPECIFIC_OPTIONS
|
config BOARD_SPECIFIC_OPTIONS
|
||||||
def_bool y
|
def_bool y
|
||||||
select BOARD_ROMSIZE_KB_16384
|
select BOARD_ROMSIZE_KB_16384
|
||||||
|
select DRIVERS_I2C_HID
|
||||||
select EC_SYSTEM76_EC
|
select EC_SYSTEM76_EC
|
||||||
select HAVE_ACPI_RESUME
|
select HAVE_ACPI_RESUME
|
||||||
select HAVE_ACPI_TABLES
|
select HAVE_ACPI_TABLES
|
||||||
|
@@ -1,7 +1,12 @@
|
|||||||
chip soc/intel/cannonlake
|
chip soc/intel/cannonlake
|
||||||
# Lock Down
|
|
||||||
register "common_soc_config" = "{
|
register "common_soc_config" = "{
|
||||||
.chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
|
.chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
|
||||||
|
/* Touchpad */
|
||||||
|
.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
|
# Send an extra VR mailbox command for the PS4 exit issue
|
||||||
@@ -35,6 +40,11 @@ chip soc/intel/cannonlake
|
|||||||
#register "enable_c6dram" = "1"
|
#register "enable_c6dram" = "1"
|
||||||
|
|
||||||
# FSP Silicon (soc/intel/cannonlake/fsp_params.c)
|
# FSP Silicon (soc/intel/cannonlake/fsp_params.c)
|
||||||
|
# Serial I/O
|
||||||
|
register "SerialIoDevMode" = "{
|
||||||
|
[PchSerialIoIndexI2C0] = PchSerialIoPci, // Touchpad
|
||||||
|
}"
|
||||||
|
|
||||||
# SATA
|
# SATA
|
||||||
register "SataMode" = "Sata_AHCI"
|
register "SataMode" = "Sata_AHCI"
|
||||||
register "SataSalpSupport" = "0"
|
register "SataSalpSupport" = "0"
|
||||||
@@ -185,7 +195,16 @@ chip soc/intel/cannonlake
|
|||||||
device pci 14.3 on end
|
device pci 14.3 on end
|
||||||
end
|
end
|
||||||
device pci 14.5 off end # SDCard
|
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" = ""ELAN040D""
|
||||||
|
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.1 off end # I2C #1
|
||||||
device pci 15.2 off end # I2C #2
|
device pci 15.2 off end # I2C #2
|
||||||
device pci 15.3 off end # I2C #3
|
device pci 15.3 off end # I2C #3
|
||||||
|
@@ -138,8 +138,8 @@ static const struct pad_config gpio_table[] = {
|
|||||||
PAD_NC(GPP_B2, UP_20K),
|
PAD_NC(GPP_B2, UP_20K),
|
||||||
|
|
||||||
// CPU Misc
|
// CPU Misc
|
||||||
// GPP_B3
|
// GPP_B3 (touchpad interrupt)
|
||||||
_PAD_CFG_STRUCT(GPP_B3, 0x80100100, 0x0000),
|
PAD_CFG_GPI_APIC_EDGE_LOW(GPP_B3, NONE, PLTRST),
|
||||||
// NC
|
// NC
|
||||||
PAD_NC(GPP_B4, UP_20K),
|
PAD_NC(GPP_B4, UP_20K),
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user