summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io-module/mtcap.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/io-module/mtcap.c b/io-module/mtcap.c
index bd4140d..7c10cd0 100644
--- a/io-module/mtcap.c
+++ b/io-module/mtcap.c
@@ -44,7 +44,7 @@ static struct gpio_pin gpio_pins_mtcap_0_0[] = {
.name = "LORA_RESET",
.pin = {
.gpio = AT91_PIN_PA8, // LORA_RST
- .flags = GPIOF_OUT_INIT_LOW,
+ .flags = GPIOF_OUT_INIT_HIGH,
.label = "lora/reset",
},
.capability = CAPA_LORA,
@@ -68,27 +68,6 @@ 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 */
@@ -128,6 +107,22 @@ static struct gpio_pin gpio_pins_mtcap_0_0[] = {
},
.active_low = 1,
},
+ {
+ .name = "WLAN_EN", // LED4 is for WiFi status
+ .pin = {
+ .gpio = AT91_PIN_PA4,
+ .flags = GPIOF_OUT_INIT_HIGH,
+ .label = "wlan-en",
+ },
+ },
+ {
+ .name = "WLAN_RST", // LED4 is for WiFi status
+ .pin = {
+ .gpio = AT91_PIN_PA3,
+ .flags = GPIOF_OUT_INIT_HIGH,
+ .label = "wlan-rst",
+ },
+ },
{ },
};
@@ -397,10 +392,10 @@ 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",
+static DEVICE_ATTR_MTS(dev_attr_wlan_en_gpio_mtcap, "wlan-en",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
-static DEVICE_ATTR_MTS(dev_attr_wlan_rst_mtcap, "wlan-rst",
+static DEVICE_ATTR_MTS(dev_attr_wlan_rst_gpio_mtcap, "wlan-rst",
mts_attr_show_gpio_pin, mts_attr_store_gpio_pin);
static struct attribute *mtcap_0_0_platform_attributes[] = {
@@ -428,9 +423,9 @@ 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,
+ &dev_attr_wlan_en_gpio_mtcap.attr,
+ &dev_attr_wlan_rst_gpio_mtcap.attr,
NULL,
};