From: Elad Nachman <enachman@marvell.com>
To: <gregory.clement@bootlin.com>, <andi.shyti@kernel.org>,
<linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <enachman@marvell.com>, <cyuval@marvell.com>
Subject: [PATCH v2 0/1] i2c: busses: i2c-mv64xxx: fix arb-loss i2c lock
Date: Thu, 7 Dec 2023 18:50:26 +0200 [thread overview]
Message-ID: <20231207165027.2628302-1-enachman@marvell.com> (raw)
From: Elad Nachman <enachman@marvell.com>
Some i2c slaves, mainly SFPs, might cause the bus to lose arbitration
while slave is in the middle of responding.
This means that the i2c slave has not finished the transmission, but
the master has already finished toggling the clock, probably due to
the slave missing some of the master's clocks.
This was seen with Ubiquity SFP module.
This is typically caused by slaves which do not adhere completely
to the i2c standard.
The solution is to change the I2C mode from mpps to gpios, and toggle
the i2c_scl gpio to emulate bus clock toggling, so slave will finish
its transmission, driven by the manual clock toggling, and will release
the i2c bus.
v2:
1) Explain more about cause of issue in commit message
2) Change variable name to something clearer
3) Leave space between comments
4) Remove redundant blank line
5) Add error message if pinctrl get failed
6) Move gpio request to probe function
7) Fix commenting style
8) Explain in comments why 10 togglings are required
9) Move from mdelay to udelay, reducing delay time
10) Explain in comments what is the value written
to the reset register.
11) Explain why fallthrough is required (generate stop condition)
12) Explain why in case of missing i2c arbitration loss details,
driver probe will not fail, in order to be backward compatible
with older dts files
Elad Nachman (1):
i2c: busses: i2c-mv64xxx: fix arb-loss i2c lock
drivers/i2c/busses/i2c-mv64xxx.c | 113 +++++++++++++++++++++++++++++++
1 file changed, 113 insertions(+)
--
2.25.1
next reply other threads:[~2023-12-07 16:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 16:50 Elad Nachman [this message]
2023-12-07 16:50 ` [PATCH v2 1/1] i2c: busses: i2c-mv64xxx: fix arb-loss i2c lock Elad Nachman
2023-12-08 4:15 ` kernel test robot
2023-12-09 6:19 ` Dan Carpenter
2023-12-09 12:59 ` Andi Shyti
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=20231207165027.2628302-1-enachman@marvell.com \
--to=enachman@marvell.com \
--cc=andi.shyti@kernel.org \
--cc=cyuval@marvell.com \
--cc=gregory.clement@bootlin.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox