From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: tamal.saha@intel.com, wsa@kernel.org,
andriy.shevchenko@linux.intel.com, linux-i2c@vger.kernel.org
Cc: bala.senthil@intel.com
Subject: Re: [PATCH v3] i2c: designware: Do not complete i2c read without RX_FULL interrupt
Date: Wed, 15 Dec 2021 14:20:50 +0200 [thread overview]
Message-ID: <7b537fb9-6ad3-5840-fc3c-a4354dd78133@linux.intel.com> (raw)
In-Reply-To: <20211214142451.3638-1-tamal.saha@intel.com>
On 12/14/21 16:24, tamal.saha@intel.com wrote:
> From: Tamal Saha <tamal.saha@intel.com>
>
> Intel Keem Bay platform supports multi-master operations over same i2c
> bus using Synopsys i2c DesignWare IP. When multi-masters initiate i2c
> operation simultaneously in a loop, SCL line is stucked low forever
> after few i2c operations. Following interrupt sequences are observed
> in:
> working case: TX_EMPTY, RX_FULL and STOP_DET
> non working case: TX_EMPTY, STOP_DET, RX_FULL.
>
> DW_apb_i2c stretches the SCL line when the TX FIFO is empty or when
> RX FIFO is full. The DW_apb_i2c master will continue to hold the SCL
> line LOW until RX FIFO is read.
>
> Linux kernel i2c DesignWare driver does not handle above non working
> sequence. TX_EMPTY, RX_FULL and STOP_DET routine execution are required
> in sequence although RX_FULL interrupt is raised after STOP_DET by
> hardware. Clear STOP_DET for the following conditions:
> (STOP_DET ,RX_FULL, rx_outstanding)
> Write Operation: (1, 0, 0)
> Read Operation:
> RX_FULL followed by STOP_DET: (0, 1, 1) -> (1, 0, 0)
> STOP_DET followed by RX_FULL: (1, 0, 1) -> (1, 1, 0)
> RX_FULL and STOP_DET together: (1, 1, 1)
>
> Signed-off-by: Tamal Saha <tamal.saha@intel.com>
> ---
> Changes in v3:
> - "multi-master" is used in commit message
> Changes in v2:
> - Commit message updated as suggested by Andy Shevchenko
> - Replaced Synopsis by Synopsys, designware by DesignWare, software by driver
> ---
> drivers/i2c/busses/i2c-designware-master.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
prev parent reply other threads:[~2021-12-15 12:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 14:24 [PATCH v3] i2c: designware: Do not complete i2c read without RX_FULL interrupt tamal.saha
2021-12-15 12:20 ` Jarkko Nikula [this message]
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=7b537fb9-6ad3-5840-fc3c-a4354dd78133@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bala.senthil@intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=tamal.saha@intel.com \
--cc=wsa@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