linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] Add support for Lattice MachXO2 programming via I2C
@ 2022-08-25 14:13 Johannes Zink
  2022-08-25 14:13 ` [PATCH 01/16] dt-bindings: fpga: convert Lattice MachXO2 Slave binding to YAML Johannes Zink
                   ` (16 more replies)
  0 siblings, 17 replies; 48+ messages in thread
From: Johannes Zink @ 2022-08-25 14:13 UTC (permalink / raw)
  To: linux-fpga
  Cc: devicetree, Rob Herring, Moritz Fischer, Wu Hao, Xu Yilun, kernel

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


^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2022-09-03 15:00 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 14:13 [PATCH 00/16] Add support for Lattice MachXO2 programming via I2C Johannes Zink
2022-08-25 14:13 ` [PATCH 01/16] dt-bindings: fpga: convert Lattice MachXO2 Slave binding to YAML Johannes Zink
2022-08-30 20:30   ` Rob Herring
2022-08-31  7:12     ` Johannes Zink
2022-08-25 14:13 ` [PATCH 02/16] dt-bindings: fpga: machxo2-slave: add erasure properties Johannes Zink
2022-08-29  7:39   ` Xu Yilun
     [not found]     ` <9d5512768acb4d57f339942007402a9ed9483e84.camel@pengutronix.de>
     [not found]       ` <YwzWt8KjyfdyqehI@yilunxu-OptiPlex-7050>
2022-08-31  7:38         ` Johannes Zink
2022-09-03 14:49           ` Xu Yilun
2022-08-30 20:36   ` Rob Herring
2022-08-31  7:07     ` Johannes Zink
2022-08-25 14:13 ` [PATCH 03/16] dt-bindings: fpga: machxo2-slave: add pin for program sequence init Johannes Zink
2022-08-25 18:51   ` Rob Herring
2022-08-26  7:56     ` Johannes Zink
2022-08-29  7:45   ` Xu Yilun
     [not found]     ` <a42d72cd71c96ca675f5bb0cf59128c7f1cb04bb.camel@pengutronix.de>
     [not found]       ` <YwzZYM6GU0GiqBiq@yilunxu-OptiPlex-7050>
2022-08-31  7:51         ` Johannes Zink
2022-08-31  8:08           ` Johannes Zink
2022-08-25 14:13 ` [PATCH 04/16] dt-bindings: fpga: machxo2-slave: add lattice,machxo2-slave-i2c compatible Johannes Zink
2022-08-30 20:40   ` Rob Herring
2022-08-31  7:10     ` Johannes Zink
2022-08-25 14:13 ` [PATCH 05/16] fpga: machxo2-spi: remove #ifdef DEBUG Johannes Zink
2022-08-25 14:13 ` [PATCH 06/16] fpga: machxo2-spi: factor out status check for readability Johannes Zink
2022-08-25 14:13 ` [PATCH 07/16] fpga: machxo2-spi: fix big-endianness incompatibility Johannes Zink
2022-08-29  8:19   ` Xu Yilun
2022-08-29 10:41     ` Johannes Zink
2022-08-25 14:13 ` [PATCH 08/16] fpga: machxo2-spi: simplify with spi_sync_transfer() Johannes Zink
2022-08-25 14:13 ` [PATCH 09/16] fpga: machxo2-spi: simplify spi write commands Johannes Zink
2022-08-25 14:13 ` [PATCH 10/16] fpga: machxo2-spi: prepare extraction of common code Johannes Zink
2022-08-25 14:13 ` [PATCH 11/16] fpga: machxo2: move non-spi-related functionality to " Johannes Zink
2022-08-25 14:13 ` [PATCH 12/16] fpga: machxo2: improve status register dump Johannes Zink
2022-08-25 14:13 ` [PATCH 13/16] fpga: machxo2: add optional additional flash areas to be erased Johannes Zink
2022-08-25 14:13 ` [PATCH 14/16] fpga: machxo2: add program initialization signalling via gpio Johannes Zink
2022-08-25 14:13 ` [PATCH 15/16] fpga: machxo2: extend erase timeout for machxo2 FPGA Johannes Zink
2022-08-29  9:26   ` Xu Yilun
2022-08-29 10:51     ` Johannes Zink
2022-08-29 14:57       ` Xu Yilun
2022-08-31  7:56         ` Johannes Zink
2022-08-25 14:13 ` [PATCH 16/16] fpga: machxo2: add configuration over i2c Johannes Zink
2022-08-29  9:47   ` Xu Yilun
2022-08-29 13:21     ` Johannes Zink
2022-08-29 14:45       ` Xu Yilun
2022-08-31 16:07         ` Johannes Zink
2022-08-25 15:25 ` [PATCH 00/16] Add support for Lattice MachXO2 programming via I2C Ivan Bornyakov
2022-08-26  6:32   ` Johannes Zink
2022-08-26  8:15     ` Ivan Bornyakov
2022-08-26  8:25   ` Sascha Hauer
2022-08-26  9:00     ` Ivan Bornyakov
2022-08-26  9:19       ` Ivan Bornyakov
2022-08-26 15:26         ` Xu Yilun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).