Skip to content

Commit

Permalink
[pddf]: Adding support for FPGAPCIe in PDDF (#13476)
Browse files Browse the repository at this point in the history
Why I did it
Some of the platform vendors use FPGA in the HW design. This FPGA is connected to the CPU via PCIe interface. This FPGA also works as an I2C controller having other devices attached to the I2C channels emanating from it. Adding a common module, a driver and a platform specific algorithm module to be used for such FPGA in PDDF.

How I did it
Added 'pddf_fpgapci_module', 'pddf_fpgapci_driver' and a sample algorithm module for Xilinx device 7021. Kernel modules which takes the platform dependent data from PDDF JSON files and initialises the PCIe FPGA. The sample algorithm module can be used by the ODMs in case the communication algorithms are same for their device. Else, they need to come up with similar algo module.

How to verify it
Any platform having such an FPGA and brought up using PDDF would use these kernel modules. The detail representation of such a device in PDDF JSON file is covered in the HLD.
  • Loading branch information
FuzailBrcm authored Feb 6, 2023
1 parent 346576b commit 0704ff5
Show file tree
Hide file tree
Showing 11 changed files with 1,012 additions and 2 deletions.
2 changes: 1 addition & 1 deletion platform/pddf/i2c/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PACKAGE_PRE_NAME := sonic-platform-pddf
KVERSION ?= $(shell uname -r)
KERNEL_SRC := /lib/modules/$(KVERSION)
MOD_SRC_DIR:= $(shell pwd)
MODULE_DIRS:= client cpld cpld/driver cpldmux cpldmux/driver fpgai2c fpgai2c/driver fan fan/driver mux gpio led psu psu/driver sysstatus xcvr xcvr/driver
MODULE_DIRS:= client cpld cpld/driver cpldmux cpldmux/driver fpgai2c fpgai2c/driver fpgapci fpgapci/driver fpgapci/algos fan fan/driver mux gpio led psu psu/driver sysstatus xcvr xcvr/driver
MODULE_DIR:= modules
UTILS_DIR := utils
SERVICE_DIR := service
Expand Down
2 changes: 1 addition & 1 deletion platform/pddf/i2c/modules/Makefile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
obj-m := client/ cpld/ cpldmux/ fpgai2c/ xcvr/ mux/ gpio/ psu/ fan/ led/ sysstatus/
obj-m := client/ cpld/ cpldmux/ fpgai2c/ fpgapci/ xcvr/ mux/ gpio/ psu/ fan/ led/ sysstatus/
4 changes: 4 additions & 0 deletions platform/pddf/i2c/modules/fpgapci/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
obj-m := driver/ algos/
obj-m += pddf_fpgapci_module.o

ccflags-y:= -I$(M)/modules/include
4 changes: 4 additions & 0 deletions platform/pddf/i2c/modules/fpgapci/algos/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sample driver for Xilinx 7021 FPGA device
obj-m += pddf_xilinx_device_7021_algo.o

ccflags-y := -I$(M)/modules/include
Loading

0 comments on commit 0704ff5

Please sign in to comment.