linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] fpga: xilinx-selectmap: add new driver
@ 2024-02-07 18:01 Charles Perry
  2024-02-07 18:01 ` [PATCH v3 1/5] fpga: xilinx-spi: extract a common driver core Charles Perry
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Charles Perry @ 2024-02-07 18:01 UTC (permalink / raw)
  To: mdf
  Cc: avandiver, bcody, Charles Perry, Wu Hao, Xu Yilun, Tom Rix,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Michal Simek,
	kishore Manne, linux-fpga, devicetree, linux-kernel,
	linux-arm-kernel

Hello,

This patchset adds a new driver for the 7 series FPGA's SelectMAP
interface.

The SelectMAP interface shares a common GPIO protocol with the SPI
interface which is already in the kernel (drivers/fpga/xilinx-spi.c).
The approach proposed in this patchset is to refactor xilinx-spi.c into
xilinx-core.c which would handle the common GPIO protocol. This is then
used to build two drivers, the already existing xilinx-spi.c driver and
a newly added xilinx-selectmap.c driver.

The SelectMAP driver proposed only supports 8 bit mode. This is because
the 16 and 32 bits mode have limitations with regards to compressed
bitstream support as well as introducing endianness considerations.

I'm testing xilinx-selectmap.c on a custom i.MX6 board connected to an
Artix 7 FPGA. Flashing a 913K bitstream takes 0.44 seconds.

Changes since v2:
 * Inserted patch 2 and 3 which rename "prog_b" and "init-b" into "prog"
   and "init" for the SPI driver.
 * From Krzysztof Kozlowski review's:
   * Use more specific compatible names
   * Remove other missing occurences of the slave word missed in v2.
 * From Xu Yilun review's:
   * Fix vertical whitespace in get_done_gpio().
   * Combine write() and write_one_dummy_byte() together.
   * Eliminate most of the xilinx_core_probe() arguments, the driver
     needs to populate those directly into the xilinx_fpga_core struct.
     Added some documentation to struct xilinx_fpga_core to clarify
     this.
   * Removed typedefs from xilinx-core.h.
   * Moved null checks in xilinx_core_probe() to first patch.
   * Move csi_b and rdwr_b out of xilinx_selectmap_conf as they are not
     used out of the probe function.

Changes since v1: (from Krzysztof Kozlowski review's)
  * Use more conventional names for gpio DT bindings
  * fix example in DT bindings
  * add mc-peripheral-props.yaml to DT bindings
  * fix various formatting mistakes
  * Remove all occurences of the "slave" word.


Charles Perry (5):
  fpga: xilinx-spi: extract a common driver core
  dt-bindings: fpga: xlnx,fpga-slave-serial: rename gpios
  fpga: xilinx-core: rename "prog_b" and "init-b" gpios
  dt-bindings: fpga: xlnx,fpga-selectmap: add DT schema
  fpga: xilinx-selectmap: add new driver

 .../bindings/fpga/xlnx,fpga-selectmap.yaml    |  86 +++++++
 .../bindings/fpga/xlnx,fpga-slave-serial.yaml |  12 +-
 drivers/fpga/Kconfig                          |  12 +
 drivers/fpga/Makefile                         |   2 +
 drivers/fpga/xilinx-core.c                    | 232 ++++++++++++++++++
 drivers/fpga/xilinx-core.h                    |  28 +++
 drivers/fpga/xilinx-selectmap.c               |  97 ++++++++
 drivers/fpga/xilinx-spi.c                     | 212 +---------------
 8 files changed, 476 insertions(+), 205 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/fpga/xlnx,fpga-selectmap.yaml
 create mode 100644 drivers/fpga/xilinx-core.c
 create mode 100644 drivers/fpga/xilinx-core.h
 create mode 100644 drivers/fpga/xilinx-selectmap.c

--
2.43.0

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

end of thread, other threads:[~2024-02-15 19:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 18:01 [PATCH v3 0/5] fpga: xilinx-selectmap: add new driver Charles Perry
2024-02-07 18:01 ` [PATCH v3 1/5] fpga: xilinx-spi: extract a common driver core Charles Perry
2024-02-07 18:01 ` [PATCH v3 2/5] dt-bindings: fpga: xlnx,fpga-slave-serial: rename gpios Charles Perry
2024-02-11 15:39   ` Krzysztof Kozlowski
2024-02-13 21:40     ` Charles Perry
2024-02-15 13:32   ` Rob Herring
2024-02-15 19:42     ` Charles Perry
2024-02-07 18:01 ` [PATCH v3 3/5] fpga: xilinx-core: rename "prog_b" and "init-b" gpios Charles Perry
2024-02-11 15:40   ` Krzysztof Kozlowski
2024-02-07 18:01 ` [PATCH v3 4/5] dt-bindings: fpga: xlnx,fpga-selectmap: add DT schema Charles Perry
2024-02-07 21:25   ` Rob Herring
2024-02-07 18:01 ` [PATCH v3 5/5] fpga: xilinx-selectmap: add new driver Charles Perry

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).