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.

AM3517 - ROM bootloader: 4k pages NAND support?

Other Parts Discussed in Thread: AM3517

Team,

Could you please clarify the below about NAND bootload?
The goal is to identify if the AM3517 can boot from Toshiba TC58NVG3S0FTAI0 NAND (8Gbit  organized as (4096 + 232) bytes × 64 pages × 4096blocks).

Section 24.4.7.4.1 at page 2720 in the AM35x Technical Reference Manual you can read:
"After retrieving parameters from the table, page size and block size are updated based on the fourth byte of the NAND ID data. Because of inconsistency among manufacturers, only devices recognized to be at least 2Gb have these parameters updated. Therefore, the ROM code supports 4-KB page devices, but only if their size, according to the table, is at least 2Gb. Devices smaller than 2Gb have the block size parameter set to 32KB when the page size is 512KB and to 128KB when the page size is 2048KB."

Since there are are no 4k-Page Devices in Table 24-34 we assume that the mechanism ‘NAND ID2 Detection’ does support 4k-Page NAND-Flash.
- But in Table 24-36 ‘ID2 Byte Description’ there is no case for Byte 1: Page Size: 4kB
- The case 4kB Page Nand is missing in Figure 24-19 ‘NAND ID2 Detection’, too.
Questions:
Are 4k page devices recognized only if they have an ID listed in table 24-34?
Does the AM35x ROM-Code support 4kB Page NAND-Devices if via ‘NAND ID2 Detection’ in Byte 1 a 4 kB Page-Size is read?
Are you aware of any 4kB Page NAND-Device which is support by AM35x ROM-Code?

Thanks,

Anthony

  • I want to return to this topic.

    I have investigated this problem in detail. Yes, AM3517 has support for 4K and 8K page NAND for IC's with capacity greater than 2GB with ID codes from that table. But support of that memories is very limited due to a BUG (not described in the errata sheet) in the ROM bootloader. ROM bootloader always reads 0x0C ECC bytes from OOB (ROM code position 0x4001792A; MOVS R1, 0x0C), instead of 0x18 bytes needed for 4K page or 0x30 bytes for 8K page. Thus, ROM bootloader can successfully load only first 2K of data from NAND. If your image contains more data, it can't be loaded because of false ECC errors.

    The only way to load x-loader from these NAND chips is to write small (<=2K bytes) "pre-loader", which will load x-loader. This really works.

    I think, it is the serious reason to update the Errata sheet.

  • I released all needed patches for using 4K-page nand with AM3517 (sau-load (x-load branch) with small pre-loader inside, and patches for u-boot and linux kernel for correct ECC support for this NAND). Full compatibility with 2K-page NAND with 8- and 16-bit buses are preserved. They will be available soon on the http://www.sauris.de web site on the page with downloads related to AM3517 SAU-Module.

  • Patches are ready for download on sauris GmbH web site: Sauris GmbH dowloads page

    0006-Sau-load-nand4k-patch.gz - patch for sau-load (branch of x-loader), contains small pre-loader to avoid TI's boot-ROM bug and other modifications to support 4K-page NAND in x-loader.

    0003-u-boot-nand4k.patch.gz - patch for u-boot, support for 4K-page NAND

    0029-Kernel-SAUModule-nand4k.patch.gz - patch for Linux kernel (2.6.37), support for 4K-page NAND


    Now, after compiling sau-load (x-loader), two files are generated - "MLO" and "NLO". "MLO" is intended for use with all boot sources except NAND, and "NLO" - for NAND only - it represents a concatenation of pre-loader and "MLO"


    These patches are tested with MT29F4G16ABBEAH4-IT:E NAND flash IC.