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.

Micron uBoot NAND Support? (DM365 DVEVM)

We are investigating Micron MT29F8G08ABABA NAND samples with the intention of using them to replace the existing (obsolete) MT29F16G08FAA NAND flash in the DM365 EVM.

So far everything has gone ok in that we have been able to successfully erase and flash the new NAND with UBL & uBoot using the UART bootmode. We were ecstatic to see the board come to life (once DIP switches were returned to NAND boot mode) and correctly pass control from RBL to UBL to uBoot.

We now however have have an issue in which uBoot fails to identify the NAND device and returns "No NAND device found" with our MT29F8G08ABABA instead of the previous "Manufacturer ID: 0x2c Chip ID: 0xd3 (Micron NAND 1GiB 3.3V 8-bit)" which was output when using the the original DVEVM packaged (but obsolete) MT29F16G08FAA. The board then enter an infinite loop with our new NAND. We are using uBoot 2009.03 as available from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_3_10/latest/index_FDS.html .

We did receive some advice re editting " nand_ids.c" (which is identical to that found at http://lxr.free-electrons.com/source/drivers/mtd/nand/nand_ids.c?v=2.6.32 ) which we have done by adding the following entry:

 {"NAND 1GiB 3,3V 8-bit Custom",        0x38, 0, 1024, 0, LP_OPTIONS},

at line 103. This is successful in that the NAND is now "detected" but now we get the following printout:

NAND:  NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron NAND 1GiB 3,3V 8-bit Custom)
Bad block table not found for chip 0
Bad block table found at page 130944, version 0x01
nand_bbt: ECC error while reading bad block table
Bad block table written to 0x1ffc0000, version 0x01
No NAND device found!!!
1024 MiB

This then sends us to the uBoot EVM prompt (as opposed to infinite reboots prior to the ChipID not being found). This is mainstream NAND which Micron who themselves suggested it the best bet replacement for the obsolete part. There is a newer 2009.08 uBoot available from the u-boot-ti GIT but this will still be compiled using the Kernels MTD drivers so I am not convinced this is what needs to be updated? Any input would be appreciated.

More details regarding the MT29F8G08ABABA NAND (in terms of 90h queries) can be found at my previous post @ http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/p/48003/172823.aspx#172823 where I was querying RBL / UBL support for this NAND prior to ordering the samples.

Many thanks!
NickA

  • Hi NickA,

    NickAllen said:
    NAND:  NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron NAND 1GiB 3,3V 8-bit Custom)
    Bad block table not found for chip 0
    Bad block table found at page 130944, version 0x01
    nand_bbt: ECC error while reading bad block table
    Bad block table written to 0x1ffc0000, version 0x01

    This suggests that U-Boot found an existing bad block table. That cannot happen for a new NAND device. Did this come after the second reboot? In any case, can you do a 'nand scrub' from U-Boot and reflash the UBL and U-Boot binaries? On the first boot, U-Boot should not find a bad block table and create one afresh. The ECC error suggests that the bad block table was written using an incompatible software (Linux?).

    NickAllen said:
    No NAND device found!!!

    DM365 EVM has two NAND devices which may not be the case with your board. This print is likely coming because of the scan for second NAND device. Can you change

    #define CONFIG_SYS_MAX_NAND_DEVICE      2       /* Max number of NAND devices */

    to

    #define CONFIG_SYS_MAX_NAND_DEVICE      1       /* Max number of NAND devices */

    in include/configs/davinci_dm365_evm.h - in case you are using the EVM's configuration file?

    Thanks,

    Sekhar 

  • Hi Sekhar,

    Sekhar said:
    Did this come after the second reboot? In any case, can you do a 'nand scrub' from U-Boot and reflash the UBL and U-Boot binaries?

    Yes it did come after the second boot, apologies. Nand scrub worked perfectly.

    Sekhar said:
    The ECC error suggests that the bad block table was written using an incompatible software (Linux?).

    We seem to have gotten rid of this error by enabling #DEFINES revolving around 4bit ECC and 4096KB page size (our NAND has 4096KB pages). We are still pulling together information & printouts to try put together an informed forum query.

    Sekhar said:
    DM365 EVM has two NAND devices which may not be the case with your board.

    You hit the nail on the head! Although we only had one physical NAND, it had two LUNs (dies) which obviously can only get treated as two physically separate NANDS (with two physically separate Chip Enables). Our new NAND has only a single LUN so your mod does remove this error!

    Thank you for your input!

    Sincerely,
    NickA

  • I'm trying to use the MT29F8G08ABABA also.  Are you guys discussing the changes that must be made to recompile U-Boot to support this NAND device?

  • Hi

    I have gotten this NAND working with uBoot and am now trying to get it working with the Kernel (2.6.32-rc2). To get uBoot compiled add the chip ID to drivers/mtd/nand/nand_ids.c

    The line I added at line 104 was:
    {"NAND 1GiB 3,3V 8-bit",   0x38, 0, 1024, 0, LP_OPTIONS},

    Then you need to edit include/configs/davinci_dm365_evm.h :
    remove #define CONFIG_SYS_NAND_PAGE_2K
    add #define CONFIG_SYS_NAND_PAGE_4K
    add #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST  (this option is a guess based on some comments in code mentioning doing OOBFIRST)
    change #define CONFIG_SYS_MAX_NAND_DEVICE      1  (will be a two for the old NAND as it has 2 chip enables but this one only has one)

    Then you can recompile your uBoot. In the root of the git directory do the following:
    make clean
    make davinci_dm365_evm_config
    make

    When the compile is finished you will have a new uBoot file that can be loaded onto the NAND.

    Regards
    Sean

    ---
    Sean Preston
    seanp@pfk.co.za

     

     

  • Thanks Sean,

    I had to use....

    make davinci_dm365evm_config

    I'm having a problem building the image because lowlevel_init.h is looking for a definition of... "DDR_4BANK or DDR_8BANK".

    There is a definition of CONFIG_NR_DRAM_BANKS = 1, but this does not satisfy lowlevel_init.h.

    Has anyone else who is building U-Boot run into this.  I used git://git.denx.de/u-boot.git to download.

    John

  •  

    Sean,

    Update...

    Now I tried building u-boot supplied in the PSP package, using the same configuration command that you posted.  It built to completion.  Now I will try making the mods you suggested.

     

    John

  • Sean Preston said:
    Then you need to edit include/configs/davinci_dm365_evm.h :

    remove #define CONFIG_SYS_NAND_PAGE_2K
    add #define CONFIG_SYS_NAND_PAGE_4K

    I don't have CONFIG_SYS_NAND_PAGE_2K in my file.

     

  • John Anderson said:

    Then you need to edit include/configs/davinci_dm365_evm.h :

    remove #define CONFIG_SYS_NAND_PAGE_2K
    add #define CONFIG_SYS_NAND_PAGE_4K

    I don't have CONFIG_SYS_NAND_PAGE_2K in my file.

    [/quote]

    Sorry should have mentioned my changes were against the uBoot sources found on the 3.10.00_16 DVSDK download page. There is a difference between the vanilla sources and the DVSDK or PSP packages so I just stuck with the DVSDK versions.  My other reason was to try and stay as close to the officially released and therefore supported code while trying to get everything working because at least then I knew I had a working base to start with.

    If you do not have the option then that is not an issue as it would depend on the NAND chip on your EVM board.  Mine has the MT29F16G08FAA on it which was why I needed this change.  Just make sure that there is no other NAND_PAGE size being declared.

  • Sean,

    I have also gotten this NAND working with uBoot now. But we found a message:

    "Card did not respond to voltage select!"

    Do you know how to solve this problem

     

    Best regards,

    David

     

    The whole message attached as following

    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 (Mar 24 2011 - 19:27:17)

    Cores: ARM 297 MHz

    DDR: 243 MHz

    I2C: ready

    DRAM: 128 MiB

    NAND: 2048 MiB

    MMC: davinci: 0, davinci: 1

    Net: Ethernet PHY: GENERIC @ 0x00

    DaVinci-EMAC

    Hit any key to stop autoboot: 0

    DM36x EVM # saveenv

    Saving Environment to NAND...

    Erasing Nand...

    Erasing at 0x3e0000 -- 100% complete.

    Writing to Nand... done

    DM36x EVM # 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 (Mar 24 2011 - 19:27:17)

    Cores: ARM 297 MHz

    DDR: 243 MHz

    I2C: ready

    DRAM: 128 MiB

    NAND: 2048 MiB

    MMC: davinci: 0, davinci: 1

    Net: Ethernet PHY: GENERIC @ 0x00

    DaVinci-EMAC

    Hit any key to stop autoboot: 0

    Card did not respond to voltage select!