[openwrt/openwrt] kernel: add support for DesignWare SPI MMIO controller
LEDE Commits
lede-commits at lists.infradead.org
Thu Jun 12 04:51:29 PDT 2025
noltari pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/d5ab1b48dc03517610d2fd64a3741cb75c3520fe
commit d5ab1b48dc03517610d2fd64a3741cb75c3520fe
Author: Albrecht Lohofener <albrechtloh at gmx.de>
AuthorDate: Sun Jun 8 09:23:42 2025 +0200
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 at gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19049
Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
(cherry picked from commit 82d20a0fbde937365f2ad6b4f9b754971c5c6ab2)
---
package/kernel/linux/modules/spi.mk | 38 +++++++++++++++++++++++++++++++++++++
target/linux/generic/config-6.6 | 5 +++++
2 files changed, 43 insertions(+)
diff --git a/package/kernel/linux/modules/spi.mk b/package/kernel/linux/modules/spi.mk
index 78a1c8a032..5e8ab03b18 100644
--- a/package/kernel/linux/modules/spi.mk
+++ b/package/kernel/linux/modules/spi.mk
@@ -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))
diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6
index 46283ac3bd..5fc31b37b0 100644
--- a/target/linux/generic/config-6.6
+++ b/target/linux/generic/config-6.6
@@ -6218,6 +6218,11 @@ CONFIG_SND_X86=y
# CONFIG_SPI_CADENCE_XSPI is not set
# CONFIG_SPI_DEBUG is not set
# CONFIG_SPI_DESIGNWARE is not set
+# CONFIG_SPI_DW_BT1 is not set
+# CONFIG_SPI_DW_BT1_DIRMAP is not set
+# CONFIG_SPI_DW_DMA is not set
+# CONFIG_SPI_DW_MMIO is not set
+# CONFIG_SPI_DW_PCI is not set
# CONFIG_SPI_FSL_DSPI is not set
# CONFIG_SPI_FSL_ESPI is not set
# CONFIG_SPI_FSL_SPI is not set
More information about the lede-commits
mailing list