On Thu, 2015-07-09 at 16:59 +0100, David Woodhouse wrote:
Here's an updated version of the next patch in the sequence.
...
From: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at Date: Mon, 22 Jun 2015 03:37:23 +0200 Subject: [PATCH] dediprog: Support new communication protocol.
On top of that, I tried the patch at http://git.infradead.org/users/dwmw2/flashrom.git/commitdiff/81ad0cc50 to attempt to enable SF600 support. I got someone to test it for me on an SF600Plus with firmware 7.1.1. It doesn't work.
Firstly, whatever dediprog_device_init() is doing is not covered by the recently-provided documentation for *either* the old or the new protocol, and the SF600 doesn't like it:
Unexpected response to init! Error: Programmer initialization failed.
If we just comment that out, and also make it accept firmware v7, then we can successfully identify a W25Q64.W chip and read sane-looking contents from it. Writes fail, though:
Calibrating delay loop... OS timer resolution is 1 usecs, 3206M loops per second, delay more than 10% too short (got 84% of expected delay), recalculating... 3512M loops per second, 10 myus = 15 us, 100 myus = 175 us, 1000 myus = 1643 us, 10000 myus = 16156 us, 4 myus = 16 us, OK. Initializing dediprog programmer dediprog_init Setting voltage to 1800 mV Found USB device (0483:dada). ANDY: stubbing dediprog_device_init Found a SF600 V:7.1.1 Unexpected firmware version 7.1.1! SPI speed is 12MHz Setting SPI voltage to 1.800 V The following protocols are supported: SPI. Probing for AMIC A25L05PT, 64 kB: programmer_map_flash_region: mapping A25L05PT from 0x00000000ffff0000 to 0x0000000000000000 dediprog_spi_send_command, writecnt=1, readcnt=4 RDID returned 0xef 0x60 0x17 0x00. probe_spi_rdid_generic: id1 0xef, id2 0x6017 programmer_unmap_flash_region: unmapped 0x0000000000000000 ... Probing for Generic unknown SPI chip (REMS), 0 kB: dediprog_spi_send_command, writecnt=4, readcnt=2 REMS returned 0xef 0x16. probe_spi_rems: id1 0xef, id2 0x16 Found Winbond flash chip "W25Q64.W" (8192 kB, SPI). This chip may contain one-time programmable memory. flashrom cannot read and may never be able to write it, hence it may not be able to completely clone the contents of this chip (see man page for details). programmer_map_flash_region: mapping W25Q64.W from 0x00000000ff800000 to 0x0000000000000000 dediprog_spi_send_command, writecnt=1, readcnt=2 Block protection is disabled. Reading old flash chip contents... done. Erasing and writing flash chip... Trying erase function 0... 0x000000-0x000fff:Edediprog_spi_send_command, writecnt=1, readcnt=0 dediprog_spi_send_command, writecnt=4, readcnt=0 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 FAILED at 0x00000226! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x00000fff: 0x1da ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Trying erase function 1... 0x000000-0x007fff:Edediprog_spi_send_command, writecnt=1, readcnt=0 dediprog_spi_send_command, writecnt=4, readcnt=0 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 FAILED at 0x0000089d! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x00007fff: 0x356 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Trying erase function 2... 0x000000-0x00ffff:Edediprog_spi_send_command, writecnt=1, readcnt=0 dediprog_spi_send_command, writecnt=4, readcnt=0 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 FAILED at 0x00000e0e! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0x5d5 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Trying erase function 3... 0x000000-0x7fffff:Edediprog_spi_send_command, writecnt=1, readcnt=0 dediprog_spi_send_command, writecnt=1, readcnt=0 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 FAILED at 0x000009ee! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x007fffff: 0x26fb4 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. Trying erase function 4... 0x000000-0x7fffff:Edediprog_spi_send_command, writecnt=1, readcnt=0 dediprog_spi_send_command, writecnt=1, readcnt=0 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 dediprog_spi_send_command, writecnt=1, readcnt=2 FAILED at 0x00001a0f! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x007fffff: 0x26f6b ERASE FAILED! Looking for another erase function. No usable erase functions left. FAILED! Uh oh. Erase/write failed. Checking if anything has changed. Reading current flash chip contents... done. Apparently at least some data has changed. Your flash chip is in an unknown state. Please report this on IRC at chat.freenode.net (channel #flashrom) or mail flashrom@flashrom.org, thanks! programmer_unmap_flash_region: unmapped 0x0000000000000000 dediprog_shutdown Setting SPI voltage to 0.000 V