All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] AM335x : failure to boot SPL from NAND
@ 2013-02-14 15:54 Mark Jackson
  2013-02-15 21:13 ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Jackson @ 2013-02-14 15:54 UTC (permalink / raw)
  To: u-boot

I'm trying to diagnose why our AM335x based CPU board (based on the AM335x Starter Kit) can boot SPL
and U-Boot from an MMC card, but is unable to boot from NAND (connected to CS0).

Following the TI wiki
(http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#Flashing_images_to_NAND_in_SD_boot)
I:-

(1) boot from MMC
(2) erase the nand
(3) copy MLO from MMC into NAND
(4) verified it copied correctly (using crc32)

When I reboot the board in NAND mode, I get nothing on UART0.

If I reboot in MMC mode, SPL and U-Boot load correctly.

Can anyone give me some pointers on the boot sequence, and where I might look to help debug the
problem ?

Regards
Mark JACKSON

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] AM335x : failure to boot SPL from NAND
  2013-02-14 15:54 [U-Boot] AM335x : failure to boot SPL from NAND Mark Jackson
@ 2013-02-15 21:13 ` Tom Rini
  2013-02-18 14:43   ` Mark Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2013-02-15 21:13 UTC (permalink / raw)
  To: u-boot

On Thu, Feb 14, 2013 at 03:54:23PM +0000, Mark Jackson wrote:

> I'm trying to diagnose why our AM335x based CPU board (based on the
> AM335x Starter Kit) can boot SPL and U-Boot from an MMC card, but is
> unable to boot from NAND (connected to CS0).
> 
> Following the TI wiki
> (http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#Flashing_images_to_NAND_in_SD_boot)
> I:-
> 
> (1) boot from MMC
> (2) erase the nand
> (3) copy MLO from MMC into NAND
> (4) verified it copied correctly (using crc32)
> 
> When I reboot the board in NAND mode, I get nothing on UART0.
> 
> If I reboot in MMC mode, SPL and U-Boot load correctly.
> 
> Can anyone give me some pointers on the boot sequence, and where I
> might look to help debug the problem ?

Assuming you're using mainline U-Boot and can rule out "vendor
problems", if you can access the SYSBOOT pins, set it up for a mode that
does NAND and UART.  If you never see the 'CCC' on console (or only see
it the first time if you do UART then NAND), then you are starting SPL
and dying in there.  If you just see a stream of C then your file is not
written to NAND correctly.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/93e765d7/attachment.pgp>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] AM335x : failure to boot SPL from NAND
  2013-02-15 21:13 ` Tom Rini
@ 2013-02-18 14:43   ` Mark Jackson
  2013-02-18 14:54     ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Jackson @ 2013-02-18 14:43 UTC (permalink / raw)
  To: u-boot

On 15/02/13 21:13, Tom Rini wrote:
> On Thu, Feb 14, 2013 at 03:54:23PM +0000, Mark Jackson wrote:
> 
>> I'm trying to diagnose why our AM335x based CPU board (based on the
>> AM335x Starter Kit) can boot SPL and U-Boot from an MMC card, but is
>> unable to boot from NAND (connected to CS0).
>>
>> Following the TI wiki
>> (http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#Flashing_images_to_NAND_in_SD_boot)
>> I:-
>>
>> (1) boot from MMC
>> (2) erase the nand
>> (3) copy MLO from MMC into NAND
>> (4) verified it copied correctly (using crc32)
>>
>> When I reboot the board in NAND mode, I get nothing on UART0.
>>
>> If I reboot in MMC mode, SPL and U-Boot load correctly.
>>
>> Can anyone give me some pointers on the boot sequence, and where I
>> might look to help debug the problem ?
> 
> Assuming you're using mainline U-Boot and can rule out "vendor
> problems", if you can access the SYSBOOT pins, set it up for a mode that
> does NAND and UART.  If you never see the 'CCC' on console (or only see
> it the first time if you do UART then NAND), then you are starting SPL
> and dying in there.  If you just see a stream of C then your file is not
> written to NAND correctly.

Interesting ... I don't get any 'CCC' on the console.

However, I then tested this by booting via MMC, erasing the NAND chip and
then trying to reboot via NAND again.

I still get no 'CCC' on the console !?!

This is using boot mode 10011 (NAND, NANDI2C, MMC0, UART0), so I would expect
to either boot via MMC (if I left it in) or get some 'CCC' output on the
console.

I can see that the NAND signals always have a burst of activity every 10ms.
That must be a timeout of some sort ... do you know if that's a hardware or
software timeout ?

Mark J.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] AM335x : failure to boot SPL from NAND
  2013-02-18 14:43   ` Mark Jackson
@ 2013-02-18 14:54     ` Tom Rini
  2013-02-19 14:55       ` Mark Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2013-02-18 14:54 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 18, 2013 at 02:43:47PM +0000, Mark Jackson wrote:
> On 15/02/13 21:13, Tom Rini wrote:
> > On Thu, Feb 14, 2013 at 03:54:23PM +0000, Mark Jackson wrote:
> > 
> >> I'm trying to diagnose why our AM335x based CPU board (based on the
> >> AM335x Starter Kit) can boot SPL and U-Boot from an MMC card, but is
> >> unable to boot from NAND (connected to CS0).
> >>
> >> Following the TI wiki
> >> (http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#Flashing_images_to_NAND_in_SD_boot)
> >> I:-
> >>
> >> (1) boot from MMC
> >> (2) erase the nand
> >> (3) copy MLO from MMC into NAND
> >> (4) verified it copied correctly (using crc32)
> >>
> >> When I reboot the board in NAND mode, I get nothing on UART0.
> >>
> >> If I reboot in MMC mode, SPL and U-Boot load correctly.
> >>
> >> Can anyone give me some pointers on the boot sequence, and where I
> >> might look to help debug the problem ?
> > 
> > Assuming you're using mainline U-Boot and can rule out "vendor
> > problems", if you can access the SYSBOOT pins, set it up for a mode that
> > does NAND and UART.  If you never see the 'CCC' on console (or only see
> > it the first time if you do UART then NAND), then you are starting SPL
> > and dying in there.  If you just see a stream of C then your file is not
> > written to NAND correctly.
> 
> Interesting ... I don't get any 'CCC' on the console.
> 
> However, I then tested this by booting via MMC, erasing the NAND chip and
> then trying to reboot via NAND again.
> 
> I still get no 'CCC' on the console !?!

How did you wire the SYSBOOT pins, and which UART is connected to
console?  If you have UART0 as the one hooked up to console and have
SYSBOOT[4:0] as 00100, the order is UART0,XIP (NOR),MMC0,NAND.  So you
should see 'CCCCCCCC' (UART0 trying to initiate X-Modem), then it will
try MMC0 and then NAND..

> This is using boot mode 10011 (NAND, NANDI2C, MMC0, UART0), so I would expect
> to either boot via MMC (if I left it in) or get some 'CCC' output on the
> console.

Correct.  If you have an empty NAND and nothing inserted in MMC, it
should be an endless cycle of 'C'.

> I can see that the NAND signals always have a burst of activity every 10ms.
> That must be a timeout of some sort ... do you know if that's a hardware or
> software timeout ?

Moving beyond what I can easily help with, sorry.  Hit up the TI forums
at http://e2e.ti.com/ as this is getting a bit off-topic for the U-Boot
list as well :)  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130218/01c6683e/attachment.pgp>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] AM335x : failure to boot SPL from NAND
  2013-02-18 14:54     ` Tom Rini
@ 2013-02-19 14:55       ` Mark Jackson
  2013-02-21 12:10         ` Mark Jackson
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Jackson @ 2013-02-19 14:55 UTC (permalink / raw)
  To: u-boot

On 18/02/13 14:54, Tom Rini wrote:
> On Mon, Feb 18, 2013 at 02:43:47PM +0000, Mark Jackson wrote:
>> On 15/02/13 21:13, Tom Rini wrote:
>>> On Thu, Feb 14, 2013 at 03:54:23PM +0000, Mark Jackson wrote:
>>>
>>>> I'm trying to diagnose why our AM335x based CPU board (based on the
>>>> AM335x Starter Kit) can boot SPL and U-Boot from an MMC card, but is
>>>> unable to boot from NAND (connected to CS0).

Just a quick update (in case anyone else is in the same boat) ...

Looks like the upper data bus (AD[15:8]) needs to have pullups on it, even though
you're booting from an 8bit device.

I guess the AM335x internal boot code assumes everything is 16bit (even though
SYSBOOT[8] is used to configure 8/16bit device).

Mark J.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] AM335x : failure to boot SPL from NAND
  2013-02-19 14:55       ` Mark Jackson
@ 2013-02-21 12:10         ` Mark Jackson
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Jackson @ 2013-02-21 12:10 UTC (permalink / raw)
  To: u-boot

On 19/02/13 14:55, Mark Jackson wrote:
> On 18/02/13 14:54, Tom Rini wrote:
>> On Mon, Feb 18, 2013 at 02:43:47PM +0000, Mark Jackson wrote:
>>> On 15/02/13 21:13, Tom Rini wrote:
>>>> On Thu, Feb 14, 2013 at 03:54:23PM +0000, Mark Jackson wrote:
>>>>
>>>>> I'm trying to diagnose why our AM335x based CPU board (based on the
>>>>> AM335x Starter Kit) can boot SPL and U-Boot from an MMC card, but is
>>>>> unable to boot from NAND (connected to CS0).
> 
> Just a quick update (in case anyone else is in the same boat) ...
> 
> Looks like the upper data bus (AD[15:8]) needs to have pullups on it, even though
> you're booting from an 8bit device.

Just to update this ... *pulldowns* (not pullups) were needed to get it to boot reliably.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-21 12:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-14 15:54 [U-Boot] AM335x : failure to boot SPL from NAND Mark Jackson
2013-02-15 21:13 ` Tom Rini
2013-02-18 14:43   ` Mark Jackson
2013-02-18 14:54     ` Tom Rini
2013-02-19 14:55       ` Mark Jackson
2013-02-21 12:10         ` Mark Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.