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.

Linux/AM3352: NAND detect issue in U-boot

Part Number: AM3352

Tool/software: Linux

Hello, 

SDK 04.02.00.09 is used on custom hardware platform. The hardware is almost the same as am335x- GP-evm.  Especially the pin mux is completely the same as am335x-evm for the nand part. And SDK 01.00.00.03 works well for the custom hardware. But on SDK 04.02.00.09 it seems no NAND flash detected by uboot. What would be the matter? The log info for uboot showes as below.


U-Boot 2017.01-00444-g4e7f468-dirty (Apr 25 2018 - 11:29:21 +0800)

CPU : AM335X-GP rev 2.1
Model: TI AM335x EVM-SK
DRAM: 256 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Card did not respond to voltage select!
** Bad device mmc 0 **
Using default environment

<ethaddr> not set. Validating first E-fuse MAC
Net: cpsw, usb_ether
Hit any key to stop autoboot: 0

  • Hello yang,

    Please, see this post. You are probably missing the nand node in your bord's device tree in U-Boot.

    Best regards,
    Kemal

  • Hi, Kemal

    Thanks for your quick reply. But still I get this issue.

    U-Boot 2017.01-00444-g4e7f468-dirty (Apr 26 2018 - 11:00:42 +0800)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM
    DRAM: 256 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0

    Because on custom board we don't have EEPROM. So I just set the board to GPEVM manually on uboot code. I have done this using the following modification on the file /u-boot-root-directory/board/ti/am335x/board.h. Is this correct?

    static inline int board_is_gp_evm(void)
    {
    return 1;
    //return board_ti_is("A33515BB");
    }

    Then am335x-evm.dts will be used as the device tree file? Or I miss something?


    Best Regards
    Yang
  • Can you revert this //return board_ti_is("A33515BB"); change and apply this patch instead?

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-Hardcode-EEPROM-board-name-to-A33515BB.patch

  • Hi, Kemal

    I tried your patch and it works. But still I get 0MB NAND. I have attached the NAND part schematic? I think this part is correct. But any way I have attached here. Any idea about this?

    Best Regards

    Yang 

  • Is you NAND detected and properly working in Linux?

  • Hi, Kermal

    This is the log for SDK 01.00.00.03.

    U-Boot SPL 2014.07-00107-gd28f2b9-dirty (Feb 27 2017 - 14:19:00)


    U-Boot 2014.07-00107-gd28f2b9-dirty (Feb 27 2017 - 14:19:00)

    I2C: ready
    DRAM: 256 MiB
    NAND: 256 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - bad CRC, using default environment

    Net: <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
    U-Boot#
    U-Boot#


    BR
    Yang
  • Does it detected by kernel?
  • Yes. My root file system located on the NAND. The kernel starting log showes.

    Booting from nand ...

    NAND read: device 0 offset 0x80000, size 0x40000
    262144 bytes read: OK

    NAND read: device 0 offset 0x200000, size 0x800000
    nand: bit-flip corrected @data=106
    8388608 bytes read: OK
    Kernel image @ 0x82000000 [ 0x000000 - 0x41c2f0 ]
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8bff3000, end 8bfffcd2 ... OK

    Starting kernel ...
  • Hi, Kernal

    The picture is the updated am335x-evm NAND part schematic from TI. The NAND chip is set to DNI.  But in the previous version of am335x-evm schematic this part  is not set to DNI. So maybe the updated SDK will not support NAND?

    BR

    Yang

  • The nand's size gets printed by this printf("%lu MiB\n", total_nand_size / 1024); in <Processor SDK>/board-support/u-boot-<version>/drivers/mtd/nand/nand.c Please, compare the two U-Boot source trace this code and find why it prints 0 MiB in new U-Boot. Probably the pinmux settings have changed or something.

  • Hi, Kemal

    I have found the root cause. On the function enable_board_pin_mux in the file /board/ti/am335x/mux.c, it showes that on GPEVM profile 2 and 3 don't have NAND. So it just do not set the NAND pin mux.

    BR

    Yang