From: Andi Shyti <andi.shyti@kernel.org>
To: carlos.song@oss.nxp.com
Cc: aisheng.dong@nxp.com, Frank.Li@nxp.com, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, carlos.song@nxp.com,
linux-i2c@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: imx-lpi2c: avoid accessing target registers on master-only controllers
Date: Fri, 28 Aug 2026 03:05:17 +0200 [thread overview]
Message-ID: <apDetAiapLq-VVRb@zenone.zhora.eu> (raw)
In-Reply-To: <20260803032705.2250373-1-carlos.song@oss.nxp.com>
Hi Carlos,
On Mon, Aug 03, 2026 at 11:27:05AM +0800, carlos.song@oss.nxp.com wrote:
> From: Carlos Song <carlos.song@nxp.com>
>
> Not all LPI2C controller instances implement the Target block.
> Since commit 90311787f483 ("i2c: imx-lpi2c: reset controller in
> probe stage"), the driver unconditionally resets both the Master
> and Target blocks during probe.
>
> On controllers that do not support target mode, accessing the
> Target registers triggers an asynchronous SError and prevents the
> driver from probing successfully. For example on i.MX8QM:
>
> SError Interrupt on CPU2, code 0x00000000bf000002 -- SError
> Hardware name: Freescale i.MX8QM MEK (DT)
> pc : lpi2c_imx_probe+0x280/0x594
> lr : lpi2c_imx_probe+0x224/0x594
> Kernel panic - not syncing: Asynchronous SError Interrupt
>
> The VERID register is implemented in the Master block and can be
> safely accessed on all controller variants. Its FEATURE field
> indicates whether target mode is supported.
>
> Read VERID during probe and use it to determine whether the
> Target block is present. Only access Target registers when target
> mode is supported and reject target registration requests with
> -EOPNOTSUPP otherwise.
>
> Fixes: 90311787f483 ("i2c: imx-lpi2c: reset controller in probe stage")
> Signed-off-by: Carlos Song <carlos.song@nxp.com>
pushed to i2c/i2c-fixes.
Thanks,
Andi
prev parent reply other threads:[~2026-08-28 1:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 3:27 [PATCH] i2c: imx-lpi2c: avoid accessing target registers on master-only controllers carlos.song
2026-08-03 3:35 ` sashiko-bot
2026-08-07 19:24 ` Frank Li
2026-08-26 3:23 ` Carlos Song (OSS)
2026-08-26 8:00 ` Carlos Song
2026-08-28 1:05 ` Andi Shyti [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=apDetAiapLq-VVRb@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=carlos.song@nxp.com \
--cc=carlos.song@oss.nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.