From e204690227be00c68134fbedafc2e43581c7128f Mon Sep 17 00:00:00 2001 From: Ian Feng Date: Tue, 12 Apr 2022 15:06:25 +0800 Subject: mb/google/skyrim: Add Goodix touchscreen Add Goodix touchscreen according to the Programming Guide Rev.0.7 BUG=b:228907558 TEST=local build and tested with Goodix touch screen Change-Id: I35dd3ca76e9e0f17508bef46c90b53b4be5d0033 Signed-off-by: Ian Feng Reviewed-on: https://review.coreboot.org/c/coreboot/+/63573 Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) --- src/mainboard/google/skyrim/variants/baseboard/gpio.c | 8 ++++---- .../google/skyrim/variants/skyrim/overridetree.cb | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/google/skyrim/variants/baseboard/gpio.c b/src/mainboard/google/skyrim/variants/baseboard/gpio.c index a262347fdc..6ff29064ad 100644 --- a/src/mainboard/google/skyrim/variants/baseboard/gpio.c +++ b/src/mainboard/google/skyrim/variants/baseboard/gpio.c @@ -58,8 +58,8 @@ static const struct soc_amd_gpio base_gpio_table[] = { /* SD_AUX_RESET_L */ PAD_GPO(GPIO_27, HIGH), /* GPIO_28: Not available */ - /* EN_PP3300_TCHSCR */ - PAD_GPO(GPIO_29, HIGH), + /* TCHSCR_INT_ODL */ + PAD_GPI(GPIO_29, PULL_NONE), /* ESPI_CS_L */ PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE), /* Unused */ @@ -113,8 +113,8 @@ static const struct soc_amd_gpio base_gpio_table[] = { PAD_NF(GPIO_116, CLK_REQ2_L, PULL_NONE), /* SOC_FPMCU_BOOT0 */ PAD_GPO(GPIO_130, LOW), - /* TCHSCR_INT_ODL */ - PAD_GPI(GPIO_131, PULL_NONE), + /* EN_PP3300_TCHSCR */ + PAD_GPO(GPIO_131, LOW), /* TCHSCR_RESET_L */ PAD_GPO(GPIO_136, LOW), /* SOC_BIOS_WP_L */ diff --git a/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb b/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb index 0b965eb5f7..02b8c1c7ba 100644 --- a/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb +++ b/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb @@ -66,4 +66,23 @@ chip soc/amd/sabrina device i2c 15 on end end end # I2C0 + device ref i2c_1 on + chip drivers/i2c/hid + register "generic.hid" = ""GDIX0000"" + register "generic.desc" = ""Goodix Touchscreen"" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_29)" + register "generic.probed" = "1" + register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_131)" + register "generic.enable_delay_ms" = "10" + register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_136)" + register "generic.reset_off_delay_ms" = "1" + register "generic.reset_delay_ms" = "10" + register "generic.stop_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_76)" + register "generic.stop_delay_ms" = "180" + register "generic.stop_off_delay_ms" = "1" + register "generic.has_power_resource" = "1" + register "hid_desc_reg_offset" = "0x01" + device i2c 5d on end + end + end # I2C1 end # chip soc/amd/sabrina -- cgit v1.2.3