Enable SPI NOR in imx6sl-evk based custom board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enable SPI NOR in imx6sl-evk based custom board

Jump to solution
1,420 Views
jagsgediya
Contributor II

Hi All,

We have a custom board based on i.MX6 sololite processor. We want to boot the board with SPI NOR Flash. We are using N25Q128 part from micron. Now in uboot following things are enabled to configure this part.

inside drivers/mtd/spi/sf_params.c

#ifdef CONFIG_SPI_FLASH_STMICRO     /* STMICRO */
    {"N25Q128",    0x20ba18, 0x0,       64 * 1024,   256, RD_FULL,           WR_QPP},
#endif


and inside include/configs/mx6slevk.h file, i have configured it like

#define CONFIG_CMD_SF

#ifdef CONFIG_CMD_SF

#define CONFIG_SPI_FLASH

#define CONFIG_SPI_FLASH_STMICRO

#define CONFIG_MXC_SPI

#define CONFIG_SF_DEFAULT_BUS 0

#define CONFIG_SF_DEFAULT_CS  0

#define CONFIG_SF_DEFAULT_SPEED 25000000

#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)

#endif

#define CONFIG_ENV_IS_IN_SPI_FLASH

#ifdef CONFIG_ENV_IS_IN_SPI_FLASH

#define CONFIG_ENV_OFFSET (768 * 1024)

#define CONFIG_ENV_SECT_SIZE (8 * 1024)

#define CONFIG_ENV_SPI_BUS      CONFIG_SF_DEFAULT_BUS

#define CONFIG_ENV_SPI_CS       CONFIG_SF_DEFAULT_CS

#define CONFIG_ENV_SPI_MODE     CONFIG_SF_DEFAULT_MODE

#define CONFIG_ENV_SPI_MAX_HZ   CONFIG_SF_DEFAULT_SPEED

#endif

Right now, i am booting the board through usboot.

and at u-boot it is showing.

SF: Unsupported flash IDs: manuf 00, jedec 0000, ext_jedec 0000
*** Warning - spi_flash_probe() failed, using default environment


I have done the proper pin mux for SPI NOR.


What other things i need to do to enable the SPI NOR?


Thanks,

Jags

Labels (4)
0 Kudos
1 Solution
727 Views
igorpadykov
NXP Employee
NXP Employee

Hi jags

please look at link below

[U-Boot] [PATCH 11/12] sf: probe: Add support for S25FL* flash parts

also seems, using jtag for debugging one can find where this error occurs.

Best regards

chip

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
728 Views
igorpadykov
NXP Employee
NXP Employee

Hi jags

please look at link below

[U-Boot] [PATCH 11/12] sf: probe: Add support for S25FL* flash parts

also seems, using jtag for debugging one can find where this error occurs.

Best regards

chip

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos