public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
@ 2010-07-15  9:55 Fabio Giovagnini
  2010-07-19  7:52 ` Stefan Roese
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Giovagnini @ 2010-07-15  9:55 UTC (permalink / raw)
  To: u-boot

Hi all,
In my experience the SST39VF6402B has become full compliant with CFI mtd 
interface just few linux kernel ago. In linux 2.6.17 it was not.
I'm developing on
U-Boot 2010.06-rc2-07985-g53f7677-dirty (lug 15 2010 - 11:41:21)

is it compliant with  SST39VF6402B

Is among of you other people using on their own board such a flash?

Thanks a lot

-- 
Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
skype: aurion.giovagnini
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919
www.aurion-tech.com

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

* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
  2010-07-15  9:55 [U-Boot] Nor Flash SST39VF6402B cfi compliant support Fabio Giovagnini
@ 2010-07-19  7:52 ` Stefan Roese
  2010-07-19  9:04   ` Fabio Giovagnini
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2010-07-19  7:52 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

On Thursday 15 July 2010 11:55:17 Fabio Giovagnini wrote:
> In my experience the SST39VF6402B has become full compliant with CFI mtd
> interface just few linux kernel ago. In linux 2.6.17 it was not.
> I'm developing on
> U-Boot 2010.06-rc2-07985-g53f7677-dirty (lug 15 2010 - 11:41:21)
> 
> is it compliant with  SST39VF6402B
> 
> Is among of you other people using on their own board such a flash?

No. I haven't used those SST parts for a long time. But I assume that its 
still not 100% CFI compliant. But you can use the legacy infrastructure to add 
support to it. Shouldn't be to difficult. Take a look at:

CONFIG_FLASH_CFI_LEGACY

and

drivers/mtd/jedec_flash.c

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

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

* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
  2010-07-19  7:52 ` Stefan Roese
@ 2010-07-19  9:04   ` Fabio Giovagnini
  2010-07-19  9:23     ` Stefan Roese
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Giovagnini @ 2010-07-19  9:04 UTC (permalink / raw)
  To: u-boot

I Stefan. I did teh following upgrade of the fileyou suggestied to me.

#define SST39VF6402B	0x236c
...
#ifdef CONFIG_SYS_FLASH_LEGACY_4Mx16
	{
		.mfr_id		= (u16)SST_MANUFACT,
		.dev_id		= SST39VF6402B,
		.name		= "SST 39VF6402B",
		.uaddr		= {
			[1] = MTD_UADDR_0x0555_0x02AA /* x16 */
		},
		.DevSize	= SIZE_4MiB,
		.CmdSet		= CFI_CMDSET_AMD_LEGACY,
		.NumEraseRegions= 1,
		.regions	= {
			ERASEINFO(0x10000,128),
		}
	},
#endif

The flash works, but not properly.
My conention is A1 mcp Bus cocceted to A0 of flash chip to have 16 bit width 
for data bus. The flash datasheet tells the flash os organized in 128 32kword of 
esare sectors. So I think my setting is not correct. Is it?

Thanks a lot and best regards
 

In data luned? 19 luglio 2010 09:52:23, Stefan Roese ha scritto:
: > Hi Fabio,
> 
> On Thursday 15 July 2010 11:55:17 Fabio Giovagnini wrote:
> > In my experience the SST39VF6402B has become full compliant with CFI mtd
> > interface just few linux kernel ago. In linux 2.6.17 it was not.
> > I'm developing on
> > U-Boot 2010.06-rc2-07985-g53f7677-dirty (lug 15 2010 - 11:41:21)
> >
> > is it compliant with  SST39VF6402B
> >
> > Is among of you other people using on their own board such a flash?
> 
> No. I haven't used those SST parts for a long time. But I assume that its
> still not 100% CFI compliant. But you can use the legacy infrastructure to
>  add support to it. Shouldn't be to difficult. Take a look at:
> 
> CONFIG_FLASH_CFI_LEGACY
> 
> and
> 
> drivers/mtd/jedec_flash.c
> 
> 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
> 

-- 
Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
skype: aurion.giovagnini
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919
www.aurion-tech.com

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

* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
  2010-07-19  9:04   ` Fabio Giovagnini
@ 2010-07-19  9:23     ` Stefan Roese
       [not found]       ` <201007191127.50865.fabio.giovagnini@aurion-tech.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2010-07-19  9:23 UTC (permalink / raw)
  To: u-boot

On Monday 19 July 2010 11:04:34 Fabio Giovagnini wrote:
> I Stefan. I did teh following upgrade of the fileyou suggestied to me.
> 
> #define SST39VF6402B	0x236c
> ...
> #ifdef CONFIG_SYS_FLASH_LEGACY_4Mx16
> 	{
> 		.mfr_id		= (u16)SST_MANUFACT,
> 		.dev_id		= SST39VF6402B,
> 		.name		= "SST 39VF6402B",
> 		.uaddr		= {
> 			[1] = MTD_UADDR_0x0555_0x02AA /* x16 */
> 		},
> 		.DevSize	= SIZE_4MiB,
> 		.CmdSet		= CFI_CMDSET_AMD_LEGACY,
> 		.NumEraseRegions= 1,
> 		.regions	= {
> 			ERASEINFO(0x10000,128),
> 		}
> 	},
> #endif
> 
> The flash works, but not properly.

What's exactly not working?

> My conention is A1 mcp Bus cocceted to A0 of flash chip to have 16 bit
> width for data bus. The flash datasheet tells the flash os organized in
> 128 32kword of esare sectors. So I think my setting is not correct. Is it?

Could be. IIRC, then the SST parts have 2 different erase regions, the 
"normal" ones and the smaller ones (4k???). Not sure which one is used by this 
command set. I suggest you investigate here further.
 
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

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

* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
       [not found]       ` <201007191127.50865.fabio.giovagnini@aurion-tech.com>
@ 2010-07-19  9:33         ` Stefan Roese
  2010-07-19 10:26           ` Fabio Giovagnini
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2010-07-19  9:33 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

(please keep the list on Cc).

On Monday 19 July 2010 11:27:50 Fabio Giovagnini wrote:
> I do not think so about teh different regons.
> I attach the datasheet I found on the net and I cannot find anythink about
> two different regions for
> SST39VF6402B
> 
> Maybe I'm wrong.

Yes, you are wrong. ;) The manual mentions block-erase (32k) and sector-erase 
(2k). Please check which one is used by the CFi commands right now.

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

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

* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
  2010-07-19  9:33         ` Stefan Roese
@ 2010-07-19 10:26           ` Fabio Giovagnini
  2010-07-19 13:57             ` Fabio Giovagnini
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Giovagnini @ 2010-07-19 10:26 UTC (permalink / raw)
  To: u-boot

I supposed the list doesn't like the attachment.
Anyway I understand, now. 
I'll make you know how I'll solve.

Thanks a lot and best regards



In data luned? 19 luglio 2010 11:33:43, Stefan Roese ha scritto:
: > Hi Fabio,
> 
> (please keep the list on Cc).
> 
> On Monday 19 July 2010 11:27:50 Fabio Giovagnini wrote:
> > I do not think so about teh different regons.
> > I attach the datasheet I found on the net and I cannot find anythink
> > about two different regions for
> > SST39VF6402B
> >
> > Maybe I'm wrong.
> 
> Yes, you are wrong. ;) The manual mentions block-erase (32k) and
>  sector-erase (2k). Please check which one is used by the CFi commands
>  right now.
> 
> 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
> 

-- 
Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
skype: aurion.giovagnini
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919
www.aurion-tech.com

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

* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
  2010-07-19 10:26           ` Fabio Giovagnini
@ 2010-07-19 13:57             ` Fabio Giovagnini
  2010-07-19 14:19               ` Stefan Roese
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Giovagnini @ 2010-07-19 13:57 UTC (permalink / raw)
  To: u-boot

This is the rigth config for such a FLASH chip

#ifdef CONFIG_SYS_FLASH_LEGACY_4Mx16
	{
		.mfr_id		= (u16)SST_MANUFACT,
		.dev_id		= SST39VF6402B,
		.name		= "SST 39VF6402B",
		.uaddr		= {
			[1] = MTD_UADDR_0x0555_0x02AA /* x16 */
		},
		.DevSize	= SIZE_4MiB,
		.CmdSet		= CFI_CMDSET_AMD_LEGACY,
		.NumEraseRegions= 1,
		.regions	= {
			ERASEINFO(0x10000,128),
		}
	},
#endif

Best regards and thanks a lot


In data luned? 19 luglio 2010 12:26:32, Fabio Giovagnini ha scritto:
: > I supposed the list doesn't like the attachment.
> Anyway I understand, now.
> I'll make you know how I'll solve.
> 
> Thanks a lot and best regards
> 
> In data luned? 19 luglio 2010 11:33:43, Stefan Roese ha scritto:
> : > Hi Fabio,
> >
> > (please keep the list on Cc).
> >
> > On Monday 19 July 2010 11:27:50 Fabio Giovagnini wrote:
> > > I do not think so about teh different regons.
> > > I attach the datasheet I found on the net and I cannot find anythink
> > > about two different regions for
> > > SST39VF6402B
> > >
> > > Maybe I'm wrong.
> >
> > Yes, you are wrong. ;) The manual mentions block-erase (32k) and
> >  sector-erase (2k). Please check which one is used by the CFi commands
> >  right now.
> >
> > 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
> 

-- 
Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
skype: aurion.giovagnini
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919
www.aurion-tech.com

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

* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
  2010-07-19 13:57             ` Fabio Giovagnini
@ 2010-07-19 14:19               ` Stefan Roese
  2010-07-19 15:13                 ` Fabio Giovagnini
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2010-07-19 14:19 UTC (permalink / raw)
  To: u-boot

On Monday 19 July 2010 15:57:09 Fabio Giovagnini wrote:
> This is the rigth config for such a FLASH chip
> 
> #ifdef CONFIG_SYS_FLASH_LEGACY_4Mx16
> 	{
> 		.mfr_id		= (u16)SST_MANUFACT,
> 		.dev_id		= SST39VF6402B,
> 		.name		= "SST 39VF6402B",
> 		.uaddr		= {
> 			[1] = MTD_UADDR_0x0555_0x02AA /* x16 */
> 		},
> 		.DevSize	= SIZE_4MiB,
> 		.CmdSet		= CFI_CMDSET_AMD_LEGACY,
> 		.NumEraseRegions= 1,
> 		.regions	= {
> 			ERASEINFO(0x10000,128),
> 		}
> 	},
> #endif
> 
> Best regards and thanks a lot

So you've got it working. Good. Please submit a proper patch with this SST 
flash support. Thanks.
 
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

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

* [U-Boot] Nor Flash SST39VF6402B cfi compliant support
  2010-07-19 14:19               ` Stefan Roese
@ 2010-07-19 15:13                 ` Fabio Giovagnini
  0 siblings, 0 replies; 9+ messages in thread
From: Fabio Giovagnini @ 2010-07-19 15:13 UTC (permalink / raw)
  To: u-boot

Ok

Cheers

In data luned? 19 luglio 2010 16:19:23, Stefan Roese ha scritto:
: > On Monday 19 July 2010 15:57:09 Fabio Giovagnini wrote:
> > This is the rigth config for such a FLASH chip
> >
> > #ifdef CONFIG_SYS_FLASH_LEGACY_4Mx16
> > 	{
> > 		.mfr_id		= (u16)SST_MANUFACT,
> > 		.dev_id		= SST39VF6402B,
> > 		.name		= "SST 39VF6402B",
> > 		.uaddr		= {
> > 			[1] = MTD_UADDR_0x0555_0x02AA /* x16 */
> > 		},
> > 		.DevSize	= SIZE_4MiB,
> > 		.CmdSet		= CFI_CMDSET_AMD_LEGACY,
> > 		.NumEraseRegions= 1,
> > 		.regions	= {
> > 			ERASEINFO(0x10000,128),
> > 		}
> > 	},
> > #endif
> >
> > Best regards and thanks a lot
> 
> So you've got it working. Good. Please submit a proper patch with this SST
> flash support. Thanks.
> 
> 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
> 

-- 
Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
skype: aurion.giovagnini
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919
www.aurion-tech.com

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

end of thread, other threads:[~2010-07-19 15:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-15  9:55 [U-Boot] Nor Flash SST39VF6402B cfi compliant support Fabio Giovagnini
2010-07-19  7:52 ` Stefan Roese
2010-07-19  9:04   ` Fabio Giovagnini
2010-07-19  9:23     ` Stefan Roese
     [not found]       ` <201007191127.50865.fabio.giovagnini@aurion-tech.com>
2010-07-19  9:33         ` Stefan Roese
2010-07-19 10:26           ` Fabio Giovagnini
2010-07-19 13:57             ` Fabio Giovagnini
2010-07-19 14:19               ` Stefan Roese
2010-07-19 15:13                 ` Fabio Giovagnini

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