Add support control UP board CPLD onboard LEDS
Subsystems (3)
v3 cover Add support control UP board CPLD onboard LEDS
The UP board <http://www.upboard.com> is the computer board for Professional Makers and Industrial Applications. We want to upstream the UP board 40-pin GP-bus Kernel driver for giving the users better experience on the software release. (not just download from UP board github)
These patches are generated from the Linux kernel mainline tag v6.0. PATCH v3 fixed the auto build test ERROR on ARCH=arm64 or ARCH=mips.
chengwei (2):
mfd: Add support for UP board CPLD/FPGA
leds: Add support for UP board CPLD onboard LEDS
drivers/leds/Kconfig | 11 + drivers/leds/Makefile | 1 + drivers/leds/leds-upboard.c | 78 +++++ drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile | 1 + drivers/mfd/upboard-fpga.c | 482 +++++++++++++++++++++++++++++++ include/linux/mfd/upboard-fpga.h | 49 ++++ 7 files changed, 634 insertions(+) create mode 100644 drivers/leds/leds-upboard.c create mode 100644 drivers/mfd/upboard-fpga.c create mode 100644 include/linux/mfd/upboard-fpga.h
base-commit: 4fe89d07dcc2804c8b562f6c7896a45643d34b2f
Signature · 1 line
2.17.1
PATCH v3 1/2 mfd: Add support for UP board CPLD/FPGA
The UP Squared board <http://www.upboard.com> implements certain features (pin control, onboard LEDs or CEC) through an on-board CPLD/FPGA.
This mfd driver implements the line protocol to read and write registers from the FPGA through regmap. The register address map is also included.
The UP Boards provide a few I/O pin headers (for both GPIO and functions), including a 40-pin Raspberry Pi compatible header.
This patch implements support for the FPGA-based pin controller that manages direction and enable state for those header pins.
Partial support UP boards:
* UP core + CREX
* UP core + CRST02
--- drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile | 1 + drivers/mfd/upboard-fpga.c | 482 +++++++++++++++++++++++++++++++ include/linux/mfd/upboard-fpga.h | 49 ++++ 4 files changed, 544 insertions(+) create mode 100644 drivers/mfd/upboard-fpga.c create mode 100644 include/linux/mfd/upboard-fpga.h
drivers/mfd/Kconfig +12 -0
@@ -2104,6 +2104,18 @@ config MFD_QCOM_PM8008 under it in the device tree. Additional drivers must be enabled in order to use the functionality of the device. +config MFD_UPBOARD_FPGA + tristate "Support for the UP board FPGA" + select MFD_CORE + depends on X86 && ACPI + help + Select this option to enable the UP and UP^2 on-board FPGA. The UP + board implements certain features (pin control, onboard LEDs or CEC) + through an on-board FPGA. + + To compile this driver as a module, choose M here: the module will be + called upboard-fpga. + menu "Multimedia Capabilities Port drivers" depends on ARCH_SA1100
drivers/mfd/Makefile +1 -0
@@ -250,6 +250,7 @@ obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o obj-$(CONFIG_MFD_ALTERA_SYSMGR) += altera-sysmgr.o obj-$(CONFIG_MFD_STPMIC1) += stpmic1.o obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o +obj-$(CONFIG_MFD_UPBOARD_FPGA) += upboard-fpga.o obj-$(CONFIG_MFD_STM32_LPTIMER) += stm32-lptimer.o obj-$(CONFIG_MFD_STM32_TIMERS) += stm32-timers.o
drivers/mfd/upboard-fpga.c new file +482 -0
482 lines not on this page · raw message
include/linux/mfd/upboard-fpga.h new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 2/2 leds: Add support for UP board CPLD onboard LEDS
In reply to chengweiThe UP boards come with a few FPGA-controlled onboard LEDs:
* UP Board: yellow, green, red
* UP Squared: blue, yellow, green, red
this patch depends on patch "mfd: Add support for UP board CPLD/FPGA"
--- drivers/leds/Kconfig | 11 ++++++ drivers/leds/Makefile | 1 + drivers/leds/leds-upboard.c | 78 +++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 drivers/leds/leds-upboard.c
drivers/leds/Kconfig +11 -0
@@ -872,6 +872,17 @@ source "drivers/leds/flash/Kconfig" comment "RGB LED drivers" source "drivers/leds/rgb/Kconfig" +config LEDS_UPBOARD + tristate "LED support for the UP board" + depends on LEDS_CLASS + depends on MFD_UPBOARD_FPGA + depends on X86 + help + This option enables support for the UP board LEDs. + + To compile this driver as a module, choose M here: the module + will be called leds-upboard. + comment "LED Triggers" source "drivers/leds/trigger/Kconfig"
drivers/leds/Makefile +1 -0
@@ -83,6 +83,7 @@ obj-$(CONFIG_LEDS_TI_LMU_COMMON) += leds-ti-lmu-common.o obj-$(CONFIG_LEDS_TLC591XX) += leds-tlc591xx.o obj-$(CONFIG_LEDS_TPS6105X) += leds-tps6105x.o obj-$(CONFIG_LEDS_TURRIS_OMNIA) += leds-turris-omnia.o +obj-$(CONFIG_LEDS_UPBOARD) += leds-upboard.o obj-$(CONFIG_LEDS_WM831X_STATUS) += leds-wm831x-status.o obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
drivers/leds/leds-upboard.c new file +78 -0
78 lines not on this page · raw message
Signature · 1 line
2.17.1