mb/goog/ocelot/var/ocelot: add LPSS touchscreen support for Rex Touchscreen
Support for the rex touchscreen panel was needed for the RVP to validate touchscreen functionality. The LPSS touchscreen is mapped to I2C bus 4 and the rex panel is mapped to address 0x10. BUG=b:458429110 TEST=None Change-Id: I99b2c7beaab63da1877995c655ff8eddf9c3a69f Signed-off-by: Avi Uday <aviuday@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90859 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Pranava Y N <pranavayn@google.com>
This commit is contained in:
parent
4772d019f3
commit
f91f18cdc4
2 changed files with 50 additions and 1 deletions
|
|
@ -292,6 +292,27 @@ static const struct pad_config touchscreen_disable_pads[] = {
|
|||
PAD_NC(GPP_VGPIO3_THC0, NONE),
|
||||
};
|
||||
|
||||
static const struct pad_config touchscreen_lpss_i2c_enable_pads[] = {
|
||||
/* GPP_E11: THC0_SPI1_CLK_TCH_PNL1 */
|
||||
PAD_NC(GPP_E11, NONE),
|
||||
/* GPP_E12: THC0_SPI1_IO_0_I2C4_SCL_TCH_PNL1 NF1: THC I2C0_SCL */
|
||||
PAD_CFG_NF(GPP_E12, NONE, DEEP, NF8),
|
||||
/* GPP_E13: THC0_SPI1_IO_1_I2C4_SDA_TCH_PNL1 NF1: THC I2C0 SDA */
|
||||
PAD_CFG_NF(GPP_E13, NONE, DEEP, NF8),
|
||||
/* GPP_E14: THC0_SPI1_IO_2_TCH_PNL1 */
|
||||
PAD_NC(GPP_E14, NONE),
|
||||
/* GPP_E15: THC0_SPI1_IO_3_TCH_PNL1 */
|
||||
PAD_NC(GPP_E15, NONE),
|
||||
/* GPP_E16: THC0_SPI1_RST_N_TCH_PNL1 */
|
||||
PAD_CFG_GPO(GPP_E16, 1, DEEP),
|
||||
/* GPP_E17: THC0_SPI1_CS0_N_TCH_PNL1 */
|
||||
PAD_NC(GPP_E17, NONE),
|
||||
/* GPP_E18: THC0_SPI1_INT_N_TCH_PNL1 */
|
||||
PAD_CFG_GPI_APIC(GPP_E18, NONE, PLTRST, LEVEL, NONE),
|
||||
/* GPP_VGPIO3_THC0: THC0_WOT */
|
||||
PAD_NC(GPP_VGPIO3_THC0, NONE),
|
||||
};
|
||||
|
||||
static const struct pad_config touchscreen_thc_i2c_enable_pads[] = {
|
||||
/* GPP_E11: THC0_SPI1_CLK_TCH_PNL1 */
|
||||
PAD_NC(GPP_E11, NONE),
|
||||
|
|
@ -572,6 +593,8 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
|
|||
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);
|
||||
} else if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_LPSS_I2C_ELAN_REX))) {
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_lpss_i2c_enable_pads);
|
||||
} else {
|
||||
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_disable_pads);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ fw_config
|
|||
option TOUCHSCREEN_NONE 0
|
||||
option TOUCHSCREEN_THC_SPI 1
|
||||
option TOUCHSCREEN_THC_I2C 2
|
||||
option TOUCHSCREEN_LPSS_I2C_ELAN_REX 3
|
||||
end
|
||||
field TOUCHPAD 9 10
|
||||
option TOUCHPAD_NONE 0
|
||||
|
|
@ -93,7 +94,7 @@ chip soc/intel/pantherlake
|
|||
[PchSerialIoIndexI2C1] = PchSerialIoPci,
|
||||
[PchSerialIoIndexI2C2] = PchSerialIoDisabled,
|
||||
[PchSerialIoIndexI2C3] = PchSerialIoPci,
|
||||
[PchSerialIoIndexI2C4] = PchSerialIoDisabled,
|
||||
[PchSerialIoIndexI2C4] = PchSerialIoPci,
|
||||
[PchSerialIoIndexI2C5] = PchSerialIoPci,
|
||||
}"
|
||||
|
||||
|
|
@ -109,6 +110,7 @@ chip soc/intel/pantherlake
|
|||
#+-------------------+---------------------------+
|
||||
#| I2C1 | TPM(cr50) |
|
||||
#| I2C3 | Audio |
|
||||
#| I2C4 | Touchscreen (LPSS) |
|
||||
#| I2C5 | Touchpad |
|
||||
#+-------------------+---------------------------+
|
||||
register "common_soc_config" = "{
|
||||
|
|
@ -123,6 +125,10 @@ chip soc/intel/pantherlake
|
|||
.speed = I2C_SPEED_FAST,
|
||||
.early_init = 1,
|
||||
},
|
||||
.i2c[4] = {
|
||||
.speed = I2C_SPEED_FAST,
|
||||
.early_init = 1,
|
||||
},
|
||||
.i2c[5] = {
|
||||
.speed = I2C_SPEED_FAST,
|
||||
},
|
||||
|
|
@ -553,6 +559,26 @@ chip soc/intel/pantherlake
|
|||
end
|
||||
end
|
||||
end #I2C3
|
||||
device ref i2c4 on
|
||||
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
|
||||
register "generic.hid" = ""HFW68H""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue