iMX25 NAND Flash support

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX25 NAND Flash support

2,475件の閲覧回数
d_saric
Contributor I

Dear all,

we built up a few prototyping board with iMX251 and added the SLC NAND Flash Spansion S34ML04G200. As the flash does not work correctly within u-boot and Linux we are currently investigating the root cause.

Comparing the flash with the PDK's one (Samsung) we found out that we are having another page size setup within our flash:

- Spansion S34ML04G200: 2 Gbit / 4 Gbit: (2048 + 128) bytes; 128-byte spare area (we have the 4Gbit version)

- Samsung K9LAG08U0M: Page Size : (2K + 64)Byte

So it seems the Spansion part does not match the requirement in terms of spare size (which can be found within the reference manual and an appnote, too - we found this recently...). Can you please comment on that and inform if the Spansion flash we chose is / is not compatible? We have several boars built up and would like to get them running correctly, so if there is a chance to configure properly please let us know.

Many thanks in advance,

Dalibor

BTW, there is another Spansion type S34ML04G100 with "x8 = 2112 (2048 + 64) bytes; 64 bytes is spare area" - would this be a better choice?

ラベル(2)
タグ(3)
0 件の賞賛
返信
8 返答(返信)

1,735件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Which U-boot and kernel version do you use?

Could you try mainline U-boot and mainline kernel?

Regards,

Fabio Estevam

0 件の賞賛
返信

1,735件の閲覧回数
d_saric
Contributor I

Dear all,

We are still trying to get the flash work correctly. Doing read / write tests we get the following strange results.

First we wrote 2048 bytes (page size - 0x800) and we were able to read it few times.

All files are exactly the same.

Then we wrote 4096 bytes (0x1000) and this is the result:

If one letter is a 512 bytes, the pattern looks like this:

data written: abcdefgh

Data received:afghefgh

For 3 pages, the pattern looks like this:

Written: abcd efgh ijkl

received: ajkl ejkl ijkl

This behaviour is reproducible (also on several boards) and occurs when testing in u-boot or in the Linux application.

So please can anyone imagine what is happening here? Do we maybe suffer of a HW bug in our design and what could it be? Any ideas are highly appreciated...

Thanks!

0 件の賞賛
返信

1,735件の閲覧回数
BacemDaassi
Contributor II

Hello D.Saric,

The NAND flash can only program a full page at a time, which is 2048bytes (main) + (spare: 64bytes or 128bytes) with the S34ML04G200 and S34ML04G100 Spansion's flash. If you want to program bigger chunks, you will have to split those up first into 2048bytes blocks and program them one at a time (First start program command then wait for completion).

Which commands are you using to program to/read from the NAND in u-boot and Linux Kernel?

You might also want to double check the NFC DMA driver used for reads.

You could also attach a Logic Analyzer to verify that the NAND flash is getting the right commands and data when receiving the program command, and delivering the right data with the read command.

Thanks!

Best regards,

Bacem Daassi

Spansion Inc.

0 件の賞賛
返信

1,735件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi D. Saric

for low level test of nand interface one can look at ATK sources

(I think one can use these codes and run with jtag)

"IMX_ATK_SOURCE_CODE"

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX25PDK&fpsp=1&tab=Design_Tools_Tab

Also suggest to check application note AN3985 "Customizing the Freescale

Advanced Toolkit for i.MX Based Platforms" (rev.0, 2/2010)

in particular sect.4  "Supporting a New NAND Flash Device"

http://www.freescale.com/files/dsp/doc/app_note/AN3985.pdf

Use FSL BSP on link below and only modified ATK (with AN3985) for flashing images to NAND

L2.6.31_09.12.00_SDK_SOURCE : Linux 2.6.31 Source Code Files 2009.12 Release support i.MX23, i.MX25

ATK usage is described in DOC bundle, link below

IMX25_0912_SDK_LINUXDOCS_BUNDLE

Best regards

igor

0 件の賞賛
返信

1,735件の閲覧回数
BacemDaassi
Contributor II

Hello D.Saric,

Adding support of our NAND flashes S34ML04G200 and S34ML04G100 to the iMX251 BSP should be straightforward.

You will just have to add an entry in the table/library of supported devices in "nand_ids.c".

For your reference, the main differences between these two devices are the process technology used and the ECC strength required: 1-Bit for S34ML04G1 vs 4-bit ECC for S34ML04G2.

Let me know if you have any other question. Thanks!

Best regards,

Bacem Daassi

Spansion Inc.

0 件の賞賛
返信

1,735件の閲覧回数
d_saric
Contributor I

Dear all,

thanks for your quick replies. We are currently trying to implement according to your requirements.

Nevertheless is there a possibility to let someone review the schematics section for NAND and iMX25 connection? I would like to make sure that there is no HW issue existent.

BR,

Dalibor

0 件の賞賛
返信

1,735件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

For NAND connections one can look at

IMX25_PDK_DESIGN_FILES: i.MX25 PDK Design Files or

AN4016 Interfacing and Configuring the i.MX25 Flash Devices

Best regards

igor

0 件の賞賛
返信

1,735件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi D. Saric

S34ML04G200 is also supported (128-byte spare area since

it is 16 bit width). Common procedure for NAND programming with i.MX25

is to use ATK and application note AN3985 "Customizing the Freescale Advanced

Toolkit for i.MX Based Platforms" (rev.0, 2/2010) in particular  sect.4  "Supporting

a New NAND Flash Device"

                   

http://www.freescale.com/files/dsp/doc/app_note/AN3985.pdf

"IMX_ATK_SOURCE_CODE"

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX25PDK&fpsp=1&tab=Design_Tools_Tab

Best regards

igor

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

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

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

0 件の賞賛
返信