We adapted yocto project and u-boot 's version is u-boot-ti-staging (2015 07), we add
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -359,6 +359,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header
configure_module_pin_mux(gpio0_7_pin_mux);
configure_module_pin_mux(rgmii1_pin_mux);
configure_module_pin_mux(mmc0_pin_mux_sk_evm);
+ configure_module_pin_mux(nand_pin_mux);
and when boot it can recognize nand flash.
U-Boot 2015.07 (Oct 21 2015 - 13:07:17 +0800)
Watchdog enabled
I2C: ready
DRAM: 256 MiB
NAND: 256 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Net: cpsw, usb_ether
then I type these instructions below:
U-Boot # mmc rescan
U-Boot # nand erase.chip
U-Boot # fatload mmc 0 0x82000000 MLO
U-Boot # nand write 0x82000000 NAND.SPL
U-Boot # nand write 0x82000000 NAND.SPL.backup1
U-Boot # nand write 0x82000000 NAND.SPL.backup2
U-Boot # nand write 0x82000000 NAND.SPL.backup3
U-Boot # fatload mmc 0 0x82000000 u-boot.img
U-Boot # nand write 0x82000000 NAND.u-boot
U-Boot # fatload mmc 0 0x82000000 zImage
U-Boot # nand write 0x82000000 NAND.kernel
U-Boot # run findfdt
U-Boot # load mmc 0 0x82000000 $fdtfile
U-Boot # nand write 0x82000000 NAND.u-boot-spl-os
U-Boot # fatload mmc 0 0x82000000 ubi.img
U-Boot # nand write 0x82000000 NAND.file-system
U-Boot # saveenv
MLO to device tree file has not any problem, but when I flash ubi.img, there is error:
NAND write: device 0 offset 0xa00000, size 0xf600000
NAND write to offset a00000 failed -5
0 bytes written: ERROR
Dose anyone kindly tell me what I lost? Thank you.