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.

Using 16bit NandFlash

Other Parts Discussed in Thread: DA8XX, OMAP-L137, OMAPL138

Hi

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

i used OMAPL137BZKBD3 (300MHz) and IS42S16160D-6BLI(SDRAM 32MB) and MT29F4G08ABADAWPITD(NANFLASH 512MiB 3.3V 8bit) in my board.

i used REL_LSP_02_20_00_07 for linux and i do below three works  :

1. i rebuild armubl project and get ubl-nand.bin binary file.


2. i rebuild dspubl project then get ubl-nand.out output file. i put this output file in AISgen (for D800K005) and get dsp-nand-ais.bin binary file.


3. i changed the da8xx_evm.h ( clear CFG-USE-SPIFLASH and add CFG-USE-NAND) in UBOOT 1.3.3 then make this file and get uboot.bin binary file.

i used OMAP-L137_FlashAndBootUtils_2_40 and three binary file ( ubl-nand.bin , dsp-nand-ais.bin , uboot.bin ) for booting from nandflash .


everything is ok and booting from nandflash is successful.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

i want changed MT29F4G08ABADAWPITD(NANFLASH 512MiB 3.3V 8bit) to MT29F4G16ABADAWPITD(NANFLASH 512MiB 3.3V 16bit). can i used this 16bit nandflash?

i used REL_LSP_02_20_00_07 for linux and i do below three works :

1. i rebuild armubl project and get ubl-nand.bin binary file.

i guess that this project supported 16bit nandflash. can i used this binary file (ubl-nand.bin) for 16bit nandflash?


2. i rebuild dspubl project then get ubl-nand.out output file. i put this output file in AISgen (for D800K005) and get dsp-nand-ais.bin binary file.

i guess that this project supported 16bit nandflash. can i used this binary file (dsp-nand-ais.bin) for 16bit nandflash?


3. i changed the da8xx_evm.h ( clear CFG-USE-SPIFLASH and add CFG-USE-NAND) in UBOOT 1.3.3 then make this file and get uboot.bin binary file.

i guess that this project supported 16bit nandflash. can i used this binary file (uboot.bin) for 16bit nandflash?

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Regards,

Mahdi

  • Hi Mahdi,
    We wrote code to support 8bit as well 16bit NAND flash devices.
    Just you want to enable the 16bit in code (config file).
  • Hi Titusrathinaraj

    Thank for your Reply

    which config file? please help me to find this config file? What should I change in this config file?

    What should I change in armubl project before build?

    What should I change in dspubl project before build?

    What should I change in uboot 1.3.3  file before make?

    please help me step by step to create ubl-nand.bin and dsp-nand-ais.bin and uboot.bin binary files for 16bit nandflash?

    Regards,

    Mahdi

  • Hi,
    I think, you may need to change in DSP UBL code.

    The code seems to be, its reading the BOOT mode settings to decide which type of NAND boot, so if you set boot mode to "NAND 16 boot" then your new flash get boot.

    Please refer to the following OMAPL137 bootloader, page no 27.

    www.ti.com/.../sprab04g.pdf

    If you want to hard code the code to NAND16 then, you have to change the following code in "dspubl-03.20.00.14/src/omapl1x7/device.c"

    DEVICE_BootMode DEVICE_bootMode( void )
    {
    Uint32 i;
    // Read BOOT pins and set bootMode
    // Using a look-up table
    i = SYSTEM->BOOTCFG & 0xFFFF;
    // Bit sequence used for LUT is 7,2,1,0,3
    // Translate: 76543210 to ___72103
    // (__210 << 1) + (7___3___ >> 3) = _210_ + 7___3 = 72103
    i = ((i & 0x0007) << 1) + ((i & 0x0088) >> 3); // _210_ + 7___3

    return bootModes[i];
    }

    DEVICE_BusWidth DEVICE_emifBusWidth( void )
    {
    if(DEVICE_bootMode() == DEVICE_BOOTMODE_NAND_EMIFA_16BIT)
    {
    return DEVICE_BUSWIDTH_16BIT;
    }

    return DEVICE_BUSWIDTH_8BIT;
    }
  • Hi Titusrathinaraj

    Thank for your Reply

    so i set boot mode to "NAND 16 boot" with boot pins in my hardware (BOOT[7]=1, BOOT[2]=0, BOOT[1]=0, BOOT[0]=0, BOOT[3]=0) then :

    1. i rebuild armubl project and get ubl-nand.bin binary file. this binary file support 16bit nandflash with boot mode "NAND 16 boot".is this ok?

    2. i rebuild dspubl project then get ubl-nand.out output file. i put this output file in AISgen (for D800K005) then i changed ROM ID to D800K003 and boot mode to NAND 16bit and get dsp-nand-ais.bin binary file. this binary file support 16bit nandflash with boot mode "NAND 16 boot". is this ok?

    3. i changed the da8xx_evm.h ( clear CFG-USE-SPIFLASH and add CFG-USE-NAND) in UBOOT 1.3.3 then make this file and get uboot.bin binary file. this binary file support 16bit nandflash. is this ok?

    can i used ( OMAP-L137_FlashAndBootUtils_2_40 ) flash writer and this binary files ( ubl-nand.bin , dsp-nand-ais.bin , uboot.bin ) for booting from 16bit nandflash?

    Regards,

    Mahdi
  • Hi,

    1. i rebuild armubl project and get ubl-nand.bin binary file. this binary file support 16bit nandflash with boot mode "NAND 16 boot".is this ok?

    2. i rebuild dspubl project then get ubl-nand.out output file. i put this output file in AISgen (for D800K005) then i changed ROM ID to D800K003 and boot mode to NAND 16bit and get dsp-nand-ais.bin binary file. this binary file support 16bit nandflash with boot mode "NAND 16 boot". is this ok?

    3. i changed the da8xx_evm.h ( clear CFG-USE-SPIFLASH and add CFG-USE-NAND) in UBOOT 1.3.3 then make this file and get uboot.bin binary file. this binary file support 16bit nandflash. is this ok?

    can i used ( OMAP-L137_FlashAndBootUtils_2_40 ) flash writer and this binary files ( ubl-nand.bin , dsp-nand-ais.bin , uboot.bin ) for booting from 16bit nandflash?


    Yes for all questions.

    After flashing DSP-UBL and ARM-UBL, then you would get some boot log prints on UART console for NAND16 boot mode.

    Firstly, try to use SFH flash tool (OMAP-L137_FlashAndBootUtils_2_40) to erase the NAND flash to check whether we able to access the flash.
  • Hi Titusrathinaraj

    Thank for your Reply

    i want change pll setting (PLLDIV3) for my nandflash. where can i change pll setting? ( in AISgen or in uboot 1.3.3 files or both )

    i guess that, I can change pll setting in the AISgen when convert ubl-nand.out output file to dsp-nand-ais.bin binary file. that is ok?

    do i have to change any file in uboot 1.3.3 for pll setting? if yes, which file in uboot 1.3.3 must be change for pll setting?

    Regards,

    Mahdi
  • Hi,

    i want change pll setting (PLLDIV3) for my nandflash. where can i change pll setting? ( in AISgen or in uboot 1.3.3 files or both )

    You have to change it in UBL code.


    do i have to change any file in uboot 1.3.3 for pll setting? if yes, which file in uboot 1.3.3 must be change for pll setting?

    No, ARM-UBL would take care all those PLL and CPU frequency change everything.

    You have to change the following file.
    armubl/include/device.h

    Ex for 456MHz:
    #define DEVICE_CONFIG_OPP DEVICE_OPP_1P3V_456MHZ

    PLL settings:
    armubl/src/device.c
  • Hi Titusrathinaraj

    Thank for your Reply

    /////////////////////////////////////////////////////////////////////////

    1) in armubl/src/ubl.c, i see below codes :

    #ifdef UBL_NAND
    case DEVICE_BOOTMODE_NAND_EMIFA_8BIT:
    {
    //Report Bootmode to host
    DEBUG_printString("NAND\r\n");

    // Copy binary image application from NAND to RAM
    if (NANDBOOT_copy() != E_PASS)
    {
    DEBUG_printString("NAND Boot failed.\r\n");
    goto UARTBOOT;
    }
    break;
    }
    #endif

    i don't see any case for DEVICE_BOOTMODE_NAND_EMIFA_16BIT. i think that this code not support 16bit nand.

    /////////////////////////////////////////////////////////////////////////

    2) in armubl/src/device.c, i see below codes :

    Uint32 DEVICE_EMIFInit()
    {

    DEVICE_pinmuxControl(13,0xFFFFFFFF,0x11111111);
    DEVICE_pinmuxControl(14,0xFFFFFFFF,0x88111111);
    DEVICE_pinmuxControl(15,0xFFFFFFFF,0x11888888);
    DEVICE_pinmuxControl(16,0xFFFFFFFF,0x11111111);
    DEVICE_pinmuxControl(17,0xFFFFFFFF,0x08111111);
    DEVICE_pinmuxControl(18,0xFFFFFFFF,0x11111111);
    DEVICE_pinmuxControl(19,0xFFFFFFFF,0x00000001);

    return E_PASS;
    }

    this configuration not support 16bit nand flash.

    /////////////////////////////////////////////////////////////////////////

    3) in dspubl/src/ubl.c, i see below codes :

    #ifdef UBL_NAND
    case DEVICE_BOOTMODE_NAND_EMIFA_8BIT:
    {
    NANDBOOT_copy();
    break;
    }
    #endif

    i don't see any case for DEVICE_BOOTMODE_NAND_EMIFA_16BIT. i think that this code not support 16bit nand.

    /////////////////////////////////////////////////////////////////////////

    4) in dspubl/src/device.c, i see below codes :

    Uint32 DEVICE_AEMIFInit()
    {

    DEVICE_LPSCTransition(0, 3, 0, PSC_ENABLE);

    DEVICE_pinmuxControl(13,0xFFFFFFFF,0x11111111);
    DEVICE_pinmuxControl(14,0xFFFFFFFF,0x88111111);
    DEVICE_pinmuxControl(15,0xFFFFFFFF,0x11888888);
    DEVICE_pinmuxControl(16,0xFFFFFFFF,0x11111111);
    DEVICE_pinmuxControl(17,0x0FFFFFFF,0x08111111);
    DEVICE_pinmuxControl(18,0xFFFFFFFF,0x11111111);
    DEVICE_pinmuxControl(19,0x0000000F,0x00000001);

    return E_PASS;
    }

    this configuration not support 16bit nand flash.

    Regards,

    Mahdi
  • Hi Mahdi,
    OMAPL138 and OMAPL137 SDI board uses NAND 8bit and OMAPL138 LCDK board using NAND 16bit mode.

    Yes, the NAND bootloader code seems to be its not supporting NAND 16bit since its very old SDK.
    The NAND driver look like it does support NAND 16bit.

    // Check busWidth to make sure it is valid and matches the device's set bus width
    if ((0x1 << (paramPageData[5] & 0xF)) == 16)
    {
    if (hNandInfo->busWidth != (Uint8) DEVICE_BUSWIDTH_16BIT)
    {
    return E_FAIL;
    }
    }
    else if ((0x1 << (paramPageData[5] & 0xF)) == 8)
    {
    if (hNandInfo->busWidth != (Uint8) DEVICE_BUSWIDTH_8BIT)
    {
    return E_FAIL;
    }

    You may have to modify the DSP and ARM UBL code to support NAND16 bit mode.

    armubl-03.22.00.06/src/omapl1x7/device.c
    DEVICE_BootMode bootModes

    In the above boot mode structure, you can see the entry for NAND 16bit.
    DEVICE_BOOTMODE_NAND_EMIFA_16BIT