# How to wakeup GPIO?

**URL:** <https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265>\
**Category:** WP Series\
**Created:** [February 16, 2022, 2:48am UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265 "2022-02-16T02:48:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_a](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@T\_a](https://forum.sierrawireless.com/u/T_a)\
**Post date:** [February 16, 2022, 2:48am UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265/1 "2022-02-16T02:48:34Z")

</div>

“gpio wakeup is not defined” ==\>\> how to wakeup gpio

[270.222340] mmc0: new high speed SDIO card at address 0001  
[270.283950] wfx-sdio mmc0:0001:1: Device is not declared in DT. Features will be limited.  
[270.285334] wfx-sdio mmc0:0001:1: GPIO lookup for consumer wakeup  
[270.285351] wfx-sdio mmc0:0001:1: using lookup tables for GPIO lookup  
[270.285364] wfx-sdio mmc0:0001:1: lookup for GPIO wakeup failed  
[270.285377] wfx-sdio mmc0:0001:1: gpio wakeup is not defined  
[270.285386] get gpio  
[270.285468] mmc0: data txfr (0x00200000) error: -84 after 0 ms  
[270.290265] sdhci: =========== REGISTER DUMP (mmc0)===========  
[270.290275] sdhci: Sys addr: 0x00000000 | Version: 0x00002e02  
[270.290285] sdhci: Blk size: 0x00000004 | Blk cnt: 0x00000001  
[270.290295] sdhci: Argument: 0x94000004 | Trn mode: 0x00000003  
[270.290305] sdhci: Present: 0x01f80100 | Host ctl: 0x00000017  
[270.290315] sdhci: Power: 0x0000000d | Blk gap: 0x00000000  
[270.290325] sdhci: Wake-up: 0x00000000 | Clock: 0x00000007  
[270.290335] sdhci: Timeout: 0x0000000b | Int stat: 0x00000000  
[270.290345] sdhci: Int enab: 0x03ff810b | Sig enab: 0x03ff010b  
[270.290355] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000  
[270.290365] sdhci: Caps: 0x262dc8b2 | Caps\_1: 0x00008007  
[270.290375] sdhci: Cmd: 0x0000353a | Max curr: 0x00000000  
[270.290385] sdhci: Resp 1: 0x00000000 | Resp 0: 0x00002000  
[270.290395] sdhci: Resp 3: 0x00000000 | Resp 2: 0x00000000  
[270.290404] sdhci: Host ctl2: 0x00000000  
[270.290414] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x8f44c008  
[270.290424] ----------- VENDOR REGISTER DUMP -----------  
[270.290435] Data cnt: 0x00000000 | Fifo cnt: 0x00000000 | Int sts: 0x000c0000  
[270.290446] DLL cfg: 0x60086400 | DLL sts: 0x00000000 | SDCC ver: 0x1000002e  
[270.290457] Vndr func: 0x00008a1c | Vndr adma err : addr0: 0x00000000 addr1: 0x00000000  
[270.290466] Vndr func2: 0xfa8018a8  
[270.290510] Test bus[0 to 3]: 0x0000c846 0x000020ce 0x00007118 0x01c101ff  
[270.290521] Test bus[4 to 7]: 0x0046bfd8 0x0024c038 0x40000000 0x0003ffff  
[270.290532] Test bus[8 to 11]: 0x47fc0604 0x40800002 0x201be089 0x000004c0  
[270.290544] Test bus[12 to 15]: 0x034f0408 0x843f1180 0x0d001c18 0x00800a80  
[270.290554] Test bus[16 to 19]: 0x00012000 0x000f804c 0x00000000 0x00000c91  
[270.290565] Test bus[20 to 23]: 0x0240ff01 0x00058021 0x00000000 0x00000000  
[270.290575] Test bus[24 to 27]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290585] Test bus[28 to 31]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290595] Test bus[32 to 35]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290605] Test bus[36 to 39]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290616] Test bus[40 to 43]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290626] Test bus[44 to 47]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290636] Test bus[48 to 51]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290646] Test bus[52 to 55]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290656] Test bus[56 to 59]: 0x00000000 0x00000000 0x00000000 0x00000000  
[270.290668] mmc0: clk: 50000000 clk-gated: 0 claimer: kworker/u2:0 pwr: 12 host-\>irq = 8192  
[270.290678] mmc0: rpmstatuspltfm(0:1:0)  
[270.290687] sdhci: ===========================================  
[270.293196] wfx-sdio mmc0:0001:1: write32: bus communication error: -84  
[270.298776] wfx-sdio mmc0:0001:1: bus returned an error during first write access. Host configuration error?  
[270.344702] \>\>\>\>\>\>\>\> err2  
[270.345590] wfx-sdio: probe of mmc0:0001:1 failed with error -5

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [February 16, 2022, 3:26am UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265/2 "2022-02-16T03:26:44Z")

</div>

Here is an example of kernel driver to set the GPIO42 as wake up source.  
[gpio\_interrupt.rar](https://forum.sierrawireless.com/uploads/short-url/vtYYb29GBkKFt9J3wgzCrdBP3Hj.rar) (81.8 KB)

---

<div class="post-metadata">

**Author:** ![T\_a](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@T\_a](https://forum.sierrawireless.com/u/T_a)\
**Post date:** [February 16, 2022, 5:27am UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265/3 "2022-02-16T05:27:16Z")

</div>

Is it same as " echo 42 \> /sys/class/gpio/export"??

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [February 16, 2022, 5:36am UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265/4 "2022-02-16T05:36:08Z")

</div>

no, it is GPIO input interrupt for waking up module

 ![image](https://us1.discourse-cdn.com/flex025/uploads/sierrawireless/original/2X/5/52ccf00a8fabbf5d4186545d58613d7e5b14245a.png)

---

<div class="post-metadata">

**Author:** ![T\_a](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@T\_a](https://forum.sierrawireless.com/u/T_a)\
**Post date:** [February 17, 2022, 12:44am UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265/5 "2022-02-17T00:44:40Z")

</div>

it still same result.  
can I use SDIO instead of GPIO??

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [February 17, 2022, 12:58am UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265/6 "2022-02-17T00:58:31Z")

</div>

No, it cannot.  
You need to check the source code of your driver why it returns such things

---

<div class="post-metadata">

**Author:** ![T\_a](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@T\_a](https://forum.sierrawireless.com/u/T_a)\
**Post date:** [February 18, 2022, 11:26am UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265/7 "2022-02-18T11:26:23Z")

</div>

How can i change “wake-n\_gpio26 STATE=SLEEP” to be wake??

[0.364027] sierra\_gpio\_wake\_n soc:sierra\_gpio\_wake\_n: wake\_n probe  
[0.364126] of\_get\_named\_gpiod\_flags: parsed ‘wake-n-gpio’ property of node ‘/soc/sierra\_gpio\_wake\_n[0]’ - status (0)  
[0.364259] gpio\_check\_and\_wake: wake-n\_gpio26 STATE=SLEEP  
[0.364412] gpio\_check\_and\_wake: wake-n\_gpio26 STATE=SLEEP

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [February 18, 2022, 1:36pm UTC](https://forum.sierrawireless.com/t/how-to-wakeup-gpio/26265/8 "2022-02-18T13:36:30Z")

</div>

no, you cannot do that
