Hi,
We are using a NAND spansion S34ML08G1 for our custom board based on am335x processor.
we are using tisdk7.00
Want to know the procedure to add support of this flash in uboot.
I knew that following files needs to be change.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
We are using a NAND spansion S34ML08G1 for our custom board based on am335x processor.
we are using tisdk7.00
Want to know the procedure to add support of this flash in uboot.
I knew that following files needs to be change.
Hi,
What version of u-boot are you using? It should have NAND support in it. See http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User's_Guide
For GPMC_CONFIGi values please read the AM335X TRM Rev. K, section 7.1.4.3.
Hi,
We are using "u-boot-2013.10-ti2013.12.01 " from ti-sdk version 7.00
Thanks & Regards,
Uday
Hi,
We have done changes as per following note in am33xx board type.
NAND
====
The AM335x GP EVM ships with a 256MiB NAND available in most profiles. In
this example to program the NAND we assume that an SD card has been
inserted with the files to write in the first SD slot and that mtdparts
have been configured correctly for the board. All images are first loaded
into memory, then written to NAND.
Step-1: Building u-boot for NAND boot
Set following CONFIGxx options for NAND device.
CONFIG_SYS_NAND_PAGE_SIZE number of main bytes in NAND page
CONFIG_SYS_NAND_OOBSIZE number of OOB bytes in NAND page
CONFIG_SYS_NAND_BLOCK_SIZE number of bytes in NAND erase-block
CONFIG_SYS_NAND_ECCPOS ECC map for NAND page
CONFIG_NAND_OMAP_ECCSCHEME (refer doc/README.nand)
Step-2: Flashing NAND via MMC/SD
# select BOOTSEL to MMC/SD boot and boot from MMC/SD card
U-Boot # mmc rescan
# erase flash
U-Boot # nand erase.chip
U-Boot # env default -f -a
U-Boot # saveenv
# flash MLO. Redundant copies of MLO are kept for failsafe
U-Boot # load mmc 0 0x82000000 MLO
U-Boot # nand write 0x82000000 0x00000 0x20000
U-Boot # nand write 0x82000000 0x20000 0x20000
U-Boot # nand write 0x82000000 0x40000 0x20000
U-Boot # nand write 0x82000000 0x60000 0x20000
# flash u-boot.img
U-Boot # load mmc 0 0x82000000 u-boot.img
U-Boot # nand write 0x82000000 0x80000 0x60000
# flash kernel image
U-Boot # load mmc 0 0x82000000 uImage
U-Boot # nand write 0x82000000 ${nandsrcaddr} ${nandimgsize}
# flash filesystem image
U-Boot # load mmc 0 0x82000000 filesystem.img
U-Boot # nand write 0x82000000 ${loadaddress} 0x300000
Step-3: Set BOOTSEL pin to select NAND boot, and POR the device.
The device should boot from images flashed on NAND device.
Our problem is board is getting boot successfully using sd card but unable to boot from flash.
Thanks& Regards,
Uday
Hi,
For the SDK 7 you have to write in NAND zImage NOT uImage. Also you have to write devicetree-zimage-am335x-evm.dtb. I copied the sequences:
* Flash the NAND on the AM335x GP EVM with the SDK 07.00.00.00:
U-Boot# nand erase.chip
NAND erase.chip: device 0 whole chip
Erasing at 0xffe0000 -- 100% complete.
OK
U-Boot# mmc rescan
U-Boot# fatls mmc 0
107920 mlo
389768 u-boot.img
13 .ipaddr
41564 devicetree-zimage-am335x-evm.dtb
4117616 zimage
32768000 arago-base-tisdk-image-am335x-evm.ubi
6 file(s), 0 dir(s)
U-Boot# fatload mmc 0 0x81000000 MLO
reading MLO
107920 bytes read in 10 ms (10.3 MiB/s)
U-Boot# cp.b 0x81000000 0x81020000 20000; cp.b 0x81000000 0x81040000 20000; cp.b 0x81000000 0x81060000 20000
U-Boot# fatload mmc 0 0x81080000 devicetree-zimage-am335x-evm.dtb
reading devicetree-zimage-am335x-evm.dtb
41564 bytes read in 8 ms (5 MiB/s)
U-Boot# fatload mmc 0 0x810c0000 u-boot.img
reading u-boot.img
389768 bytes read in 28 ms (13.3 MiB/s)
U-Boot# fatload mmc 0 0x81200000 zImage
reading zImage
4117616 bytes read in 258 ms (15.2 MiB/s)
U-Boot# fatload mmc 0 0x81a00000 arago-base-tisdk-image-am335x-evm.ubi
reading arago-base-tisdk-image-am335x-evm.ubi
32768000 bytes read in 2039 ms (15.3 MiB/s)
U-Boot# nand write 0x81000000 0x0 0x2950000
NAND write: device 0 offset 0x0, size 0x2950000
43319296 bytes written: OK
BR
Ivan
Hi Mr. Uday,
I presume you are using the SDK 7.x . correct?
Also i hope you have done the changes needed for the Nand flash used on your custom board in uboot and ubl. Is it done?
Also could you please try all the steps provided by Ivan as is?
Glad the uboot-> kernel boot is working fine.So the issue is with rbl-> ubl -> uboot steps.
Please let us know...
Thanks
Best Regards
Feroz
Hi Ivan,
The issue is with nand boot mode start. On hard power up, nothing is seen on the UART prompt. So issue seems to be the MLO or the reading of it from Nand.
Is there some way to know if there can be a Nand issue in the first blocks where MLO and u-boot are stored? Or if the SD Card ‘s MLO needs to be changed for Nand boot?
Best REgards
Feroz
Feroz,
Can you check if NAND Ready/Busy signal is connected to GPMC_WAIT0? This is a requirement for NAND boot.