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.

8-bit nand flash boot on AM3517

Other Parts Discussed in Thread: AM3517

Hello

I have a question about nand flash boot.

If I adopt 8-bit nand flash instead of 16-bit nand flash as a boot device, what kind of hardware/software settings I need to take special care?

For example, do I need to pull up or pull down some pin to enable 8-bit data bus or modify x-loader/u-boot to recongize my 8-bit nand flash?

Could you tell me about the details or guide me to the documents that focus on this topics?

Thanks for help.

 

  • Hi Charles,

    We are working on your question and we will reply shortly.  Please allow us some time.

    Regards,

    Lawrence

  • Hello,

    for NAND boot, the ROM code actually comes up in 8-bit mode and pulls the ID code from the NAND.  If the attached NAND device is 16b it will then set it up for 16b.  Table 24-34 in the AM3517 TRM has a list of supported NAND devices.

    For x-loader, you will want to make sure you have the proper GPMC configuration and timing values to ensure optimum performance for your system. 

    Please refer to section 24.4.7.3.1 of the AM3517 TRM for more information on booting from NAND, and section 9.1.5.14 for NAND device basic programming model. 

    AM3517 TRM link

    Best regards,
    Jeff

  • Hello Lawrence,

     

    Any update on the 8bit NAND. We are also using 8 bit NAND for booting. 

     

    THanks

  • Hi Rajiv,

    Could you please clarify your question regarding 8-bit NAND?  Note Jeff's response in the thread, above.  

    Thanks,

    Lawrence

  • Hi Jeff,

    I am testing with my customboard, which is of the same hardware with am3517evm except NAND. I substitute Samsung NAND (512MiB 3,3V 8-bit) for Micron NAND (512MiB 1,8V 16-bit).

    As your suggestion, I made some changes to kernel nand driver following the section 9.1.5.14 for NAND device basic programming model of the AM3517 TRM.

    My changes:

    @kernel/arch/arm/plat-omap/include/plat/gpmc.h
    @line 45
    --------from---------
    #define GPMC_CONFIG1_DEVICESIZE_16      GPMC_CONFIG1_DEVICESIZE(1)
    ---------to----------
    #define GPMC_CONFIG1_DEVICESIZE_16      GPMC_CONFIG1_DEVICESIZE(0)

     

    I flashed the ubi.img to the nand system partition, but after the system is up, the android processes can't start up,  I think the nand driver may not work well.

    and kernel logs like this,

    UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB 2040:32768, written 0 bytes
    UBI warning: ubi_eba_write_leb: failed to write data to PEB 2040
    UBI: recover PEB 2040, move data to PEB 1522
    UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 1522:512, written 0 bytes
    UBI warning: recover_peb: failed to write to PEB 1522
    UBI: try again
    UBI: recover PEB 2040, move data to PEB 1523
    UBI: run torture test for PEB 1522
    UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 1523:512, written 0 bytes
    UBI warning: recover_peb: failed to write to PEB 1523
    UBI: try again
    UBI: recover PEB 2040, move data to PEB 1524
    UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 1524:512, written 0 bytes
    UBI warning: recover_peb: failed to write to PEB 1524
    UBI: try again
    UBI: recover PEB 2040, move data to PEB 1525
    UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 1525:512, written 0 bytes
    UBI warning: recover_peb: failed to write to PEB 1525
    UBI warning: ubi_ro_mode: switch to read-only mode
    UBIFS error (pid 828): ubifs_wbuf_write_nolock: cannot write 4144 bytes to LEB 477:30720, error -5
    UBIFS warning (pid 828): ubifs_ro_mode: switched to read-only mode, error -5
    UBIFS error (pid 828): do_writepage: cannot write page 8 of inode 769, error -5
    UBI error: ubi_io_write: read-only mode
    UBI error: erase_worker: failed to erase PEB 1522, error -30
    UBI error: do_work: work failed with error code -30
    UBI error: ubi_thread: ubi_bgt0d: work failed with error code -30
    UBIFS error (pid 780): make_reservation: cannot reserve 392 bytes in jhead 1, error -30
    UBIFS error (pid 780): ubifs_mkdir: cannot create directory, error -30
    UBIFS error (pid 782): make_reservation: cannot reserve 424 bytes in jhead 1, error -30
    UBIFS error (pid 782): ubifs_create: cannot create regular file, error -30
    UBIFS error (pid 782): make_reservation: cannot reserve 416 bytes in jhead 1, error -30
    UBIFS error (pid 782): ubifs_create: cannot create regular file, error -30
    UBIFS error (pid 782): make_reservation: cannot reserve 424 bytes in jhead 1, error -30
    UBIFS error (pid 782): ubifs_create: cannot create regular file, error -30
    UBIFS error (pid 782): make_reservation: cannot reserve 424 bytes in jhead 1, error -30
    UBIFS error (pid 782): ubifs_create: cannot create regular file, error -30

     

    Have you met such problem before? Could you give me any suggestions?

     

    Thanks,

    Kevin

     

     

     

  • i met  the same problem as you .

    UBI error: ubi_io_write: error -5 while writing 2048 bytes to PEB 400:86016, written 0 bytes
    UBI warning: ubi_eba_write_leb: failed to write data to PEB 400
    UBI: recover PEB 400, move data to PEB 585
    UBI: data was successfully recovered
    UBI: run torture test for PEB 400
    UBI: PEB 400 passed torture test, do not mark it a bad

    But i am not able to solve this problem , am3517

  • If you are testing with am3517, can you try with enabling these two items in kernel.

    1. $make menuconfig

    2. Device Drivers -> Memory Technology Device (MTD) support -> NAND Device Support -> NAND Flash device on OMAP2 and OMAP3 -> GPMC prefetch support for NAND Flash device -> DMA mode

    <*>   NAND Flash device on OMAP2 and OMAP3
    [*]          GPMC prefetch support for NAND Flash device
    [*]               DMA mode   

     

    I am not sure it will work for you, but it worked for me for my problem, and you can have a try.

    Hope it will help.

  • hello

    kevin

    i try this kernl configuration , but it does not work.