flashprog/v1.2

From flashprog
Revision as of 15:08, 18 August 2024 by Icon (talk | contribs) (→‎FTDI FT4222H: correct measured reading speed (1000 vs 1024...))
Jump to navigation Jump to search


Our third feature release brings some exciting ground work to boost external programming: Flashprog now supports multi-i/o reads and QPI, finally! So far, this works with Dediprog SF600 and its successors, FT4222H-based programmers and bit banging.

What's new?

Multi I/O

Our generic SPI25 flash driver was reworked to support different read commands, primarily to support dual and quad-i/o reads. To actually make use of it, a huge revamp of our flash-chip database was necessary. So far we only kept track of QPI support (vaguely), but didn't note what multi-i/o commands are available in SPI mode.

Dual and quad-i/o reads are usable with Dediprog SF600 and its successors, providing a nice speed-up for those. They can also be used with the new ft4222_spi driver and bitbanging via linux_gpio_spi. For those, however, full QPI takes precedence (see below).

As dual i/o only requires the traditional four SPI signal lines, it's enabled by default for compatible programmer / chip combinations. To enable quad i/o, a iomode=quad programmer argument is required (plus the necessary physical setup, of course). Many chips also have a quad-enable (QE) configuration bit that has to be set. Flashprog will automatically try to set a volatile QE bit, if present. However setting non-volatile bits currently requires some work-in-progress patches.

SF600 programmers with older (protocol v2) firmware are untested and still default to single i/o.

QPI

Flash chips with QPI support allow to send and receive all data via four signal lines at once. This, however requires a compatible programmer. QPI is currently only useful with the new ft4222_spi driver and can additionally be tested with the linux_gpio_spi bitbanging driver. If the prerequisites for quad i/o are given and programmer and flash support QPI, it will be used by default.

FTDI FT4222H

Flashprog has a new driver ft4222_spi to use FT4222H based USB-SPI bridges. The chip supports QPI, which was the original incentive to look into this topic. The FT4222H i/o buffers take an external Vref, which also makes it useable for 1.8V applications without additional translation. With QPI at 40MHz, it can read about 6.1 MiB/s.

Meson Testing

Some smaller Meson fixes were applied that we discovered during testing of the last release. The test script was updated to test and compare (a little) builds with Make and Meson. This should further help to transition with reduced risk of regressions.

Other Changes

  • README was update a little and converted to markdown.
  • Flashprog has new udev rules for a bunch of USB programmers.
  • Some patches originally for flashrom were applied to support multi-i/o related configuration registers.
  • Some smaller fixups around the current erase-block selection (minor speed-up, and fixed SFDP with ichspi in corner cases).
  • Support for the CH347F variant was added.
  • While flashprog should fully support AMD systems up to Zen 4 (if not locked down too much), we bail out now when PCI config space reads all 'ff' (discovered on a Rembrandt ThinkPad, reasons are currently unknown).

Download

flashprog v1.2-rc1 can be downloaded in various ways:

Anonymous checkout of the tag v1.2-rc1 from git repositories at

A tarball is available for download at

https://flashprog.org/releases/flashprog-v1.2-rc1.tar.bz2 (GPG signature) (see GPG_Signatures)

Supported hardware

Please see the archived status page for the hardware supported by this release.