]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: mxs: Fix TIMING2 register value
authorMarek Vasut <marex@denx.de>
Mon, 12 Nov 2012 14:34:31 +0000 (14:34 +0000)
committerTom Rini <trini@ti.com>
Tue, 11 Dec 2012 20:17:30 +0000 (13:17 -0700)
According to FSL, the value in the TIMING2 register shall be 0x00300030
instead of what's written in the datasheet. This new value correlates
with older STMP36xx datasheet. Issues were detected in Linux when this
register was misconfigured, so write this correct value.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
drivers/i2c/mxs_i2c.c

index 3771452b9f1a7cfc5a4e42d67eb21755820b3dc0..006fb919f41cbd8aa2d21ab7b5fb372659d5ad83 100644 (file)
@@ -267,8 +267,8 @@ int i2c_set_bus_speed(unsigned int speed)
        writel(spd->timing0, &i2c_regs->hw_i2c_timing0);
        writel(spd->timing1, &i2c_regs->hw_i2c_timing1);
 
-       writel((0x0015 << I2C_TIMING2_BUS_FREE_OFFSET) |
-               (0x000d << I2C_TIMING2_LEADIN_COUNT_OFFSET),
+       writel((0x0030 << I2C_TIMING2_BUS_FREE_OFFSET) |
+               (0x0030 << I2C_TIMING2_LEADIN_COUNT_OFFSET),
                &i2c_regs->hw_i2c_timing2);
 
        return 0;