Hi Eric,
Using the values you're referring to, we couldn't make the driver work on the i.MX28 so we had to dig more into this and as far as I recall, we've found those new offset values somewhere else in an errata or in the datasheet itself.
I would recommend that you use the same values you see in the posted driver since these were proven to be working properly.
Thanks and regards,
Bacem Daassi
Sr. System Software Engineer
Spansion International Inc.
Hi Bacem,
I can not match the reg in imx28_spi.c file with the imx287 reg sheet,
eg.
#define CLK_BASE 0x80040000
#define CLKFRAC(base) ((base) + 0x6c)
but the imx287 data sheet the CLKFRAC is 0x80040000+0x1D0
Hi,all
any body has successed using above code on imx287,why i can not read device id correctly?
Hi Bacem,
Thanks. I can build now.
Best Regards
Liu Hui
Hi Liu,
In fact, there is a missing header file in the source file package which also contains some updates. It is file 'spi_flash.h' and you can follow the previous file link to open it. Some fields were added to the strcture 'spi_flash'.
Please use it and let me know how things will work for you.
Of course, we will also update the above posted package with those changes.
Thanks for bringing this up!
Best regards,
Bacem Daassi
Spansion - Sr. System Software Engineer
Hi all,
After I add the files provided above to "u-boot-2009.08/drivers/mtd/spi" and define "CONFIG_SPI_FLASH_SPANSION" in "/include/configs/mx28_evk.h", I get below output when I compile uboot:
spansion.c: In function 'spansion_spi_otp_write': spansion.c:928: warning: unused variable 'offset_backup' spansion.c:927: warning: unused variable 'len_backup' spansion.c: In function 'spi_flash_probe_spansion': spansion.c:1169: error: 'struct spi_flash' has no member named 'quad_write' spansion.c:1174: error: 'struct spi_flash' has no member named 'set_config_reg' spansion.c:1175: error: 'struct spi_flash' has no member named 'set_status_reg' spansion.c:1176: error: 'struct spi_flash' has no member named 'get_config_reg' spansion.c:1177: error: 'struct spi_flash' has no member named 'get_status_reg' spansion.c:1191: error: 'struct spi_flash' has no member named 'otp_read' spansion.c:1192: error: 'struct spi_flash' has no member named 'otp_write' spansion.c:1193: error: 'struct spi_flash' has no member named 'otp_lock' spansion.c:1203: error: 'struct spi_flash' has no member named 'dual_read' spansion.c:1204: error: 'struct spi_flash' has no member named 'quad_read' spansion.c:1205: error: 'struct spi_flash' has no member named 'dual_hp_read' spansion.c:1206: error: 'struct spi_flash' has no member named 'quad_hp_read' make[1]: *** [spansion.o] Error 1
Is there any other missing files or patches to solve this?
Best regards Liu Hui
Hi Bacem,
yes I did... But thanks for the hint. I checked your source and see that you don't use the spi_xfer(). So, then I tried to comment the spi_xfer() links in "cmd_spi.c" and "exports.c" and finally it builds successfully. Now we just need the spansion chip :)
Thanks again!
Best regards,
Alex
Hi Alexander,
Please make sure to define "CONFIG_SPI_FLASH_SPANSION" in your board config file "/include/configs/mx28_evk.h" so that you enable the usage of the i.MX28 HAL driver that we provide.
Let me know how this will work for you. Thanks!
Best regards,
Bacem
Hi Alexander,
Thanks for the nice words! :)
To get uboot working with our SPI flash memory, you just need to follow the steps indicated in the above description and use the sources included over there as well.
So, from a s/w point of view, what you already did should be sufficient to make the SPI flash work for you. However, if you want to benefit from Multi I/O operations, you need some h/w modifications also described above.
Let us know if you have any other concern!
Best regards,
Bacem Daassi
Spansion - Sr. System Software Engineer
Hi! Really great work! We just purchased a Spansion flash chip and want to use your method.
So, I add your files to the uboot 2009.08, provided by freescale, and changed the configuration and some definitions.
Are there any other changes to do in uboot to get work with the Spansion chip? Thanks in avance!