[FX30 Cat-M] GPIO naming change between R9.1 and R14

We have developed an IOT Expansion Card to expand I/O of FX30 (3G and 4G).

We encounter a problem that the gpio8 (GPIO_4 of IOT connector) is not longer available and can’t be created (via export).

How can we bring back the gpio8? (and other gpio of expansion card if they also changed).

FX30 Cat-M 9.1:

root@9.1:~# ls /sys/class/gpio/
export        gpio22        gpio29        gpio38        gpio45        gpio48        gpio51        gpio54        gpio57        gpiochip0     gpiochip1018  gpiochip836   gpiochip932   unexport
gpio2         gpio24        gpio32        gpio43        gpio46        gpio49        gpio52        gpio55        gpio58        gpiochip1     gpiochip200   gpiochip868   gpiochip964
gpio21        gpio25        gpio36        gpio44        gpio47        gpio50        gpio53        gpio56        gpio7         gpiochip1012  gpiochip804   gpiochip900   gpiochip996
root@9.1:~# echo 8 > /sys/class/gpio/export
root@9.1:~# echo 8 > /sys/class/gpio/unexport

Here no problem, all our program work properly.

FX30 Cat-M R14:

root@R14:~# export                      gpio53                      gpioFX30-NETWORK_LED_RED    gpioFX30S-PB_INPUT
gpio2                       gpio54                      gpioFX30-ON_OFF_MON_N       gpioFX30S-ULPM_WAKE1_36
gpio21                      gpio55                      gpioFX30-PB_INPUT           gpioFX30S-ULPM_WAKE1_38
gpio22                      gpio56                      gpioFX30-POWER_HOLD         gpiochip0
gpio24                      gpio57                      gpioFX30-POWER_LED_GRN      gpiochip1
gpio25                      gpio58                      gpioFX30-POWER_LED_MUX      gpiochip1012
gpio29                      gpio7                       gpioFX30-POWER_LED_RED_N    gpiochip1018
gpio32                      gpioFX30-DIGITAL_INPUT1_N   gpioFX30-SIGNAL_LED_GRN     gpiochip200
gpio36                      gpioFX30-DIGITAL_INPUT2_N   gpioFX30-SIGNAL_LED_RED     gpiochip804
gpio38                      gpioFX30-DIGITAL_INPUT3_N   gpioFX30-ULPM_WAKE1_36      gpiochip836
gpio43                      gpioFX30-DIGITAL_OUTPUT3    gpioFX30-ULPM_WAKE1_38      gpiochip868
gpio44                      gpioFX30-ETH_DISABLE_N      gpioFX30-USER_LED_GRN       gpiochip900
gpio45                      gpioFX30-GPIO29             gpioFX30-USER_LED_RED       gpiochip932
gpio46                      gpioFX30-GPS_BIAS_EN        gpioFX30S-DIGITAL_INPUT1_N  gpiochip964
gpio47                      gpioFX30-HUB_ENABLE         gpioFX30S-DIGITAL_INPUT2_N  gpiochip996
gpio48                      gpioFX30-IOT_DETECT         gpioFX30S-DIGITAL_INPUT3_N  unexport
gpio49                      gpioFX30-IO_PULLUP_EN1      gpioFX30S-GPIO29            v2
gpio50                      gpioFX30-IO_PULLUP_EN2      gpioFX30S-HUB_ENABLE
gpio51                      gpioFX30-IO_PULLUP_EN3      gpioFX30S-IOT_DETECT
gpio52                      gpioFX30-NETWORK_LED_GRN    gpioFX30S-ON_OFF_MON_N
ls /sys/class/gpio/

root@14:~# echo 8 > /sys/class/gpio/export
sh: write error: Operation not permitted

Here our programs can’t work properly due to missing gpio and inability to create it.

In addition, this is also reproducible on FX30 that use SWI R9.1 and upgraded to the SWI R14.

Best regards,
Guillaume

No problem is found on FX30_WP77xx_full_R14.1.1.002-generic_gcf-SWI9X06Y_02.36.06.00.cwe

root@fx30:~# pwd
/home/root
root@fx30:~# legato version
19.11.5.a1621d58_27c4cd8552e17e79fdc3b0c91ff8bce9
root@fx30:~# cm info
Device:                        WP7702
IMEI:                          352653090612345
IMEISV:                        6
FSN:                           VU213431212345
Firmware Version:              SWI9X06Y_02.36.06.00 63d944 jenkins 2020/12/10 19:12:28
Bootloader Version:            SWI9X06Y_02.36.06.00 63d944 jenkins 2020/12/10 19:12:28
MCU Version:                   002.015
PRI Part Number (PN):          9908741
PRI Revision:                  002.001
Carrier PRI Name:              GENERIC
Carrier PRI Revision:          001.071_001
SKU:                           1104214
Last Reset Cause:              Reset, User Requested
Resets Count:                  Expected: 6      Unexpected: 0
root@fx30:~# ls /sys/class/gpio/
export                      gpioFX30S-GPIO29
gpio21                      gpioFX30S-HUB_ENABLE
gpio22                      gpioFX30S-IOT_DETECT
gpio24                      gpioFX30S-ON_OFF_MON_N
gpio25                      gpioFX30S-PB_INPUT
gpio29                      gpioFX30S-ULPM_WAKE1_36
gpio32                      gpioFX30S-ULPM_WAKE1_38
gpio36                      gpiochip0
gpio38                      gpiochip1
gpio7                       gpiochip1012
gpioFX30-DIGITAL_INPUT2_N   gpiochip1018
gpioFX30-DIGITAL_INPUT3_N   gpiochip200
gpioFX30-GPIO29             gpiochip820
gpioFX30-HUB_ENABLE         gpiochip852
gpioFX30-IOT_DETECT         gpiochip884
gpioFX30-ON_OFF_MON_N       gpiochip916
gpioFX30-PB_INPUT           gpiochip948
gpioFX30-ULPM_WAKE1_36      gpiochip980
gpioFX30-ULPM_WAKE1_38      unexport
gpioFX30S-DIGITAL_INPUT2_N  v2
gpioFX30S-DIGITAL_INPUT3_N
root@fx30:~# echo 8 > /sys/class/gpio/export
root@fx30:~# ls /sys/class/gpio/
export                      gpioFX30S-GPIO29
gpio21                      gpioFX30S-HUB_ENABLE
gpio22                      gpioFX30S-IOT_DETECT
gpio24                      gpioFX30S-ON_OFF_MON_N
gpio25                      gpioFX30S-PB_INPUT
gpio29                      gpioFX30S-ULPM_WAKE1_36
gpio32                      gpioFX30S-ULPM_WAKE1_38
gpio36                      gpioWLAN_EN
gpio38                      gpiochip0
gpio7                       gpiochip1
gpio8                       gpiochip1012
gpioFX30-DIGITAL_INPUT2_N   gpiochip1018
gpioFX30-DIGITAL_INPUT3_N   gpiochip200
gpioFX30-GPIO29             gpiochip820
gpioFX30-HUB_ENABLE         gpiochip852
gpioFX30-IOT_DETECT         gpiochip884
gpioFX30-ON_OFF_MON_N       gpiochip916
gpioFX30-PB_INPUT           gpiochip948
gpioFX30-ULPM_WAKE1_36      gpiochip980
gpioFX30-ULPM_WAKE1_38      unexport
gpioFX30S-DIGITAL_INPUT2_N  v2
gpioFX30S-DIGITAL_INPUT3_N

We checked on several FX30 that was running properly on 9.1 (including GPIO 8 creation). After upgrading (with same FW), 3 of them can’t create anymore the GPIO 8 but one does…

I checked in the logread, and found this:

On the FX30 that can’t create GPIO:

Jan  1 00:00:16 fx30 user.debug kernel: [    0.651604] of_get_named_gpiod_flags: parsed 'alias-8' property of node '/soc/sierra_gpio[0]' - status (0)
Jan  1 00:00:16 fx30 user.info kernel: [    0.651622] sierra_gpio soc:sierra_gpio: 4 PIN 58 FUNC 0 NAME "8"
Jan  1 00:00:16 fx30 user.err kernel: [    0.651634] sierra_gpio soc:sierra_gpio: property "alias-13": length 12

On the FX30 that create properly the GPIO:

Jan  1 00:23:37 fx30 user.debug kernel: [    0.619552] of_get_named_gpiod_flags: parsed 'alias-8' property of node '/soc/sierra_gpio[0]' - status (0)
Jan  1 00:23:37 fx30 user.info kernel: [    0.619572] sierra_gpio soc:sierra_gpio: 4 PIN 58 FUNC 1 NAME "8"
Jan  1 00:23:37 fx30 user.err kernel: [    0.619583] sierra_gpio soc:sierra_gpio: property "alias-13": length 12

However, I’m not sure that’s linked to the problem.

The FW R14.1 that we use is based on the FX30_WP77xx_full_R14.1.1.002-sierra-SWI9X06Y_02.36.06.00.

Regards,

Have you diff the return of at+wiocfg? among ok and nok modules?

On the left the FX30 that work and on the right the one that won’t work:

PS:
Lines taken at boot time before export of the gpio

Then that is the problem, you need to set it to 16

I tried that and unfortunately, it’s not working…

root@GPIO_KO:~# modem /dev/ttyAT 230400 "AT+WIOCFG=8,16"
AT+WIOCFG=8,16
OK

root@GPIO_KO:~# echo 8 > /sys/class/gpio/unexport
sh: write error: Operation not permitted
root@GPIO_KO:~# echo 8 > /sys/class/gpio/export
sh: write error: Operation not permitted
root@GPIO_KO:~#

Have you reset the module after setting +wiocfg

That does the trick, thanks!
Now it work properly