From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Jan Dabros <jsd@semihalf.com>
Cc: linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: designware: add a new bit check for IC_CON control
Date: Mon, 16 Jan 2023 11:38:36 +0200 [thread overview]
Message-ID: <59fbf54d-9bbc-efaa-bb2a-74880156e310@linux.intel.com> (raw)
In-Reply-To: <20230116043500.413499-1-Shyam-sundar.S-k@amd.com>
Hi
On 1/16/23 06:35, Shyam Sundar S K wrote:
> On some AMD platforms, based on the new designware datasheet,
> BIOS sets the BIT(11) within the IC_CON register to advertise
> the "bus clear feature capability".
>
> Since the current driver implementation completely ignores what
> is advertised by BIOS, we just build the master_cfg and
> overwrite the entire thing into IC_CON during
> i2c_dw_configure_master().
>
> Since, the bus clear feature is not enabled, sometimes there is
> no way to reset if the BIT(11) is not set.
>
> AMD/Designware datasheet says:
>
> Bit(11) BUS_CLEAR_FEATURE_CTRL. Read-write,Volatile. Reset: 0.
> Description: In Master mode:
> - 1'b1: Bus Clear Feature is enabled.
> - 1'b0: Bus Clear Feature is Disabled.
> In Slave mode, this register bit is not applicable.
>
> Hence add a check in i2c_dw_configure_master() that if the BIOS
> advertises the bus clear feature, let driver not ignore it and
> adapt accordingly.
>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> ---
> drivers/i2c/busses/i2c-designware-core.h | 1 +
> drivers/i2c/busses/i2c-designware-master.c | 5 +++++
> 2 files changed, 6 insertions(+)
>
Is this change alone enough? I understood from the specification that
the SCL/SDA stuck low timeout registers should be set and a bus recovery
procedure (additional code) is required.
Jarkko
next prev parent reply other threads:[~2023-01-16 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 4:35 [PATCH] i2c: designware: add a new bit check for IC_CON control Shyam Sundar S K
2023-01-16 9:38 ` Jarkko Nikula [this message]
2023-01-17 10:31 ` Shyam Sundar S K
2023-01-17 10:38 ` Andy Shevchenko
2023-01-17 11:21 ` Jarkko Nikula
2023-01-17 11:39 ` Shyam Sundar S K
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=59fbf54d-9bbc-efaa-bb2a-74880156e310@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.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