Skip to content

Commit a194467

Browse files
Gerhard Engledergregkh
authored andcommitted
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: Gerhard Engleder <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6150e5e commit a194467

File tree

7 files changed

+525
-0
lines changed

7 files changed

+525
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
What: /sys/devices/pciXXXX:XX/0000:XX:XX.X/0000:XX:XX.X/version
2+
Date: June 2024
3+
KernelVersion: 6.11
4+
Contact: Gerhard Engleder <[email protected]>
5+
Description: Version of the FPGA configuration bitstream as printable string.
6+
This file is read only.
7+
Users: KEBA
8+
9+
What: /sys/devices/pciXXXX:XX/0000:XX:XX.X/0000:XX:XX.X/keep_cfg
10+
Date: June 2024
11+
KernelVersion: 6.11
12+
Contact: Gerhard Engleder <[email protected]>
13+
Description: Flag which signals if FPGA shall keep or reload configuration
14+
bitstream on reset. Normal FPGA behavior and default is to keep
15+
configuration bitstream and to only reset the configured logic.
16+
17+
Reloading configuration on reset enables an update of the
18+
configuration bitstream with a simple reboot. Otherwise it is
19+
necessary to power cycle the device to reload the new
20+
configuration bitstream.
21+
22+
This file is read/write. The values are as follows:
23+
1 = keep configuration bitstream on reset, default
24+
0 = reload configuration bitstream on reset
25+
Users: KEBA

drivers/misc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,4 +602,5 @@ source "drivers/misc/cardreader/Kconfig"
602602
source "drivers/misc/uacce/Kconfig"
603603
source "drivers/misc/pvpanic/Kconfig"
604604
source "drivers/misc/mchp_pci1xxxx/Kconfig"
605+
source "drivers/misc/keba/Kconfig"
605606
endmenu

drivers/misc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,4 @@ obj-$(CONFIG_TMR_INJECT) += xilinx_tmr_inject.o
6969
obj-$(CONFIG_TPS6594_ESM) += tps6594-esm.o
7070
obj-$(CONFIG_TPS6594_PFSM) += tps6594-pfsm.o
7171
obj-$(CONFIG_NSM) += nsm.o
72+
obj-y += keba/

drivers/misc/keba/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
config KEBA_CP500
3+
tristate "KEBA CP500 system FPGA support"
4+
depends on PCI
5+
help
6+
This driver supports the KEBA CP500 system FPGA, which is used in
7+
KEBA CP500 devices. It registers all sub devices present on the CP500
8+
system FPGA as separate devices. A driver is needed for each sub
9+
device.
10+
11+
This driver can also be built as a module. If so, the module will be
12+
called cp500.

drivers/misc/keba/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_KEBA_CP500) += cp500.o

0 commit comments

Comments
 (0)