* [PATCH] i2c: i2c-au1550: relax bus timings a bit
@ 2015-09-08 6:56 Manuel Lauss
2015-10-20 15:44 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Manuel Lauss @ 2015-09-08 6:56 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Manuel Lauss
The i2c-au1550 driver has to program various setup and hold times
for the sda/scl signals by hand. The current values seem to be
working best when the driver is supplied with 50MHz, however on the
DB1300 board 48MHz is the closest we can get to it, and the timings
are a bit too tight for that, leading to the last bit of a transmission
sometimes being swallowed. This manifests itself in wrong readings
of the ne1619 sensor and inability to configure the wm8731 i2s codec.
With the relaxed timings, both the sensor and the i2s codec can now
be accessed more reliably over a wider range of I2C block input
frequencies.
Verified on DB1200, DB1300 and DB1550 boards.
Signed-off-by: Manuel Lauss <manuel.lauss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/i2c/busses/i2c-au1550.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index a6aae84..4de1107 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -284,10 +284,10 @@ static void i2c_au1550_setup(struct i2c_au1550_data *priv)
/* Set the protocol timer values. See Table 71 in the
* Au1550 Data Book for standard timing values.
*/
- WR(priv, PSC_SMBTMR, PSC_SMBTMR_SET_TH(0) | PSC_SMBTMR_SET_PS(15) | \
- PSC_SMBTMR_SET_PU(15) | PSC_SMBTMR_SET_SH(15) | \
- PSC_SMBTMR_SET_SU(15) | PSC_SMBTMR_SET_CL(15) | \
- PSC_SMBTMR_SET_CH(15));
+ WR(priv, PSC_SMBTMR, PSC_SMBTMR_SET_TH(0) | PSC_SMBTMR_SET_PS(20) | \
+ PSC_SMBTMR_SET_PU(20) | PSC_SMBTMR_SET_SH(20) | \
+ PSC_SMBTMR_SET_SU(20) | PSC_SMBTMR_SET_CL(20) | \
+ PSC_SMBTMR_SET_CH(20));
cfg |= PSC_SMBCFG_DE_ENABLE;
WR(priv, PSC_SMBCFG, cfg);
--
2.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: i2c-au1550: relax bus timings a bit
2015-09-08 6:56 [PATCH] i2c: i2c-au1550: relax bus timings a bit Manuel Lauss
@ 2015-10-20 15:44 ` Wolfram Sang
2015-10-20 17:54 ` Manuel Lauss
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2015-10-20 15:44 UTC (permalink / raw)
To: Manuel Lauss; +Cc: linux-i2c
[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]
On Tue, Sep 08, 2015 at 08:56:23AM +0200, Manuel Lauss wrote:
> The i2c-au1550 driver has to program various setup and hold times
> for the sda/scl signals by hand. The current values seem to be
> working best when the driver is supplied with 50MHz, however on the
> DB1300 board 48MHz is the closest we can get to it, and the timings
> are a bit too tight for that, leading to the last bit of a transmission
> sometimes being swallowed. This manifests itself in wrong readings
> of the ne1619 sensor and inability to configure the wm8731 i2s codec.
>
> With the relaxed timings, both the sensor and the i2s codec can now
> be accessed more reliably over a wider range of I2C block input
> frequencies.
>
> Verified on DB1200, DB1300 and DB1550 boards.
>
> Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Applied to for-next, thanks!
Since you have access to these platforms, there is a pending devm
conversion patchneeding some testing:
http://patchwork.ozlabs.org/patch/482140/
Are you maybe interested in checking that one?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: i2c-au1550: relax bus timings a bit
2015-10-20 15:44 ` Wolfram Sang
@ 2015-10-20 17:54 ` Manuel Lauss
0 siblings, 0 replies; 3+ messages in thread
From: Manuel Lauss @ 2015-10-20 17:54 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux-I2C
On Tue, Oct 20, 2015 at 5:44 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> Since you have access to these platforms, there is a pending devm
> conversion patchneeding some testing:
>
> http://patchwork.ozlabs.org/patch/482140/
>
> Are you maybe interested in checking that one?
Sure, I've run-tested it now on the DB1300 board, no problems.
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Thanks!
Manuel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-20 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-08 6:56 [PATCH] i2c: i2c-au1550: relax bus timings a bit Manuel Lauss
2015-10-20 15:44 ` Wolfram Sang
2015-10-20 17:54 ` Manuel Lauss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).