mb/google/fatcat: Implement Google Rex touchscreen integration
This update introduces support for Google touchscreen devices to the existing framework, enhancing compatibility with Google's hardware interfaces. It extends the fw_config field with new options to accommodate different connection types used by Google touchscreens. Specifically, it adds: - TOUCHSCREEN_LPSS_I2C_ELAN_REX for ELAN9006 interfaced via LPSS-I2C. - TOUCHSCREEN_THC_SPI_ELAN_REX for ELAN6918 interfaced via THC-SPI. - TOUCHSCREEN_THC_I2C_ELAN_REX for ELAN9006 interfaced via THC-I2C. BUG=none TEST=Connect Google's REX touchscreen with the conversion cables. Boot to OS with fw_config setting for Google's touchscreen and verify device enumeration in /sys/bus/hid/devices directory. Signed-off-by: Cliff Huang <cliff.huang@intel.com> Change-Id: I3fda0e4587d8484881c844674053a0badfc23a11 Reviewed-on: https://review.coreboot.org/c/coreboot/+/89181 Reviewed-by: Kim, Kyoung Il <kyoung.il.kim@intel.com> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
3f5807ce10
commit
b7763a5973
3 changed files with 75 additions and 6 deletions
|
|
@ -669,15 +669,18 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
|
|||
GPIO_PADBASED_OVERRIDE(padbased_table, touchpad_i2c_disable_pads);
|
||||
}
|
||||
|
||||
if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_LPSS_I2C))) {
|
||||
if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_LPSS_I2C)) ||
|
||||
fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_LPSS_I2C_ELAN_REX))) {
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_lpss_i2c_enable_pads);
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_I2C))) {
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_I2C)) ||
|
||||
fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_I2C_ELAN_REX))) {
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_thc_i2c_enable_pads);
|
||||
if (config->thc_wake_on_touch[0])
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, thc0_enable_wake);
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_GSPI))) {
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_gspi_enable_pads);
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI))) {
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI)) ||
|
||||
fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI_ELAN_REX))) {
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_thc_spi_enable_pads);
|
||||
if (config->thc_wake_on_touch[0])
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, thc0_enable_wake);
|
||||
|
|
@ -708,7 +711,8 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
|
|||
* 2. CBI selecting TS THC-SPI or TS GSPI with FSP present is invalid case.
|
||||
*/
|
||||
if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_GSPI)) ||
|
||||
fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI))) {
|
||||
fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI)) ||
|
||||
fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI_ELAN_REX))) {
|
||||
/* board has TS SPI rework and not FPS support */
|
||||
} else if (fw_config_probe(FW_CONFIG(FP, FP_PRESENT))) {
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, fp_enable_pads);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ fw_config
|
|||
option TOUCHSCREEN_GSPI 2
|
||||
option TOUCHSCREEN_THC_SPI 3
|
||||
option TOUCHSCREEN_THC_I2C 4
|
||||
# NOTE: conversion cables are required to connect with Google touch screen
|
||||
option TOUCHSCREEN_LPSS_I2C_ELAN_REX 5
|
||||
option TOUCHSCREEN_THC_SPI_ELAN_REX 6
|
||||
option TOUCHSCREEN_THC_I2C_ELAN_REX 7
|
||||
end
|
||||
field TOUCHPAD 11 12
|
||||
option TOUCHPAD_NONE 0
|
||||
|
|
@ -326,6 +330,8 @@ chip soc/intel/pantherlake
|
|||
register "thc_wake_on_touch[0]" = "true"
|
||||
probe TOUCHSCREEN TOUCHSCREEN_THC_SPI
|
||||
probe TOUCHSCREEN TOUCHSCREEN_THC_I2C
|
||||
probe TOUCHSCREEN TOUCHSCREEN_THC_SPI_ELAN_REX
|
||||
probe TOUCHSCREEN TOUCHSCREEN_THC_I2C_ELAN_REX
|
||||
# THC0 is function 0; hence it needs to be enabled when THC1 is to be enabled.
|
||||
probe TOUCHPAD TOUCHPAD_THC_I2C
|
||||
chip drivers/intel/touch
|
||||
|
|
@ -345,6 +351,23 @@ chip soc/intel/pantherlake
|
|||
probe TOUCHSCREEN TOUCHSCREEN_THC_I2C
|
||||
end
|
||||
end
|
||||
chip drivers/intel/touch
|
||||
register "name" = "INTEL_THC0_NAME"
|
||||
register "mode" = "THC_HID_I2C_MODE"
|
||||
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F08)"
|
||||
register "enable_delay_ms" = "2"
|
||||
register "enable_off_delay_ms" = "2"
|
||||
register "wake_on_touch" = "true"
|
||||
# NOTE: Use GpioInt() in _CRS and does not use GPE.
|
||||
register "wake_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW_WAKE(GPP_VGPIO3_THC0)"
|
||||
register "active_ltr" = "1"
|
||||
register "idle_ltr" = "0"
|
||||
register "connected_device" = "TH_SENSOR_ELAN_REX"
|
||||
register "add_acpi_dma_property" = "true"
|
||||
device generic 0 alias touch_0_i2c_google on
|
||||
probe TOUCHSCREEN TOUCHSCREEN_THC_I2C_ELAN_REX
|
||||
end
|
||||
end
|
||||
chip drivers/intel/touch
|
||||
register "name" = "INTEL_THC0_NAME"
|
||||
register "mode" = "THC_HID_SPI_MODE"
|
||||
|
|
@ -367,6 +390,28 @@ chip soc/intel/pantherlake
|
|||
probe TOUCHSCREEN TOUCHSCREEN_THC_SPI
|
||||
end
|
||||
end
|
||||
chip drivers/intel/touch
|
||||
register "name" = "INTEL_THC0_NAME"
|
||||
register "mode" = "THC_HID_SPI_MODE"
|
||||
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F08)"
|
||||
register "enable_delay_ms" = "2"
|
||||
register "enable_off_delay_ms" = "2"
|
||||
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_E16)"
|
||||
register "reset_delay_ms" = "10"
|
||||
register "reset_off_delay_ms" = "2"
|
||||
register "wake_on_touch" = "true"
|
||||
# NOTE: Use GpioInt() in _CRS and does not use GPE.
|
||||
register "wake_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW_WAKE(GPP_VGPIO3_THC0)"
|
||||
register "active_ltr" = "1"
|
||||
register "idle_ltr" = "0"
|
||||
register "connected_device" = "TH_SENSOR_ELAN_REX"
|
||||
register "soc_hidspi.write_mode" = "HIDSPI_WRITE_MODE_SINGLE"
|
||||
register "soc_hidspi.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_E16)"
|
||||
register "add_acpi_dma_property" = "true"
|
||||
device generic 0 alias touch_0_spi_google on
|
||||
probe TOUCHSCREEN TOUCHSCREEN_THC_SPI_ELAN_REX
|
||||
end
|
||||
end
|
||||
end
|
||||
device ref thc1 on
|
||||
register "thc_wake_on_touch[1]" = "true"
|
||||
|
|
@ -902,6 +947,24 @@ chip soc/intel/pantherlake
|
|||
probe TOUCHSCREEN TOUCHSCREEN_LPSS_I2C
|
||||
end
|
||||
end
|
||||
chip drivers/i2c/hid
|
||||
register "generic.hid" = ""ELAN9006""
|
||||
register "generic.desc" = ""ELAN Touchscreen""
|
||||
register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E18_IRQ)"
|
||||
# NOTE: pmc_gpe0_dw2 is GPP_E in baseboard devicetree.cb.
|
||||
register "generic.wake" = "GPE0_DW2_18"
|
||||
register "generic.probed" = "1"
|
||||
register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_E16)"
|
||||
register "generic.reset_delay_ms" = "20"
|
||||
register "generic.reset_off_delay_ms" = "2"
|
||||
register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F08)"
|
||||
register "generic.enable_delay_ms" = "1"
|
||||
register "generic.has_power_resource" = "1"
|
||||
register "hid_desc_reg_offset" = "0x01"
|
||||
device i2c 10 on
|
||||
probe TOUCHSCREEN TOUCHSCREEN_LPSS_I2C_ELAN_REX
|
||||
end
|
||||
end
|
||||
end # I2C4
|
||||
device ref i2c5 on
|
||||
chip drivers/i2c/hid
|
||||
|
|
|
|||
|
|
@ -51,9 +51,11 @@ void variant_update_soc_chip_config(struct soc_intel_pantherlake_config *config)
|
|||
* | with WOT disabled | with WOT disabled| | |
|
||||
* +===================+==================+=================+============================+
|
||||
*/
|
||||
if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_I2C))) {
|
||||
if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_I2C)) ||
|
||||
fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_I2C_ELAN_REX))) {
|
||||
config->thc_mode[0] = THC_HID_I2C_MODE;
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI))) {
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI)) ||
|
||||
fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI_ELAN_REX))) {
|
||||
config->thc_mode[0] = THC_HID_SPI_MODE;
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_GSPI))) {
|
||||
config->serial_io_gspi_mode[PchSerialIoIndexGSPI0] = PchSerialIoPci;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue