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

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.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6150e5e1
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
......@@ -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
......@@ -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/
# 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.
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_KEBA_CP500) += cp500.o
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2024, KEBA Industrial Automation Gmbh */
#ifndef _LINUX_MISC_KEBA_H
#define _LINUX_MISC_KEBA_H
#include <linux/auxiliary_bus.h>
struct i2c_board_info;
/**
* struct keba_i2c_auxdev - KEBA I2C auxiliary device
* @auxdev: auxiliary device object
* @io: address range of I2C controller IO memory
* @info_size: number of I2C devices to be probed
* @info: I2C devices to be probed
*/
struct keba_i2c_auxdev {
struct auxiliary_device auxdev;
struct resource io;
int info_size;
struct i2c_board_info *info;
};
#endif /* _LINUX_MISC_KEBA_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment