From 092ef11a12af222cd9816f86a36fa310e2c89a7c Mon Sep 17 00:00:00 2001 From: Dtrain Hsu Date: Thu, 30 Jul 2020 10:43:07 +0800 Subject: mb/google/dedede/var/madoo: Support Elan touchpad and configure I2C ports 1. Add Elan touchpad support. 2. Follow schematic to disable I2C1 and I2C3. BUG=b:160869188,b:161407664 BRANCH=NONE TEST=emerge-dedede coreboot chromeos-bootimage", build successful Signed-off-by: Dtrain Hsu Change-Id: I154a1ff2597968d200d1d0693718f90cd2744616 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44052 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian Reviewed-by: EricR Lai Reviewed-by: Justin TerAvest --- src/mainboard/google/dedede/variants/madoo/gpio.c | 4 ++++ .../google/dedede/variants/madoo/overridetree.cb | 27 ++++++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/mainboard/google/dedede/variants/madoo/gpio.c b/src/mainboard/google/dedede/variants/madoo/gpio.c index f9f8ea2bcc..314d39eb06 100644 --- a/src/mainboard/google/dedede/variants/madoo/gpio.c +++ b/src/mainboard/google/dedede/variants/madoo/gpio.c @@ -5,6 +5,10 @@ /* Pad configuration in ramstage */ static const struct pad_config override_gpio_table[] = { + /* C18 : AP_I2C_EMR_SDA */ + PAD_NC(GPP_C18, NONE), + /* C19 : AP_I2C_EMR_SCL */ + PAD_NC(GPP_C19, NONE), /* D12 : WCAM_RST_L */ PAD_NC(GPP_D12, NONE), /* D13 : EN_PP2800_CAMERA */ diff --git a/src/mainboard/google/dedede/variants/madoo/overridetree.cb b/src/mainboard/google/dedede/variants/madoo/overridetree.cb index f8e2b06674..3f9992795c 100644 --- a/src/mainboard/google/dedede/variants/madoo/overridetree.cb +++ b/src/mainboard/google/dedede/variants/madoo/overridetree.cb @@ -6,6 +6,15 @@ chip soc/intel/jasperlake register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # Camera register "usb3_ports[2]" = "USB3_PORT_EMPTY" # Not Used + register "SerialIoI2cMode" = "{ + [PchSerialIoIndexI2C0] = PchSerialIoPci, + [PchSerialIoIndexI2C1] = PchSerialIoDisabled, + [PchSerialIoIndexI2C2] = PchSerialIoPci, + [PchSerialIoIndexI2C3] = PchSerialIoDisabled, + [PchSerialIoIndexI2C4] = PchSerialIoPci, + [PchSerialIoIndexI2C5] = PchSerialIoDisabled, + }" + # Intel Common SoC Config #+-------------------+---------------------------+ #| Field | Value | @@ -15,7 +24,7 @@ chip soc/intel/jasperlake #| | for TPM communication | #| | before memory is up | #| I2C0 | Trackpad | - #| I2C1 | Digitizer | + #| I2C1 | | #| I2C2 | Touchscreen | #| I2C3 | | #| I2C4 | Audio | @@ -28,9 +37,6 @@ chip soc/intel/jasperlake .i2c[0] = { .speed = I2C_SPEED_FAST, }, - .i2c[1] = { - .speed = I2C_SPEED_FAST, - }, .i2c[2] = { .speed = I2C_SPEED_FAST, }, @@ -56,7 +62,17 @@ chip soc/intel/jasperlake end end end # USB xHCI - device pci 15.0 on end + device pci 15.0 on + chip drivers/i2c/generic + register "hid" = ""ELAN0000"" + register "desc" = ""ELAN Touchpad"" + register "irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_B3_IRQ)" + register "wake" = "GPE0_DW0_03" + register "probed" = "1" + device i2c 15 on end + end + end #I2C 0 + device pci 15.1 off end # I2C 1 device pci 15.2 on chip drivers/i2c/hid register "generic.hid" = ""GDIX0000"" @@ -74,6 +90,7 @@ chip soc/intel/jasperlake device i2c 0x5d on end end end # I2C 2 + device pci 15.3 off end # I2C 3 device pci 1c.7 on end device pci 19.0 on chip drivers/i2c/generic -- cgit v1.2.3