mb/google/rex/var/rex0: Change touch over spi interrupt trigger to edge

This CL corrects the trigger for HID over SPI from Level to Edge.

BUG:None
TEST:Tested with I2C and SPI

Change-Id: I78937af22df22d80a702477b6790a7aa40d782a4
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76116
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Eran Mitrani 2023-06-26 13:27:42 -07:00 committed by Felix Held
parent 266e6557ba
commit 95a5e72213
3 changed files with 19 additions and 3 deletions

View File

@ -89,6 +89,16 @@ static const struct pad_config ish_enable_pads[] = {
PAD_CFG_NF(GPP_F22, NONE, DEEP, NF8),
};
static const struct pad_config touchscreen_i2c_int_pads[] = {
/* GPP_C07 : [] ==> SOC_TCHSCR_INT */
PAD_CFG_GPI_APIC(GPP_C07, NONE, PLTRST, LEVEL, NONE),
};
static const struct pad_config touchscreen_spi_int_pads[] = {
/* GPP_C07 : [] ==> SOC_TCHSCR_INT */
PAD_CFG_GPI_APIC(GPP_C07, NONE, PLTRST, EDGE_SINGLE, INVERT),
};
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
{
if (!fw_config_is_provisioned()) {
@ -121,4 +131,12 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
printk(BIOS_INFO, "Configure GPIOs for ISH.\n");
GPIO_PADBASED_OVERRIDE(padbased_table, ish_enable_pads);
}
if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_I2C))) {
printk(BIOS_INFO, "Configure Touchscreen Interrupt for I2C.\n");
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_i2c_int_pads);
} else { /* SPI */
printk(BIOS_INFO, "Configure Touchscreen Interrupt for SPI.\n");
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_spi_int_pads);
}
}

View File

@ -116,8 +116,6 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_GPO(GPP_C05, 1, PLTRST),
/* GPP_C06 : [] ==> SOC_TCHSCR_RPT_EN */
PAD_CFG_GPO(GPP_C06, 0, DEEP),
/* GPP_C07 : [] ==> SOC_TCHSCR_INT */
PAD_CFG_GPI_APIC(GPP_C07, NONE, PLTRST, LEVEL, NONE),
/* GPP_C08 : [] ==> SOCHOT_ODL */
PAD_CFG_NF(GPP_C08, NONE, DEEP, NF2),
/* GPP_C09 : net NC is not present in the given design */

View File

@ -39,7 +39,7 @@ Device(TCSC) {
0, /* ResourceSourceIndex */
ResourceConsumer, /* ResourceUsage */
)
Interrupt(ResourceConsumer, Level, ActiveLow, Shared)
Interrupt(ResourceConsumer, Edge, ActiveLow, Shared)
{
TOUCH_SCR_IRQ
}