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.

OMAP gpmc driver & nand detection

Guru 20755 points
Other Parts Discussed in Thread: OMAP3530

Hello,

We use omap3530 , with kernel 2.6.37 to boot from nand.

We recently made some change in the custom board, and we encounter some problem with nand device.
I see that the nand is detected in u-boot, but nand is failed to be detected in kernel boot (I get "no nand device found." message during boot).
The thing is that the supposed relevant change for this matter is replacing micorn  MT29C4G48MAZA with MS29C4G48MAZA (microSemi).

Trying the debug the issue, it seems that the kernel did not read properly device and manufacture id (it read it as 0), while u-boot detects the device properly:

NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-bit)

With same xloader,uboot & kernel we detect nand in older board but not in new board.
Now, the question is how can it be that u-boot nand detection is successful, while kernel fails in nand detect?
1. Does kernel change the CS configuration as part of the omap gpmc driver ? . Note that we didn't add configure CS as part of kernel/linux in code. 
Why should Kernel change the CS configuration anyway (it seems that omap-gpmc.c does change it according to code review. 
2. Is it some change in automatic voltage change that is done as part of kernel omap boot when moving from u-boot to kernel ?

Thanks for any idea,
Ran

  • Hi Ran,

    The failed NAND detection in the kernel after successful detection in the u-boot seems very strange for me because I didn't find any voltage changes in the kernel.

    I suggest you to compare the nand_scan_ident() and nand_get_flash_type() functions and their arguments in the u-boot and in the kernel.

    Also measure the voltage during u-boot and kernel to be sure that it is not changing.

    BR

    Tsvetolin Shulev

  • Hi Tsvetolin,

    I managed to finally work with the new nand (microSemi), when I skipped the cs gpms override configuration in nand (and so staying with the u-boot configuration for the gpmc cs).
    I still wander why the kernel code automatically override the u-boot configuration in the following routine: omap2_nand_gpmc_retime (from file linux-04.02.00.07/arch/arm/mach-omap2/gpmc-nand.c)
    Do you know the reason for this override in kernel ?

    Thanks,
    Ran