[U-Boot] DDR training code for Armada 38x

Stefan Roese sr at denx.de
Tue Sep 26 05:10:49 UTC 2017


Hi Chris,

On 26.09.2017 00:29, Chris Packham wrote:
> For the internet historians,
> 
> On Thu, Sep 21, 2017 at 4:25 PM, Chris Packham <judge.packham at gmail.com> wrote:
>> On Wed, Sep 20, 2017 at 5:31 PM, Stefan Roese <sr at denx.de> wrote:
>>> Hi Chris,
>>>
>>> On 19.09.2017 20:58, Chris Packham wrote:
>>>>
>>>> When you did the port from Marvell's source did you script any of the
>>>> tidy-up that you did along the way?
>>>
>>>
>>> Not really. At least not in a reproducible way. I spent long
>>> hours running Lindent, recursive-replace tools and especially
>>> manual code inspection and re-formatting on this huge code.
>>> Still the outcome is far from perfect, but hopefully better
>>> that the original version.
>>>
>>>> I'm running up a new board and with the upstream u-boot DDR training
>>>> occasionally fails. But with the Marvell bootloader it doesn't fail.
>>>> The initial port was done from TIP-1.29 but Marvell are now up to
>>>> TIP-1.55 so there is probably some difference that results in my board
>>>> working.
>>>>
>>>> One difference I've spotted so far is that Marvell enable 2T timing
>>>> mode for all Armada 38x boards (the comment says "resolve low freq
>>>> instability"). But doing that doesn't magically make my board work.
>>>
>>>
>>> Did you compare all DDR register values (the "good" ones and the "bad"
>>> ones) and only the the 2T timing is different?
>>>
>>
>> There are more differences. 2T was the one that stuckout. As you know
>> working backwards from register values to where the code sets them can
>> be tricky with this code.
>>
>>>> I'm thinking I need to compare TIP-1.29 with TIP-1.55 to look for
>>>> other differences but obviously that's going to be hard given the
>>>> style changes.
>>>
>>>
>>> Has the style changed in between the Marvell versions as well? I
>>> have not looked into this code for quite some time.
>>>
>>
>> What I meant was u-boot has 1.29 and I have 1.55 from Marvell. The
>> oldest Marvell version I have is 1.34 which helped me find the 2T
>> thing. I'm wondering what differences exist between 1.29 and 1.34.
>> 1.55 also has support for some newer integrated switch+CPU chips so it
>> is a little hard to separate those bits from the A38X code.
>>
>>>> If you have any scripts (or even just a record of the
>>>> regexes) that you used would you be able to share them?
>>>
>>>
>>> Please find some scripts attached, I've located that I have used while
>>> doing this porting.
>>
>> Thanks. That's a start at least.
> 
> In the end once I fixed the ecc_scrubbing[1] I stopped seeing the
> training failures so I've basically stopped looking at the differences
> between the Marvell bootloader and u-boot. But in the meantime I can
> summarize the differences I have identified in case they might help
> someone in the future.
> 
> * Marvell unconditionally enable 2T timing for A38X
> * Different settings for RD/WR ODT particularly in situations using
> only one chip-select.
> 
> There are more differences in the register dumps but I haven't looked
> into the meaning of them.

Thanks for the update Chris. I'm currently build-testing the MVEBU
patches in Travis and will send the pull request, once this completes
without issues.

Thanks,
Stefan


More information about the U-Boot mailing list