[PATCH 1/4] i2c: designware_i2c: Fix IC_CON register setting for high speed mode

Jun Chen ptchentw at gmail.com
Mon Mar 2 09:58:54 CET 2020


From: Jun Chen <jun.chen at vatics.com>

IC_CON[2:1] should be 3 for high speed mode

Signed-off-by: Jun Chen <ptchentw at gmail.com>
Signed-off-by: Jun Chen <jun.chen at vatics.com>
---

 drivers/i2c/designware_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index 0b5e70a..9186fcb 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -274,7 +274,7 @@ static int _dw_i2c_set_bus_speed(struct dw_i2c *priv, struct i2c_regs *i2c_base,
 
 	switch (config.speed_mode) {
 	case IC_SPEED_MODE_HIGH:
-		cntl |= IC_CON_SPD_SS;
+		cntl |= IC_CON_SPD_HS;
 		writel(config.scl_hcnt, &i2c_base->ic_hs_scl_hcnt);
 		writel(config.scl_lcnt, &i2c_base->ic_hs_scl_lcnt);
 		break;
-- 
1.9.1



More information about the U-Boot mailing list