[flashrom] Try to add support for LE25FW106/1Mbit spi flash

Stefan Tauner stefan.tauner at alumni.tuwien.ac.at
Mon Jun 2 20:11:00 CEST 2014


On Mon, 2 Jun 2014 08:27:51 +0200
The Raven <originalraven at hotmail.com> wrote:

> Hello,
> i am trying to add this chip (ID 0x62 0x15).
> It works so far, but erase function 1 is not working.
> The datasheet tells that it supports 2K small sector, 32K sector and
> chip erase.
> 2K Small Sector and chip erase works. But 32K not. And i don't know why.
> Please have a look:
>         .vendor        = "Sanyo",
>         .name        = "LE25FW106",
>         .bustype    = BUS_SPI,
>         .manufacture_id    = SANYO_ID,
>         .model_id    = SANYO_LE25FW106,
>         .total_size    = 128,
>         .page_size    = 256,
>         .feature_bits    = FEATURE_WRSR_WREN,
>         .tested        = TEST_OK_PREW,
>         .probe        = probe_spi_res2,
>         .probe_timing    = TIMING_ZERO,
>         .block_erasers    = {
>             {
> //                .eraseblocks = { {2 * 1024, 64} }, //ok
> //                .block_erase = spi_block_erase_d7,
> //            }, {
>                 .eraseblocks = { {32 * 1024, 4} }, //not ok
>                 .block_erase = spi_block_erase_d8,
> //            }, {
> //                .eraseblocks = { {128 * 1024, 1} }, //ok
> //                .block_erase = spi_block_erase_c7,
>                 }
>             },
>         .printlock    = spi_prettyprint_status_register_plain,
>         .unlock        = spi_disable_blockprotect,
>         .write        = spi_chip_write_256,
>         .read        = spi_chip_read,
>         .voltage    = {2700, 3600},
> 
> I am also not sure if "FEATURE_WRSR_WREN" is correct.

That defines how flashrom should make the status register
write-enabled before issuing a WRSR (write status register) command.
Either with WREN or with EWSR. Answer see section 3. Write Enable in
the datasheet. (it is correct).

> The code is taken from "LE25FW406A" chip and changed to fit the "LE25FW106".
> 
> This is the error:
> Found Sanyo flash chip "LE25FW106" (128 kB, SPI).
> Erasing and writing flash chip... Trying erase function 0...
> 0x000000-0x007fff:E, 0x008000-0x00ffff:EError: invalid response 0xAF
> from device

That's a bug in the serprog implementation (again... I think we saw
that already in one of your logs a few weeks ago?). Is it perfectly
reproducible?

Your chip definition looks good. I'd use another .printlock:
spi_prettyprint_status_register_bp1_srwd with a fixme noting that the
ERSER error flag is not implemented (yet) though. I am looking forward
to a complete patch with sign-off this time? :)

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list