[U-Boot] M29EW flash is detected as 0xFF

Hi,
I have a 16MB, M29EW flash on target boards.
I got the below info, while probing the flash.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
Since the Manu.ID of this flash is 0x89, it got detected as 0xFF.
Does u-boot code have a support for M29EW flash..?
Thanks, Jagan.

FYI.
Can u help me anything further.
Thanks, Jagan.
On Sun, Feb 17, 2013 at 5:21 PM, Jagan Teki jagannadh.teki@gmail.com wrote:
Hi,
I have a 16MB, M29EW flash on target boards.
I got the below info, while probing the flash.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
Since the Manu.ID of this flash is 0x89, it got detected as 0xFF.
Does u-boot code have a support for M29EW flash..?
Thanks, Jagan.

Hi all,
I have a 16MB, M29EW flash on target boards.
I got the below info, while probing the flash.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
Since the Manu.ID of this flash is 0x89, it got detected as 0xFF.
Does u-boot code have a support for M29EW flash..?
Thanks, Jagan.

On 18.02.2013 10:57, Jagan Teki wrote:
I have a 16MB, M29EW flash on target boards.
I got the below info, while probing the flash.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
Since the Manu.ID of this flash is 0x89, it got detected as 0xFF.
Does u-boot code have a support for M29EW flash..?
I'm pretty sure, yes. Which U-Boot version are you using? Most likely its an older version. Your problem reminds me about this commit:
Author: Philippe De Muyter phdm@macqel.be 2010-08-10 16:54:52 Committer: Stefan Roese sr@denx.de 2010-08-18 09:09:00 Parent: 2e97394a6d07a36dfc139b7b98b12e452b5bd8dc (cfi_flash: flinfo: allow user interrupt in flash print info fn) Child: 70084df7125a0b67de707b999982ec67adfdc35c (cfi_flash: Cleanup flash_print_info()) Branches: many (98) Follows: v2010.06 Precedes: v2010.09-rc1
Fix printing & reading of 16-bit CFI device identifiers
Fix reading and printing of CFI flashes 16-bit devices identifiers
Nowadays CFI flashes have a 16-bit device identifier. U-boot still print them and read them as if they were only 8-bit wide. Fix that. Before: Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x1B After: Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x881B
So please update to the latest version and try again.
Best regards, Stefan

Hi Stefan,
On Wed, Feb 20, 2013 at 7:27 PM, Stefan Roese sr@denx.de wrote:
On 18.02.2013 10:57, Jagan Teki wrote:
I have a 16MB, M29EW flash on target boards.
I got the below info, while probing the flash.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
Since the Manu.ID of this flash is 0x89, it got detected as 0xFF.
Does u-boot code have a support for M29EW flash..?
I'm pretty sure, yes. Which U-Boot version are you using? Most likely its an older version. Your problem reminds me about this commit:
Author: Philippe De Muyter phdm@macqel.be 2010-08-10 16:54:52 Committer: Stefan Roese sr@denx.de 2010-08-18 09:09:00 Parent: 2e97394a6d07a36dfc139b7b98b12e452b5bd8dc (cfi_flash: flinfo: allow user interrupt in flash print info fn) Child: 70084df7125a0b67de707b999982ec67adfdc35c (cfi_flash: Cleanup flash_print_info()) Branches: many (98) Follows: v2010.06 Precedes: v2010.09-rc1
Fix printing & reading of 16-bit CFI device identifiers Fix reading and printing of CFI flashes 16-bit devices identifiers Nowadays CFI flashes have a 16-bit device identifier. U-boot still print them and read them as if they were only 8-bit wide. Fix that. Before: Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x1B After: Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x881B
So please update to the latest version and try again.
Sorry for not intimating the version I used, actually I am using the latest u-boot version 2013.01.01 Below link the head commit for cfi_flash.c http://git.denx.de/?p=u-boot.git;a=commit;h=d2af028db3f75390f56f018e16c0f269...
I am not sure whats wrong with code for detecting the m/c ID.
Please let me know your inputs.
Thanks, Jagan.

On Wed, Feb 20, 2013 at 10:55 PM, Jagan Teki jagannadh.teki@gmail.com wrote:
Hi Stefan,
On Wed, Feb 20, 2013 at 7:27 PM, Stefan Roese sr@denx.de wrote:
On 18.02.2013 10:57, Jagan Teki wrote:
I have a 16MB, M29EW flash on target boards.
I got the below info, while probing the flash.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
Since the Manu.ID of this flash is 0x89, it got detected as 0xFF.
Does u-boot code have a support for M29EW flash..?
I'm pretty sure, yes. Which U-Boot version are you using? Most likely its an older version. Your problem reminds me about this commit:
Author: Philippe De Muyter phdm@macqel.be 2010-08-10 16:54:52 Committer: Stefan Roese sr@denx.de 2010-08-18 09:09:00 Parent: 2e97394a6d07a36dfc139b7b98b12e452b5bd8dc (cfi_flash: flinfo: allow user interrupt in flash print info fn) Child: 70084df7125a0b67de707b999982ec67adfdc35c (cfi_flash: Cleanup flash_print_info()) Branches: many (98) Follows: v2010.06 Precedes: v2010.09-rc1
Fix printing & reading of 16-bit CFI device identifiers Fix reading and printing of CFI flashes 16-bit devices identifiers Nowadays CFI flashes have a 16-bit device identifier. U-boot still print them and read them as if they were only 8-bit wide. Fix that. Before: Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x1B After: Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x881B
So please update to the latest version and try again.
Sorry for not intimating the version I used, actually I am using the latest u-boot version 2013.01.01 Below link the head commit for cfi_flash.c http://git.denx.de/?p=u-boot.git;a=commit;h=d2af028db3f75390f56f018e16c0f269...
I am not sure whats wrong with code for detecting the m/c ID.
Please let me know your inputs.
Thanks, Jagan.
For your information, I am using below configs for my nor setup.
#define CONFIG_SYS_FLASH_BASE 0xE2000000 # define CONFIG_SYS_FLASH_SIZE (16 * 1024 * 1024) # define CONFIG_SYS_MAX_FLASH_BANKS 1 # define CONFIG_SYS_MAX_FLASH_SECT 512 # define CONFIG_SYS_FLASH_ERASE_TOUT 1000 # define CONFIG_SYS_FLASH_WRITE_TOUT 5000 # define CONFIG_FLASH_SHOW_PROGRESS 10 # define CONFIG_SYS_FLASH_CFI # undef CONFIG_SYS_FLASH_EMPTY_INFO # define CONFIG_FLASH_CFI_DRIVER # undef CONFIG_SYS_FLASH_PROTECTION /* don't use hardware protection */ # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* use buffered writes (20x faster) */
Please let me know, if am wrong with any settings..
Thanks, Jagan.

Hi Jagan,
On 20.02.2013 18:25, Jagan Teki wrote:
So please update to the latest version and try again.
Sorry for not intimating the version I used, actually I am using the latest u-boot version 2013.01.01 Below link the head commit for cfi_flash.c http://git.denx.de/?p=u-boot.git;a=commit;h=d2af028db3f75390f56f018e16c0f269...
I am not sure whats wrong with code for detecting the m/c ID.
Please let me know your inputs.
This reminds me of a still pending problem with 8-bit flash chips. Could you perhaps give this patch a try?
http://patchwork.ozlabs.org/patch/140863/
Not sure if it still applies clean. But it seemed to fix a problem with 8-bit bus flash chips.
Thanks, Stefan
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: office@denx.de

Hi Stefan,
On Wed, Feb 20, 2013 at 11:44 PM, Stefan Roese sr@denx.de wrote:
Hi Jagan,
On 20.02.2013 18:25, Jagan Teki wrote:
So please update to the latest version and try again.
Sorry for not intimating the version I used, actually I am using the latest u-boot version 2013.01.01 Below link the head commit for cfi_flash.c http://git.denx.de/?p=u-boot.git;a=commit;h=d2af028db3f75390f56f018e16c0f269...
I am not sure whats wrong with code for detecting the m/c ID.
Please let me know your inputs.
This reminds me of a still pending problem with 8-bit flash chips. Could you perhaps give this patch a try?
http://patchwork.ozlabs.org/patch/140863/
Not sure if it still applies clean. But it seemed to fix a problem with 8-bit bus flash chips.
I am able to detect the correct Manufacture ID and device ID with these changes.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x7E2301 Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
But the 1024 bytes buffer size is another issues, as Numonyx CFI wrongly mentioned 1024 instead of 256. Any way that we can fix I guess for N29EW flashes..
but how these changes impacts the other flashes i don't ..
Please find the log message.
Thanks, Jagan.

Hi Stefan,
On Thu, Feb 21, 2013 at 5:27 PM, Jagan Teki jagannadh.teki@gmail.com wrote:
Hi Stefan,
On Wed, Feb 20, 2013 at 11:44 PM, Stefan Roese sr@denx.de wrote:
Hi Jagan,
On 20.02.2013 18:25, Jagan Teki wrote:
So please update to the latest version and try again.
Sorry for not intimating the version I used, actually I am using the latest u-boot version 2013.01.01 Below link the head commit for cfi_flash.c http://git.denx.de/?p=u-boot.git;a=commit;h=d2af028db3f75390f56f018e16c0f269...
I am not sure whats wrong with code for detecting the m/c ID.
Please let me know your inputs.
This reminds me of a still pending problem with 8-bit flash chips. Could you perhaps give this patch a try?
http://patchwork.ozlabs.org/patch/140863/
Not sure if it still applies clean. But it seemed to fix a problem with 8-bit bus flash chips.
I am able to detect the correct Manufacture ID and device ID with these changes.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x7E2301 Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
But the 1024 bytes buffer size is another issues, as Numonyx CFI wrongly mentioned 1024 instead of 256. Any way that we can fix I guess for N29EW flashes..
but how these changes impacts the other flashes i don't ..
Please find the log message.
I made a fix for hw cfi issue when device is operating in 8-bit mode, If the above changes are looks fine we may have this fix will solve the M29EW flashes operates under 8-bit mode.
Could send your comments/views.
Thanks, Jagan.

Hi Stefan,
On Fri, Feb 22, 2013 at 9:02 PM, Jagan Teki jagannadh.teki@gmail.com wrote:
Hi Stefan,
On Thu, Feb 21, 2013 at 5:27 PM, Jagan Teki jagannadh.teki@gmail.com wrote:
Hi Stefan,
On Wed, Feb 20, 2013 at 11:44 PM, Stefan Roese sr@denx.de wrote:
Hi Jagan,
On 20.02.2013 18:25, Jagan Teki wrote:
So please update to the latest version and try again.
Sorry for not intimating the version I used, actually I am using the latest u-boot version 2013.01.01 Below link the head commit for cfi_flash.c http://git.denx.de/?p=u-boot.git;a=commit;h=d2af028db3f75390f56f018e16c0f269...
I am not sure whats wrong with code for detecting the m/c ID.
Please let me know your inputs.
This reminds me of a still pending problem with 8-bit flash chips. Could you perhaps give this patch a try?
http://patchwork.ozlabs.org/patch/140863/
Not sure if it still applies clean. But it seemed to fix a problem with 8-bit bus flash chips.
I am able to detect the correct Manufacture ID and device ID with these changes.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x7E2301 Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
But the 1024 bytes buffer size is another issues, as Numonyx CFI wrongly mentioned 1024 instead of 256. Any way that we can fix I guess for N29EW flashes..
but how these changes impacts the other flashes i don't ..
Please find the log message.
I made a fix for hw cfi issue when device is operating in 8-bit mode, If the above changes are looks fine we may have this fix will solve the M29EW flashes operates under 8-bit mode.
Could send your comments/views.
Thanks, Jagan.
Could you please send your comments.
Thanks, Jagan.

Hi Jagan,
On 22.02.2013 16:32, Jagan Teki wrote:
I am able to detect the correct Manufacture ID and device ID with these changes.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x7E2301 Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
But the 1024 bytes buffer size is another issues, as Numonyx CFI wrongly mentioned 1024 instead of 256. Any way that we can fix I guess for N29EW flashes..
but how these changes impacts the other flashes i don't ..
Please find the log message.
I made a fix for hw cfi issue when device is operating in 8-bit mode, If the above changes are looks fine we may have this fix will solve the M29EW flashes operates under 8-bit mode.
Could send your comments/views.
Not sure if I understood you correctly. So I have to ask some questions:
Did you use this patch?
http://patchwork.ozlabs.org/patch/140863/
Did it apply without issues to mainline U-Boot? Or did you have to make some changes so that it can be applied? And did it fix the issues you have seen before?
And did you have some make some further changes as well?
Thanks, Stefan

Hi Stefan,
On Fri, Mar 1, 2013 at 12:29 PM, Stefan Roese sr@denx.de wrote:
Hi Jagan,
On 22.02.2013 16:32, Jagan Teki wrote:
I am able to detect the correct Manufacture ID and device ID with these changes.
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x7E2301 Erase timeout: 4096 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 1024 bytes
But the 1024 bytes buffer size is another issues, as Numonyx CFI wrongly mentioned 1024 instead of 256. Any way that we can fix I guess for N29EW flashes..
but how these changes impacts the other flashes i don't ..
Please find the log message.
I made a fix for hw cfi issue when device is operating in 8-bit mode, If the above changes are looks fine we may have this fix will solve the M29EW flashes operates under 8-bit mode.
Could send your comments/views.
Not sure if I understood you correctly. So I have to ask some questions:
Firstly, apologies from my side by sending too many status updates that makes you confusion.
Did you use this patch?
Yes, I have applied the same patch,
http://patchwork.ozlabs.org/patch/140863/
Did it apply without issues to mainline U-Boot? Or did you have to make some changes so that it can be applied? And did it fix the issues you have seen before?
I have manually applied those changes as the index values are differ. I haven't added any newly code other than the patch changes.
Yes it fixed the error by detecting correct manufacture and device ID.
And did you have some make some further changes as well?
And apart from these patch change, I have changed one more this for numonyx M29EW fix for incorrect write buffer size..any way that I could send once these changes are pushed/reviewed.
Thanks, Jagan.
Thanks, Stefan

On 01.03.2013 08:12, Jagan Teki wrote:
I made a fix for hw cfi issue when device is operating in 8-bit mode, If the above changes are looks fine we may have this fix will solve the M29EW flashes operates under 8-bit mode.
Could send your comments/views.
Not sure if I understood you correctly. So I have to ask some questions:
Firstly, apologies from my side by sending too many status updates that makes you confusion.
No problem. I have been slow on reacting.
Did you use this patch?
Yes, I have applied the same patch,
http://patchwork.ozlabs.org/patch/140863/
Did it apply without issues to mainline U-Boot? Or did you have to make some changes so that it can be applied? And did it fix the issues you have seen before?
I have manually applied those changes as the index values are differ. I haven't added any newly code other than the patch changes.
If you had to make some changes to this patch, then please send the changes / updated patch version as a new version (v3) to the list. So that it applies clean now. And please change the commit text accordingly.
Yes it fixed the error by detecting correct manufacture and device ID.
Only that? IIRC, then without this patch, writing to the 8-bit flash didn't work at all. But I don't have such a board, so I can't really test myself.
And did you have some make some further changes as well?
And apart from these patch change, I have changed one more this for numonyx M29EW fix for incorrect write buffer size..any way that I could send once these changes are pushed/reviewed.
Please send this additional change/fix as a separate patch to the list as well.
Thanks, Stefan

Hi Stefan,
On Fri, Mar 1, 2013 at 12:48 PM, Stefan Roese sr@denx.de wrote:
On 01.03.2013 08:12, Jagan Teki wrote:
I made a fix for hw cfi issue when device is operating in 8-bit mode, If the above changes are looks fine we may have this fix will solve the M29EW flashes operates under 8-bit mode.
Could send your comments/views.
Not sure if I understood you correctly. So I have to ask some questions:
Firstly, apologies from my side by sending too many status updates that makes you confusion.
No problem. I have been slow on reacting.
Did you use this patch?
Yes, I have applied the same patch,
http://patchwork.ozlabs.org/patch/140863/
Did it apply without issues to mainline U-Boot? Or did you have to make some changes so that it can be applied? And did it fix the issues you have seen before?
I have manually applied those changes as the index values are differ. I haven't added any newly code other than the patch changes.
If you had to make some changes to this patch, then please send the changes / updated patch version as a new version (v3) to the list. So that it applies clean now. And please change the commit text accordingly.
Please find that I have sent a v3 patch titled as: mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support Tested on two flashes 256M29EW, 512M29EW work fine.
Yes it fixed the error by detecting correct manufacture and device ID.
Only that? IIRC, then without this patch, writing to the 8-bit flash didn't work at all. But I don't have such a board, so I can't really test myself.
And did you have some make some further changes as well?
And apart from these patch change, I have changed one more this for numonyx M29EW fix for incorrect write buffer size..any way that I could send once these changes are pushed/reviewed.
Please send this additional change/fix as a separate patch to the list as well.
I sent one patch for this titled as: mtd: cfi_flash: Write buffer size adjustment for M29EW Numonyx devices
Please review and let me know for any issues/comments.
Thanks, Jagan.
participants (2)
-
Jagan Teki
-
Stefan Roese