public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: mv64xxx: Apply errata delay only in standard mode
@ 2018-03-14 17:03 Gregory CLEMENT
  2018-03-17 20:20 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Gregory CLEMENT @ 2018-03-14 17:03 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c
  Cc: Andrew Lunn, Jason Cooper, Antoine Tenart, Gregory CLEMENT,
	Thomas Petazzoni, Miquèl Raynal, linux-arm-kernel,
	Sebastian Hesselbarth

The errata FE-8471889 description has been updated. There is still a
timing violation for repeated start. But the errata now states that it
was only the case for the Standard mode (100 kHz), in Fast mode (400 kHz)
there is no issue.

This patch limit the errata fix to the Standard mode.

It has been tesed successfully on the clearfog (Aramda 388 based board).

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
---
 drivers/i2c/busses/i2c-mv64xxx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 440fe4a96e68..a5a95ea5b81a 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -845,12 +845,16 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
 	 */
 	if (of_device_is_compatible(np, "marvell,mv78230-i2c")) {
 		drv_data->offload_enabled = true;
-		drv_data->errata_delay = true;
+		/* The delay is only needed in standard mode (100kHz) */
+		if (bus_freq <= 100000)
+			drv_data->errata_delay = true;
 	}
 
 	if (of_device_is_compatible(np, "marvell,mv78230-a0-i2c")) {
 		drv_data->offload_enabled = false;
-		drv_data->errata_delay = true;
+		/* The delay is only needed in standard mode (100kHz) */
+		if (bus_freq <= 100000)
+			drv_data->errata_delay = true;
 	}
 
 	if (of_device_is_compatible(np, "allwinner,sun6i-a31-i2c"))
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: mv64xxx: Apply errata delay only in standard mode
  2018-03-14 17:03 [PATCH] i2c: mv64xxx: Apply errata delay only in standard mode Gregory CLEMENT
@ 2018-03-17 20:20 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2018-03-17 20:20 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Andrew Lunn, Jason Cooper, Antoine Tenart, linux-i2c,
	Thomas Petazzoni, Miquèl Raynal, linux-arm-kernel,
	Sebastian Hesselbarth


[-- Attachment #1.1: Type: text/plain, Size: 554 bytes --]

On Wed, Mar 14, 2018 at 06:03:40PM +0100, Gregory CLEMENT wrote:
> The errata FE-8471889 description has been updated. There is still a
> timing violation for repeated start. But the errata now states that it
> was only the case for the Standard mode (100 kHz), in Fast mode (400 kHz)
> there is no issue.
> 
> This patch limit the errata fix to the Standard mode.
> 
> It has been tesed successfully on the clearfog (Aramda 388 based board).
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>

Applied to for-next, thanks!


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-17 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-14 17:03 [PATCH] i2c: mv64xxx: Apply errata delay only in standard mode Gregory CLEMENT
2018-03-17 20:20 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox