Skip to contentSkip to conversation

Add support for SST 39VF6402B flash

PATCH In review Florian Fainelli 3 participants 4 messages May 16, 2007 – May 17, 2007 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add support for SST 39VF6402B flash

The SST 39VF6402B is currently not supported by the Linux kernel. This patch adds it to the list of JEDEC command set compatible Flash chips, so that it can be used in a flash map driver using "jedec_probe".

Note that according to the datasheet this flash has two possible erase sizes :
64kb and 4kb. I prefer using 64Kb erase size since we do not have to change the erase command from 0x50 (64Kb) to 0x30 (4Kb).

The datasheet is available here :
http://www.sst.com/downloads/datasheet/S71288.pdf

--

drivers/mtd/chips/jedec_probe.c +15 -1
index 58e561e..22f1d5b 100644
@@ -159,6 +159,7 @@
 #define SST49LF030A	0x001C
 #define SST49LF040A	0x0051
 #define SST49LF080A	0x005B
+#define SST39VF6402B    0x236C
 
 /* Toshiba */
 #define TC58FVT160	0x00C2
@@ -1509,7 +1510,20 @@ static const struct amd_flash_info jedec_table[] = {
                        ERASEINFO(0x1000,256),
                        ERASEINFO(0x1000,256)
                }
-
+	}, {
+		.mfr_id         = MANUFACTURER_SST,
+		.dev_id         = SST39VF6402B,
+		.name           = "SST 39VF6402B",
+		.uaddr          = {
+			[0] = MTD_UADDR_0x5555_0x2AAA,  /* x8 */
+			[1] = MTD_UADDR_0x5555_0x2AAA   /* x16 */
+		},
+		.DevSize        = SIZE_8MiB,
+		.CmdSet         = P_ID_AMD_STD,
+		.NumEraseRegions= 4,
+		.regions        = {
+			ERASEINFO(0x10000,128)
+		}
        }, {
 		.mfr_id		= MANUFACTURER_ST,	/* FIXME - CFI device? */
 		.dev_id		= M29W800DT,
#1 lore raw

Re: [PATCH] Add support for SST 39VF6402B flash - block & sector support ?

Quoted 4 lines · Florian Fainelli <florian.fainelli <at> int-evry.fr> writes:

Note that according to the datasheet this flash has two possible erase sizes :
64kb and 4kb. I prefer using 64Kb erase size since we do not have to change the erase command from 0x50 (64Kb) to 0x30 (4Kb).

Or maybe the MTD model now needs to include support for both 'block' and 'sector' erase ?

Regards,
MikeW

#2 lore raw

Re: [PATCH] Add support for SST 39VF6402B flash - block & sector support ?

Hello Mike,

Yes this would be better. I will try to come up with a patch to the MTD subsystem that can handle this properly.

Le jeudi 17 mai 2007, MikeW a écrit :

Quoted 15 lines
Quoted 3 lines · Florian Fainelli <florian.fainelli <at> int-evry.fr> writes:

Note that according to the datasheet this flash has two possible erase sizes : 64kb and 4kb. I prefer using 64Kb erase size since we do not have to change the erase command from 0x50 (64Kb) to 0x30 (4Kb).

Or maybe the MTD model now needs to include support for both 'block' and 'sector' erase ?

Regards,
MikeW

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#3 lore raw

Re: [PATCH] Add support for SST 39VF6402B flash - block & sector support ?

Quoted 2 lines · Florian Fainelli

Yes this would be better. I will try to come up with a patch to the MTD subsystem that can handle this properly.

You should be able to handle it within the chip driver -- where you can use 64KiB erase commands, do so -- else use 4KiB erase commands.

Signature · 1 line
dwmw2