Spansion - wall comments

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

Spansion - wall comments

1,728 Views
TedEiden
Contributor I
18-Spansion_logo.jpg This group was created to enable use of Spansion devices in i.MX-based platforms.
Tags (2)
0 Kudos
12 Replies

1,336 Views
BacemDaassi
Contributor II

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.

0 Kudos

1,336 Views
ericfang
Contributor I

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

0 Kudos

1,336 Views
ericfang
Contributor I

Hi,all

any body has successed using above code on imx287,why i can not read device id correctly?

0 Kudos

1,336 Views
LiuHui
Contributor I

Hi Bacem,

Thanks. I can build now.

 

Best Regards

Liu Hui

0 Kudos

1,336 Views
BacemDaassi
Contributor II

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

0 Kudos

1,336 Views
LiuHui
Contributor I

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

0 Kudos

1,336 Views
AlexanderKeller
Contributor I

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

0 Kudos

1,336 Views
BacemDaassi
Contributor II

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

0 Kudos

1,336 Views
AlexanderKeller
Contributor I
Hello Bacem, thanks for the answer! This is the first good message since the uboot/SPI flash nightmare has begun (4 weeks ago...) I've already tried to use the latest uboot-imx release and build up a config but after probing the flash (a Winbond flash) and writing the image...the spi flash is still filled with zeroes. And since there is no SPI driver for the 2009.08 release for the IMX28, I suggested to take the Spansion flash to use your solution... When I use your files and set the "imx28_spi.c" as the SPI driver; the build process stops with some messages "undefined reference to 'spi_xfer' ". I guess it's because of the "CONFIG_CMD_SPI" in the configuration file, but it's needed? So, do you got an advice? Thanks in advance! Best regards, Alexander Keller (thesis writing student in Sungrow Power Supply)
0 Kudos

1,336 Views
BacemDaassi
Contributor II

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

0 Kudos

1,335 Views
AlexanderKeller
Contributor I

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!

0 Kudos

1,335 Views
VladanJovanovic
NXP Employee
NXP Employee
Great work. Thanks.
0 Kudos