User`s guide

Porting the On-Board-Diagnostic-Suite (OBDS) to a Custom Board
i.MX53 System Development User’s Guide, Rev. 1
10-4 Freescale Semiconductor
10.2.8 Ethernet (FEC) Loopback Test
The test requires a loopback Ethernet cable, which is described in the OBDS user guide. There is only one
FEC in the i.MX53 SoC. No customization is required and code from OBDs can be run as-is.
10.2.9 SPI-NOR Test
This test verifies the interface between the i.MX53 ECSPI-1 module and the SPI-NOR flash. The
~/src/driver/spinor folder contains the files necessary to test the SPI-NOR flash available on the
i.MX53 reference board, using the i.MX53 ECSPI-1 module and ECSPI-1 SS1. Change
src/drivers/spinor/imx_spi_nor.c when using a different SPI model. See the following example
implementation for the Atmel AT45DB321D SPI NOR Flash.
struct chip_id AT45DB321D_id =
{ .id0 = 0x01, // Atmel AT45DB321D
.id1 = 0x27,
.id2 = 0x1f
}
There are also calls that are specific to the Atmel flash:
spi_nor_status_atmel
spi_nor_write_atmel
If another CSPI port is used to connect to the SPI, the calls to ECSPI-1 needs to be created in
src/drivers/spi/imx_ecspi.c. For example:
platform_init()
...
imx_spi_nor.base = ECSPI1_BASE_ADDR;
imx_spi_nor.freq = 25000000;
imx_spi_nor.ss_pol = IMX_SPI_ACTIVE_LOW;
imx_spi_nor.ss = 1;
imx_spi_nor.fifo_sz = 32;
imx_spi_nor.us_delay = 0;
spi_init_flash = imx_ecspi_init;
...
Change this to ECSPI2_BASE_ADDR when connecting the SPI NOR to CSPI-2. The IOMUX settings
for the other CSPI port need to be added in
hardware.c.