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 <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63573
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/mainboard/google/skyrim/variants/baseboard/gpio.c b/src/mainboard/google/skyrim/variants/baseboard/gpio.c
index a262347..6ff2906 100644
--- a/src/mainboard/google/skyrim/variants/baseboard/gpio.c
+++ b/src/mainboard/google/skyrim/variants/baseboard/gpio.c
@@ -58,8 +58,8 @@
/* 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 @@
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 0b965eb5..02b8c1c 100644
--- a/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb
+++ b/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb
@@ -66,4 +66,23 @@
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