From 72cfaf05bf3442477aa2ee5b4835340a30281cde Mon Sep 17 00:00:00 2001 From: Alex1 Kao Date: Fri, 16 Jul 2021 19:00:10 +0800 Subject: mb/google/dedede/var/pirika: Configure I2C times to 380-400 kHz for touchpad Configure I2C high / low time in the device tree to ensure I2C CLK runs accurately between 380 kHz and 400 kHz. Audio codec:388.91 kHz Touchpad:394.48 kHz BUG=b:193864546 BRANCH=dedede TEST=Build and check after tuning I2C clock is between 380 kHz and 400 kHz Signed-off-by: Alex1 Kao Change-Id: Ia57c90ead44ceb0990878dc0566e595bae5a9099 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56383 Reviewed-by: Kirk Wang Reviewed-by: Karthik Ramasubramanian Tested-by: build bot (Jenkins) --- .../google/dedede/variants/pirika/overridetree.cb | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mainboard/google/dedede/variants/pirika/overridetree.cb b/src/mainboard/google/dedede/variants/pirika/overridetree.cb index df3fead3d9..fbbea1deb2 100644 --- a/src/mainboard/google/dedede/variants/pirika/overridetree.cb +++ b/src/mainboard/google/dedede/variants/pirika/overridetree.cb @@ -9,9 +9,6 @@ chip soc/intel/jasperlake #| | for TPM communication | #| | before memory is up | #| I2C0 | Trackpad | - #| I2C1 | Digitizer | - #| I2C2 | Touchscreen | - #| I2C3 | Camera | #| I2C4 | Audio | #+-------------------+---------------------------+ register "common_soc_config" = "{ @@ -21,21 +18,24 @@ chip soc/intel/jasperlake }, .i2c[0] = { .speed = I2C_SPEED_FAST, - }, - .i2c[1] = { - .speed = I2C_SPEED_FAST, - }, - .i2c[2] = { - .speed = I2C_SPEED_FAST, - }, - .i2c[3] = { - .speed = I2C_SPEED_FAST, + .rise_time_ns = 260, + .fall_time_ns = 50, }, .i2c[4] = { .speed = I2C_SPEED_FAST, + .rise_time_ns = 260, + .fall_time_ns = 50, }, }" + register "SerialIoI2cMode" = "{ + [PchSerialIoIndexI2C0] = PchSerialIoPci, + [PchSerialIoIndexI2C1] = PchSerialIoDisabled, + [PchSerialIoIndexI2C2] = PchSerialIoDisabled, + [PchSerialIoIndexI2C3] = PchSerialIoDisabled, + [PchSerialIoIndexI2C4] = PchSerialIoPci, + }" + # USB Port Configuration register "usb2_ports[2]" = "{ .enable = 1, -- cgit v1.2.3