We are trying to bring up custom board based on DM365,
We are trying to boot from the NAND,
NAND used is from micron MT29F8G08ABABA.
Organization
– Page size x8: 4320 bytes (4096 + 224 bytes)
– Block size: 128 pages (512K +28 K bytes)
– Plane size: 2 planes x 1024 blocks per plane
– Device size: 8Gb: 2048 blocks
and 4bit ECC
we made changes to Uboot to get it detected by Uboot.
In "drivers/mtd/nand/nand_ids.c" added below line
{"NAND 1GiB 3,3V 8-bit", 0x38, 0, 1024, 0, LP_OPTIONS},
And in "include/configs/davinci_dm365evm.h"
Removed #define CONFIG_SYS_NAND_PAGE_2K
Added #define CONFIG_SYS_NAND_PAGE_4K
Added #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
Existing #define CONFIG_SYS_MAX_NAND_DEVICE 1
With above changes initially NAND write started working and we could book the Linux kernel.
But Linux kernel was not able to detect the NAND partitions.
We started experimenting in Linux and suddenly NAND read stopped working from Uboot.
We get error code "failed -74". Below is boot log,
DM36x EVM # nand info
Device 0: 2x nand0, sector size 256 KiB
DM36x EVM # setenv mtdids 'nand0=nand_davinci.0'
DM36x EVM # setenv mtdparts 'mtdparts=nand_davinci.0:15m(Bootloader),1m(config),4m(kernel),512m(Fs),-(unused)'
DM36x EVM # setenv partition 'nand0,0'
DM36x EVM # setenv mtddevnum 0
DM36x EVM # setenv mtddevname 'UBOOT'
DM36x EVM # saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x3c0000 -- 100% complete.
Writing to Nand... done
DM36x EVM # print
baudrate=115200
bootargs=mem=48M console=ttyS0,115200n8 root=/dev/mtdblock3 rootfstype=squashfs ip=192.168.1.101:192.168.1.100:192.168.1.1:255.255.255.0 eth=00:0c:0c:02:3A:DE lpj=1077248 cmemk.phys_start="0x83000000" cmemk.phys_end="0x88000000" cmemk.phys_start_1="0x00001000" cmemk.phys_end_1="0x00008000" cmemk.pools_1="1x28672" cmemk.allowOverlap="1"
bootcmd=nand read 0x80700000 0x1000000 0x400000;bootm 0x80700000
bootdelay=3
bootfile="uImage"
ethact=DaVinci-EMAC
mtddevname=UBOOT
mtddevnum=0
mtdids=nand0=nand_davinci.0
mtdparts=mtdparts=nand_davinci.0:15m(Bootloader),1m(config),4m(kernel),512m(Fs),-(unused)
partition=nand0,0
stderr=serial
stdin=serial
stdout=serial
ver=U-Boot 2010.12-rc2 (Nov 20 2013 - 10:39:01)
Environment size: 755/262140 bytes
DM36x EVM # reset
resetting ...
DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
Starting NAND Copy...
Valid magicnum, 0xA1ACED66, found in block 0x00000019.
DONE
Jumping to entry point at 0x81080000.
U-Boot 2010.12-rc2 (Nov 20 2013 - 10:39:01)
Cores: ARM 297 MHz
DDR: 243 MHz
I2C: ready
DRAM: 128 MiB
NAND: 2048 MiB
MMC: davinci: 0, davinci: 1
Net: LNT:PINMUX3 configured 1affff
Read from EEPROM @ 0x50 failed
No ETH PHY detected!!!
DaVinci-EMAC
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x1000000, size 0x400000
NAND read from offset 1000000 failed -74
0 bytes read: ERROR
## Booting kernel from Legacy Image at 80700000 ...
Image Name: Linux-2.6.32.17-davinci1
Created: 2013-11-20 0:35:41 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2177420 Bytes = 2.1 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
Now my doubt is what could be error in NAND Read ?
What is this code -74 ?
Any help is appreciated.
Thank you,
Ankur