summaryrefslogtreecommitdiff
path: root/src/mainboard/google/dedede
diff options
context:
space:
mode:
authoralec.wang <alec.wang@lcfc.corp-partner.google.com>2020-09-29 11:10:28 +0800
committerPatrick Georgi <pgeorgi@google.com>2020-10-20 11:50:39 +0000
commit3704b6d4abda30756d765211ea534c3c4a7d4323 (patch)
tree44f4561586ece851a280deb362031f8f4fe6328d /src/mainboard/google/dedede
parentdbe8415245ebf31336b11c31cf8dcbb247e33384 (diff)
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>
Diffstat (limited to 'src/mainboard/google/dedede')
-rw-r--r--src/mainboard/google/dedede/Kconfig1
-rw-r--r--src/mainboard/google/dedede/variants/boten/gpio.c2
-rw-r--r--src/mainboard/google/dedede/variants/boten/overridetree.cb14
3 files changed, 16 insertions, 1 deletions
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig
index 377702da45..597516cd88 100644
--- a/src/mainboard/google/dedede/Kconfig
+++ b/src/mainboard/google/dedede/Kconfig
@@ -3,6 +3,7 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE
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 05a567f65c..f889c7fd69 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 2ba6d9d665..fa6cf226d7 100644
--- a/src/mainboard/google/dedede/variants/boten/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/boten/overridetree.cb
@@ -10,7 +10,7 @@ chip soc/intel/jasperlake
#| | before memory is up |
#| I2C0 | Trackpad |
#| I2C1 | Digitizer |
- #| I2C2 | Touchscreen |
+ #| I2C2 | Touchscreen, Stylus |
#| I2C4 | Audio |
#+-------------------+---------------------------+
register "common_soc_config" = "{
@@ -107,6 +107,18 @@ 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_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""