summaryrefslogtreecommitdiff
path: root/io-module/mtcap.c
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-02-27 17:47:55 -0600
committerJohn Klug <john.klug@multitech.com>2017-02-27 17:47:55 -0600
commit23235c4fa284c4e6a3cd85d1c3b945168ff19378 (patch)
tree473d6ec802d5b2b36a36c684712c1fae1ff6d37a /io-module/mtcap.c
parentcb4b0b1b31707c9978c0f4c00ecb00462ad590d1 (diff)
downloadmts-io-23235c4fa284c4e6a3cd85d1c3b945168ff19378.tar.gz
mts-io-23235c4fa284c4e6a3cd85d1c3b945168ff19378.tar.bz2
mts-io-23235c4fa284c4e6a3cd85d1c3b945168ff19378.zip
Add reset and enable for wifi wilc10001.5.9
Diffstat (limited to 'io-module/mtcap.c')
-rw-r--r--io-module/mtcap.c29
1 files changed, 29 insertions, 0 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,
};