Lattice MachXO2 FPGAs have internal configuration flash which can be reprogrammed over different interfaces. The former driver implementation supported programming via SPI, this patch series adds programming via I2C. The first 4 patches convert the MachXO2 Slave binding from textual format to YAML and add additional features like different flash areas to be erased upon a programming cycle, a GPIO which can be used to explicitely initialize the programming sequence, and finally I2C as additional programming interface. The following 10 patches clean up and refactor the previous machxo2-spi driver code, extract functionalities common to both spi and i2c programming interfaces as a preparation, add additional flash areas to be erased and signalling for start of the programming sequence via gpio. Since the original driver did not yield enough time to erase machxo2 variants with large flash memory, a variation of erase timeout handling is added with another patch, introducing a more datasheet conformant way of dealing with large flash sizes due to larger LUT counts. The final patch adds the I2C bus as an additional interface for programming. Johannes Zink (15): dt-bindings: fpga: convert Lattice MachXO2 Slave binding to YAML dt-bindings: fpga: machxo2-slave: add erasure properties dt-bindings: fpga: machxo2-slave: add pin for program sequence init dt-bindings: fpga: machxo2-slave: add lattice,machxo2-slave-i2c compatible fpga: machxo2-spi: remove #ifdef DEBUG fpga: machxo2-spi: factor out status check for readability fpga: machxo2-spi: fix big-endianness incompatibility fpga: machxo2-spi: simplify with spi_sync_transfer() fpga: machxo2-spi: simplify spi write commands fpga: machxo2-spi: prepare extraction of common code fpga: machxo2: move non-spi-related functionality to common code fpga: machxo2: improve status register dump fpga: machxo2: add optional additional flash areas to be erased fpga: machxo2: add program initialization signalling via gpio fpga: machxo2: extend erase timeout for machxo2 FPGA Peter Jensen (1): fpga: machxo2: add configuration over i2c .../bindings/fpga/lattice,machxo2-slave.yaml | 80 ++++ .../bindings/fpga/lattice-machxo2-spi.txt | 29 -- drivers/fpga/Kconfig | 14 + drivers/fpga/Makefile | 2 + drivers/fpga/machxo2-common.c | 392 ++++++++++++++++++ drivers/fpga/machxo2-common.h | 43 ++ drivers/fpga/machxo2-i2c.c | 137 ++++++ drivers/fpga/machxo2-spi.c | 366 ++-------------- 8 files changed, 712 insertions(+), 351 deletions(-) create mode 100644 Documentation/devicetree/bindings/fpga/lattice,machxo2-slave.yaml delete mode 100644 Documentation/devicetree/bindings/fpga/lattice-machxo2-spi.txt create mode 100644 drivers/fpga/machxo2-common.c create mode 100644 drivers/fpga/machxo2-common.h create mode 100644 drivers/fpga/machxo2-i2c.c -- 2.30.2