[coreboot-gerrit] Change in coreboot[master]: mainboard/google/kahlee: Add i2c init to bootblock

Chris Ching (Code Review) gerrit at coreboot.org
Thu Jan 18 23:34:32 CET 2018


Chris Ching has uploaded this change for review. ( https://review.coreboot.org/23322


Change subject: mainboard/google/kahlee: Add i2c init to bootblock
......................................................................

mainboard/google/kahlee: Add i2c init to bootblock

BUG=b:69416132
BRANCH=none
TEST=run on grunt, see traffic over i2c lines

Change-Id: I7ceaf94c9605ef675b865cbc3bd53d2041f36e81
---
M src/mainboard/google/kahlee/bootblock/bootblock.c
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/23322/1

diff --git a/src/mainboard/google/kahlee/bootblock/bootblock.c b/src/mainboard/google/kahlee/bootblock/bootblock.c
index 90c8acb..2261bd0 100644
--- a/src/mainboard/google/kahlee/bootblock/bootblock.c
+++ b/src/mainboard/google/kahlee/bootblock/bootblock.c
@@ -16,12 +16,23 @@
 #include <bootblock_common.h>
 #include <soc/southbridge.h>
 #include <variant/ec.h>
+#include <drivers/i2c/designware/dw_i2c.h>
 
 void bootblock_mainboard_init(void)
 {
 	/* Enable the EC as soon as we have visibility */
 	mainboard_ec_init();
 
+	/* enable i2c before TPM */
+	struct dw_i2c_bus_config bcfg = {
+		.early_init=0,
+		.speed=I2C_SPEED_FAST,
+		.rise_time_ns=190,
+		.fall_time_ns=34,
+	};
+
+	dw_i2c_init(1, &bcfg);
+
 	/* Setup TPM decode before verstage */
 	sb_tpm_decode_spi();
 }

-- 
To view, visit https://review.coreboot.org/23322
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ceaf94c9605ef675b865cbc3bd53d2041f36e81
Gerrit-Change-Number: 23322
Gerrit-PatchSet: 1
Gerrit-Owner: Chris Ching <chingcodes at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180118/4ab15476/attachment.html>


More information about the coreboot-gerrit mailing list