http://www.spansion.com/Support/Datasheets/S25FL129P_00.pdf http://www.spansion.com/Support/Application%20Notes/S25FL129P_Prog_Guide_AN....
Signed-off-by: Antonio Ospite ospite@studenti.unina.it ---
Hi,
I was able to read the content of the flash chip in the subject with the patch below but I am not sure if the patch is correct and ready for submission, could someone please check with the datasheet? I know very little about flash chips.
Moreover from the Datasheet (Table 9.2, page 34) I see that this chip comes in two variants, one with 64K sectors and one with 256KB sectors, and some "Extended Device Identification" is used to identify the right variant, I don't know if flashrom supports reading such information.
I see that somewhere else that is supported: http://old.nabble.com/-PATCH--m25p80:-Add-Spansion-S25FL129P-serial-flashes-...
I didn't feel like testing erase/write either as the connection to the chip was/is quite unreliable, I just needed to get a rootfs off from it once (it's some embedded router). If anyone can suggest some really cheap place where to get test clips or probes in Italy (or even better feels like donating some), I might risk testing erase/write after we solve the issue about the chip variant.
BTW the output after the patch:
$ sudo ./flashrom -p ft2232_spi:type=tumpa,port=B -r flash.bin flashrom v0.9.6.1-r1599 on Linux 3.6.0-rc5-ao2 (x86_64) flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK. Found Spansion flash chip "S25FL129P" (16384 kB, SPI) on ft2232_spi. Reading flash... done.
Thanks, Antonio Ospite http://ao2.it
flashchips.c | 28 ++++++++++++++++++++++++++++ flashchips.h | 1 + 2 files changed, 29 insertions(+)
diff --git a/flashchips.c b/flashchips.c index a6c2004..ced6ad0 100644 --- a/flashchips.c +++ b/flashchips.c @@ -6288,6 +6288,34 @@ const struct flashchip flashchips[] = { },
{ + .vendor = "Spansion", + .name = "S25FL129P", + .bustype = BUS_SPI, + .manufacture_id = SPANSION_ID, + .model_id = SPANSION_S25FL129P, + .total_size = 16384, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_OK_PR, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {64 * 1024, 256} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {4 * 1024, 4096} }, + .block_erase = spi_block_erase_20, + } + }, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, + .voltage = {2700, 3600}, + }, + + { .vendor = "SST", .name = "SST25LF040A", .bustype = BUS_SPI, diff --git a/flashchips.h b/flashchips.h index 8e51d35..d13773d 100644 --- a/flashchips.h +++ b/flashchips.h @@ -480,6 +480,7 @@ #define SPANSION_S25FL016A 0x0214 #define SPANSION_S25FL032A 0x0215 #define SPANSION_S25FL064A 0x0216 +#define SPANSION_S25FL129P 0x2018
/* * SST25 chips are SPI, first byte of device ID is memory type, second
On Wed, 26 Sep 2012 13:50:54 +0200 Antonio Ospite ospite@studenti.unina.it wrote:
http://www.spansion.com/Support/Datasheets/S25FL129P_00.pdf http://www.spansion.com/Support/Application%20Notes/S25FL129P_Prog_Guide_AN....
Signed-off-by: Antonio Ospite ospite@studenti.unina.it
Hi,
hello and thanks a lot for your patch!
I was able to read the content of the flash chip in the subject with the patch below but I am not sure if the patch is correct and ready for submission, could someone please check with the datasheet? I know very little about flash chips.
i pity you, because that chip is not one of the more simple ones, but your patch seems to be ok on the first look. :) i need to look more closely at it, after we fix the probing...
Moreover from the Datasheet (Table 9.2, page 34) I see that this chip comes in two variants, one with 64K sectors and one with 256KB sectors,
that's quite a problem. while flashrom would not care too much, because it just tries all erase functions available in cases of failure, we usually do not merge such patches without being able to differentiate between the chips (which sometimes requires to get very creative :).
and some "Extended Device Identification" is used to identify the right variant, I don't know if flashrom supports reading such information.
in your case it is easier as you have found out already. flashrom does not support EDI yet, but i am working on it. because flashrom supports some very funky SPI masters (which have very annoying limitations on the number of bytes to read and write in a single transaction) it is not completely trivial to add this though. after that we can add the two(!) chips from your patch (and maybe there exist other similar chips of the same family with different capacities... have you looked for them?).
I see that somewhere else that is supported: http://old.nabble.com/-PATCH--m25p80:-Add-Spansion-S25FL129P-serial-flashes-...
that "somewhere" is actually the linux kernel ;)
I didn't feel like testing erase/write either as the connection to the chip was/is quite unreliable, I just needed to get a rootfs off from it once (it's some embedded router). If anyone can suggest some really cheap place where to get test clips or probes in Italy (or even better feels like donating some), I might risk testing erase/write after we solve the issue about the chip variant.
you did not say which package, but i presumed SOIC8. apparently the chip is only available as 300mil SOIC16 (and BGA/WSON). for SOIC8 i would have written the following (i actually did write it before checking... meh. maybe you find it useful nonetheless, if not just skip over the next paragraph please :)
in that case the cheapest one is probably a Pomona 5250; 3M does also make them, but they are usually more expensive. someone from italy in our IRC channel has ordered one lately but it did not arrive yet afaik. maybe he is near enough and willing to share :) he ordered from here: http://www.tme.eu/html/EN/soic08-test-clips/ramka_4886_EN_pelny.html distrelec does also have them (i got mine from their austrian branch): https://www.distrelec.it/pinzette-di-test-per-ic/pomona/5250/652964
for the SOIC16 the Pomona model number is 5252, tme does not seem to have it but distrelec does and probably also any other electronics reseller (mouser, rs, farnell etc).
PS: i have committed some ft2232_spi changes lately (r1608 - r1610). i would be glad if you would upgrade and report if you have any issues with them.
On Thu, 27 Sep 2012 05:09:05 +0200 Stefan Tauner stefan.tauner@student.tuwien.ac.at wrote:
On Wed, 26 Sep 2012 13:50:54 +0200 Antonio Ospite ospite@studenti.unina.it wrote:
http://www.spansion.com/Support/Datasheets/S25FL129P_00.pdf http://www.spansion.com/Support/Application%20Notes/S25FL129P_Prog_Guide_AN....
Signed-off-by: Antonio Ospite ospite@studenti.unina.it
[...]
i pity you, because that chip is not one of the more simple ones, but your patch seems to be ok on the first look. :) i need to look more closely at it, after we fix the probing...
My doubts were mostly about the block_erasers.
Moreover from the Datasheet (Table 9.2, page 34) I see that this chip comes in two variants, one with 64K sectors and one with 256KB sectors,
that's quite a problem. while flashrom would not care too much, because it just tries all erase functions available in cases of failure, we usually do not merge such patches without being able to differentiate between the chips (which sometimes requires to get very creative :).
and some "Extended Device Identification" is used to identify the right variant, I don't know if flashrom supports reading such information.
in your case it is easier as you have found out already. flashrom does not support EDI yet, but i am working on it. because flashrom supports some very funky SPI masters (which have very annoying limitations on the number of bytes to read and write in a single transaction) it is not completely trivial to add this though. after that we can add the two(!) chips from your patch (and maybe there exist other similar chips of the same family with different capacities... have you looked for them?).
Stefan please CC me when you get to send EDI related patches, I am subscribed to the list for now but you never know.
I didn't feel like testing erase/write either as the connection to the chip was/is quite unreliable, I just needed to get a rootfs off from it once (it's some embedded router). If anyone can suggest some really cheap place where to get test clips or probes in Italy (or even better feels like donating some), I might risk testing erase/write after we solve the issue about the chip variant.
[...]
for the SOIC16 the Pomona model number is 5252, tme does not seem to have it but distrelec does and probably also any other electronics reseller (mouser, rs, farnell etc).
I picked up a Pomona 5252 from it.mouser.com along with other stuff I might need so to reach the free-shipment quota.
PS: i have committed some ft2232_spi changes lately (r1608 - r1610). i would be glad if you would upgrade and report if you have any issues with them.
I'll let you know once I have the test clip.
JFYI for the previous read test I used a 16pin DIP socket carrier to which I deformed the pins to match the SOIC spacing, that worked because the SOIC pins I was targeting were quite sparse, but the connection is not very firm as you can guess and it takes time to align the pins at every insertion.
Regards, Antonio
On Tue, 2 Oct 2012 12:29:28 +0200 Antonio Ospite ospite@studenti.unina.it wrote:
PS: i have committed some ft2232_spi changes lately (r1608 - r1610). i would be glad if you would upgrade and report if you have any issues with them.
I'll let you know once I have the test clip.
There is a bug in those changes. A fix is ready but not yet committed. If you see a segfault when using the ft2232_spi programmer, please apply http://pastie.org/private/55g3dwdh6dj1bj9qmtwm2a It will be committed with other small changes sometime in the next 2 weeks.
JFYI for the previous read test I used a 16pin DIP socket carrier to which I deformed the pins to match the SOIC spacing, that worked because the SOIC pins I was targeting were quite sparse, but the connection is not very firm as you can guess and it takes time to align the pins at every insertion.
Nice idea, i would love to add pictures of that to our wiki. :)
On Wed, 3 Oct 2012 15:11:57 +0200 Stefan Tauner stefan.tauner@student.tuwien.ac.at wrote:
On Tue, 2 Oct 2012 12:29:28 +0200 Antonio Ospite ospite@studenti.unina.it wrote:
PS: i have committed some ft2232_spi changes lately (r1608 - r1610). i would be glad if you would upgrade and report if you have any issues with them.
I'll let you know once I have the test clip.
There is a bug in those changes. A fix is ready but not yet committed. If you see a segfault when using the ft2232_spi programmer, please apply http://pastie.org/private/55g3dwdh6dj1bj9qmtwm2a It will be committed with other small changes sometime in the next 2 weeks.
OK, with this change ft2232_spi works.
BTW, my programmer now works only with divisor=4 or greater, maybe it's an hardware issue, I am checking with the manufacturer.
Thanks, Antonio