i2c: davinci: Increase module clock frequency
authorAlexander Sverdlin <alexander.sverdlin@nokia.com>
Mon, 30 Nov 2015 14:51:00 +0000 (15:51 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 30 Nov 2015 14:55:07 +0000 (15:55 +0100)
commit87cb5b425fa32094972868b50e65083c586509a3
treee35e86770755cdd62ba403d90a62923f6d74492e
parentbba61f50f76574ca5b84b310925be7c2e8e64275
i2c: davinci: Increase module clock frequency

I2C controller used in Keystone SoC has an undocumented peculiarity which
results in SDA-SCL margins being dependent on module clock. Driving high
capacity bus near its limits can result in STOP condition sometimes being
understood as REPEATED-START by slaves (or NACK instead of ACK, etc...).
Driving the module with higher clocks increases the margin between SDA and SCL
transitions, making the operations with higher bus rates more robust. Therefore,
target the module clock to 12MHz instead of 7MHz, still staying within
the specification limits.

Before the change STOP timing looked like this on 400kHz:

SDA   ----------+          +----
                 \        /
                  \      /
                   +----+
                       (1)
SCL   --+          +------------
         \        /
          \      /
           +----+
               (2)

While only point (1) signals STOP, point (2) could be incorrectly recognized as
repeated-START (almost no margin between SDA and SCL transitions).

After the change there is at least 600ns margin measured between SCL fall and
SDA fall during STOP generation:

SDA   ------+          +----
             \        /
              \      /
               +----+

SCL   --+          +--------
         \        /
          \      /
           +----+
           ->|    |<- 600ns
                ->|   |<- tSUSTO

So called tSUSTO (setup time for STOP condition) is still slightly higher than
600ns, so no problem here.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-davinci.c
This page took 0.028689 seconds and 5 git commands to generate.