Re: [PATCH v3] i2c: imx: add imx7d compatible string for applying errata ERR007805

Carlos Song
2024-12-19T07:10:15Z

> -----Original Message-----
> From: Oleksij Rempel <o.rempel@pengutronix.de>
> Sent: Thursday, December 19, 2024 1:55 PM
> To: Carlos Song <carlos.song@nxp.com>
> Cc: andi.shyti@kernel.org; Frank Li <frank.li@nxp.com>;
> kernel@pengutronix.de; shawnguo@kernel.org; s.hauer@pengutronix.de;
> festevam@gmail.com; linux-i2c@vger.kernel.org; imx@lists.linux.dev;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Bough
> Chen <haibo.chen@nxp.com>
> Subject: [EXT] Re: [PATCH v3] i2c: imx: add imx7d compatible string for applying
> errata ERR007805
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
>
>
> On Wed, Dec 18, 2024 at 12:42:38PM +0800, Carlos Song wrote:
> > Compatible string "fsl,imx7d-i2c" is not exited at i2c-imx driver
> do not exist?
> > compatible string table, at the result, "fsl,imx21-i2c" will be
> > matched, but it will cause errata ERR007805 not be applied in fact.
> >
> > So Add "fsl,imx7d-i2c" compatible string in i2c-imx driver to apply
> > the errata
> > ERR007805(https://eur01.safelinks.protection.outlook.com/?url=https%3A
> > %2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3D&data=05%
> 7C02%7Ccarl
> >
> os.song%40nxp.com%7C958101ea901c4404272f08dd1ff1bb7f%7C686ea1d3bc2
> b4c6
> >
> fa92cd99c5c301635%7C0%7C0%7C638701845332883650%7CUnknown%7CTW
> FpbGZsb3d
> >
> 8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoi
> T
> >
> WFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=gLJgTRfX8KgwxAIm7GHP
> TKgbQx3
> > 4f6p2lyaRna0BD%2BU%3D&reserved=0
> > IMX7DS_2N09P).
>
> This link is not working, may be this one:
> https://www.nxp/
> .com%2Fdocs%2Fen%2Ferrata%2FIMX7DS_3N09P.pdf&data=05%7C02%7Ccarl
> os.song%40nxp.com%7C958101ea901c4404272f08dd1ff1bb7f%7C686ea1d3bc2
> b4c6fa92cd99c5c301635%7C0%7C0%7C638701845332903180%7CUnknown%7
> CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXa
> W4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=xhrAk7
> %2FVbIWyXGr9ltpprMNimJjAX%2BfFrxQ%2BUvj7wZs%3D&reserved=0
>
> More practical is to include the erratum text with list of affected SoC variants.
>
> > "fsl,imx7d-i2c" already is documented in binding doc. This errata
>
> s/errata/erratum
>
> Errata is plural
> Erratum is singular
>
> > fix has been included in imx6_i2c_hwdata and it is the same in all
> > I.MX6/7/8, so just reuse it.
> >
>
> Please Fixes tag, this patch should go stable:
> Fixes: 39c025721d70 ("i2c: imx: Implement errata ERR007805 or e7805 bus
> frequency limit")
> Cc: stable@vger.kernel.org
>
> > Signed-off-by: Carlos Song <carlos.song@nxp.com>
> > Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
>
> With fixes in the commit message you can add my:
> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
>

Hi, I have remake the commit log referring to your comment.
Is this what you expected? If yes, please let me know. I will apply it at V4 and add your
Acked-by.

It will be this in V4:

i2c: imx: add imx7d compatible string for applying erratum ERR007805

Compatible string "fsl,imx7d-i2c" is not exited at i2c-imx driver
compatible string table, at the result, "fsl,imx21-i2c" will be
matched, but it will cause erratum ERR007805 not be applied in fact.

So Add "fsl,imx7d-i2c" compatible string in i2c-imx driver to apply
the erratum ERR007805(https://www.nxp.com/docs/en/errata/IMX7DS_3N09P.pdf).

"
ERR007805 I2C: When the I2C clock speed is configured for 400 kHz,
the SCL low period violates the I2C spec of 1.3 uS min

Description: When the I2C module is programmed to operate at the
maximum clock speed of 400 kHz (as defined by the I2C spec), the SCL
clock low period violates the I2C spec of 1.3 uS min. The user must
reduce the clock speed to obtain the SCL low time to meet the 1.3us
I2C minimum required. This behavior means the SoC is not compliant
to the I2C spec at 400kHz.

Workaround: To meet the clock low period requirement in fast speed
mode, SCL must be configured to 384KHz or less.
"

"fsl,imx7d-i2c" already is documented in binding doc. This erratum
fix has been included in imx6_i2c_hwdata and it is the same in all
I.MX6/7/8, so just reuse it.

Fixes: 39c025721d70 ("i2c: imx: Implement errata ERR007805 or e7805 bus frequency limit")
Cc: stable@vger.kernel.org
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

> > ---
> > Change for V3:
> > - No ACK, so resend this patch.
> > Change for V2:
> > - I have tried to fix this issue at imx7s.dtsi in V1, according to
> > the community suggestion, I make V2 patch for i2c-imx driver to
> > avoid updating the FDT to fix an errata. Discussion in V1:
> > Subject: [PATCH] ARM: dts: imx7s: change i2c compatible string for
> applying errata ERR007805
> > Message-ID: <20241021031148.2682015-1-carlos.song@nxp.com> (raw)
> > ---
> > drivers/i2c/busses/i2c-imx.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/i2c/busses/i2c-imx.c
> > b/drivers/i2c/busses/i2c-imx.c index 350346a7892c..9d5caa032c5c 100644
> > --- a/drivers/i2c/busses/i2c-imx.c
> > +++ b/drivers/i2c/busses/i2c-imx.c
> > @@ -335,6 +335,7 @@ static const struct of_device_id i2c_imx_dt_ids[] = {
> > { .compatible = "fsl,imx6sll-i2c", .data = &imx6_i2c_hwdata, },
> > { .compatible = "fsl,imx6sx-i2c", .data = &imx6_i2c_hwdata, },
> > { .compatible = "fsl,imx6ul-i2c", .data = &imx6_i2c_hwdata, },
> > + { .compatible = "fsl,imx7d-i2c", .data = &imx6_i2c_hwdata, },
> > { .compatible = "fsl,imx7s-i2c", .data = &imx6_i2c_hwdata, },
> > { .compatible = "fsl,imx8mm-i2c", .data = &imx6_i2c_hwdata, },
> > { .compatible = "fsl,imx8mn-i2c", .data = &imx6_i2c_hwdata, },
> > --
> > 2.34.1
> >
> >
>
> --
> Pengutronix e.K. |
> |
> Steuerwalder Str. 21 |
> http://www.pen/
> gutronix.de%2F&data=05%7C02%7Ccarlos.song%40nxp.com%7C958101ea901c
> 4404272f08dd1ff1bb7f%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7
> C638701845332917054%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOn
> RydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3
> D%3D%7C0%7C%7C%7C&sdata=Zc4%2BMIZBmbv7BsAELQk9jKNtmhMTGxcdT
> mytHTYdNag%3D&reserved=0 |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0
> |
> Amtsgericht Hildesheim, HRA 2686 | Fax:
> +49-5121-206917-5555 |