We have developed a custom board using am1808 controller and Micron’s 16bit NAND flash MT29F2G16ABAEAWP-IT. We are currently using Linux-Davinci 2.6.37 (taken from arago-project git repository) of source revision ‘V2.6.37_DAVINCIPSP_03.21.00.04’. The bootloader we are using is u-boot-omapl1, also taken from arago-project git repository.
Currently we are facing some issue with Davinci-NAND driver in Linux. We are using 4-bit ECC support in u-boot and it works fine. But enabling 4-bit ECC support in Linux Davinci-NAND driver results in some errors. We need to mount root filesystem from NAND flash as jffs2. But enabling 4-bit ECC creates errors and mounting issues. Analyzing the kernel source code, a comment has been found saying that 4-bit ECC may not work with 16 bit NAND flash.
###########################################################
Davinci_nand.c->nand_davinci_probe()
case NAND_ECC_HW:
if (pdata->ecc_bits == 4) {
/* No sanity checks: CPUs must support this,
* and the chips may not use NAND_BUSWIDTH_16.
*/
###########################################################
Switching to 1 bit ECC in Linux and u-boot solved filesystem mounting issue. But we would like to have 4-bit ECC support in Linux, so that updating u-boot image in NAND from Linux is possible. U-boot image should be written to NAND with 4-bit ECC data written in OOB area.
Also switching to 1bit ECC instead of 4bit reduces the error detection and error correction possibilities.
• Is there any possibility to fix the above mentioned issue in davinci-nand driver with 16 bit NAND flash devices?
• Also it seems the latest kernel version available for Linux-Davinci is 2.6.37. Is there any newer kernel versions (3.0 and above) available for davinci family, especially am1808/omapl138