On Wednesday, March 30th, 2022 at 10:42 AM, Nico Huber wrote:
What I do in this case is to start with the most simple layout:
0000:0fff fd
and then flash only the descriptor to make `--ifd` work again. `ifdtool` may work too but has some quirks: sometimes you have to tell it what descriptor generation to expect and it doesn't warn if you don't, AIUI.
Hello Nico,
I have finally been able to try your suggestion, and I belive that my original problem has been solved. However, I'm not yet able to flash the chip. I don't know if this should be posted as a new question to the mailing list, but as this problem could also just be a rookie mistake by me, I will try to post it here first.
The chip I'm trying to flash is the Macronix MX25L12873F which support was added for in commit 16661d82e3c17e224a21c109572b0834ec63a17c / Change-Id I59c8067f15b5ceac5a2e2f8fe93431a465f17e23 on 14/07-21.
I'm using flashrom built from master branch (7dcd0de).
The SOIC clip is high quality with very good grip, and so far I have never had any communication problems with the chip. I have made sure that everything is wired correctly and also tried with different values for spispeed, but the error is the same:
======================================================================== Command line (14 args): flashrom -p \ linux_spi:dev=/dev/spidev0.0,spispeed=1000 -c \ MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F -w \ firmware.bin -l rom.layout -i fd --noverify-all -V -o out.log Added layout entry 00000000 - 00000fff named fd Using region: "fd". Initializing linux_spi programmer Using device /dev/spidev0.0 Using 1000kHz clock get_max_kernel_buf_size: Using value from \ /sys/module/spidev/parameters/bufsiz as max buffer size. linux_spi_init: max_kernel_buf_size: 4096 The following protocols are supported: SPI. Probing for Macronix \ MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F, 16384 kB: \ compare_id: id1 0xc2, id2 0x2018 Added layout entry 00000000 - 00ffffff named complete flash Found Macronix flash chip \ "MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F" \ (16384 kB, SPI) on linux_spi. Chip status register is 0x7c. Chip status register: Status Register Write Disable (SRWD, SRP, ...) \ is not set Chip status register: Bit 6 is set Chip status register: Block Protect 3 (BP3) is set Chip status register: Block Protect 2 (BP2) is set Chip status register: Block Protect 1 (BP1) is set Chip status register: Block Protect 0 (BP0) is set Chip status register: Write Enable Latch (WEL) is not set Chip status register: Write In Progress (WIP/BUSY) is not set 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). Some block protection in effect, disabling... Block protection could \ not be disabled! Chip status register is 0x7c. Chip status register: Status Register Write Disable (SRWD, SRP, ...) \ is not set Chip status register: Bit 6 is set Chip status register: Block Protect 3 (BP3) is set Chip status register: Block Protect 2 (BP2) is set Chip status register: Block Protect 1 (BP1) is set Chip status register: Block Protect 0 (BP0) is set Chip status register: Write Enable Latch (WEL) is not set Chip status register: Write In Progress (WIP/BUSY) is not set Reading old flash chip contents... done. Erasing and writing flash chip... Trying erase function 0... \ 0x000000-0x000fff:EFAILED at 0x00000000! Expected=0xff, Found=0x00, \ failed byte count from 0x00000000-0x00000fff: 0x1000 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase \ function. Trying erase function 1... 0x000000-0x007fff:RREFAILED at 0x00000000! \ Expected=0xff, Found=0x00, failed byte count from \ 0x00000000-0x00007fff: 0x8000 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase \ function. Trying erase function 2... 0x000000-0x00ffff:RREFAILED at 0x00000000! \ Expected=0xff, Found=0x00, failed byte count from \ 0x00000000-0x0000ffff: 0x10000 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase \ function. Trying erase function 3... 0x000000-0xffffff:RREFAILED at 0x00000000! \ Expected=0xff, Found=0x00, failed byte count from \ 0x00000000-0x00ffffff: 0xae98a3 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase \ function. Trying erase function 4... 0x000000-0xffffff:RREFAILED at 0x00000000! \ Expected=0xff, Found=0x00, failed byte count from \ 0x00000000-0x00ffffff: 0xae98a3 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase \ function. Trying erase function 5... not defined. Looking for another erase \ function. Trying erase function 6... not defined. Looking for another erase \ function. Trying erase function 7... not defined. No usable erase functions left. FAILED! Uh oh. Erase/write failed. Your flash chip is in an unknown state. Please report this to the mailing list at flashrom@flashrom.org or on IRC (see https://www.flashrom.org/Contact for details), thanks! ========================================================================
What could I be doing wrong, that causes this new error?
Thanks.
Best regards, Pete Smith