[U-Boot] Does U-boot supports Spansion S29GL512P NOR Flash?
prakash bedge
prakash.bedge at gmail.com
Wed Apr 14 07:03:59 CEST 2010
Hi Stefan,
Does the latest code supports S29GL512P chip, since I am not seeing any
instance of this chip in 2010.03 uboot code.
>>So you have chipwidth *and* portwidth of 16! This is the most common use
case.
But when flash is getting detected it shows the chipwidth is 8 and portwidth
is 16. If you see the logs in earlier mail it is like
*found port 2 chip 1 port 16 bits chip 8 bits. *Is it correct or wrong?
>> Again, please use the mainline CFI driver and give it another try.
I can not use the current code as we have to use the present code for some
reason. I believe the uboot code 2009.08, I am using, must also support the
S29GL512P chip.
I replaced the cfi_flash.c with the new cfi_flash.c file from latest uboot
version 2010.03 and done relevant changes. But still I didn't get the
postive result. Is there anything else that I have to check, or by using
only cfi_flash.c and cfi_flash.h from 2010.03 uboot code CFI flash driver
will work?
I can not use the latest code but I want the CFI support for S29GL512P.
Can you please tell that, what I need to do to make the CFI driver works for
the S29GL512P chip?
>> What kind of "utility"? Don't you use the BDI3000 for FLASH programming?
We have customized utility to flash the binary. Using BDI3000 I tried to
erase the flash but it didn't work. I followed the CFI erase command seuence
but it fails to erase the flash.
BDI3000>md 0xfe7c0000
fe7c0000 : 27051956 552d426f 6f742032 3030392e '..VU-Boot 2009.
fe7c0010 : 30382028 41707220 31342032 30313020 08 (Apr 14 2010
fe7c0020 : 2d203130 3a30313a 32392900 00000000 - 10:01:29).....
fe7c0030 : 00000000 00000000 00000000 00000000 ................
fe7c0040 : 00000000 00000000 00000000 00000000 ................
fe7c0050 : 00000000 00000000 00000000 00000000 ................
fe7c0060 : 00000000 00000000 00000000 00000000 ................
fe7c0070 : 00000000 00000000 00000000 00000000 ................
fe7c0080 : 00000000 00000000 00000000 00000000 ................
fe7c0090 : 00000000 00000000 00000000 00000000 ................
fe7c00a0 : 00000000 00000000 00000000 00000000 ................
fe7c00b0 : 00000000 00000000 00000000 00000000 ................
fe7c00c0 : 00000000 00000000 00000000 00000000 ................
fe7c00d0 : 00000000 00000000 00000000 00000000 ................
fe7c00e0 : 00000000 00000000 00000000 00000000 ................
fe7c00f0 : 00000000 00000000 00000000 00000000 ................
*BDI3000>mmb 0xfc000000 0xf0
BDI3000>mmb 0xfc000aaa 0xaa
BDI3000>mmb 0xfc000555 0x55
BDI3000>mmb 0xfc000aaa 0x80
BDI3000>mmb 0xfc000aaa 0xaa
BDI3000>mmb 0xfc000555 0x55
BDI3000>mmb 0xfe7c0000 0x30
*BDI3000>mmb 0xfc000000 0xf0
BDI3000>md 0xfe7c0000 -- *sector data is not erased
*fe7c0000 : 30051956 552d426f 6f742032 3030392e 0..VU-Boot 2009.
fe7c0010 : 30382028 41707220 31342032 30313020 08 (Apr 14 2010
fe7c0020 : 2d203130 3a30313a 32392900 00000000 - 10:01:29).....
fe7c0030 : 00000000 00000000 00000000 00000000 ................
fe7c0040 : 00000000 00000000 00000000 00000000 ................
fe7c0050 : 00000000 00000000 00000000 00000000 ................
fe7c0060 : 00000000 00000000 00000000 00000000 ................
fe7c0070 : 00000000 00000000 00000000 00000000 ................
fe7c0080 : 00000000 00000000 00000000 00000000 ................
fe7c0090 : 00000000 00000000 00000000 00000000 ................
fe7c00a0 : 00000000 00000000 00000000 00000000 ................
fe7c00b0 : 00000000 00000000 00000000 00000000 ................
fe7c00c0 : 00000000 00000000 00000000 00000000 ................
fe7c00d0 : 00000000 00000000 00000000 00000000 ................
fe7c00e0 : 00000000 00000000 00000000 00000000 ................
fe7c00f0 : 00000000 00000000 00000000 00000000 ................
BDI3000>mmb 0xfc000000 0xf0
BDI3000>mmb 0xfc0000aa 0x98
BDI3000>md 0xfc000020
fc000020 : 51005200 59000200 00004000 00000000 Q.R.Y..... at .....
fc000030 : 00000000 00002700 36000000 00000600 ......'.6.......
fc000040 : 06000900 13000300 05000300 02001a00 ................
fc000050 : 02000000 06000000 0100ff00 01000000 ................
fc000060 : 02000000 00000000 00000000 00000000 ................
fc000070 : 00000000 00000000 0000ffff ffffffff ................
fc000080 : 50005200 49003100 33001400 02000100 P.R.I.1.3.......
fc000090 : 00000800 00000000 0200b500 c5000400 ................
fc0000a0 : 0100ffff ffffffff ffffffff ffffffff ................
fc0000b0 : ffffffff ffffffff ffffffff ffffffff ................
fc0000c0 : ffffffff ffffffff ffffffff ffffffff ................
fc0000d0 : ffffffff ffffffff ffffffff ffffffff ................
fc0000e0 : ffffffff ffffffff ffffffff ffffffff ................
fc0000f0 : ffffffff ffffffff ffffffff ffffffff ................
fc000100 : 00000000 00000000 00000000 00000000 ................
fc000110 : 00000000 00000000 00000000 00000000 ................
BDI3000>mmb 0xfc000000 0xf0
>> This mirroring might a a result of an incorrect EBC setup.
What does it mean?
In BDI3000 I am using chiptype MIRRORX16 and BUSWIDTH 16.
BDI parameter
[FLASH]
; user flash at 0xFC000000, S29GL512P (16M x 8)
CHIPTYPE MIRRORX16 ;Flash type (Flash M29W128GH is of MIRRORX8
Flash Type)
CHIPSIZE 0x4000000 ;The size of one flash chip in bytes
BUSWIDTH 16 ;The width of the flash memory bus in bits (8 |
16 | 32)
ERASE 0xFC000000 0x20000 512 ;erase sector 512 of flash (S29GL512P)
On Tue, Apr 13, 2010 at 5:46 PM, Stefan Roese <sr at denx.de> wrote:
> Hi Prakash,
>
> On Tuesday 13 April 2010 13:46:11 prakash bedge wrote:
> > >> Are you not using the mainline version of cfi_flash.c? If not, which
> > >> "fixup code" are you referring to (link)?
> >
> > I am using U-Boot 2009.08 version.
>
> This version is outdated. I suggest to switch to current code.
>
> > I used the fixup for M29W128GH chip from the patch you suggested earlier.
> > In that code, I changed the condition to check chipwidth and it works.
>
> You shouldn't need any additional code to support the Spansion S29GL chips.
> Please use the latest code from mainline U-Boot.
>
> > But I have a concern now, as it works with by changing chipwidth to 16Bit
> > or portwidth to 16Bit. This is making me a little bit confuse.
> > if(info->chipwidth == FLASH_CFI_16BIT)
> > info->portwidth = FLASH_CFI_8BIT;
> >
> > if(info->chipwidth == FLASH_CFI_8BIT)
> > info->portwidth = FLASH_CFI_16BIT;
>
> ???
>
> > Can you please tell what is chipwidth and portwidth and how we can find
> > that?
>
> chipwidth: Width of the NOR FLASH chip, meaning count of data lines
> actively used.
>
> portwidth: Width of the external bus (data lines).
>
> > Also I am not getting the correct manufacturer and device ids.
> >
> > From the flash control register I can see that my device is 16 Bit.It
> > reprsent a bit set 1 saying it is a 16 bit device.
> > Now is this flash chipwidth or flash portwidth?
>
> chipwidth.
>
> > To my flash chip 16 data lines and 26 address lines are connected.
>
> So you have chipwidth *and* portwidth of 16! This is the most common use
> case.
> Again, please use the mainline CFI driver and give it another try.
>
> > >> Perhaps a problem of incorrect unlocking addresses (byte vs. word
> >
> > address)?
> > Does it mean that unlocking addresses are not correct?
> > Supoose if chip is in word mode then what should be the portwidth and
> > chipwidth? What will be the ublocking address then?
> >
> > I am using an utilty to erase flash and to load uboot image and it is
> > working fine, only that it copies data at multple locations.
>
> What kind of "utility"? Don't you use the BDI3000 for FLASH programming?
> This
> mirroring might a a result of an incorrect EBC setup.
>
> Cheers,
> Stefan
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
>
More information about the U-Boot
mailing list