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.

66AK2E05: NAND not detected when booting from NFS

Part Number: 66AK2E05

In the K2E-EVM board I just found out that the NAND connected via AEMIF is only detected (/sys/devices/platform/soc/21000a00.aemif/30000000.nand) if I boot the board from it, i.e. boot-ubi in uboot. If I boot from NFS (boot=nfs) the NAND is not detected. (no device in /sys/devices/platform/soc/21000a00.aemif )

Is this because the Linux kernel autodetects the NAND only when it needs it to boot from it? Is there a way to force detection of NAND even when the NAND is not used for booting? Loading a module or adding something to the board .dts maybe?

If the NAND detection is always running, could this be due to the fact that when booting from NAND/ubi, uboot starts and mounts the NAND before loading the Linux kernel?

Any help appreciated,

Giannis

  • Giannis,

    The engineer who normally supports this is OOO today and will come back next Monday.

    The way it works as such is per design intent as if you are booting from NFS, you are not needing NAND at that point.

    If you want to enforce detecting of NAND, I would suggest you check the Uboot code. Search for NAND in Uboot code and see if you can find anything relevant.

    best regards,

    David Zhou

  • Hi, Giannis,

    It shouldn't be. I used PLSDK 5.2 release and the kernel boot logs show NAND partitions. What version of PLSDK are you using?

    [ 8.986675] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xac
    [ 8.993059] nand: Micron MT29F4G08ABBDAH4
    [ 8.997075] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [ 9.004962] Bad block table found at page 262080, version 0x01
    [ 9.011321] Bad block table found at page 262016, version 0x01
    [ 9.017477] 3 ofpart partitions found on MTD device 30000000.nand
    [ 9.023598] Creating 3 MTD partitions on "30000000.nand":
    [ 9.029008] 0x000000000000-0x000000100000 : "u-boot"
    [ 9.034525] 0x000000100000-0x000000180000 : "params"
    [ 9.040000] 0x000000180000-0x000020000000 : "ubifs"
    [ 9.048813] davinci_nand 30000000.nand: controller rev. 2.5

    k2e-evm login: root
    root@k2e-evm:~# cat /proc/mtd
    dev: size erasesize name
    mtd0: 00100000 00010000 "u-boot-spl"
    mtd1: 00f00000 00010000 "misc"
    mtd2: 00100000 00020000 "u-boot"
    mtd3: 00080000 00020000 "params"
    mtd4: 1fe80000 00020000 "ubifs"
    root@k2e-evm:~# uname -a
    Linux k2e-evm 4.14.79-gbde58ab01e #1 SMP PREEMPT Thu Dec 20 03:49:56 UTC 2018 armv7l GNU/Linux

    Rex

  • Hi Rex,

    is that when booting from NFS or net/TFTP?

    I use Processor SDK 6.00.00.07 and when booting from NFS the NAND is not detected, though the SPI NOR is.

  • Hi, Giannis,

    I use boot=net which tftp the images and uses nfs mounted filesystem. I'll check PLSDK 6.x and get back to you.

    Rex

  • Hi, Giannis,

    I downloaded the latest PLSDK 6.1, and it works fine. Please give it a try with the latest release.

    Arago 2019.07 k2e-evm ttyS0

    k2e-evm login:

    #>>>>> LCD 12
    IP Address:
    158.218.117.72
    root
    root@k2e-evm:~# cat /proc/mtd
    dev: size erasesize name
    mtd0: 00100000 00010000 "u-boot-spl"
    mtd1: 00f00000 00010000 "misc"
    mtd2: 00100000 00020000 "u-boot"
    mtd3: 00080000 00020000 "params"
    mtd4: 1fe80000 00020000 "ubifs"
    root@k2e-evm:~# uname -a
    Linux k2e-evm 4.19.59-g5f8c1c6121 #1 SMP PREEMPT Sun Oct 20 13:47:16 UTC 2019 armv7l GNU/Linux
    root@k2e-evm:~#

    root@k2e-evm:~# dmesg | grep nand
    [ 9.787240] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xac
    [ 9.793628] nand: Micron MT29F4G08ABBDAH4
    [ 9.797645] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [ 9.817959] 3 fixed-partitions partitions found on MTD device 30000000.nand
    [ 9.824947] Creating 3 MTD partitions on "30000000.nand":
    [ 9.850006] davinci_nand 30000000.nand: controller rev. 2.5
    root@k2e-evm:~#

    Rex