[PATCH] i2c: bcm2835: Set clock-stretch timeout to 35ms

Wolfram Sang wsa at kernel.org
Fri Jan 28 02:37:31 PST 2022


Hi Ivan,

> The BCM2835 I2C blocks have a register to set the clock-stretch
> timeout - how long the device is allowed to hold SCL low - in bus
> cycles. The current driver doesn't write to the register, therefore
> the default value of 64 cycles is being used for all devices.
> 
> Set the timeout to the value recommended for SMBus - 35ms.

By default, busses are I2C and not SMBus, so it looks like we should
finally apply this patch which disables CLKT:

http://patchwork.ozlabs.org/project/linux-i2c/patch/1519422151-6218-1-git-send-email-stefan.wahren@i2se.com/

If you really want the SMBus timeout applied, you can check for a
"smbus" property in DT and then set CLKT accordingly in a seperate
patch.

Kind regards,

   Wolfram

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220128/229710c6/attachment.sig>


More information about the linux-arm-kernel mailing list