Determining compatibility between ROM Bootloader (RBL) and Raw NAND devices

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

Finding the right raw NAND device to be used to boot from TI RBLs (ROM Bootloaders) is a common question from customers. Given the dynamic nature of the raw NAND market, it is not feasible to certify all the NANDs currently available when a device is released. However, customers can determine for themselves whether a particular raw NAND will work with a specific RBL. This article provides a step-by-step guide to determine compatibility between a given RBL and raw NAND.

Scope of this article

The scope of this article is to determine if a specific RBL can read data from a given raw NAND device. This article does not address the ECC support offered by the RBL/device hardware or required by a given raw NAND. Also, managed NAND device support (such as eMMC/eSD/moviNAND) is not covered in this article.

Please Note: Apart from using the information in this article, it is strongly recommended that users try using their chosen NAND device with their custom hardware to make sure that the NAND is indeed compatible.

Background

Raw NAND memory is usually organized in blocks, where each block is further divided into pages. For example, MT29F2G08AACWP has a block size of 128 KBytes (excluding spare area) and 64 pages per block (For more details on NAND architecture/geometry, please refer to first few pages of the White paper).
During NAND boot, the first step for the ROM bootloader (RBL) is to determine the NAND geometry (required to read data from NAND device). The following list is the minimum set of NAND parameters needed by the RBL to determine NAND geometry:

  • 8-bit or 16-bit data width
  • Page Size
  • Number of pages per block
  • Number of address cycles (usually 5 in the current NANDs)


This information about NAND geometry is also usually stored in the NAND itself and can be read by the RBL. However, the dynamic raw NAND market (Raw NANDs have relatively short life-cycles (~2 years)) and lack of standardization (initially) has resulted in heterogeneous interfaces from different NAND manufacturers. Not only do these approaches vary between manufacturers, but, at times, they also differ between different generations of NANDs from within the same manufacturer!!!


This offers significant challenges for RBLs which are not meant to be updated very often (if at all) due to cost. To overcome these issues, many approaches have been incorporated into the recent RBLs which are discussed in later sections. Despite this effort, some NANDs might not be directly supported by some device's RBLs. The aim of this article is to provide the needed information to determine compatibility between the RBL and raw NANDs i.e. whether the device can successfully load UBL (User BootLoader) from a particular NAND.


Please Note: If the raw NAND is not supported by the RBL, it might still be supported by TI device. In this scenario, the customer can choose to boot from an alternative bootmode (e.g. SPI, I2C) and still use that raw NAND.

Documents required

The following two documents are required to determine compatibility between a particular raw NAND and a specific RBL:

  1. NAND device datasheet: Obtained from the NAND manufacturer. For example for MT29F2G08AACWP, the datasheet is available from Micron .
  2. TI Bootloader document: Available from TI under the device product folder on TI.com. This bootloader document can either be standalone or part of the ARM Subsystem Guide. For DM335, this information is located in the ARM Subystem Reference Guide, Section 11 .



Methods used by NAND manufacturers

As discussed earlier, raw NAND provides various ways to determine its geometry at run time. This section discusses various methods used by NAND manufacturers to provide this information.

  • 4th byte ID: All raw NANDs have a READ ID (0x90 at Address 0x00) operation which returns 5 bytes of identifier code. In these 5 bytes, the first and second byte (if the starting byte number is 1 aka "one based") is the manufacturer and device ID, respectively. The fourth byte (one based) has information on the NAND parameters (discussed above) which can be used by the RBL. Figure 17 from the MT29F2G08AACWP datasheet (Page No. 24) shows the READ ID operation. For this particular NAND, the four ID bytes are (from the datasheet, Page No. 25):


Byte Number Value
1 0x2C
2 0xDA
3 Don't care
4 0x15


This 4th byte information can be used to determine raw NAND geometry. However, the interpretation of the 4th byte ID changes from raw NAND manufacturer to manufacturer and between generations of raw NANDs. Two interpretations are listed below:


  • Common format: Common format is used by Toshiba, Fujitsu, Renesas, Numonyx, ST, National and Hynix
  • Samsung format: Used in latest Samsung NANDs (e.g. K9LBG08UXD)


  • ONFI: To overcome some of the issues discussed in the previous section, many NAND manufacturers (Hynix, Micron, STMicro, Spansion, Intel) have joined hands to simplify NAND flash integration and offer ONFI compliant NANDs. ONFI also offers a standard approach to read NAND parameters.



Various Approaches used in RBLs to determine NAND geometry

Various methods and approaches have been used in RBLs so that they can read data potentially from all the exisiting and future NANDs. This section discusses various methods that have been used in RBLs to overcome the issue discussed above. The information from this section can be utilized to understand how different methods works and whether a given method can successfully determine raw NAND geometry for a specific combination of RBL and NAND device.
For each method, a compatibility check is suggested. An example is given to highlight the compatibility check process.

Device ID Look-up table


The Device ID Look-up table is a table indexed by the device ID of the raw NAND. This approach is supported in most RBLs.
Each entry in this table has information about the raw NAND parameters. The RBL reads the device ID from the second byte of the READ ID (0x90) operation. This is a quick and easy way to get the NAND parameters. The drawback is that many of the NANDs in the table have been EOL'd (End Of Life) and are no longer available. Another issue is that multiple NANDs (with different geometries) might have same device ID.
For an example of a device ID look-up table, please refer to Table 12-6 of the TMS320DM644x DMSoC ARM Subsystem Reference Guide (Rev. C)  

To check raw NAND compatibility
In order to determine if a raw NAND is compatible using this look-up table method:

  1. Check 1: Is the device ID of the NAND (as specified in the NAND datasheet) in the Device ID lookup table of the TI device ROM?
  2. Check 2: Do the NAND parameters specified in the device ID table matche with the actual NAND parameters (as specified in the NAND datasheet)?


If the answer to both checks is yes, then the NAND is SUPPORTED

Example: Is MT29F2G08AACWP compatible with DM355 Rev 1.4, based on this method? Lets do the checks:

  • Check 1: From the NAND datasheet, device ID is 0xDA. This device ID is present in the DM355 Device ID table (Table 11-3, ARM Subsystem Reference Guide).


Device ID.JPG


  • Check 2: Compare the NAND parameters from the device ID table and NAND datasheet.


NAND parameters Value from Device ID Table/ROM doc Value from NAND datasheet
Data Width 8 8
Page Size 2048 2048
Page Count 64 64
Address cycles 5 5


The answer to both the checks is YES . Hence this NAND is SUPPORTED by DM355 Rev 1.4 RBL based on Device ID table.


Reading the 4th Byte ID


As discussed in the previous section, the fourth byte (one based) from READ ID (0x90) operation has information about raw NAND geometry. Many RBLs implement this method. For example DM644x, Rev 2.3, see Table 12-1, TMS320DM644x DMSoC ARM Subsystem Reference Guide (Rev. C) for details of 4th byte ID as used in the RBLs.


To check NAND compatibility
To determine if a NAND is compatible using this method:

  1. Check 1: Does the RBL support this method?
  2. Check 2: Is the 4th ID byte format supported by the RBL matches with the 4th byte ID of the NAND (as specified in the NAND datasheet)?


If the answer to both the checks is yes, then the NAND is SUPPORTED.

Example: Is MT29F2G08AACWP compatible with DM335 Rev 1.4, based on this method? Lets do the checks for this method:

  • Check 1: As per section 11.2.2.1.3 of the DM335 ARM Subsytem Reference Guide, reading of the 4th ID byte is supported in the DM335 RBL.
  • Check 2: Based on Table 10 of the MT29F2G08AACWP datasheet, the 4th ID byte information will match the information interpreted by DM335 RBL (based on Section 11.2.2.1.3 of the DM335 ARM Subsytem Reference Guide)


Answer to both checks is YES, hence the NAND is SUPPORTED using this method.

ONFI


To check NAND compatibility
To determine if a NAND is compatible using this method:

  • Check 1: Does the RBL of the device supports ONFI?
  • Check 2: Does the NAND supports ONFI (as specified in the NAND datasheet)?


If the answer to both the checks is yes, then the NAND is SUPPORTED .

Example: Is MT29F2G08AACWP compatible with DM335 Rev 1.4, based on this method? Lets do the checks:

  • Check 1: Section 11.2.2.1.2 of the DM335 ARM Subsytem Reference Guide indicates that the RBL supports ONFI
  • Check 2: The NAND datasheet makes no mention of ONFI. This NAND is not ONFI-compliant.


As the Check 2 FAILED, this NAND is NOT SUPPORTED using this method.


NAND parameters from SPI EEPROM


The raw NAND parameters are well known from the NAND datasheet. These parameters can be stored in an EEPROM and read through SPI.  Although there is some overhead in using a small EEPROPM in this manner, this approach ensures that the right NAND parameters are available to the RBL.


To check NAND compatibility
To determine if a NAND is compatible using this method:

  • Check 1: Does the RBL of the device support NAND parameters being from SPI EEPROM?


If the answer to the check is yes, the NAND is SUPPORTED .


Example: Is MT29F2G08AACWP compatible with DM335 Rev 1.4, based on this method? Lets do the checks:

  • Check 1: Section 11.2.2.1.1 (DM335 ARM Subsytem Reference Guide) indicates that the RBL supports NAND parameters from SPI EEPROM.


As the answer to Check 1 is YES, this NAND is SUPPORTED using this method.


Default Parameters


Some RBLs might assign a default set of parameters if the other methods fail. Usually, these parameters are the most common set from the NANDs available in the market at the time of the device release.
One example of a default parameter set is: Data Width: 8, Page Size = 2K, Page count = 64, Address cycles = 5
To check NAND compatibility
To determine if a NAND is compatible using this method:

  • Check 1: Does the RBL of the device support using default parameters?
  • Check 2: Do the default parameters located in the RBL match the NAND parameters from the NAND datasheet?


If the answer to both checks is yes, then the NAND is SUPPORTED .


Example: Is MT29F2G08AACWP compatible with DM335 Rev 1.4, based on this method? Lets do the checks:

  • Check 1: Figure 11-7 of the DM335 ARM Subsytem Reference Guide indicates that the default parameters are not supported by this RBL.
  • Check 2: Not applicable, as there are no default parameters


As Check 2 FAILED, this NAND is NOT SUPPORTED using this method.

Please Note: All of the above methods might not be implemented in all the RBLs. Please check the device documentation for what is supported in a specific device RBL.



RBL NAND support in TI devices


As discussed in the previous section, RBLs use various approaches/methods to ensure successful communication with raw NANDs. The following flowchart shows the steps used by RBLs to get NAND parameters. (Please Note: This is a comprehensive list. Different device RBLs will use a subset of these methods. Please refer to the table below for more details.) Nand boot process.JPG



Methods used in RBL


The methods used to read NAND parameters are summarized in the following table:

Method Description
1 Reading NAND parameters from SPI EEPROM.
2 Getting NAND parameters from ONFI parameter list (if the device is ONFI complaint).
3 Use Look-up table (indexed by Manufacture/Device ID): This table is given in the Bootmode section of the ARM/device user guide, or the bootloader app note associated with the device.
4(a) Use 4th ID byte based on Manufacture ID in Common format to read NAND parameters
4(b) Use 4th ID byte based on Manufacture ID in Samsung format to read NAND parameters
4(c) Use 4th ID byte based on Manufacture ID in Common format to read NAND parameters. In this method, Samsung NAND devices are treated the same as any other NAND device and Common Format is used to read the parameters.
5 Use default NAND parameters



NAND parameter read features/methods supported in various TI devices RBLs


The following table lists the NAND parameter read features supported in various TI devices RBLs. The methods are listed as per their order of execution inside the ROM Boot Loader:

Devices Silicon Rev NAND Methods supported NAND Width supported
DM 355/335
Related Docs: ARM Subsystem User Guide , Migration Guide
1.4 1, 2, 3, 4(a), 4(b) 8
1.3 3, 4(c) 8
1.1 3, 5
(Default Parameters: Page Size = 2K, Page count = 64, Address cycles = 5)
8
DM 644x
Related Docs: ARM Subsystem User Guide, Migration Guide
2.3 2, 3, 4(a), 4(b) 8/16
2.1 (and earlier) 3, 5
(Default Parameters: Page Size = 2K, Page count = 64, Address cycles = 5)
8/16
DM 365/368
Related Docs: ARM Subsystem User Guide
1.2, 1.1 3, 4(c) 8
DM 6467/6467T
Related Docs: Using the TMS320DM646x DMSoC Bootloader document
1.0 (and later) 3, 5
(Default Parameters: Page Size = 2K, Page count = 64, Address cycles = 5)
8/16
DM 6437
Related Docs: Using the TMS320DM643x DMSoC Bootloader document
1.3 3 8/16
1.2, 1.1 3, 5
(Default Parameters: Page Size = 2K, Page count = 64, Address cycles = 5)
8/16
OMAPL137/C6747/C6745/C6743/AM17xx
Related Docs: Using the OMAP-L1x7 Bootloader document
2.0, 1.0 2, 3, 4(c) 8/16
OMAPL138/C6748/C6746/C6742/AM18xx
Related Docs: Using the Application Report OMAP-L1x8 Bootloader document
1.1, 1.0 2, 3, 4(c) 8/16



Step by Step process to determine compatibility

If the raw NAND parameters determined by the RBL match with the NAND parameters from the NAND datasheet, NAND is SUPPORTED . The following steps can be used to determine compatibility:

  • Step 1: Get the raw NAND parameters from the NAND datasheet. Also determine if the NAND is ONFI compliant
  • Step 2: Identify the methods (specified in the above Table), supported in the RBL in question.
  • Step 3: Use the above information to find out if any of the methods supported by the RBL will successfully determine the NAND parameters (as found in the NAND datasheet).


8/16 bit support can be determined from the NAND and TI datasheets.


Examples

Step Description Data Comments
1 Get the NAND parameters from the NAND datasheet. Also determine if the NAND is ONFI compliant. From NAND datasheet: Width: 8/16, Page Size: 2KBytes, Page Count: 64, (Page No. 1)
Address cycles: 5 (Page No. 18).
Manufacturer ID: 0x20, Device ID: 0xDA, 4th Byte: 0x1D (Page No. 33)
ONFI not supported by NAND
2 Identify the methods (specified in the above Table), supported in the RBL in question. 3 (Look up table) , 4(c) (4th ID byte based on Manufacturer ID in Common format)
3 Use the above information to find out if any of the methods supported by the RBL will successfully determine the NAND parameters From the Table 113/114 ARM Subsystem Guide ,Device ID: 0xDA or Manufacturer ID + Device ID: 0x20DA does not exist in the look-up table. So Method 3 won't work.

However using method 4, the NAND parameters from the datasheet matches with the NAND parameters obtained through the 4th byte ID (common format).

NAND is SUPPORTED


Step Description Data Comments
1 Get the NAND parameters from the NAND datasheet. Also determine if the NAND is ONFI compliant. From NAND datasheet: Width: 8, Page Size: 2KBytes, Page Count: 64, (Page No. 4)
Address cycles: 5 (Page No. 10, Table 3).
Manufacturer ID: 0xAD, Device ID: 0xD3, 4th Byte: 0x95 (Page No. 24)
ONFI not supported by NAND
2 Identify the methods (specified in the above Table), supported in the RBL in question. 2 (ONFI), 3 (Look up table) , 4(a) (4th ID byte based on Manufacturer ID in Common format), 4(b) (4th ID byte based on Manufacture ID in Samsung format)
3 Use the above information to find out if any of the methods supported by the RBL will successfully determine the NAND parameters From the Table 12-6 ARM Subsystem Guide,Device ID: 0xD3 does not exist in the look-up table. So Method 3 doesn't work.

However using method 4 (a), the NAND parameters from the datasheet matches with the NAND parameters obtained through the 4th byte ID (common format).

NAND is SUPPORTED


  • Micron 29F32G08CBABA (Datasheet is available from the manufacturer) and DM6467 (Rev 1.0)
Step Description Data Comments
1 Get the NAND parameters from the NAND datasheet. Also determine if the NAND is ONFI compliant. From NAND datasheet: Width: 8, Page Size: 4KBytes, Page Count: 256, (Page No. 1)
Address cycles: 5 (Page No. 26, Table 2).
Manufacturer ID: 0x2C, Device ID: 0x68, 4th Byte: 0x46 (Page No. 53)
ONFI supported by NAND
2 Identify the methods (specified in the above Table), supported in the RBL in question. 3 (Look up table) , 5( Default parameters)
3 Use the above information to find out if any of the methods supported by the RBL will successfully determine the NAND parameters From the Table 4 TMS320DM646x DMSoC Bootloader (Rev. C), Device ID: 0x68 does not exist in the look-up table. So Method 3 doesn't work.

Also using method 5, the NAND parameters from the datasheet doesn't matches with the default parameters.

NAND is NOT SUPPORTED


  • Micron 29F32G08CBABA (Datasheet is available from the manufacturer) and DM335 (Rev 1.4)
Step Description Data Comments
1 Get the NAND parameters from the NAND datasheet. Also determine if the NAND is ONFI compliant. From NAND datasheet: Width: 8, Page Size: 4KBytes, Page Count: 256, (Page No. 1)
Address cycles: 5 (Page No. 26, Table 2).
Manufacturer ID: 0x2C, Device ID: 0x68, 4th Byte: 0x46 (Page No. 53)
ONFI supported by NAND
2 Identify the methods (specified in the above Table), supported in the RBL in question (Section 11.2.2.1 ARM Subsystem Guide). 1 (NAND parameters from SPI EEPROM), 2 (ONFI), 3 (Look up table) , 4(a) (4th ID byte based on Manufacturer ID in Common format), 4(b) (4th ID byte based on Manufacture ID in Samsung format)
3 Use the above information to find out if any of the methods supported by the RBL will successfully determine the NAND parameters As the RBL supports ONFI and the NAND is ONFI complaint, using method 2, the NAND is supported. NAND is SUPPORTED



List of NANDs supported

A dedicated page List of NANDs devices supported by TI RBLs is being maintained to provide the list of NANDs supported by the RBLs. This information has been collected from various sources:

  • NANDs used in EVMs and reference designs
  • Internal testing
  • Feedback from customers



Appendix

NAND paramters format in SPI EEPROM

Address (in bytes) Description
8 Magic Pattern (0xA1ACEDAA)
12 Number of pages per block
16 Number of address cycles
20 Number of bytes in a page (Page Size)
24 Number of spare bytes in a page
28 Number of bits by which block address is to be shifted (Blk Shift)