Skip to content

Commit 2d3c381

Browse files
gclementZhengShunQian
authored andcommitted
i2c: mv64xxx: Apply errata delay only in standard mode
[ Upstream commit 31184d8 ] 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: Wolfram Sang <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 89c74d6 commit 2d3c381

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/i2c/busses/i2c-mv64xxx.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,12 +856,16 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
856856
*/
857857
if (of_device_is_compatible(np, "marvell,mv78230-i2c")) {
858858
drv_data->offload_enabled = true;
859-
drv_data->errata_delay = true;
859+
/* The delay is only needed in standard mode (100kHz) */
860+
if (bus_freq <= 100000)
861+
drv_data->errata_delay = true;
860862
}
861863

862864
if (of_device_is_compatible(np, "marvell,mv78230-a0-i2c")) {
863865
drv_data->offload_enabled = false;
864-
drv_data->errata_delay = true;
866+
/* The delay is only needed in standard mode (100kHz) */
867+
if (bus_freq <= 100000)
868+
drv_data->errata_delay = true;
865869
}
866870

867871
if (of_device_is_compatible(np, "allwinner,sun6i-a31-i2c"))

0 commit comments

Comments
 (0)