mxs: i2c: Implement algorithm to set up arbitrary i2c speed
authorMarek Vasut <marex@denx.de>
Fri, 30 Nov 2012 18:17:07 +0000 (18:17 +0000)
committerTom Rini <trini@ti.com>
Tue, 11 Dec 2012 20:17:30 +0000 (13:17 -0700)
commitfa5e2845a867a3715240ff221aaec2825b5c73df
tree84fb219f6965ce523fd429324785c3c60c142d72
parent1e2fc0d19bac9bf4f62d259169e902e700a18bad
mxs: i2c: Implement algorithm to set up arbitrary i2c speed

This algorithm computes the values of TIMING{0,1,2} registers for the
MX28 I2C block. This algorithm was derived by using a scope, but the
result seems correct.

The resulting values programmed into the registers do not correlate
with the contents in datasheet. When using the values from the datasheet,
the I2C clock were completely wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
arch/arm/cpu/arm926ejs/mxs/clock.c
arch/arm/include/asm/arch-mxs/clock.h
drivers/i2c/mxs_i2c.c