diff options
Diffstat (limited to 'io-module')
-rw-r--r-- | io-module/mtcap.c | 30 | ||||
-rw-r--r-- | io-module/mths.c | 15 | ||||
-rw-r--r-- | io-module/mts-io.c | 1 | ||||
-rw-r--r-- | io-module/mts_io.h | 7 |
4 files changed, 38 insertions, 15 deletions
diff --git a/io-module/mtcap.c b/io-module/mtcap.c index fd278c8..7409c2f 100644 --- a/io-module/mtcap.c +++ b/io-module/mtcap.c @@ -191,7 +191,7 @@ static int radio_off_mtcap(int radio_model) // cannot be fixed definitely. Normally it will be above 15 seconds later from releasing // ON/OFF# and DTE should monitor the status of PWRMON to see the actual power off. hold_time = 2500; - if (radio_model == RADIO_LNA3) { + if (radio_model == RADIO_LNA3 || radio_model == RADIO_LEU3) { // To turn OFF the LE910 V2 the pad ON_OFF* must be tied low for at least 3 seconds and then released. // ref: Telit_LE910_V2_Hardware_User_Guide_r7.pdf @@ -199,6 +199,7 @@ static int radio_off_mtcap(int radio_model) } reset_gpio_pin(onoff_pin, hold_time, 0); + msleep(200); // Give time for pin to change state before inspection. value = 0; for (i = 0; i < 15; i++) { @@ -246,11 +247,14 @@ static int radio_on_mtcap(int radio_model) // for LEU1 (ref: Telit_LE910_Hardware_User_Guide_r6.pdf) hold_time = 1500; - if (radio_model == RADIO_LNA3) { + if (radio_model == RADIO_LNA3 || radio_model == RADIO_LEU3) { // To turn on the LE910 V2 the pad ON_OFF* must be tied low for at least 5 seconds and then released. // ref: Telit_LE910_V2_Hardware_User_Guide_r7.pdf - hold_time = 5500; + // ref:Telit_LE910_V2_Hardware_User_Guide_r9.pdf + // pg 32: When USB is connected or after firmware updating, + // delay must be equal at least to 10 seconds. + hold_time = 10500; } // drive on/off pin high for at least 1 seconoff_pin @@ -259,7 +263,7 @@ static int radio_on_mtcap(int radio_model) // ON_OFF must be tied low and then released reset_gpio_pin(onoff_pin, hold_time, 0); - + msleep(200); // Make sure modem has had time to move the status pin // check that power is high value = gpio_get_value(pwrmon_pin->pin.gpio); if(value == 0) { @@ -293,14 +297,22 @@ static int radio_reset_mtcap(int radio_model) // // Turning on radio // - log_info("turning on cell radio"); + log_info("turning on cell radio for reset"); // for LEU1 (ref: Telit_LE910_Hardware_User_Guide_r6.pdf) hold_time = 1500; - if (radio_model == RADIO_LNA3) { + if (radio_model == RADIO_LNA3 || radio_model == RADIO_LEU3) { // To turn on the LE910 V2 the pad ON_OFF* must be tied low for at least 5 seconds and then released. // ref: Telit_LE910_V2_Hardware_User_Guide_r7.pdf - hold_time = 5500; + // ref:Telit_LE910_V2_Hardware_User_Guide_r9.pdf + // pg 32: When USB is connected or after firmware updating, + // delay must be equal at least to 10 seconds. + // + // Note that a hold time of 5.5 seconds on MTCAP + // with Verizon Firmware 20.00.12 will cause a + // radio-reset to power the LE910-NA1 off until + // a reload of the mts-io driver, or a reboot. + hold_time = 10500; } // drive on/off pin high for at least 1 sec @@ -310,8 +322,10 @@ static int radio_reset_mtcap(int radio_model) // drive on/off pin low for < 2 sec // drive on/off pin high + log_info("turning off cell radio for reset"); reset_gpio_pin(onoff_pin, hold_time, 0); - + log_info("Reset is complete. Wait for power monitor pin"); + msleep(200); // Make sure modem has had time to move the status pin return 0; } diff --git a/io-module/mths.c b/io-module/mths.c index 79ba885..224e918 100644 --- a/io-module/mths.c +++ b/io-module/mths.c @@ -392,17 +392,21 @@ static int radio_on_mths(void) log_info("turning on radio"); gpio_set_value(onoff_pin->pin.gpio, 0); - msleep(5500); + // ref:Telit_LE910_V2_Hardware_User_Guide_r9.pdf + // pg 32: When USB is connected or after firmware updating, + // delay must be equal at least to 10 seconds. + msleep(10500); // set on/off pin high gpio_set_value(onoff_pin->pin.gpio, 1); + log_info("radio_on_mths: radio should be coming up"); msleep(200); // check that power is high value = gpio_get_value(pwrmon_pin->pin.gpio); if(value == 0) { - log_warning("radio is still off. performing radio reset"); + log_warning("radio_on_mths: radio is still off. performing radio reset"); //Perform Hard Reset gpio_set_value(rst_pin->pin.gpio, 0); @@ -437,13 +441,16 @@ static int radio_reset_mths(void) // wait for 2 sec before toggling on/off pin msleep(2000); - // drive on/off pin low for 6 sec + // drive on/off pin low for 10.5 sec gpio_set_value(onoff_pin->pin.gpio, 0); - msleep(6000); + log_info("Wait 10.5 seconds for on/off pin"); + msleep(10500); + log_info("Done with wait 10.5 seconds for on/off pin"); // set on/off pin high gpio_set_value(onoff_pin->pin.gpio, 1); + msleep(200); // Delay for status pin to switch return 0; } diff --git a/io-module/mts-io.c b/io-module/mts-io.c index 180a7b0..d127fe2 100644 --- a/io-module/mts-io.c +++ b/io-module/mts-io.c @@ -570,6 +570,7 @@ static int get_radio_model_from_product_id(void) { if (strstr(id_eeprom.product_id, "LEU1")) rc = RADIO_LEU1; else if (strstr(id_eeprom.product_id, "LNA3")) rc = RADIO_LNA3; + else if (strstr(id_eeprom.product_id, "LEU3")) rc = RADIO_LEU3; // Add other radios as needed. return rc; diff --git a/io-module/mts_io.h b/io-module/mts_io.h index 47cc422..8691f13 100644 --- a/io-module/mts_io.h +++ b/io-module/mts_io.h @@ -5,7 +5,7 @@ #include <linux/gpio.h> -#define DRIVER_VERSION "v2.2.0" +#define DRIVER_VERSION "v2.2.1" #define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>" #define DRIVER_DESC "MTS-IO Controller" #define DRIVER_NAME "mts-io" @@ -131,8 +131,9 @@ enum { enum { RADIO_UNKNOWN, - RADIO_LEU1, - RADIO_LNA3, + RADIO_LEU1, // LE910-EUG + RADIO_LEU3, // LE910-EU1 + RADIO_LNA3, // LE910-NA1 }; enum ap { |