How to add Nor Flash to Yocto build?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Nor Flash to Yocto build?

157 Views
Contributor V

I'm using an imx6qd board with 2GB DDR, The requirement is to add NOR FLASH support to the board,

The chip I'm using is mt28ew128aba.

I found a file in u-boot "sf_params.c"

And I understand we need to add the i.d in CONFIG_SPI_FLASH_STMICRO

but it requires several fields, 

for eg.

{"M25P10",    0x202011, 0x0, 32 * 1024,     4, 0,   0},

what are these values? and where can I find them? 

0 Kudos
5 Replies

1 View
Contributor IV

CONFIG_SPI_FLASH_STMICRO is used for serial NOR flash chips. Your chip is parallel NOR with Common Flash Interface (CFI) so you cannot use serial flash drivers to access the chip. You should be using CONFIG_FLASH_CFI_MTD instead. I have not used it myself but there already some boards in u-boot that use CFI flash. You can take those as reference.

0 Kudos

1 View
Contributor V

Hi Tahsin,

Can you give me the file name where those board that use CFI flash are mentioned?

0 Kudos

1 View
NXP TechSupport
NXP TechSupport

Hi Sujay

i.MX6Q Sabre AI board uses M29W256GL7AN6E parallel NOR flash:

mx6sabreauto.c\mx6sabreauto\freescale\board - uboot-imx - i.MX U-Boot 

driver description can be found in sect.3.2 EIM NOR Linux Manual.

Best regards
igor

0 Kudos

1 View
Contributor IV

You can search the u-boot source code for text CONFIG_FLASH_CFI_ to see where it is used. For example see include/configs/mx6ul_arm2.h or configs/mx6qsabreauto_eimnor_defconfig.

0 Kudos

1 View
NXP TechSupport
NXP TechSupport

Hi Sujay

one can look at sect.3.8.5 Menu Configuration Options Linux Manual in

Linux 4.19.35_1.1.0 Documentation

Regarding u-boot "sf_params.c" I could not find it in uboot sources

uboot-imx - i.MX U-Boot 

One can pay attention to spi_nor_ids.c :

spi-nor-ids.c\spi\mtd\drivers - uboot-imx - i.MX U-Boot 

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

0 Kudos