This patchset introduces a new Linux Kernel Driver, versal-pci for AMD Alevo Versal based PCIe Card. The driver is based on Linux fpga driver framework. The AMD Alevo Versal based PCIe Card, including V70, is the first Alevo production card leveraging AMD XDNA architecture with AI Engines. It is designed for AI inference efficiency and is tuned for video analytics and natural language processing applications [1]. This versal-pci driver provides services, including: - leveraging linux firmware and FPGA framework to download management firmware - program additional bit-streams for AMD Xilinx specific hardware - communicate with PCIe user function - communicate with firmware running on the PCIe Card - monitor device health The driver is licensed under GPL-2.0. The firmware and bit-streams are distributed as a closed binary, delivered by AMD. Please see [1] for more information. [1] https://www.amd.com/en/products/accelerators/alveo/v70.html Refactor driver to address all comments from v1. Changes since v1: - Add driver architecture description. - Change the driver name to versal-pci - Remove unnecessary memcpy in versal-pci-comm-chan.c - Keep mod_timer because we need single_threaded_queue with delayed_work. - Change the "comms" to "comm_chan". - Remove regmap, use base+offset directly. - Add skeleton ops with on implementation (TODO) for fpga_manager in early patch (0001) and add implementation in later patch(0004). - Remove br_ops and FPGA region, no need. - Add load_xclbin request from user PF driver via comm_chan service, and read firmware from local cached data. - Remove pcim_iomap_table and pcim_iomap_regions. Use pcim_iomap_region. - Redo patches, remove no-used definitions for each patch itself. Use /* TODO */ to mark dependencies that will be addressed in later patch. - Fix memory leak in rm_check_health. - Fix cmd with error status in rm_check_health. - Change to vzalloc in all places. - Add rm_queue_withdraw_cmd in fw_cancel. Yidong Zhang (4): drivers/fpga/amd: Add new driver amd versal-pci drivers/fpga/amd: Add communication channel drivers/fpga/amd: Add remote queue drivers/fpga/amd: Add load xclbin and load firmware MAINTAINERS | 6 + drivers/fpga/Kconfig | 3 + drivers/fpga/Makefile | 3 + drivers/fpga/amd/Kconfig | 15 + drivers/fpga/amd/Makefile | 8 + drivers/fpga/amd/versal-pci-comm-chan.c | 271 ++++++++++++ drivers/fpga/amd/versal-pci-comm-chan.h | 14 + drivers/fpga/amd/versal-pci-main.c | 445 ++++++++++++++++++++ drivers/fpga/amd/versal-pci-rm-queue.c | 324 +++++++++++++++ drivers/fpga/amd/versal-pci-rm-queue.h | 21 + drivers/fpga/amd/versal-pci-rm-service.c | 497 +++++++++++++++++++++++ drivers/fpga/amd/versal-pci-rm-service.h | 229 +++++++++++ drivers/fpga/amd/versal-pci.h | 90 ++++ 13 files changed, 1926 insertions(+) create mode 100644 drivers/fpga/amd/Kconfig create mode 100644 drivers/fpga/amd/Makefile create mode 100644 drivers/fpga/amd/versal-pci-comm-chan.c create mode 100644 drivers/fpga/amd/versal-pci-comm-chan.h create mode 100644 drivers/fpga/amd/versal-pci-main.c create mode 100644 drivers/fpga/amd/versal-pci-rm-queue.c create mode 100644 drivers/fpga/amd/versal-pci-rm-queue.h create mode 100644 drivers/fpga/amd/versal-pci-rm-service.c create mode 100644 drivers/fpga/amd/versal-pci-rm-service.h create mode 100644 drivers/fpga/amd/versal-pci.h -- 2.34.1