Oooh, that’s familiar.
I’ve had a similar issue when I flashed a sd-card image on the SPI by mistake. After that the u-boot would configure the Arria 10 for SD boot as soon as the chip was powered up and then the flasher would fail with this error.
After a bit of hair pulling we opted for a rather ugly hack: we soldered a switch onto the SPI daughterboard to manually reset it:
Then we’d just hold the button while powering up the board (so that the A10 ROM would fail to load u-boot) then after a second or so you can release it and reflash the SPI correctly. You can use a similar hack for the NAND by the way.
Now there’s probably a more elegant solution, technically with the JTAG you should be able to override U-boot’s config to put the A10 back in SPI mode to let the flash go through but soldering two wires was quicker than figuring that out…
Hope that helps.
