summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorShelley Chen <shchen@google.com>2018-12-17 13:12:54 -0800
committerPatrick Georgi <pgeorgi@google.com>2018-12-22 12:14:39 +0000
commit09e7b998379225fb0b79e5fd2fb5ba9b95bd6961 (patch)
tree67de3f74639ae063794810c5e6860b435a53f7e5 /src/mainboard
parent6bb563f29c5620746411e4766ac03113ec8b8280 (diff)
mb/google/hatch: Enable Elan Trackpad
BUG=b:120914069 BRANCH=None TEST=USE="-intel_mrc" emerge-hatch coreboot Change-Id: I91db5745d1db16ab4b2fbb7f8c415bd7c1eb29e9 Signed-off-by: Shelley Chen <shchen@google.com> Reviewed-on: https://review.coreboot.org/c/30227 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/hatch/variants/baseboard/devicetree.cb13
-rw-r--r--src/mainboard/google/hatch/variants/baseboard/gpio.c6
2 files changed, 18 insertions, 1 deletions
diff --git a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb
index 4fe0c4cd70..f08e2f9b34 100644
--- a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb
+++ b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb
@@ -18,12 +18,16 @@ chip soc/intel/cannonlake
#| | required to set up a BAR |
#| | for TPM communication |
#| | before memory is up |
+ #| I2C0 | Touchpad |
#+-------------------+---------------------------+
register "common_soc_config" = "{
.gspi[0] = {
.speed_mhz = 1,
.early_init = 1,
},
+ .i2c[0] = {
+ .speed = I2C_SPEED_FAST,
+ },
}"
device domain 0 on
@@ -36,7 +40,14 @@ chip soc/intel/cannonlake
device pci 14.0 off end # USB xHCI
device pci 14.1 off end # USB xDCI (OTG)
device pci 14.5 off end # SDCard
- device pci 15.0 off end # I2C #0
+ device pci 15.0 on
+ chip drivers/i2c/generic
+ register "hid" = ""ELAN0000""
+ register "desc" = ""ELAN Touchpad""
+ register "irq" = "ACPI_IRQ_EDGE_LOW(GPP_A21_IRQ)"
+ device i2c 15 on end
+ end
+ end # I2C #0
device pci 15.1 off end # I2C #1
device pci 15.2 off end # I2C #2
device pci 15.3 off end # I2C #3
diff --git a/src/mainboard/google/hatch/variants/baseboard/gpio.c b/src/mainboard/google/hatch/variants/baseboard/gpio.c
index 69a0f3781b..d215b099e9 100644
--- a/src/mainboard/google/hatch/variants/baseboard/gpio.c
+++ b/src/mainboard/google/hatch/variants/baseboard/gpio.c
@@ -19,6 +19,8 @@
#include <commonlib/helpers.h>
static const struct pad_config gpio_table[] = {
+ /* TRACKPAD_INT_ODL */
+ PAD_CFG_GPI_APIC(GPP_A21, NONE, PLTRST, LEVEL, INVERT),
/* H1_SLAVE_SPI_CS_L */
PAD_CFG_NF(GPP_B15, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_CLK */
@@ -27,6 +29,10 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_NF(GPP_B17, NONE, DEEP, NF1),
/* H1_SLAVE_SPI_MOSI_R */
PAD_CFG_NF(GPP_B18, NONE, DEEP, NF1),
+ /* PCH_I2C_TRACKPAD_SDA */
+ PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1),
+ /* PCH_I2C_TRACKPAD_SCL */
+ PAD_CFG_NF(GPP_C17, NONE, DEEP, NF1),
/* H1_PCH_INT_ODL */
PAD_CFG_GPI_APIC(GPP_C21, NONE, DEEP, LEVEL, INVERT),
/* PCH_WP_OD */