mb/google/nissa/var/yavilla: Add elan and G2 i2c touchscreen

Implement support for elan i2c touchscreen and use fw_config
to pick between i2c or HID-over-i2c touchscreen.

Support G2 TS have different slave address by fw_config

BUG=b:295272539
BRANCH=firmware-nissa-15217.B
TEST=build and verified touchscreen work

Change-Id: I5e3f85106606d84e1cfa204e62b7b2662db6546b
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77996
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
This commit is contained in:
Shon Wang 2023-09-18 10:14:39 +08:00 committed by Felix Held
parent b41b0f5f90
commit c368775460
2 changed files with 45 additions and 1 deletions

View File

@ -427,6 +427,7 @@ config BOARD_GOOGLE_YAVILLA
select DRIVERS_INTEL_MIPI_CAMERA select DRIVERS_INTEL_MIPI_CAMERA
select HAVE_WWAN_POWER_SEQUENCE select HAVE_WWAN_POWER_SEQUENCE
select INTEL_GMA_HAVE_VBT select INTEL_GMA_HAVE_VBT
select EC_GOOGLE_CHROMEEC_INCLUDE_SSFC_IN_FW_CONFIG
config BOARD_GOOGLE_ZYDRON config BOARD_GOOGLE_ZYDRON
bool "-> Zydron" bool "-> Zydron"

View File

@ -40,6 +40,11 @@ fw_config
option INTEL_YAVIJO_WIFI 5 option INTEL_YAVIJO_WIFI 5
option UNUSED 15 option UNUSED 15
end end
field TOUCH_PANEL 40 41
option TOUCH_ELAN_I2C 0
option TOUCH_ELAN_HID_I2C 1
option TOUCH_G2_HID_I2c 2
end
end end
chip soc/intel/alderlake chip soc/intel/alderlake
@ -257,8 +262,29 @@ chip soc/intel/alderlake
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C0)" register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C0)"
register "enable_delay_ms" = "1" register "enable_delay_ms" = "1"
register "has_power_resource" = "1" register "has_power_resource" = "1"
device i2c 10 on end device i2c 10 on
probe TOUCH_PANEL TOUCH_ELAN_I2C
end
end end
chip drivers/i2c/hid
register "generic.hid" = ""ELAN2513""
register "generic.desc" = ""ELAN Touchscreen""
register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_C7_IRQ)"
register "generic.detect" = "1"
register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C1)"
register "generic.reset_delay_ms" = "20"
register "generic.reset_off_delay_ms" = "2"
register "generic.stop_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C6)"
register "generic.stop_delay_ms" = "280"
register "generic.stop_off_delay_ms" = "2"
register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C0)"
register "generic.enable_delay_ms" = "1"
register "generic.has_power_resource" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 10 on
probe TOUCH_PANEL TOUCH_ELAN_HID_I2C
end
end
chip drivers/i2c/hid chip drivers/i2c/hid
register "generic.hid" = ""ELAN2513"" register "generic.hid" = ""ELAN2513""
register "generic.desc" = ""ELAN Touchscreen"" register "generic.desc" = ""ELAN Touchscreen""
@ -276,6 +302,23 @@ chip soc/intel/alderlake
register "hid_desc_reg_offset" = "0x01" register "hid_desc_reg_offset" = "0x01"
device i2c 15 on end device i2c 15 on end
end end
chip drivers/i2c/hid
register "generic.hid" = ""GTCH7503""
register "generic.desc" = ""G2TOUCH Touchscreen""
register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_C7_IRQ)"
register "generic.detect" = "1"
register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C1)"
register "generic.reset_delay_ms" = "50"
register "generic.stop_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C6)"
register "generic.stop_delay_ms" = "100"
register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C0)"
register "generic.enable_delay_ms" = "1"
register "generic.has_power_resource" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 10 on
probe TOUCH_PANEL TOUCH_G2_HID_I2c
end
end
chip drivers/i2c/hid chip drivers/i2c/hid
register "generic.hid" = ""GTCH7503"" register "generic.hid" = ""GTCH7503""
register "generic.desc" = ""G2TOUCH Touchscreen"" register "generic.desc" = ""G2TOUCH Touchscreen""