User`s guide
Configuring the SPI NOR Flash Memory Technology Device (MTD) Driver
i.MX53 System Development User’s Guide, Rev. 1
16-2 Freescale Semiconductor
NOTE
If you want to use another data flash model, add it on the last structure. Be
sure the flash models are compatible with the Atmel data flashes.
16.3 Selecting SPI NOR on the Linux Image
Table 16-2 provides information for each supported device.
Follow these steps to select the desired data flash from Table 16-2.
1. Open the mx53_<board name>.c file (located at arch/arm/mach-mx5/mx53_<board name>.c) and
modify the structure called static struct flash_platform_data mxc_spi_flash_data[]
2. Write the name of the data flash desired on the .type variable of this structure. This name must be
exactly the same as it appears on the
dataflash_data[]_ structure.
3. Set the number of partitions you want to use on the SPI NOR Flash. On the mx53_<board name>.c
file, go to the structure called
static struct mtd_partition mxc_dataflash_partitions[]
Each partition has three elements: the name of the partition, the offset, and the size. By default,
these elements are partitioned into a bootloader section and a kernel section, and defined as:
.name = "bootloader",
.offset = 0,
.size = 0x000100000,
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
256 Number of bytes per page
8 Offset
Table 16-2. Device Information
Device Density ID Code #Pages PageSize Offset
AT45DB011B 1 Mbit (128K) xx0011xx (0x0C) 512 264 9
AT45DB021B 2 Mbit (256K) xx0101xx (0x14) 1024 264 9
AT45DB041B 4 Mbit (512K) xx0111xx (0x1C) 2048 264 9
AT45DB081B 8 Mbit (1M) xx1001xx (0x24) 4096 264 9
AT45DB0161B 16 Mbit (2M) xx1011xx (0x2C) 4096 528 10
AT45DB0321B 32 Mbit (4M) xx1101xx (0x34) 8192 528 10
AT45DB0642 64 Mbit (8M) xx111xxx (0x3C) 8192 1056 11
AT45DB1282 128 Mbit (16M) xx0100xx (0x10) 16384 1056 11
Table 16-1. Parameter Variables (continued)
Variable Definition