Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45807 )
Change subject: mb/google/dedede: add PEN for Boten ......................................................................
mb/google/dedede: add PEN for Boten
Update devicetree of boten that enable stylus
BUG=b:160752604 BRANCH=NONE TEST=build bios and verify function for boten
Signed-off-by: alec.wang alec.wang@lcfc.corp-partner.google.com Change-Id: Ifbcac18fcf758f3d870a6af0d1b03e34369414c0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45807 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Marco Chen marcochen@google.com Reviewed-by: Jamie Chen jamie.chen@intel.com Reviewed-by: Karthik Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/Kconfig M src/mainboard/google/dedede/variants/boten/gpio.c M src/mainboard/google/dedede/variants/boten/overridetree.cb 3 files changed, 16 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Marco Chen: Looks good to me, approved Karthik Ramasubramanian: Looks good to me, approved Jamie Chen: Looks good to me, but someone else must approve
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig index 377702d..597516c 100644 --- a/src/mainboard/google/dedede/Kconfig +++ b/src/mainboard/google/dedede/Kconfig @@ -3,6 +3,7 @@ select BOARD_ROMSIZE_KB_16384 if !BOARD_ROMSIZE_KB_32768 select CR50_USE_LONG_INTERRUPT_PULSES select DPTF_USE_EISA_HID + select DRIVERS_GENERIC_GPIO_KEYS select DRIVERS_I2C_GENERIC select DRIVERS_I2C_GPIO_MUX select DRIVERS_I2C_HID diff --git a/src/mainboard/google/dedede/variants/boten/gpio.c b/src/mainboard/google/dedede/variants/boten/gpio.c index 05a567f..f889c7f 100644 --- a/src/mainboard/google/dedede/variants/boten/gpio.c +++ b/src/mainboard/google/dedede/variants/boten/gpio.c @@ -7,6 +7,8 @@
/* Pad configuration in ramstage*/ static const struct pad_config gpio_table[] = { + /* C12 : AP_PEN_DET_ODL */ + PAD_CFG_GPI_SCI(GPP_C12, NONE, DEEP, EDGE_SINGLE, NONE), /* C18 : AP_I2C_EMR_SDA */ PAD_NC(GPP_C18, NONE), /* C19 : AP_I2C_EMR_SCL */ diff --git a/src/mainboard/google/dedede/variants/boten/overridetree.cb b/src/mainboard/google/dedede/variants/boten/overridetree.cb index 2ba6d9d..fa6cf22 100644 --- a/src/mainboard/google/dedede/variants/boten/overridetree.cb +++ b/src/mainboard/google/dedede/variants/boten/overridetree.cb @@ -10,7 +10,7 @@ #| | before memory is up | #| I2C0 | Trackpad | #| I2C1 | Digitizer | - #| I2C2 | Touchscreen | + #| I2C2 | Touchscreen, Stylus | #| I2C4 | Audio | #+-------------------+---------------------------+ register "common_soc_config" = "{ @@ -107,6 +107,18 @@ end end # I2C 0 device pci 15.2 on + chip drivers/generic/gpio_keys + register "name" = ""PENH"" + register "gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_C12)" + register "key.wake_gpe" = "GPE0_DW1_12" + register "key.wakeup_route" = "WAKEUP_ROUTE_SCI" + register "key.wakeup_event_action" = "EV_ACT_DEASSERTED" + register "key.dev_name" = ""EJCT"" + register "key.linux_code" = "SW_PEN_INSERTED" + register "key.linux_input_type" = "EV_SW" + register "key.label" = ""pen_eject"" + device generic 0 on end + end chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" register "generic.desc" = ""Goodix Touchscreen""