From: Kewei Xu <kewei.xu@mediatek.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: <wsa@the-dreams.de>, <robh+dt@kernel.org>,
<linux-i2c@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
<srv_heupstream@mediatek.com>, <leilk.liu@mediatek.com>,
<qii.wang@mediatek.com>, <qiangming.xia@mediatek.com>,
<liguo.zhang@mediatek.com>
Subject: Re: [PATCH 2/3] i2c: mediatek: Dump i2c/dma register when a timeout occurs
Date: Wed, 9 Jun 2021 10:43:44 +0800 [thread overview]
Message-ID: <1623206624.14050.10.camel@mhfsdcap03> (raw)
In-Reply-To: <54301510-e0d5-0762-1979-b194b8fd5eb8@gmail.com>
On Tue, 2021-06-08 at 16:01 +0200, Matthias Brugger wrote:
>
> On 08/06/2021 05:16, Kewei Xu wrote:
> > From: "Kewei.Xu" <kewei.xu@mediatek.com>
> >
> > When a timeout error occurs in i2c transter, it is usually related
> > to the i2c/dma IP hardware configuration. Therefore, the purpose of
> > this patch is to dump the key register values of i2c/dma when a
> > timeout occurs in i2c for debugging.
> >
> > Signed-off-by: Kewei.Xu <kewei.xu@mediatek.com>
> > ---
> > drivers/i2c/busses/i2c-mt65xx.c | 97 ++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 95 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
> > index 5ddfa4e..e65a41e 100644
> > --- a/drivers/i2c/busses/i2c-mt65xx.c
> > +++ b/drivers/i2c/busses/i2c-mt65xx.c
> > @@ -125,6 +125,7 @@ enum I2C_REGS_OFFSET {
> > OFFSET_HS,
> > OFFSET_SOFTRESET,
> > OFFSET_DCM_EN,
> > + OFFSET_MULTI_DMA,
> > OFFSET_PATH_DIR,
> > OFFSET_DEBUGSTAT,
> > OFFSET_DEBUGCTRL,
> > @@ -192,8 +193,9 @@ enum I2C_REGS_OFFSET {
> > [OFFSET_TRANSFER_LEN_AUX] = 0x44,
> > [OFFSET_CLOCK_DIV] = 0x48,
> > [OFFSET_SOFTRESET] = 0x50,
> > + [OFFSET_MULTI_DMA] = 0x84,
> > [OFFSET_SCL_MIS_COMP_POINT] = 0x90,
> > - [OFFSET_DEBUGSTAT] = 0xe0,
> > + [OFFSET_DEBUGSTAT] = 0xe4,
>
> Is this offset only for mt8192 or also for mt8183?
> In any case that should go in as another patch. Either a fix or a new
> mt_i2c_regs_v3[]
>
> Regards,
Matthias
Hi Matthias,
This offset value is suitable for the IC of mt_i2c_regs_v2 hardware
design similar to mt8192/8195, not for 8183.
The reason for the modification here is that the previous
offset information is incorrect, OFFSET_DEBUGSTAT = 0XE4 is
the correct value.
Regards,
Kewei
next prev parent reply other threads:[~2021-06-09 2:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 3:16 [PATCH 0/3] add i2c support for mt8195 Kewei Xu
2021-06-08 3:16 ` [PATCH 1/3] dt-bindings: i2c: update bindings for MT8195 SoC Kewei Xu
2021-06-08 13:59 ` Matthias Brugger
2021-06-18 20:27 ` Rob Herring
2021-06-08 3:16 ` [PATCH 2/3] i2c: mediatek: Dump i2c/dma register when a timeout occurs Kewei Xu
2021-06-08 14:01 ` Matthias Brugger
2021-06-09 2:43 ` Kewei Xu [this message]
2021-06-29 4:19 ` Tzung-Bi Shih
2021-06-29 12:12 ` Kewei Xu
2021-06-08 3:16 ` [PATCH 3/3] i2c: mediatek: Reset the handshake signal between i2c and dma Kewei Xu
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=1623206624.14050.10.camel@mhfsdcap03 \
--to=kewei.xu@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=leilk.liu@mediatek.com \
--cc=liguo.zhang@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=qiangming.xia@mediatek.com \
--cc=qii.wang@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=srv_heupstream@mediatek.com \
--cc=wsa@the-dreams.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 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).