Hello,
Some time ago I've revived an old patchset by Hatim Kanchwala and extended it with support for more devices and unit tests.
It wasn't reviewed for a while and now that reviewing makes sense (changes it's based on were accepted) it's not really needed for 3mdeb's project anymore...
The question is whether there is a need for it? If there is interest and wiliness to test it (wasn't tested on hardware), pursuing review still makes sense.
Someone can even take over the patches and I'll become a reviewer and help along the way.
If OTP isn't needed at the moment, the patchset will be abandoned at least until some project which requires OTP in flashrom or until someone else will pick it up.
The first change of the series is (no topic yet)
https://review.coreboot.org/c/flashrom/+/59402
To give you an idea of the amount of work it might take to upstream:
Makefile | 2 chipdrivers.h | 5 cli_classic.c | 243 dummyflasher.c | 351 flash.h | 6 flashchips.c | 61 flashrom.8.tmpl | 81 libflashrom.h | 18 meson.build | 2 otp.c | 490 otp.h | 91 otp_layouts.c | 210 spi.h | 40 spi25.c | 89 spi25_statusreg.c | 90 tests/chip_otp.c | 470 tests/meson.build | 1 tests/tests.c | 14 tests/tests.h | 12 19 files changed, 2186 insertions(+), 90 deletions(-)
Conflicts with current master for a couple of month, should be easy to fix (I'll do that if someone else will take over). I also have a bash script to test new CLI options via dummyflasher.
Best regards, Sergii