public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M
@ 2005-04-18 11:38 Alexandre BASTOS
  2005-04-18 12:46 ` Sebastian Schau
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandre BASTOS @ 2005-04-18 11:38 UTC (permalink / raw)
  To: u-boot

Hi,

I am currently working in a custom board based on MPC8272ADS but
with some differences.

One of those is Flash chip/configuration used. I am using a Spansion
S29GL032M CFI Flash chip in BYTE# (8bit) mode.

I have tested the drivers/cfi_flash.c, which is OK for reading, but
it is not working for unlock/erase/write. Maybe due to command address
definitions, which, according to Datasheet, are for 16 bit configurations.
For example:

16 bit (already in driver)

#define AMD_ADDR_ERASE_START        0x555
#define AMD_ADDR_START          0x555
#define AMD_ADDR_ACK            0x2AA

8 bit (should be?)

#define AMD_ADDR_ERASE_START    0xAAA
#define AMD_ADDR_START          0xAAA
#define AMD_ADDR_ACK            0x555


So, my question is ... Is the S29GL032M (or AMD equivalent AM29LV320M)
already supported in byte mode for any board in u-boot?.
I have been testing some of the drivers, but I still couldn't find a
working solution for my board.

If not ... is there already any work done for this purpouse? Any hint?

Thanks,

Alex Bastos

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M
@ 2005-04-18 12:00 Sam Song
  2005-04-18 12:25 ` Ladislav Michl
  2005-04-18 13:40 ` Alexandre BASTOS
  0 siblings, 2 replies; 8+ messages in thread
From: Sam Song @ 2005-04-18 12:00 UTC (permalink / raw)
  To: u-boot

--- Alexandre BASTOS <alebas@televes.com> wrote:
[snip]
> So, my question is ... Is the S29GL032M (or AMD
> equivalent AM29LV320M) already supported in byte 
> mode for any board in u-boot?.
> I have been testing some of the drivers, but I still
> couldn't find a working solution for my board.

U could try the flash driver of RPXlite DW. If I 
remember right, this one could work well for 4*8bit 
of AM29LV320M. As for cfi driver, I haven't heard 
about it can work for any AMD FLASH chip:-( Maybe I 
exaggerate the case? Hope I am wrong:-)

Best regards,

Sam

_________________________________________________________
Do You Yahoo!?
150??MP3????????????
http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/
???????????????????
http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com
1G??1000???????????
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M
  2005-04-18 12:00 Sam Song
@ 2005-04-18 12:25 ` Ladislav Michl
  2005-04-18 13:36   ` Alexandre BASTOS
  2005-04-18 13:40 ` Alexandre BASTOS
  1 sibling, 1 reply; 8+ messages in thread
From: Ladislav Michl @ 2005-04-18 12:25 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 18, 2005 at 08:00:45PM +0800, Sam Song wrote:
> --- Alexandre BASTOS <alebas@televes.com> wrote:
> [snip]
> > So, my question is ... Is the S29GL032M (or AMD
> > equivalent AM29LV320M) already supported in byte 
> > mode for any board in u-boot?.
> > I have been testing some of the drivers, but I still
> > couldn't find a working solution for my board.
> 
> U could try the flash driver of RPXlite DW. If I 
> remember right, this one could work well for 4*8bit 
> of AM29LV320M. As for cfi driver, I haven't heard 
> about it can work for any AMD FLASH chip:-( Maybe I 
> exaggerate the case? Hope I am wrong:-)

Perhaps because some AMD chips are JEDEC compatible?
Quick look to datasheet shows that AM29LV320M is JEDEC
compatible and therefore cfi_flash driver will not work
for it (it works nicely for CFI compatible AMD chips such
as AM29DL323).

There is no generic driver for JEDEC flashes in U-Boot, so
you'll have to provide your own flash driver in board's
directory.

Best regards,
	ladis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M
  2005-04-18 11:38 [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M Alexandre BASTOS
@ 2005-04-18 12:46 ` Sebastian Schau
  0 siblings, 0 replies; 8+ messages in thread
From: Sebastian Schau @ 2005-04-18 12:46 UTC (permalink / raw)
  To: u-boot

> So, my question is ... Is the S29GL032M (or AMD equivalent AM29LV320M)
> already supported in byte mode for any board in u-boot?.
> I have been testing some of the drivers, but I still couldn't find a
> working solution for my board.

I think there isn't a flash driver for S29GL032M in BYTE-Mode, so you 
have to write your own driver.
Be careful, because the AMD AM29LV320M supports a BYTE-Programm mode, to 
write a single byte into flash. This mode is used in many (AMD) flash 
drivers in U-Boot. The S29GL032M doesn't support this mode, so you have 
to use write buffer programming if your Flash is in X8 (BYTE) mode.

Best regards Sebastian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M
  2005-04-18 12:25 ` Ladislav Michl
@ 2005-04-18 13:36   ` Alexandre BASTOS
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandre BASTOS @ 2005-04-18 13:36 UTC (permalink / raw)
  To: u-boot

> Perhaps because some AMD chips are JEDEC compatible?
> Quick look to datasheet shows that AM29LV320M is JEDEC
> compatible and therefore cfi_flash driver will not work
> for it (it works nicely for CFI compatible AMD chips such
> as AM29DL323).
>
> There is no generic driver for JEDEC flashes in U-Boot, so
> you'll have to provide your own flash driver in board's
> directory.
>
> Best regards,
> 	ladis
>


Ummmm. Maybe I was wrong, as I was thinking that CFI was also
part of the JEDEC standards.
Nevertheless, in datasheet from Spansion I can read:

CFI (Common Flash Interface) compliant

So this should not be the issue here.

Neither the command address I have reported before.
A deeper analyse of driver showed me that address is shifted
in write cfi_write_cmd. Indeed command to query CFI Table (0x98)
works. So, maybe problem is Program command AMD_CMD_WRITE, which
is not present in 8bit mode.

Best Regards,

Alex Bastos

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M
  2005-04-18 12:00 Sam Song
  2005-04-18 12:25 ` Ladislav Michl
@ 2005-04-18 13:40 ` Alexandre BASTOS
  1 sibling, 0 replies; 8+ messages in thread
From: Alexandre BASTOS @ 2005-04-18 13:40 UTC (permalink / raw)
  To: u-boot

Citando Sam Song <samsongshu@yahoo.com.cn>:

> --- Alexandre BASTOS <alebas@televes.com> wrote:
> [snip]
> > So, my question is ... Is the S29GL032M (or AMD
> > equivalent AM29LV320M) already supported in byte
> > mode for any board in u-boot?.
> > I have been testing some of the drivers, but I still
> > couldn't find a working solution for my board.
>
> U could try the flash driver of RPXlite DW. If I
> remember right, this one could work well for 4*8bit
> of AM29LV320M. As for cfi driver, I haven't heard
> about it can work for any AMD FLASH chip:-( Maybe I
> exaggerate the case? Hope I am wrong:-)
>
> Best regards,
>
> Sam

Sam,

I will test it. But I can see it uses write_word command (0xA0),
which is not supported in 8bit mode (as long as Datasheet is ok).

Best regards,

Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M
@ 2005-04-21  9:50 Sam Song
  2005-04-21 11:03 ` Alex BASTOS
  0 siblings, 1 reply; 8+ messages in thread
From: Sam Song @ 2005-04-21  9:50 UTC (permalink / raw)
  To: u-boot

Ladislav Michl <ladis@linux-mips.org> wrote:
> > U could try the flash driver of RPXlite DW. If I 
> > remember right, this one could work well for
> > 4*8bit of AM29LV320M. As for cfi driver, I 

Well, I made a mistake here. The flash driver is not
for AM29LV320M. It is for 4*AM29DL323DB90VI instead.
Sorry for this.

> Perhaps because some AMD chips are JEDEC compatible?
> Quick look to datasheet shows that AM29LV320M is
> JEDEC compatible and therefore cfi_flash driver 
> will not work for it (it works nicely for CFI 
> compatible AMD chips such as AM29DL323).

You delivered a really nice hint. But the example you
listed couldn't push youself laugh to the end IMHO.
AM29DL323 wasn't supported by cfi_flash driver, at
least I tested it for Brad Kemp but we didn't succeed.
Maybe now or other configuration can work?

Thanks,

Sam

Best regards,

Sam

_________________________________________________________
Do You Yahoo!?
150??MP3????????????
http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/
???????????????????
http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com
1G??1000???????????
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M
  2005-04-21  9:50 Sam Song
@ 2005-04-21 11:03 ` Alex BASTOS
  0 siblings, 0 replies; 8+ messages in thread
From: Alex BASTOS @ 2005-04-21 11:03 UTC (permalink / raw)
  To: u-boot

Hi,

>
> Well, I made a mistake here. The flash driver is not
> for AM29LV320M. It is for 4*AM29DL323DB90VI instead.
> Sorry for this.

Don't worry about. In fact, I have tested this driver.
But the problem pointed out by Sebastian Schau was also
present on it: the new S29GLxxxM flashes doesn't support
the WRITE BYTE (AO) command, so write has to be allways
done through write_buffer.

So, finally, I decided to make some modification to the
generic cfi_flash.c driver to support 8 BIT mode and
AMD write buffer operation. I will submit a patch in
several minutes.

In brief, I have to implement flash_write_cfibuffer
and add AMD_ADDR_xxx_8BIT to add support for specific
unlock sequence and command addresses.

> You delivered a really nice hint. But the example you
> listed couldn't push youself laugh to the end IMHO.
> AM29DL323 wasn't supported by cfi_flash driver, at
> least I tested it for Brad Kemp but we didn't succeed.
> Maybe now or other configuration can work?

At least S29GL032M behaves as CFI, and the cfi driver is
now working.

Best regards,

Alex BASTOS

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-04-21 11:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 11:38 [U-Boot-Users] cfi_flash support for 8 bit port width S29GL032M Alexandre BASTOS
2005-04-18 12:46 ` Sebastian Schau
  -- strict thread matches above, loose matches on Subject: below --
2005-04-18 12:00 Sam Song
2005-04-18 12:25 ` Ladislav Michl
2005-04-18 13:36   ` Alexandre BASTOS
2005-04-18 13:40 ` Alexandre BASTOS
2005-04-21  9:50 Sam Song
2005-04-21 11:03 ` Alex BASTOS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox