[PATCH v8 2/5] i2c: mediatek: Dump i2c/dma register when a timeout occurs

Kewei Xu kewei.xu at mediatek.com
Sun Oct 24 23:09:05 PDT 2021


On Mon, 2021-10-11 at 18:38 +0300, Boris Lysov wrote:
> On Sun, 10 Oct 2021 15:05:13 +0800
> Kewei Xu <kewei.xu at 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 at mediatek.com>
> > Reviewed-by: Qii Wang <qii.wang at 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
Hi, This patch only applies to APDMA(application processor DMA) and
does not use GDMA(Generic DMA).In addition, the file i2c-mt65xx.c only
supports APDMA mode by default. If APDMA address is not configured in
dts, i2c transmission will be fail.thx~


More information about the Linux-mediatek mailing list