summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io-module/mtcap.c29
-rw-r--r--io-module/mts_io.c2
2 files changed, 30 insertions, 1 deletions
diff --git a/io-module/mtcap.c b/io-module/mtcap.c
index 588f63f..bd4140d 100644
--- a/io-module/mtcap.c
+++ b/io-module/mtcap.c
@@ -68,6 +68,27 @@ static struct gpio_pin gpio_pins_mtcap_0_0[] = {
},
.capability = CAPA_LORA,
},
+ { // WiFi chip is enabled when the pin is driven high
+ // Reset should be brought low before or simultaneously
+ // with chip disable (setting enable to low).
+ .name = "WLAN_EN",
+ .pin = {
+ .gpio = AT91_PIN_PA4,
+ .flags = GPIOF_OUT_INIT_LOW,
+ .label = "wlan-en",
+ },
+ .capability = CAPA_WIFI,
+ },
+ { // WiFi chip is reset with low signal.
+ // Reset is brought high 5mS after wlan_en is brought high.
+ .name = "WLAN_RST",
+ .pin = {
+ .gpio = AT91_PIN_PA3,
+ .flags = GPIOF_OUT_INIT_LOW,
+ .label = "wlan-rst",
+ },
+ .capability = CAPA_WIFI,
+ },
/* LEDs */
@@ -376,6 +397,12 @@ static DEVICE_ATTR_MTS(dev_attr_led_lora_gpio_mtcap, "led-lora",
static DEVICE_ATTR_MTS(dev_attr_led_wifi_gpio_mtcap, "led-wifi",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
+static DEVICE_ATTR_MTS(dev_attr_wlan_en_mtcap, "wlan-en",
+ mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
+
+static DEVICE_ATTR_MTS(dev_attr_wlan_rst_mtcap, "wlan-rst",
+ mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
+
static struct attribute *mtcap_0_0_platform_attributes[] = {
&dev_attr_vendor_id.attr,
&dev_attr_product_id.attr,
@@ -401,6 +428,8 @@ static struct attribute *mtcap_0_0_platform_attributes[] = {
&dev_attr_led_cd_gpio.attr,
&dev_attr_led_lora_gpio_mtcap.attr,
&dev_attr_led_wifi_gpio_mtcap.attr,
+ &dev_attr_wlan_en_mtcap.attr,
+ &dev_attr_wlan_rst_mtcap.attr,
NULL,
};
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index 8260c26..8ce9285 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -47,7 +47,7 @@
#include "mts_io.h"
-#define DRIVER_VERSION "v1.5.8"
+#define DRIVER_VERSION "v1.5.9"
#define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"