summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZanxi Chen <chenzanxi@huaqin.corp-partner.google.com>2021-05-21 22:29:16 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-05-28 18:21:19 +0000
commitdfaab1b3b6ec4ae0fb65456cb66919ac135f0ba1 (patch)
treeffa249b0433316b212083c06e8dc1bcc0fdd62eb
parentf3819bdf2e5f4ed9ca1572f6742683dad78f0e04 (diff)
mb/google/dedede: Update Storo setting for PEN detection.
Update devicetree and gpio driving of storo that enable stylus Updates the GPIO configuration for GPP_C12 to PAD_CFG_GPI_GPIO_DRIVER and device tree entry for PENH device to use WAKEUP_ROUTE_GPIO_IRQ. BUG=b:188519508,b:188365033 BRANCH=dedede TEST=build bios and the pen behavior can be detected. Change-Id: I2ffc969569b3ca29ba76326140f958a9707199f7 Signed-off-by: Zanxi Chen <chenzanxi@huaqin.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54762 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/mainboard/google/dedede/variants/storo/gpio.c3
-rw-r--r--src/mainboard/google/dedede/variants/storo/overridetree.cb13
2 files changed, 15 insertions, 1 deletions
diff --git a/src/mainboard/google/dedede/variants/storo/gpio.c b/src/mainboard/google/dedede/variants/storo/gpio.c
index 71e78dc811..3d830e7e55 100644
--- a/src/mainboard/google/dedede/variants/storo/gpio.c
+++ b/src/mainboard/google/dedede/variants/storo/gpio.c
@@ -11,6 +11,9 @@ static const struct pad_config gpio_table[] = {
/* B7 : PCIE_CLKREQ2_N ==> WWAN_SAR_DETECT_ODL*/
PAD_CFG_GPI_IRQ_WAKE(GPP_B7, NONE, DEEP, LEVEL, INVERT),
+ /* C12 : AP_PEN_DET_ODL */
+ PAD_CFG_GPI_GPIO_DRIVER(GPP_C12, UP_20K, DEEP),
+
/* D15 : EN_PP3300_CAMERA */
PAD_CFG_GPO(GPP_D15, 1, PLTRST),
/* D22 : AP_I2C_SUB_SDA*/
diff --git a/src/mainboard/google/dedede/variants/storo/overridetree.cb b/src/mainboard/google/dedede/variants/storo/overridetree.cb
index 14eed3d54f..40b17df816 100644
--- a/src/mainboard/google/dedede/variants/storo/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/storo/overridetree.cb
@@ -13,7 +13,7 @@ chip soc/intel/jasperlake
#| | for TPM communication |
#| | before memory is up |
#| I2C0 | Trackpad |
- #| I2C1 | Digitizer |
+ #| I2C1 | Digitizer, Stylus |
#| I2C2 | Touchscreen |
#| I2C3 | Camera |
#| I2C4 | Audio |
@@ -119,6 +119,17 @@ chip soc/intel/jasperlake
end
end #I2C 0
device pci 15.2 on
+ chip drivers/generic/gpio_keys
+ register "name" = ""PENH""
+ register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPP_C12)"
+ register "key.wakeup_route" = "WAKEUP_ROUTE_GPIO_IRQ"
+ 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" = ""ELAN9008""
register "generic.desc" = ""ELAN Touchscreen""