Attention is currently required from: Anastasia Klimchuk, David Hendricks, Matt DeVillier.
Anton Samsonov has posted comments on this change by Matt DeVillier. ( https://review.coreboot.org/c/flashrom/+/85160?usp=email )
Change subject: cli_classic: Add option to use first detected chip if multiple found ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Thank you David, this is useful!
My two cents.
I recently submitted a patch for adding Spansion S25FS512S, because several — not just one! — of my colleagues happily relied on the auto-detected S25FL512S (its FS vs FL, with different command set and register handling, and different voltage as well) and scratched their head why it results in bricking. They were using both internal linux_spi and external dediprog, including with original DediProg Engineering software, but no one of them bothered with visually expecting the motherboard for identifying the chip, which would be pretty easy. People are lazy; even the engineers are, too. Luckily, Spansion provides additional Device ID info for disambiguating the chips programmatically.
Another recent example was Spansion S25FL128S......0, which shares the same 2-byte ID with 7 another models, including S25FL128S......1 (with different sector size), S25FL128P......0 (with different command behavior), S25FS128S (see "FS-vs-FL" above) and so on. Not surprisingly, when people are not instructed which chip to select, they happily select the first one, or a random one, and end up with a bricked device, even when they also have the opportunity to open the chassis and have a look at the motherboard near the SPI header. Since those chips are all Spansion, too, I'll try to write a patch what would disambiguate them all, if it's acceptable to submit patches that affect multiple chips based on their datasheets only, with testing on a single chip only.
My point is: do whatever you can to identify chips programmatically, rather than relying on people and their "first choice", unless you plan to provoke massive bricking.