Commit a1944676 authored by Gerhard Engleder's avatar Gerhard Engleder Committed by Greg Kroah-Hartman
Browse files

misc: keba: Add basic KEBA CP500 system FPGA support



The KEBA CP500 system FPGA is a PCIe device, which consists of multiple
IP cores. Every IP core has its own auxiliary driver. The cp500 driver
registers an auxiliary device for each device and the corresponding
drivers are loaded by the Linux driver infrastructure.

Currently 3 variants of this device exists. Every variant has its own
PCI device ID, which is used to determine the list of available IP
cores. In this first version only the auxiliary device for the I2C
controller is registered.

Besides the auxiliary device registration some other basic functions of
the FPGA are implemented; e.g, FPGA version sysfs file, keep FPGA
configuration on reset sysfs file, error message for errors on the
internal AXI bus of the FPGA.

Signed-off-by: default avatarGerhard Engleder <eg@keba.com>
Link: https://lore.kernel.org/r/20240630194740.7137-2-gerhard@engleder-embedded.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6150e5e1
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
What:		/sys/devices/pciXXXX:XX/0000:XX:XX.X/0000:XX:XX.X/version
Date:		June 2024
KernelVersion:	6.11
Contact:	Gerhard Engleder <eg@keba.com>
Description:	Version of the FPGA configuration bitstream as printable string.
		This file is read only.
Users:		KEBA

What:		/sys/devices/pciXXXX:XX/0000:XX:XX.X/0000:XX:XX.X/keep_cfg
Date:		June 2024
KernelVersion:	6.11
Contact:	Gerhard Engleder <eg@keba.com>
Description:	Flag which signals if FPGA shall keep or reload configuration
		bitstream on reset. Normal FPGA behavior and default is to keep
		configuration bitstream and to only reset the configured logic.

		Reloading configuration on reset enables an update of the
		configuration bitstream with a simple reboot. Otherwise it is
		necessary to power cycle the device to reload the new
		configuration bitstream.

		This file is read/write. The values are as follows:
		1 = keep configuration bitstream on reset, default
		0 = reload configuration bitstream on reset
Users:		KEBA
+1 −0
Original line number Diff line number Diff line
@@ -602,4 +602,5 @@ source "drivers/misc/cardreader/Kconfig"
source "drivers/misc/uacce/Kconfig"
source "drivers/misc/pvpanic/Kconfig"
source "drivers/misc/mchp_pci1xxxx/Kconfig"
source "drivers/misc/keba/Kconfig"
endmenu
+1 −0
Original line number Diff line number Diff line
@@ -69,3 +69,4 @@ obj-$(CONFIG_TMR_INJECT) += xilinx_tmr_inject.o
obj-$(CONFIG_TPS6594_ESM)	+= tps6594-esm.o
obj-$(CONFIG_TPS6594_PFSM)	+= tps6594-pfsm.o
obj-$(CONFIG_NSM)		+= nsm.o
obj-y				+= keba/
+12 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
config KEBA_CP500
	tristate "KEBA CP500 system FPGA support"
	depends on PCI
	help
	  This driver supports the KEBA CP500 system FPGA, which is used in
	  KEBA CP500 devices. It registers all sub devices present on the CP500
	  system FPGA as separate devices. A driver is needed for each sub
	  device.

	  This driver can also be built as a module. If so, the module will be
	  called cp500.
+3 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_KEBA_CP500)	+= cp500.o
Loading