We have a custom board design that has a 66AK2H12 with the EMIF connected to a Micron MT29F8G16ADBDAH4 NAND flash. This is a 16-bit wide, ONFI-compliant flash with all 16 bits connected to the EMIF. If I boot the Keystone 2 from the UART, U-Boot sees the NAND, reads it, writes it, loves it, wants to get married to it, everything is groovy. But if I put the U-Boot image itself in the NAND flash and configure the BOOTMODE pins so that the RBL will try to boot from flash, nothing works.
The ARM Bootloader documentation (spruhj3, p. 3-7) says
The RBL uses has several methods of determining the NAND device geometry. The
first method is to ask the device if it is ONFI-compliant. To determine if the device is
ONFI compliant, a standard read ID command is issued to device address 0x20 and
four bytes read. If the four bytes contain 0x49464E4F (ASCII for ONFI), the RBL knows
the device is ONFI-compliant. It will then read the ONFI parameter table from the
device that contains the geometry information.
The manufacturer and device ID will always be read from the device by issuing a read
ID command to device address 0x00 and four bytes read. The first byte is the
manufacturer ID. The second byte is the device ID. The third and fourth bytes imply
information about the device geometry.
If the device was found to not be ONFI-compliant, the RBL will compare the
manufacturer and device ID to a table of known devices stored in the RBL. This table
includes geometry information for each device listed in the table.
So, in desperation I probed the EMFI and saw the following transactions on my oscilloscope:
1. RBL resets NAND
Next, RBL issues a READID command (0x90) to address 0x20:
NAND replies with the four-byte magic number 0x49464E4F (ASCII for ONFI):
RBL issues another reset, then a READID (0x90) to address 0x00:
The NAND replies with its device ID
And, after that, as far as I can tell, there are no more transactions on the EMIF.
So what's going on? Is there an erratum in the RBL? Is there a problem booting from a 16-bit NAND?
HELP!