diff options
Diffstat (limited to 'io-module/mtcap.c')
-rw-r--r-- | io-module/mtcap.c | 29 |
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, }; |