linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v8 2/5] i2c: mediatek: Dump i2c/dma register when a timeout occurs
@ 2021-10-11 15:38 Boris Lysov
  2021-10-25  6:09 ` Kewei Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Lysov @ 2021-10-11 15:38 UTC (permalink / raw)
  To: Kewei Xu; +Cc: linux-mediatek, linux-i2c, matthias.bgg, qii.wang

On Sun, 10 Oct 2021 15:05:13 +0800
Kewei Xu <kewei.xu@mediatek.com> wrote:

> 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>
> Reviewed-by: Qii Wang <qii.wang@mediatek.com>

I would like to test this patchset on one of supported platforms, an
mt6577-powered device. This driver requires a DMA base...
> 	i2c->pdmabase = devm_ioremap_resource(&pdev->dev, res);
>	if (IS_ERR(i2c->pdmabase))
>		return PTR_ERR(i2c->pdmabase);
... however I am not sure what address should I specify in the .dts file. While
other i2c busses supported by this driver such as mt6589 [1][2] and mt6797 [3]
have designated DMA for I2C, mt6577 seems to lack dedicated DMA engine for I2C
[4][5].

Do I need to specify the Generic DMA base address [4] instead?

Worth mentioning I brought up this issue in the past [5][6].

[1] ALPS.KK1.MP5.V1.3_EASTAEON89_WET_KK source code (downstream)
[2] MT6589 HSPA+ Smartphone Application Processor Datasheet v1.0, page 869
[3] MT6797 LTE-A Smartphone Application Processor Register Table (Part 1) v1.1,
page 1796
[4] MT6577 HSPA Smartphone Application Processor Datasheet v0.94, page 547
[5] ALPS.JB.MP.V1.19_MBK77_TB_JB source code (downstream)
[6] https://marc.info/?l=devicetree&m=159949247901831&w=2
[7] https://marc.info/?l=linux-i2c&m=159939730714187&w=2

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH v8 0/5] Introducing an attribute to select the time setting
@ 2021-10-10  7:05 Kewei Xu
  2021-10-10  7:05 ` [PATCH v8 2/5] i2c: mediatek: Dump i2c/dma register when a timeout occurs Kewei Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Kewei Xu @ 2021-10-10  7:05 UTC (permalink / raw)
  To: wsa
  Cc: matthias.bgg, robh+dt, linux-i2c, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, srv_heupstream, leilk.liu, qii.wang,
	liguo.zhang, caiyu.chen, ot_daolong.zhu, yuhan.wei, kewei.xu

v7:
Resubmit the patch based on version 5.15-rc1

v6:
1. Add the judgment condition, clear the handshake signal between dma and
i2c when multiple msgs are transmitted.

v5:
1. Replace the previous variable name "default_timing_adjust" with "use-default-timing"
2. Added waiting for dma reset mechanism
3. Remove received patch(dt-bindings: i2c: update bindings for MT8195 SOC)

v4:
1. Remove the repeated assignment of the inter_clk_div parameter
2. Modify the wrong assignment of OFFSET_MULTI_DMA
3. Unify the log print format of the i2c_dump_register() and drop the extra outer parentheses
4. Place the fixes at the very least
5. Add fixed tags 25708278f810 ("i2c: mediatek: Add i2c support for MediaTek MT8183")
6. Add "i2c: mediatek: modify bus speed calculation formula"
7. Fix single line characters exceeding 80 characters
8. Combine two different series of patches.

v3:
1. Fix code errors caused by v2 modification

v2:
1. Add "dt-bindings: i2c: add attribute default-timing-adjust"
2. Split the fix into sepatate patch.

Kewei Xu (5):
  i2c: mediatek: Reset the handshake signal between i2c and dma
  i2c: mediatek: Dump i2c/dma register when a timeout occurs
  dt-bindings: i2c: add attribute use-default-timing
  i2c: mediatek: Isolate speed setting via dts for special devices
  i2c: mediatek: modify bus speed calculation formula

 .../devicetree/bindings/i2c/i2c-mt65xx.txt    |   2 +
 drivers/i2c/busses/i2c-mt65xx.c               | 192 ++++++++++++++++--
 2 files changed, 180 insertions(+), 14 deletions(-)

--
2.18.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-25  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-11 15:38 [PATCH v8 2/5] i2c: mediatek: Dump i2c/dma register when a timeout occurs Boris Lysov
2021-10-25  6:09 ` Kewei Xu
  -- strict thread matches above, loose matches on Subject: below --
2021-10-10  7:05 [PATCH v8 0/5] Introducing an attribute to select the time setting Kewei Xu
2021-10-10  7:05 ` [PATCH v8 2/5] i2c: mediatek: Dump i2c/dma register when a timeout occurs Kewei Xu
2021-10-11 10:41   ` Wolfram Sang

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).