[PATCH AUTOSEL 5.12 42/43] powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P2041 i2c controllers

Michael Ellerman mpe at ellerman.id.au
Fri Jun 4 10:42:15 AEST 2021


Sasha Levin <sashal at kernel.org> writes:
> From: Chris Packham <chris.packham at alliedtelesis.co.nz>
>
> [ Upstream commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 ]
>
> The i2c controllers on the P2040/P2041 have an erratum where the
> documented scheme for i2c bus recovery will not work (A-004447). A
> different mechanism is needed which is documented in the P2040 Chip
> Errata Rev Q (latest available at the time of writing).
>
> Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
> Acked-by: Michael Ellerman <mpe at ellerman.id.au>
> Signed-off-by: Wolfram Sang <wsa at kernel.org>
> Signed-off-by: Sasha Levin <sashal at kernel.org>
> ---
>  arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

This patch (and the subsequent one), just set a flag in the device tree.

They have no effect unless you also backport the code change that looks
for that flag, which was upstream commit:

  8f0cdec8b5fd ("i2c: mpc: implement erratum A-004447 workaround")

AFAICS you haven't picked that one up for any of the stable trees.

I'll defer to Chris & Wolfram on whether it's a good idea to take the
code change for stable.

I guess it's harmless to pick these two patches, but it's also
pointless. So I think you either want to take all three, or drop these
two.

cheers

> diff --git a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
> index 872e4485dc3f..ddc018d42252 100644
> --- a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
> @@ -371,7 +371,23 @@ sdhc at 114000 {
>  	};
>  
>  /include/ "qoriq-i2c-0.dtsi"
> +	i2c at 118000 {
> +		fsl,i2c-erratum-a004447;
> +	};
> +
> +	i2c at 118100 {
> +		fsl,i2c-erratum-a004447;
> +	};
> +
>  /include/ "qoriq-i2c-1.dtsi"
> +	i2c at 119000 {
> +		fsl,i2c-erratum-a004447;
> +	};
> +
> +	i2c at 119100 {
> +		fsl,i2c-erratum-a004447;
> +	};
> +
>  /include/ "qoriq-duart-0.dtsi"
>  /include/ "qoriq-duart-1.dtsi"
>  /include/ "qoriq-gpio-0.dtsi"
> -- 
> 2.30.2


More information about the Linuxppc-dev mailing list