kernel: add support for DesignWare SPI MMIO controller

Add kernel packages for DesignWare SPI core and MMIO controllers.
This is needed for the RP1 SoC found on RPi 5 devices.

Tested with a Microchip ENC28J60 Ethernet controller on a RPi 5.

Signed-off-by: Albrecht Lohofener <albrechtloh@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19049
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 82d20a0fbd)
This commit is contained in:
Albrecht Lohofener
2025-06-08 09:23:42 +02:00
committed by Álvaro Fernández Rojas
parent f90e7a7397
commit d5ab1b48dc
2 changed files with 43 additions and 0 deletions

View File

@@ -73,3 +73,41 @@ define KernelPackage/spi-dev/description
endef
$(eval $(call KernelPackage,spi-dev))
define KernelPackage/spi-dw
SUBMENU:=$(SPI_MENU)
TITLE:=DesignWare SPI controller driver (core)
KCONFIG:=\
CONFIG_SPI=y \
CONFIG_SPI_DESIGNWARE \
CONFIG_SPI_DYNAMIC=y \
CONFIG_SPI_MASTER=y
FILES:=\
$(LINUX_DIR)/drivers/spi/spi-dw.ko
AUTOLOAD:=$(call AutoProbe,spi-dw)
endef
define KernelPackage/spi-dw/description
This package contains the DesignWare SPI core driver.
endef
$(eval $(call KernelPackage,spi-dw))
define KernelPackage/spi-dw-mmio
SUBMENU:=$(SPI_MENU)
TITLE:=DesignWare SPI controller driver (MMIO)
DEPENDS:=+kmod-spi-dw
KCONFIG:=\
CONFIG_SPI_DW_MMIO
FILES:=\
$(LINUX_DIR)/drivers/spi/spi-dw-mmio.ko
AUTOLOAD:=$(call AutoProbe,spi-dw-mmio)
endef
define KernelPackage/spi-dw-mmio/description
This package contains the DesignWare SPI MMIO driver.
endef
$(eval $(call KernelPackage,spi-dw-mmio))