From: Peter Rosin <peda@axentia.se> To: linux-kernel@vger.kernel.org Cc: Peter Rosin <peda@axentia.se>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@free-electrons.com>, Russell King <linux@armlinux.org.uk>, Guenter Roeck <linux@roeck-us.net>, Jean Delvare <jdelvare@suse.com>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org Subject: [PATCH 0/2] Sluggish AT91 I2C driver causes SMBus timeouts Date: Fri, 13 Oct 2017 11:27:03 +0200 [thread overview] Message-ID: <20171013092705.7038-1-peda@axentia.se> (raw) Hi! This is a workaround for a problem in the AT91 I2C adapter driver (or perhaps the hardware?) when it drives the TWI peripheral on an Atmel sama5d3 chip as I2C. Apparently, that driver can delay in excess of 100 ms just after the transfer of the 7th bit of the last byte. When it does this the I2C bus, when viewed from SMBUS client devices, appears stuck with SCL low. Some SMBUS devices times out under these conditions, in particular temperature sensors. The I2C adapter driver does however not notice the timeout, and thinks the transfer completed successfully when it finally desides to finish the transaction. When this happens, the 8th bit of the last byte is always set, and thus quite possibly corrupted. The chip this was observed with (an nxp SE97) has a means to disable the SMBUS timeout detector, which "fixes" things. Do that. This should probably go to stable? Previous discussion: https://lkml.org/lkml/2017/10/12/227 Cheers, Peter Peter Rosin (2): hwmon: (jc42) optionally try to disable the SMBUS timeout ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850 Documentation/devicetree/bindings/hwmon/jc42.txt | 4 ++++ arch/arm/boot/dts/at91-tse850-3.dts | 1 + drivers/hwmon/jc42.c | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+) -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
From: peda@axentia.se (Peter Rosin) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/2] Sluggish AT91 I2C driver causes SMBus timeouts Date: Fri, 13 Oct 2017 11:27:03 +0200 [thread overview] Message-ID: <20171013092705.7038-1-peda@axentia.se> (raw) Hi! This is a workaround for a problem in the AT91 I2C adapter driver (or perhaps the hardware?) when it drives the TWI peripheral on an Atmel sama5d3 chip as I2C. Apparently, that driver can delay in excess of 100 ms just after the transfer of the 7th bit of the last byte. When it does this the I2C bus, when viewed from SMBUS client devices, appears stuck with SCL low. Some SMBUS devices times out under these conditions, in particular temperature sensors. The I2C adapter driver does however not notice the timeout, and thinks the transfer completed successfully when it finally desides to finish the transaction. When this happens, the 8th bit of the last byte is always set, and thus quite possibly corrupted. The chip this was observed with (an nxp SE97) has a means to disable the SMBUS timeout detector, which "fixes" things. Do that. This should probably go to stable? Previous discussion: https://lkml.org/lkml/2017/10/12/227 Cheers, Peter Peter Rosin (2): hwmon: (jc42) optionally try to disable the SMBUS timeout ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850 Documentation/devicetree/bindings/hwmon/jc42.txt | 4 ++++ arch/arm/boot/dts/at91-tse850-3.dts | 1 + drivers/hwmon/jc42.c | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+) -- 2.11.0
next reply other threads:[~2017-10-13 9:27 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-10-13 9:27 Peter Rosin [this message] 2017-10-13 9:27 ` [PATCH 0/2] Sluggish AT91 I2C driver causes SMBus timeouts Peter Rosin 2017-10-13 9:27 ` [PATCH 1/2] hwmon: (jc42) optionally try to disable the SMBUS timeout Peter Rosin 2017-10-13 9:27 ` Peter Rosin 2017-10-13 9:27 ` Peter Rosin 2017-10-13 12:51 ` Guenter Roeck 2017-10-13 12:51 ` Guenter Roeck 2017-10-13 13:50 ` Guenter Roeck 2017-10-13 13:50 ` Guenter Roeck 2017-10-13 14:26 ` Peter Rosin 2017-10-13 14:26 ` Peter Rosin 2017-10-13 20:35 ` Guenter Roeck 2017-10-13 20:35 ` Guenter Roeck 2017-10-13 23:44 ` Guenter Roeck 2017-10-13 23:44 ` Guenter Roeck 2017-10-17 22:16 ` Rob Herring 2017-10-17 22:16 ` Rob Herring 2017-10-18 2:38 ` Guenter Roeck 2017-10-18 2:38 ` Guenter Roeck 2017-10-26 6:44 ` Peter Rosin 2017-10-26 6:44 ` Peter Rosin 2017-10-26 6:44 ` Peter Rosin 2017-10-26 13:45 ` Guenter Roeck 2017-10-26 13:45 ` Guenter Roeck 2017-10-26 13:45 ` Guenter Roeck 2017-10-13 9:27 ` [PATCH 2/2] ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850 Peter Rosin 2017-10-13 9:27 ` [PATCH 2/2] ARM: dts: at91: disable the nxp, se97b " Peter Rosin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20171013092705.7038-1-peda@axentia.se \ --to=peda@axentia.se \ --cc=alexandre.belloni@free-electrons.com \ --cc=devicetree@vger.kernel.org \ --cc=jdelvare@suse.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-hwmon@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=linux@roeck-us.net \ --cc=mark.rutland@arm.com \ --cc=nicolas.ferre@microchip.com \ --cc=robh+dt@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.