All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kris Bahnsen via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Eugen Hristev <eugen.hristev@microchip.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Mark Featherston <mark@embeddedTS.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Kris Bahnsen <kris@embeddedTS.com>
Subject: [Buildroot] [PATCH 4/4] package/wilc-driver: new package
Date: Thu, 24 Mar 2022 13:20:26 -0700	[thread overview]
Message-ID: <20220324202026.5688-5-kris@embeddedTS.com> (raw)
In-Reply-To: <20220324202026.5688-1-kris@embeddedTS.com>

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>
---
 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/wilc-driver/Config.in        | 58 ++++++++++++++++++++++++++++++++++++
 package/wilc-driver/wilc-driver.hash |  2 ++
 package/wilc-driver/wilc-driver.mk   | 29 ++++++++++++++++++
 5 files changed, 91 insertions(+)
 create mode 100644 package/wilc-driver/Config.in
 create mode 100644 package/wilc-driver/wilc-driver.hash
 create mode 100644 package/wilc-driver/wilc-driver.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 17becfa189..acd341873d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1662,6 +1662,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/
diff --git a/package/Config.in b/package/Config.in
index a175f105f3..ae3f13df5c 100644
--- a/package/Config.in
+++ b/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"
diff --git a/package/wilc-driver/Config.in b/package/wilc-driver/Config.in
new file mode 100644
index 0000000000..caf46ae281
--- /dev/null
+++ b/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
diff --git a/package/wilc-driver/wilc-driver.hash b/package/wilc-driver/wilc-driver.hash
new file mode 100644
index 0000000000..bfd8eaebc4
--- /dev/null
+++ b/package/wilc-driver/wilc-driver.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  62a03d1a4f6aa92f5ecae36b5c8798a121506e8b09a8a68192b664416bf6e745  wilc-driver-linux4microchip-2021.10.tar.gz
diff --git a/package/wilc-driver/wilc-driver.mk b/package/wilc-driver/wilc-driver.mk
new file mode 100644
index 0000000000..3b1fab8954
--- /dev/null
+++ b/package/wilc-driver/wilc-driver.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# wilc-driver
+#
+################################################################################
+
+WILC_DRIVER_VERSION = linux4microchip-2021.10
+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))
-- 
2.11.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2022-03-24 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 20:20 [Buildroot] [PATCH 0/4] Pull in WILC Wi-Fi updates Kris Bahnsen via buildroot
2022-03-24 20:20 ` [Buildroot] [PATCH 1/4] package/wilc1000-firmware: bump to 15.6 Kris Bahnsen via buildroot
2022-03-24 20:20 ` [Buildroot] [PATCH 2/4] package/wilc-firmware: rename from wilc1000-firmware Kris Bahnsen via buildroot
2022-03-24 20:20 ` [Buildroot] [PATCH 3/4] configs: add WILC3000_FIRMWARE to compatible devices Kris Bahnsen via buildroot
2022-03-24 20:20 ` Kris Bahnsen via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220324202026.5688-5-kris@embeddedTS.com \
    --to=buildroot@buildroot.org \
    --cc=eugen.hristev@microchip.com \
    --cc=kris@embeddedTS.com \
    --cc=ludovic.desroches@microchip.com \
    --cc=mark@embeddedTS.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.