From: Sam Ravnborg <sam@ravnborg.org>
To: Wolfram Sang <wsa@kernel.org>, Sascha Hauer <sha@pengutronix.de>,
barebox@lists.infradead.org
Subject: Re: [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20
Date: Tue, 21 Mar 2023 20:02:34 +0100 [thread overview]
Message-ID: <ZBn/ShAwKik7TdvZ@ravnborg.org> (raw)
In-Reply-To: <ZBnnbU1SUkNm4ryz@sai.fritz.box>
Hi Wolfram.
On Tue, Mar 21, 2023 at 06:20:45PM +0100, Wolfram Sang wrote:
> Hi Sascha!
>
> > Nice to hear from you here ;)
>
> Yeah, it has been only 10 years... :)
>
> > I have no idea how the SDRAM setup is done on the USB-A9G20. There seems
> > to be SDRAM setup code for the USB-A9263, but not for the USB-A9G20. Is
> > there some AT91Bootstrap required?
>
> Yes. There is a bootstrap required: https://github.com/linux4sam/at91bootstrap
> However, an old version is needed. I am still fighting the details.
>
> I accidently erased it, so my journey for unbricking the device began.
> at91bootstrap, openocd, barebox - they all once supported A9G20, but
> nowadays all of them were broken. Well, I fixed openocd and barebox
> mostly so far, the bootstrap is still the missing piece.
You may be hit by the newer gcc optimize the delays in
the sdram init code in at91bootstrap.
This code:
/* Step#4 The minimum pause of 200 us is provided to precede any single toggle */
for (i = 0; i < 1000; i++) ;
Are optimized away with newer gcc's.
You can find it repeated several times in the init code.
I think this was the only part what broke at91bootstrap for me.
It was Ahmad, IIRC, that told me about it - so not my finding.
>
> Super interesting about the A9263 setup code. I missed it so far. Does
> that mean that barebox can replace the at91bootstrap?
Yes. The patch series I pointed at generates a bare variant that I
successfully used to boot my board direct from ROMBOOT.
It is a direct replacement for at91bootstrap and loads barebox as the
next step bootloader.
I really like the way it is all integrated and how the two barebox
variants are built in one go.
Sam
>
> > Anyway, what's really missing is DT support. I scribbled a patch to get
> > you started in case you are motivated. Basically it's: Compile in the
>
> Motivated? No way ;) Obliged? More so. But first, I want to unbrick my
> device. First make it work, then make it beautiful.
>
> That being said, the two patches from this series are okay? I'd think
> they are still needed for other legacy systems even if I convert A9G20
> to DT in some ages.
>
> Thanks for your help!
>
> Wolfram
next prev parent reply other threads:[~2023-03-21 19:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 15:49 Wolfram Sang
2023-03-19 15:49 ` [PATCH 1/3] mtd: nand: atmel: legacy: add 'algo' to use Wolfram Sang
2023-03-19 15:49 ` [PATCH 2/3] mtd: nand: atmel: legacy: use proper ecc_shift Wolfram Sang
2023-03-19 15:49 ` [PATCH 3/3] mtd: nand: atmel: legacy: remove superfluous code Wolfram Sang
2023-03-19 18:51 ` [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20 Sam Ravnborg
2023-03-19 21:28 ` Wolfram Sang
2023-03-21 8:58 ` Sascha Hauer
2023-03-21 9:44 ` Alexander Dahl
2023-03-21 16:48 ` Sam Ravnborg
2023-03-21 17:20 ` Wolfram Sang
2023-03-21 19:02 ` Sam Ravnborg [this message]
2023-03-21 20:53 ` Sam Ravnborg
2023-03-21 21:42 ` Wolfram Sang
2023-03-22 7:37 ` Sascha Hauer
2023-04-27 17:25 ` Wolfram Sang
2023-04-27 17:26 ` Wolfram Sang
2023-03-22 7:41 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZBn/ShAwKik7TdvZ@ravnborg.org \
--to=sam@ravnborg.org \
--cc=barebox@lists.infradead.org \
--cc=sha@pengutronix.de \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox