linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: linux-i2c@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Tamal Saha <tamal.saha@intel.com>
Subject: Re: [PATCH 1/6] i2c: designware: Do not complete i2c read without RX_FULL interrupt
Date: Thu, 16 Dec 2021 22:17:04 +0100	[thread overview]
Message-ID: <Ybus0MVyyNU+GyeC@kunai> (raw)
In-Reply-To: <20211215151205.584264-1-jarkko.nikula@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

On Wed, Dec 15, 2021 at 05:12:00PM +0200, Jarkko Nikula 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>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Applied to for-next, thanks!


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

      parent reply	other threads:[~2021-12-16 21:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 15:12 [PATCH 1/6] i2c: designware: Do not complete i2c read without RX_FULL interrupt Jarkko Nikula
2021-12-15 15:12 ` [PATCH 2/6] i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters Jarkko Nikula
2021-12-16 21:17   ` Wolfram Sang
2021-12-15 15:12 ` [PATCH 3/6] i2c: designware-pci: Add a note about struct dw_scl_sda_cfg usage Jarkko Nikula
2021-12-16 21:17   ` Wolfram Sang
2021-12-15 15:12 ` [PATCH 4/6] i2c: designware-pci: Group MODULE_*() macros Jarkko Nikula
2021-12-16 21:18   ` Wolfram Sang
2021-12-17 11:30     ` Andy Shevchenko
2021-12-15 15:12 ` [PATCH 5/6] i2c: designware-pci: use __maybe_unused for PM functions Jarkko Nikula
2021-12-16 21:18   ` Wolfram Sang
2021-12-15 15:12 ` [PATCH 6/6] i2c: designware-pci: Convert to use dev_err_probe() Jarkko Nikula
2021-12-16 21:18   ` Wolfram Sang
2021-12-16 21:17 ` Wolfram Sang [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=Ybus0MVyyNU+GyeC@kunai \
    --to=wsa@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=tamal.saha@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).