Hi Jens,
Thanks for the patch, it looks good. There's one important thing missing though: https://www.flashrom.org/Development_Guidelines#Sign-off_Procedure.

Once we have your "sign-off" we can go forward with merging it.

On Fri, May 24, 2019 at 3:06 PM Jens Gollasch <jens.gollasch@gmx.de> wrote:
Hi folks,

I tried to flash some new Atmel/Adesto SPI 512k flash chips with
flashrom0.9.9-rc1-r1942 on Linux 4.15.0-50-generic (x86_64) (from
repositories in linux mint 18.3) and flashrom v1.0.1 on Linux
4.15.0-50-generic (x86_64) (compiled it from source).


Both versions could not find the chip:
-------------------------------------------------------------------------------------
Found Atmel flash chip "unknown Atmel SPI chip" (0 kB, SPI).
This flash part has status NOT WORKING for operations: PROBE READ ERASE
WRITE
-------------------------------------------------------------------------------------


The IDs of this flash chip are:

Manufacturer ID: 1f
Memory Type: 8401

So I checked the datasheet and added support in flashchips.h at line 154:

#define ATMEL_AT25SF041     0x8401  /* Adesto */

and in flashchips.c at line 2178:

     {
         .vendor        = "Atmel",
         .name        = "AT25SF041",
         .bustype    = BUS_SPI,
         .manufacture_id    = ATMEL_ID,
         .model_id    = ATMEL_AT25SF041,
         .total_size    = 512,
         .page_size    = 256,
         .feature_bits    = FEATURE_WRSR_WREN,
         .tested        = TEST_OK_PREW,
         .probe        = probe_spi_rdid,
         .probe_timing    = TIMING_ZERO,
         .block_erasers    =
         {
             {
                 .eraseblocks = { {4 * 1024, 128} },
                 .block_erase = spi_block_erase_20,
             }, {
                 .eraseblocks = { {32 * 1024, 16} },
                 .block_erase = spi_block_erase_52,
             }, {
                 .eraseblocks = { {64 * 1024, 8} },
                 .block_erase = spi_block_erase_d8,
             }, {
                 .eraseblocks = { {512 * 1024, 1} },
                 .block_erase = spi_block_erase_60,
             }, {
                 .eraseblocks = { {512 * 1024, 1} },
                 .block_erase = spi_block_erase_c7,
             }
         },
         .printlock    = spi_prettyprint_status_register_at25df,
         .unlock        = spi_disable_blockprotect_at2x_global_unprotect,
         .write        = spi_chip_write_256,
         .read        = spi_chip_read,
         .voltage    = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models
available */

     },


Compiled, Works perfect!
So you can add support for this beast in your next version.


Bye,
Jens

_______________________________________________
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-leave@flashrom.org