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.

RBL Not loading x-loader from NAND

Other Parts Discussed in Thread: DM3725

I'm trying to boot from a Micron NAND (MT29C4G48MAZAPAKD-5iT) on a custom board with a DM3725 processor and so far have not had any success.  The board boots OK from the MMC.  The Micron NAND is specified as having a 4b ECC, but the first block is designated as a 1b ECC for less than 1000 Program/Erase cycles (which we are no where close to). It's DeviceID is specified as: BCh, which according to the AM/DM37xx-TRM Rev. N, table 26-32, should be OK. 

I have programmed the x-loader (mlo) from the MMC card into the first block of NAND using the following U-Boot sequence:

=> mmc init
mmc1 is available
=> fatload mmc 0 80008000 mlo
reading mlo

21956 bytes read
=> nandecc hw
HW ECC selected
=> nand write 80008000 0 20000

NAND write: device 0 offset 0x0, size 0x20000
 131072 bytes written: OK
=> nand write 80008000 20000 20000

NAND write: device 0 offset 0x20000, size 0x20000
 131072 bytes written: OK
=> nand write 80008000 40000 20000

NAND write: device 0 offset 0x40000, size 0x20000
 131072 bytes written: OK
=> nand write 80008000 60000 20000

NAND write: device 0 offset 0x60000, size 0x20000
 131072 bytes written: OK
=>

After programming the x-loader into the NAND I see this:

=> nand dump 0
Page 00000000 dump:
    bc 55 00 00 00 08 20 40  12 00 00 ea 14 f0 9f e5
    10 f0 9f e5 0c f0 9f e5  08 f0 9f e5 04 f0 9f e5
    00 f0 9f e5 04 f0 1f e5  60 09 20 40 78 56 34 12

So far so good ....

I then set the boot configuration pins to: 0b01111

I confirmed this using a JTAG bdm and observed this for the CONTROL_STATUS register:

BDI-3000>md 0x480022f0 1
480022f0 : 0x0000030f          783  ....

Again, so far so good ...

I then clear the SRAM (0x40200000 to 0x40204000), remove the MMC card and power cycle the board.  Using the JTAG bdm, I observe this in the SRAM:

BDI-3000>md 0x40200800       
40200800 : a6cec1c9 6e269f42 3cde7746 fe17a611  ....B.&nFw.<....
40200810 : 65e3d747 9755e0b2 5340d57c 577a9fa9  G..e..U.|.@S..zW
40200820 : 6c39fa0a 06a628da 35fd6720 fa290f82  ..9l.(.. g.5..).
40200830 : 3c255773 33581222 c90f69a5 be514086  sW%<".X3.i...@Q.
40200840 : 3f6b8177 9ef5de54 234e5eeb fe6d8276  w.k?T....^N#v.m.
40200850 : 5ce11716 f1335ec4 e18a2a01 6ef62be3  ...\.^3..*...+.n

This appears to be garbage data ... but it is not random data and appears consistent across power cycles, so maybe it's coming from somewhere else ?  When I boot with the MMC card I get this:

BDI-3000>md 0x40200800
40200800 : ea000012 e59ff014 e59ff010 e59ff00c  ................
40200810 : e59ff008 e59ff004 e59ff000 e51ff004  ................
40200820 : 40200960 12345678 12345678 12345678  `. @xV4.xV4.xV4.
40200830 : 12345678 12345678 12345678 12345678  xV4.xV4.xV4.xV4.

Which of course is good data.

Can you tell me if there are any known issues with the newer Micron 4GByte NAND devices in the PoP package ?  Or is there something that I may have missed ?

Any help would be greatly appreciated !

Thank you,

-Kevin

  • Kevin,

    Do you have a working EVM where NAND boot is working fine? There can you do a "nand dump 0x0" and see whether the spare area layout matches with yours? Also can send the complete log of "nand dump 0"?

  • Renjith,

    Thanks for responding ...

    Unfortunately I do not have an EVM to test with.  Below is the output of the entire nand dump 0, as well as the nand info:

    => nand info

    Device 0: nand0, sector size 128 KiB
      Page size      2048 b
      OOB size         64 b
      Erase size   131072 b

    => nand dump 0
    Page 00000000 dump:
        bc 55 00 00 00 08 20 40  12 00 00 ea 14 f0 9f e5
        10 f0 9f e5 0c f0 9f e5  08 f0 9f e5 04 f0 9f e5
        00 f0 9f e5 04 f0 1f e5  60 09 20 40 78 56 34 12
        78 56 34 12 78 56 34 12  78 56 34 12 78 56 34 12
        78 56 34 12 78 56 34 12  00 08 20 40 00 08 20 40
        bc 5d 20 40 b0 8e 20 40  00 00 0f e1 1f 00 c0 e3
        d3 00 80 e3 00 f0 29 e1  68 00 4f e2 04 00 80 e2
        40 20 a0 e3 02 20 80 e0  01 11 a0 e3 02 36 a0 e3
        03 10 81 e0 3e 3b a0 e3  03 10 81 e0 f8 07 b0 e8
        f8 07 a1 e8 02 00 50 e1  fb ff ff 1a 3a 00 00 eb
        17 00 00 eb a4 00 4f e2  68 10 1f e5 01 00 50 e1
        07 00 00 0a 70 20 1f e5  70 30 1f e5 02 20 43 e0
        02 20 80 e0 f8 07 b0 e8  f8 07 a1 e8 02 00 50 e1
        fb ff ff da 94 00 1f e5  80 d0 40 e2 07 d0 cd e3
        98 00 1f e5 98 10 1f e5  00 20 a0 e3 00 20 80 e5
        01 00 50 e1 04 00 80 e2  fb ff ff 1a 04 f0 1f e5
        a4 41 20 40 00 00 a0 e3  17 0f 08 ee 35 0f 07 ee
        01 c0 a0 e3 70 00 60 e1  10 0f 11 ee 02 0a c0 e3
        07 00 c0 e3 02 00 80 e3  06 0b 80 e3 10 0f 01 ee
        13 0e 4f e2 f4 10 1f e5  01 00 50 e1 01 00 a0 03
        00 00 a0 13 0e c0 a0 e1  5a 00 00 eb 0c e0 a0 e1
        0e f0 a0 e1 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
        00 f0 20 e3 00 f0 20 e3  28 d1 1f e5 01 0e 00 eb
        00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 f0 20 e3
        00 f0 20 e3 00 f0 20 e3  00 08 20 40 1c 00 8f e2
        06 2d a0 e3 01 10 a0 e1  00 20 82 e0 f8 07 b0 e8
        f8 07 a1 e8 02 00 50 e1  fb ff ff 1a 0e f0 a0 e1
        70 00 2d e9 d8 40 9f e5  00 00 84 e5 00 50 93 e5
        01 50 05 e2 01 00 55 e3  fb ff ff 0a c4 50 9f e5
        00 10 85 e5 c0 50 9f e5  00 20 85 e5 bc 50 9f e5
        bc 20 9f e5 00 20 85 e5  b8 50 9f e5 b8 20 9f e5
        00 20 85 e5 b4 50 9f e5  b4 20 9f e5 00 20 85 e5
        74 50 9f e5 74 20 9f e5  00 20 85 e5 70 50 9f e5
        70 20 9f e5 00 20 85 e5  70 50 9f e5 68 20 9f e5
        00 20 85 e5 4c 50 9f e5  00 20 95 e5 03 20 82 e3
        00 20 85 e5 07 00 80 e3  00 00 84 e5 00 f0 20 e3
        00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 00 50 93 e5
        01 50 05 e2 01 00 55 e3  fb ff ff 1a 00 f0 20 e3
        00 f0 20 e3 00 f0 20 e3  00 f0 20 e3 70 00 bd e8
        0e f0 a0 e1 a8 09 20 40  60 00 00 6e 68 00 00 6e
        02 06 06 00 6c 00 00 6e  09 11 09 11 1f 1f 14 01
        70 00 00 6e 00 4d 00 48  40 4d 00 48 40 4a 00 48
        40 4c 00 48 04 00 00 00  40 4b 00 48 03 00 00 00
        40 51 00 48 50 0a 02 03  18 d0 9f e5 00 c0 8d e5
        0e c0 a0 e1 6e 06 00 eb  00 c0 9d e5 0c e0 a0 e1
        0e f0 a0 e1 f0 22 00 48  fc ff 20 40 fe 00 00 00
        07 00 00 00 05 00 00 00  01 00 00 00 fa 00 00 00
        05 00 00 00 07 00 00 00  01 00 00 00 7d 01 00 00
        0c 00 00 00 03 00 00 00  01 00 00 00 f4 01 00 00
        0c 00 00 00 03 00 00 00  01 00 00 00 79 01 00 00
        12 00 00 00 04 00 00 00  01 00 00 00 71 02 00 00
        17 00 00 00 03 00 00 00  01 00 00 00 7d 01 00 00
        19 00 00 00 03 00 00 00  01 00 00 00 fa 00 00 00
        0c 00 00 00 07 00 00 00  01 00 00 00 fa 01 00 00
        32 00 00 00 03 00 00 00  01 00 00 00 71 02 00 00
        2f 00 00 00 03 00 00 00  01 00 00 00 a8 00 4f e2
        0e f0 a0 e1 7d 00 00 00  05 00 00 00 07 00 00 00
        01 00 00 00 b4 00 00 00  05 00 00 00 07 00 00 00
        01 00 00 00 fa 00 00 00  0c 00 00 00 03 00 00 00
        01 00 00 00 68 01 00 00  0c 00 00 00 03 00 00 00
        01 00 00 00 82 00 00 00  09 00 00 00 07 00 00 00
        01 00 00 00 e1 00 00 00  0b 00 00 00 06 00 00 00
        01 00 00 00 7d 00 00 00  0c 00 00 00 07 00 00 00
        01 00 00 00 b4 00 00 00  0c 00 00 00 07 00 00 00
        01 00 00 00 3f 01 00 00  30 00 00 00 03 00 00 00
        01 00 00 00 e1 00 00 00  17 00 00 00 06 00 00 00
        01 00 00 00 a8 00 4f e2  0e f0 a0 e1 9f 01 00 00
        0e 00 00 00 03 00 00 00  01 00 00 00 a6 00 00 00
        05 00 00 00 07 00 00 00  01 00 00 00 b2 01 00 00
        10 00 00 00 03 00 00 00  01 00 00 00 4c 01 00 00
        0c 00 00 00 03 00 00 00  01 00 00 00 9f 01 00 00
        17 00 00 00 03 00 00 00  01 00 00 00 9f 01 00 00
        17 00 00 00 03 00 00 00  01 00 00 00 b2 01 00 00
        21 00 00 00 03 00 00 00  01 00 00 00 a6 00 00 00
        0c 00 00 00 07 00 00 00  01 00 00 00 9f 01 00 00
        2f 00 00 00 03 00 00 00  01 00 00 00 9f 01 00 00
        2f 00 00 00 03 00 00 00  01 00 00 00 a8 00 4f e2
        0e f0 a0 e1 d8 00 00 00  05 00 00 00 07 00 00 00
        09 00 00 00 b0 01 00 00  0c 00 00 00 03 00 00 00
        09 00 00 00 e1 00 00 00  09 00 00 00 07 00 00 00
        09 00 00 00 d8 00 00 00  0c 00 00 00 07 00 00 00
        09 00 00 00 e1 00 00 00  13 00 00 00 07 00 00 00
        09 00 00 00 58 00 4f e2  0e f0 a0 e1 90 01 00 00
        0c 00 00 00 00 00 00 00  01 00 00 00 90 01 00 00
        0c 00 00 00 00 00 00 00  01 00 00 00 90 01 00 00
        0c 00 00 00 00 00 00 00  01 00 00 00 90 01 00 00
        0c 00 00 00 00 00 00 00  01 00 00 00 0a 00 00 00
        00 00 00 00 00 00 00 00  01 00 00 00 0a 00 00 00
        00 00 00 00 00 00 00 00  01 00 00 00 0a 00 00 00
        00 00 00 00 00 00 00 00  01 00 00 00 0a 00 00 00
        00 00 00 00 00 00 00 00  01 00 00 00 a6 00 00 00
        0c 00 00 00 00 00 00 00  01 00 00 00 a6 00 00 00
        0c 00 00 00 00 00 00 00  01 00 00 00 a6 00 00 00
        0c 00 00 00 00 00 00 00  01 00 00 00 a6 00 00 00
        0c 00 00 00 00 00 00 00  01 00 00 00 90 65 00 00
        b0 01 00 00 0c 00 00 00  09 00 00 00 10 00 00 00
        09 00 00 00 04 00 00 00  03 00 00 00 01 00 00 00
        90 65 00 00 b0 01 00 00  0c 00 00 00 09 00 00 00
        10 00 00 00 09 00 00 00  04 00 00 00 03 00 00 00
        01 00 00 00 90 65 00 00  b0 01 00 00 0c 00 00 00
        09 00 00 00 10 00 00 00  09 00 00 00 04 00 00 00
        03 00 00 00 01 00 00 00  90 65 00 00 b0 01 00 00
        0c 00 00 00 09 00 00 00  10 00 00 00 09 00 00 00
        04 00 00 00 03 00 00 00  01 00 00 00 90 65 00 00
        e0 01 00 00 0c 00 00 00  08 00 00 00 01 00 00 00
        01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
        90 65 00 00 e0 01 00 00  0c 00 00 00 08 00 00 00
        01 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
        01 00 00 00 90 65 00 00  e0 01 00 00 0c 00 00 00
        08 00 00 00 01 00 00 00  01 00 00 00 01 00 00 00
        01 00 00 00 01 00 00 00  90 65 00 00 e0 01 00 00
        0c 00 00 00 08 00 00 00  01 00 00 00 01 00 00 00
        01 00 00 00 01 00 00 00  01 00 00 00 7a 0f 4f e2
        0e f0 a0 e1 1b 0e 4f e2  0e f0 a0 e1 5e 0f 4f e2
        0e f0 a0 e1 05 0d 4f e2  0e f0 a0 e1 b8 00 4f e2
        0e f0 a0 e1 01 00 50 e2  fd ff ff 1a 1e ff 2f e1
        fb ff ff ea 00 00 a0 e3  1e ff 2f e1 08 30 9f e5
        f0 02 93 e5 50 04 e2 e7  1e ff 2f e1 00 20 00 48
        08 30 9f e5 f0 02 93 e5  1f 00 00 e2 1e ff 2f e1
        00 20 00 48 10 40 2d e9  f8 ff ff eb 1b 00 50 e3
        00 f1 9f 97 25 00 00 ea  f8 0f 20 40 f0 0f 20 40
        f8 0f 20 40 00 10 20 40  f8 0f 20 40 18 10 20 40
        00 10 20 40 18 10 20 40  08 10 20 40 18 10 20 40
        18 10 20 40 08 10 20 40  f0 0f 20 40 18 10 20 40
        08 10 20 40 f0 0f 20 40  f8 0f 20 40 10 10 20 40
        10 10 20 40 18 10 20 40  08 10 20 40 f0 0f 20 40
        f8 0f 20 40 18 10 20 40  10 10 20 40 18 10 20 40
        08 10 20 40 f0 0f 20 40  01 00 a0 e3 10 80 bd e8
    OOB:
        ff f1 f1 55 e9 e9 99 f8
        f8 88 a0 5f 87 ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
    =>

    Thanks for your help !

    -Kevin

  • Kevin,

    Looks like some issue is there with the ECC layout used by your u-boot. 

        ff f1 f1 55 e9 e9 99 f8
        f8 88 a0 5f 87 ff ff ff

        ff ff ff ff ff ff ff ff ...

    I think it should have been 

        ff ff f1 f1 55 e9 e9 99 
        f8 f8 88 a0 5f 87 ff ff 
        ff ff ff ff ff ff ff ff ....

    I am not 100% sure about this layout, whether it is the right one or not. But I'm pretty sure that the current layout is wrong. Can you try taking the latest u-boot and try the same? Or else can you try flashing an image from kernel and see what is the layout it generates?

  • Thanks Renjith.  I will try to put together a newer Uboot and try again.

    Also, I'm curious.  How did you figure out that the layout was bad ?  Was there a calculation that you performed ?  I don't know much about how the ECC is calculated.  Thanks.

  • Kevin,

    Generally all the ECC layouts will skip at least first two bytes in spare area. By convention, the first two bytes are used to indicate bad block. This is used by JFFS and some of the manufacturers follow this convention.

  • Hi Kevin,

    Are you have any progress with the newer u-boot. Is your problem still exists?

    BR

    Tsvetolin Shulev

  • Hi Tsvetolin,

    I have tried the newer u-boot, but the problem still exists.  I am in the process of debugging the ecc calculation to determine the root cause.

    Thanks,

    -Kevin