[U-Boot] [PATCH] arm: mvebu: move i2c slave disable to generic SPL code

Stefan Roese sr at denx.de
Mon May 28 09:04:38 UTC 2018


(Added Jagan and Maxime to Cc)

On 28.05.2018 10:55, Chris Packham wrote:
> Hi Baruch,
> 
> On Mon, May 28, 2018 at 8:22 PM Baruch Siach <baruch at tkos.co.il> wrote:
> 
>> Hi Chris,
> 
>> On Mon, May 28, 2018 at 08:11:39PM +1200, Chris Packham wrote:
>>> On Mon, May 28, 2018 at 3:27 AM Baruch Siach <baruch at tkos.co.il> wrote:
>>>> The hidden i2c slave that interferes the i2c bus is not board
> specific.
>>>> All Armada 38x SoCs are affected. Move the code disabling this slave
> to
>>>> generic code to make it work on all affected hardware.
>>>
>>> I can't find a definition of this but the register seems to work for
>>> kirkwood as well (not surprising since it's probably a common IP
> block). Is
>>> there any chance we can find a home for this that's available to boards
>>> that don't use SPL?
> 
>> This workaround is Armada 38x specific. Are you aware of any 38x SoC based
>> system that does not use SPL?
> 
>> As far as I can see 38x support requires SPL. CONFIG_ARMADA_38X selects
>> CONFIG_ARMADA_32BIT that in turn selects CONFIG_SPL_DM. CONFIG_SPL_DM
> depends
>> on CONFIG_SPL.
> 
> The original workaround was implemented for the Turris Omnia board, as
> you've highlighted this is debug register is documented for Armada-385. On
> a hunch I tried clearing bit 18 of register 0xf101108c on a Kirkwood based
> board and found that it also works to suppress the 0x64 self address. It's
> highly likely that the i2c block is common to many Marvell SoCs and it just
> happens to be documented on A-385.

Thanks for testing this Chris. This I2C IP core is also used by many
Allwinner SoCs:

	{ .compatible = "allwinner,sun6i-a31-i2c", },


so it might be possible, that this "feature" is also available here.
Perhaps somebody from the "sunxi front" can confirm this?

> If we could get this into the mvtwsi.c driver we could allow other SoCs to
> disable the self address. Because it's only documented on A-385 we probably
> don't want to do this unconditionally (unless someone on Marvell's SoC team
> can confirm this register is valid) but I can confirm it works for Kirkwood.

Yes, it needs conditionals until its confirmed for all platforms using
this driver.

Thanks,
Stefan


More information about the U-Boot mailing list