Bootstrap code U-Boot non-ONFI NAND problem

AT91SAM9 Evaluation Boards

Moderator: nferre

lzq
Posts: 15
Joined: Tue Dec 23, 2008 5:51 pm

Bootstrap code U-Boot non-ONFI NAND problem

Sat Jul 27, 2013 2:43 am

I have a custom SAMA5D3 board using Samsung NAND FLASH. The SAM-BA was able to recognize the chip and program it. The bootstrap code boots and loads U-Boot correctly even though it complains about non-ONFI NAND FLASH. The U-Boot seems to see the FLASH but all NAND FLASH related operations fails, erase, read, write, etc. Looked through the U-Boot code briefly but didn't see any clue. Could it be the bootstrap code didn't set the FLASH controller properly? Need a hint as where I should look for thing. Thank you very much in advance.
blue_z
Location: USA
Posts: 1547
Joined: Thu Apr 19, 2007 10:15 pm

Re: Bootstrap code U-Boot non-ONFI NAND problem

Sun Jul 28, 2013 2:05 am

lzq wrote:I have a custom SAMA5D3 board using Samsung NAND FLASH.
How is this custom board different from the Atmel eval board?
What is the p/n for this "Samsung NAND FLASH"?
The U-Boot seems to see the FLASH
Please be more specific, e.g. show console output.
Looked through the U-Boot code briefly but didn't see any clue.
Did you review the code to make sure you have accounted for your custom board?
Could it be the bootstrap code didn't set the FLASH controller properly?
You tell us.
It's your custom board. How has the code been customized for that board?
Need a hint as where I should look for thing.
How have you modified U-Boot to accommodate your custom board?
What are the configuration settings for NAND stuff?
Have you tried enabling CONFIG_MTD_DEBUG?

Sounds like U-Boot is running, and you have a console.
So you have a powerful debugging tool that can examine and modify device registers.

Regards
lzq
Posts: 15
Joined: Tue Dec 23, 2008 5:51 pm

Re: Bootstrap code U-Boot non-ONFI NAND problem

Sun Jul 28, 2013 10:27 pm

Everything else is the same as the EK CPU module except the NAND FLASH is a Samsung K9F2G08 and no serial EEPROM. Here is the boot log,

AT91Bootstrap 3.5.3 (Mon Jul 8 14:08:30 EDT 2013)

1-Wire: Loading 1-Wire information ...
1-Wire: ROM Searching ... Done, 0x1 1-Wire chips found

1-Wire: BoardName | [Revid] | VendorName
WARNING: 1-Wire: Failed to get board information

1-Wire: Using defalt value SYS_GPBR2: 0x481242a, SYS_GPBR3: 0x6a0823

NAND: ONFI not supported
NAND: Manufacturer ID: 0xec Chip ID: 0xda
NAND: Disable On-Die ECC
NAND: Initialize PMECC params, cap: 0x4, sector: 0x200
NAND: Image: Copy 0x80000 bytes from 0x40000 to 0x26f00000
NAND: Done to load image


U-Boot 2013.04 (Jul 06 2013 - 07:32:33)

CPU: SAMA5D34
Crystal frequency: 12 MHz
CPU clock : 528 MHz
Master clock : 132 MHz
DRAM: 512 MiB
NAND: 256 MiB
MMC: mci: 0
*** Error - No Valid Environment Area found
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x180000, size 0x80000
Attempt to read outside the flash area
0 bytes read: ERROR

NAND read: device 0 offset 0x200000, size 0x600000
Attempt to read outside the flash area
0 bytes read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot>
U-Boot> nand info

Device 0: nand0, sector size 128 KiB
Page size 2048 b
OOB size 64 b
Erase size 131072 b
U-Boot>

The only firmware modification was add NAND FLASH ID and parameter to the bootstrap code. What else needs to be modified?
lgarelli
Posts: 44
Joined: Mon Oct 26, 2009 4:44 pm

Re: Bootstrap code U-Boot non-ONFI NAND problem

Mon Jun 16, 2014 6:42 pm

Try to replace the NAND Flash on the EK Board an test your software there. You may have Signal integrity problems in your PCB.

Try with a older Bootstrap. We have the same nand flash "EC DA" in our custom board AT91sam9263@240MHz working with bootstrap 2.13 but not with any 3.x due o ecc errors.

Return to “Evaluation and Development Boards”

Who is online

Users browsing this forum: No registered users and 2 guests