cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
139 Views
Registered: ‎11-20-2020

NAND not found by linux - 2019.2

Hello,

While booting linux I am getting the following error:

...
mmc0: new SD card at address dce7
mmcblk0: mmc0:dce7 SD02G 1.84 GiB
mmcblk0: p1 p2
nand: timeout while waiting for chip to become ready
nand: No NAND device found
pl353-nand e1000000.flash: could not scan the nand chip
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Segment Routing with IPv6
...

And then once Linux has booted I do not see the flash device.

We are using the Xilinx supported Micro MT29F2G08AB device. Also, we have successfully worked with this device on the same board using Petalinux 2011.9 and 2017.2. This is our first time using 2019.2.

I am able to access the nand device using uboot:

Zynq> nand info

Device 0: nand0, sector size 128 KiB
Page size 2048 b
OOB size 64 b
Erase size 131072 b
subpagesize 2048 b
options 0x00005000
bbt options 0x00028000
Zynq>

I de-compiled our dtb (generated during build) back to a dts file. Here is a snippet:

memory-controller@e000e000 {
    #address-cells = <0x1>;
    #size-cells = <0x1>;
    status = "okay";
    clock-names = "memclk", "apb_pclk";
    clocks = <0x1 0xb 0x1 0x2c>;
    compatible = "arm,pl353-smc-r2p1", "arm,primecell";
    interrupt-parent = <0x4>;
    interrupts = <0x0 0x12 0x4>;
    ranges;
    reg = <0xe000e000 0x1000>;

    flash@e1000000 {
        status = "okay";
        compatible = "arm,pl353-nand-r2p1";
        reg = <0xe1000000 0x1000000>;
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        arm,nand-cycle-t0 = <0x3>;
        arm,nand-cycle-t1 = <0x3>;
        arm,nand-cycle-t2 = <0x1>;
        arm,nand-cycle-t3 = <0x2>;
        arm,nand-cycle-t4 = <0x1>;
        arm,nand-cycle-t5 = <0x1>;
        arm,nand-cycle-t6 = <0x2>;
        nand-bus-width = <0x8>;

        partition@0x00000000 {
            label = "boot";
            reg = <0x0 0x500000>;
        };

        partition@0x00500000 {
            label = "kernel";
            reg = <0x500000 0x1400000>;
        };

        partition@0x01900000 {
            label = "usr_ubifs";
            reg = <0x1900000 0x8000000>;
        };
    };

    flash@e2000000 {
        status = "disabled";
        compatible = "cfi-flash";
        reg = <0xe2000000 0x2000000>;
        #address-cells = <0x1>;
        #size-cells = <0x1>;
    };
};

 

Using petalinux-config -c kernel I have enabled

  • MTD support
  • NAND Device support 
  • ARM PL353 NAND flash driver

Side note: Is there any way for me to confirm the kernel settings above are being used?

 

Let me know if you need more information. Thanks.

0 Kudos
2 Replies
Highlighted
Moderator
Moderator
67 Views
Registered: ‎09-12-2007

Highlighted
Visitor
Visitor
39 Views
Registered: ‎11-20-2020

Hi Stephen, thanks for your response!

I do not believe it is a HW issue. Using the same board, the nand flash device loads correctly using a Petalinux 2017.2 build.
Here are some captures I made this morning after switching the files on the SD card:

Linux boot:

...
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xaa
nand: Micron MT29F2G08ABBEAH4
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
nand: WARNING: pl35x-nand: the ECC used on your system is too weak compared to the one required by the NAND chip
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
3 ofpart partitions found on MTD device pl35x-nand
Creating 3 MTD partitions on "pl35x-nand":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000001900000 : "kernel"
0x000001900000-0x000009900000 : "usr_ubifs"
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
...

MTD devices after boot:

root@device:/dev# mtdinfo mtd0
mtd0
Name:                           boot
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          40 (5242880 bytes, 5.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         true
Device is writable:             true

root@device:/dev# mtdinfo mtd1
mtd1
Name:                           kernel
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          160 (20971520 bytes, 20.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:2
Bad blocks are allowed:         true
Device is writable:             true

root@device:/dev# mtdinfo mtd2
mtd2
Name:                           usr_ubifs
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          1024 (134217728 bytes, 128.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:4
Bad blocks are allowed:         true
Device is writable:             true

 

Please let me know what else I can try.

Thanks,
Joel

0 Kudos