Browse Source

package/wilc-driver: new package

WILC1000/3000 driver pulled from at91-linux tree set-up to be built
as an external module. Upstream Linux kernel does not support
WILC3000 features at this time. This package is intended to bridge
that gap until WILC1000/3000 is fully supported in kernel.

Signed-off-by: Kris Bahnsen <kris@embeddedTS.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Kris Bahnsen 3 years ago
parent
commit
f2832d0dfc

+ 1 - 0
DEVELOPERS

@@ -1664,6 +1664,7 @@ F:	configs/octavo_osd32mp1_red_defconfig
 
 N:	Kris Bahnsen <kris@embeddedTS.com>
 F:	package/wilc-firmware/
+F:	package/wilc-driver/
 
 N:	Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
 F:	package/bcusdk/

+ 1 - 0
package/Config.in

@@ -610,6 +610,7 @@ endmenu
 	source "package/usbutils/Config.in"
 	source "package/w_scan/Config.in"
 	source "package/wf111/Config.in"
+	source "package/wilc-driver/Config.in"
 	source "package/wipe/Config.in"
 	source "package/xorriso/Config.in"
 	source "package/xr819-xradio/Config.in"

+ 58 - 0
package/wilc-driver/Config.in

@@ -0,0 +1,58 @@
+config BR2_PACKAGE_WILC_DRIVER
+	bool "wilc kernel module"
+	help
+	  External kernel module for WILC1000/3000 devices.
+
+	  wilc kernel driver source as found in Microchip's at91-linux
+	  kernel tree with added Kbuild file to be built as a generic
+	  external module.
+
+	  The wilc1000 driver currently maintained in Linux kernel does
+	  not support BLE of the WILC3000 hardware. This package is
+	  meant to bridge that gap until Microchip can get WILC3000
+	  support upstream.
+
+	  Supports both SDIO and SPI modes.
+
+	  https://github.com/embeddedTS/wilc3000-external-module
+
+if BR2_PACKAGE_WILC_DRIVER
+
+config BR2_PACKAGE_WILC_DRIVER_SPI
+	bool "SPI"
+	help
+	  This module adds support for the SPI interface of adapters
+	  using WILC1000/3000 chipset. The WILC1000/3000 has a Serial
+	  Peripheral Interface (SPI) that operates as an SPI slave.
+	  This SPI interface can be used for control and for serial
+	  I/O of 802.11 data. The SPI is a full-duplex slave
+	  synchronous serial interface that is available immediately
+	  following reset when pin 9 (SDIO_SPI_CFG) is tied to VDDIO.
+	  Select this if your platform is using the SPI bus.
+
+config BR2_PACKAGE_WILC_DRIVER_SDIO
+	bool "SDIO"
+	help
+	  This module adds support for the SDIO interface of adapters
+	  using WILC1000/3000 chipset. The WILC1000/3000 SDIO is a full
+	  speed interface. It meets SDIO card specification version 2.0.
+	  The interface supports the 1-bit/4-bit SD transfer mode at the
+	  clock range of 0-50 MHz. The host can use this interface to
+	  read and write from any register within the chip as well as
+	  configure the WILC1000/3000 for data DMA. To use this
+	  interface, pin9 (SDIO_SPI_CFG) must be grounded. Select this
+	  if your platform is using the SDIO bus.
+
+if BR2_PACKAGE_WILC_DRIVER_SDIO
+
+config BR2_PACKAGE_WILC_DRIVER_SDIO_OOB
+	bool "Enable out-of-band interrupt"
+	help
+	  This option enables out-of-band interrupt support for the
+	  WILC1000/3000 chipset. This OOB interrupt is intended to
+	  provide a faster interrupt mechanism for SDIO host controllers
+	  that don't support SDIO interrupt. Select this option If the
+	  SDIO host controller in your platform doesn't support SDIO
+	  time division interrupt.
+endif
+endif

+ 3 - 0
package/wilc-driver/wilc-driver.hash

@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  4796b1a53781f8702a335b0146d488a9422b71dab39f6f154f955b0ad1711199  wilc-driver-linux4microchip-2021.10-1.tar.gz
+sha256  f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79  LICENSE

+ 29 - 0
package/wilc-driver/wilc-driver.mk

@@ -0,0 +1,29 @@
+################################################################################
+#
+# wilc-driver
+#
+################################################################################
+
+WILC_DRIVER_VERSION = linux4microchip-2021.10-1
+WILC_DRIVER_SITE = $(call github,embeddedTS,wilc3000-external-module,$(WILC_DRIVER_VERSION))
+
+WILC_DRIVER_LICENSE = GPL-2.0
+WILC_DRIVER_LICENSE_FILES = LICENSE
+
+ifeq ($(BR2_PACKAGE_WILC_DRIVER_SPI),y)
+WILC_DRIVER_MODULE_MAKE_OPTS += \
+	CONFIG_WILC_SPI=m
+endif
+
+ifeq ($(BR2_PACKAGE_WILC_DRIVER_SDIO),y)
+WILC_DRIVER_MODULE_MAKE_OPTS += \
+	CONFIG_WILC_SDIO=m
+endif
+
+ifeq ($(BR2_PACKAGE_WILC_DRIVER_SDIO_OOB),y)
+WILC_DRIVER_MODULE_MAKE_OPTS += \
+	CONFIG_WILC_HW_OOB_INTR=y
+endif
+
+$(eval $(kernel-module))
+$(eval $(generic-package))