Wake On GPIO error on WP7601, Firmware 12 , Legato 18.10.3

Hello All,

I have a WP 7601-1 (Firmware Release 12, Legato 18.10.3) running on the Mangoh red dev board .

I’ve noticed that asking the board to wake on GPIO then commanding a pmtool shutdown returns an error

root@swi-mdm9x28-wp:~# pmtool bootOn gpio 36 high
SUCCESS!

root@swi-mdm9x28-wp:~# pmtool shutdown
Can’t initiate shutdown of MDM

Issuing pmtool shutdown without the GPIO wake is successful. Issuing pmtool shutdown with a bootOn timer is also successful.

root@swi-mdm9x28-wp:~# cm info
Device: WP7601-1
Firmware Version: SWI9X07Y_02.18.05.00 000000 jenkins 2018/07/19 17:40:21
Bootloader Version: SWI9X07Y_02.18.05.00 000000 jenkins 2018/07/19 17:40:21
MCU Version: 002.011
PRI Part Number (PN): 9907596
PRI Revision: 001.003
Carrier PRI Name: GENERIC
Carrier PRI Revision: 002.041_003
SKU: 1103728

Here are is the relevant part of the log

Apr 22 17:12:35 swi-mdm9x28-wp user.info Legato: INFO | powerManagerService[976]/powerMgr T=main | le_pm.c OnClientConnect() 224 | Connection from client pmtool/3301
Apr 22 17:12:35 swi-mdm9x28-wp user.info Legato: INFO | powerManagerService[976]/powerMgr T=main | le_pm.c OnClientDisconnect() 252 | Client pid 3301 disconnected.
Apr 22 17:12:39 swi-mdm9x28-wp user.info Legato: INFO | powerManagerService[976]/powerMgr T=main | le_pm.c OnClientConnect() 224 | Connection from client pmtool/3309
Apr 22 17:12:39 swi-mdm9x28-wp user.info kernel: [ 956.212658] pm_set_mcu_ulpm_enable: SWIMCU_PM_ULPS_ENTER - continue sync with MCU
Apr 22 17:12:39 swi-mdm9x28-wp user.info kernel: [ 956.212711] swimcu_pm_wusrc_config: configured GPIO wakeup source 0x1
Apr 22 17:12:39 swi-mdm9x28-wp user.err kernel: [ 956.212726] swimcu_pm_wusrc_config: check statep->gpio_pin_mask 0x1
Apr 22 17:12:39 swi-mdm9x28-wp user.err kernel: [ 956.213252] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:18) mode:FIFO slv_addr:0x3a MSTR_STS:0x0c1300c8 OPER:0x00000090
Apr 22 17:12:39 swi-mdm9x28-wp user.err Legato: =ERR= | powerManagerService[976]/powerMgr T=main | le_ulpm.c WriteToSysfs() 146 | Error writing to sysfs file ‘/sys/module/swimcu_pm/boot_source/enable’ (Input/output error).
Apr 22 17:12:39 swi-mdm9x28-wp user.info Legato: INFO | powerManagerService[976]/powerMgr T=main | le_pm.c OnClientDisconnect() 252 | Client pid 3309 disconnected.
Apr 22 17:12:39 swi-mdm9x28-wp user.err kernel: [ 956.223419] swimcu_pm_wusrc_config: failed to GPIO config 0x1 (4)
Apr 22 17:12:39 swi-mdm9x28-wp user.info kernel: [ 956.223741] swimcu_pm_wusrc_config_reset
Apr 22 17:12:39 swi-mdm9x28-wp user.err kernel: [ 956.223762] enable_store: Failed to enable mode 1: -5

Solution is use

pmtool bootOn gpio N both/falling/rising etc