[coreboot-gerrit] Patch set updated for coreboot: Pyro: tune i2c frequency to 400kHz

Kevin Chiu (Kevin.Chiu@quantatw.com) gerrit at coreboot.org
Wed Nov 9 03:37:30 CET 2016


Kevin Chiu (Kevin.Chiu at quantatw.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17331

-gerrit

commit 8f4c19c9c985a141033f2ea904aec7c789bfb19d
Author: Kevin Chiu <Kevin.Chiu at quantatw.com>
Date:   Wed Nov 9 09:52:55 2016 +0800

    Pyro: tune i2c frequency to 400kHz
    
    tune i2c devices clk for pyro:
    I2C0: audio da7219
    I2C2: TPM H1
    I2C3: wacom touchscreen
    I2C4: elan touchpad
    
    BUG=chrome-os-partner:58112
    BRANCH=master
    TEST=emerge-pyro coreboot chromeos-bootimage
    signed-off-by: Kevin Chiu <Kevin.Chiu at quantatw.com>
    
    Change-Id: If3c92ed260277c27a94d2fcf7883e9441519e40e
---
 .../google/reef/variants/pyro/devicetree.cb        | 47 +++++++++++++++++++++-
 1 file changed, 45 insertions(+), 2 deletions(-)

diff --git a/src/mainboard/google/reef/variants/pyro/devicetree.cb b/src/mainboard/google/reef/variants/pyro/devicetree.cb
index a0ba584..88caaf3 100644
--- a/src/mainboard/google/reef/variants/pyro/devicetree.cb
+++ b/src/mainboard/google/reef/variants/pyro/devicetree.cb
@@ -66,8 +66,51 @@ chip soc/intel/apollolake
 	register "gpe0_dw2" = "PMC_GPE_N_63_32"
 	register "gpe0_dw3" = "PMC_GPE_SW_31_0"
 
-	# Enable I2C2 bus early for TPM access
-	register "i2c[2].early_init" = "1"
+	# Limit I2C0 Audio codec da7219 speed to 400kHz with manually tuned values.
+	register "i2c[0]" = "{
+		.speed = I2C_SPEED_FAST,
+		.speed_config[0] = {
+			.speed = I2C_SPEED_FAST,
+			.scl_lcnt = 0xd0,
+			.scl_hcnt = 0x68,
+			.sda_hold = 0x27,
+		}
+	}"
+
+	# Enable I2C2 bus early for TPM access and configure as 400kHz
+	# with manually tuned values.
+	register "i2c[2]" = "{
+		.early_init = 1,
+		.speed = I2C_SPEED_FAST,
+		.speed_config[0] = {
+			.speed = I2C_SPEED_FAST,
+			.scl_lcnt = 0xd0,
+			.scl_hcnt = 0x68,
+			.sda_hold = 0x27,
+		}
+	}"
+
+	# Limit I2C3 WACOM touchscreen speed to 400kHz with manually tuned values.
+	register "i2c[3]" = "{
+		.speed = I2C_SPEED_FAST,
+		.speed_config[0] = {
+			.speed = I2C_SPEED_FAST,
+			.scl_lcnt = 0xd0,
+			.scl_hcnt = 0x68,
+			.sda_hold = 0x27,
+		}
+	}"
+
+	# Limit trackpad speed to 400kHz with manually tuned values.
+	register "i2c[4]" = "{
+		.speed = I2C_SPEED_FAST,
+		.speed_config[0] = {
+			.speed = I2C_SPEED_FAST,
+			.scl_lcnt = 0xd0,
+			.scl_hcnt = 0x68,
+			.sda_hold = 0x27,
+		}
+	}"
 
 	# Minimum SLP S3 assertion width 28ms.
 	register "slp_s3_assertion_width_usecs" = "28000"



More information about the coreboot-gerrit mailing list