]> git.ipfire.org Git - people/ms/u-boot.git/commit
i2c: ti: Update method to calculate psc, sscl and ssch I2C parameters
authorLukasz Majewski <lukma@denx.de>
Wed, 15 Mar 2017 15:59:23 +0000 (16:59 +0100)
committerHeiko Schocher <hs@denx.de>
Tue, 28 Mar 2017 04:27:42 +0000 (06:27 +0200)
commitb52a3fa08b830006c1872517bdafe41160d9223d
tree2661d4aa3921276bcaedf87989e405670de439f7
parente530d2e15b0a28385d2cc34168e2bf395222b1ef
i2c: ti: Update method to calculate psc, sscl and ssch I2C parameters

This patch updates the way in which psc, sscl and ssch I2C parameters are
calculated to be in sync with v4.9 Linux kernel
SHA1: 69973b830859bc6529a7a0468ba0d80ee5117826
in the ./drivers/i2c/busses/i2c-omap.c

The previous method was causing several issues:
- The internal I2C frequency (after prescaler) was far above recommended
one (7 - 12 MHz [*]) - the current approach brings better noise suppression
(as stated in Linux commit: SHA1: 84bf2c868f3ca996e5bb)

- The values calculated (psc, sscl and ssch) were far from optimal, which
caused on the test platform (AM57xx) the I2C0 SCL signal low time (Fast
Mode) of ~1.0us (the standard requires > 1.3 us).

[*] for AM57xx TRM SPRUHZ6G, Table 24,7
"HS I2C Register Values for Maximum I2C Bit Rates in I2C F/S, I2C HS Modes"

Signed-off-by: Lukasz Majewski <lukma@denx.de>
drivers/i2c/omap24xx_i2c.c