Hi Stefan,
On 14.01.2010 14:08, Stefan Reinauer wrote:
On 1/14/10 5:24 AM, Carl-Daniel Hailfinger wrote:
Dediprog SF100 support. Very fragile, lots of stuff guessed from logs. May explode spontaneously.
I think I know enough to actually use it to ID the chip, but that's it. A USB log with which includes writing an image from the original software (pretty much any image) would help clear up a few ambiguities.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Awesome..!
Thanks!
It seems to be talking to the device and get through the initialization, but it ends up with no "SPI" chips being "incompatible":
Actually, that's intentional. That way I could avoid hooking up the driver in the SPI core (which would mean I'd have to create dummy command functions) and still get initialization testing.
MacPro:flashrom stepan$ ./flashrom -p dediprog -V flashrom v0.9.1-r862 Found USB device (0483:dada). Sending RDID Receiving response: 20 20 16 10 00 00 00 00 00 00 00 00 00 00 00 00
Which flash chip is this? The response suggests a ST M25P32 flash chip, but the extra "10" at the end looks rather strange.
Not sure if this code is intended:
/* URB 9. Command Receive Device String. */ memset(buf, 0, sizeof(buf)); ret = usb_control_msg(dediprog_handle, 0xc2, 0x8, 0xff, 0xff, buf, 0x10, DEFAULT_TIMEOUT); if ((ret != 0x10) || !memcmp(buf, "SF100 V:2.1.1 ", 0x10)) {
This would bail out if the version string is "SF100 V:2.1.1 "
Right, that's a bug. Considering that this was coded at 5am, I'm surprised there was only one bug.
msg_perr("Unexpected response 3!\n"); return 1; }
Here I added this:
buf[0xf]=0; msg_pdbg("Found a Dediprog %s\n", buf);
That potentially truncates the string. I'll use strnlen/strncpy to write the string to a separate buffer which is big enough.
Which got me:
flashrom v0.9.1-r862 Found USB device (0483:dada). Found a Dediprog SF100 V:3.1.8
Hm. The best idea might be to match against the model name and the major version.
Let me know if you need more information
A log with SniffUsb 2.0.0006 from http://www.pcausa.com/Utilities/UsbSnoop/ would be very appreciated. I wrote a tool to decode the log generated with that SniffUsb version. Feel free to point me to a private upload via IRC (the log may contain programmer serial numbers).
What the log should contain: - Plugging in the SF100 - Starting the programming software - SPI device detection/probe - Full read - Erase (optional) - Full write (optional) - No custom settings (but you can do a probe-only run with changed settings in another file if you want to help decode a few more commands)
It would be cool if you could use a small SPI chip (4 Mbit or so) because the logs roughly have 4x-20x the size of the flash chip.
Please do not use a SST chip (log would be at least 100x the size of the flash chip). Pretty much all other vendors are OK.
I will post an updated patch soon.
Regards, Carl-Daniel