I’m searshing how to configure UIART1_DTR to be a wakeup source when WP77 enters in Sleep State and if it’s possible to read and even better catch interrupts on this GPIO.
In WP77XX Product Specification r4.pdf chapter 4.9, the UIART1_DTR is listed as a wakeup source and in WP AT Command Reference r7.1.pdf I found the command +KSLEEP which should at least allow me to wakeup from sleep mode or at least prevent module to enter in sleep mode.
This command depends on !RIOWNER which is already set to 0 on my module by default.
My problem is that even if I set KSLEEP to 0 or to 1, when my modem is in sleep mode it doesn’t wakeup when I change the state of UART1_DTR.
Is it the right process or do I miss something ?
On the other hand, is it possible to access to the UART1_DTR state as other gpio through sysfs or something ?
Your question makes me think that I didn’t explain well my setup.
I am on a custon board with a wp77. The uart1 is used to communicate with another device with a custom protocol. Therefore our mapuart setting is set to customer linux application (17) for this uart.
I need to be able to wakeup the wp77 on uart dtr activity.
Is it possible to achive my goal this way ? Or is ont mandatory to set the uart1 setting to at command (1) with mapuart ?
I mean you set these first to see if DTR pin can wake up the wp77 module
At!mapuart=1,1
At+ksleep=0
BTW, here shows how to change DTR to GPIO in yocto source of WP76 in R13, you can see if you can do the same in WP77:
As the implementation of yocto linux gpio part in WP76 FW R16.0.1 and R13 is different, I have also tried the following in the yocto linux of WP76 R16.0.1, I can control the UART1 DTR pin as other gpio through sysfs. You might try the same in WP77 R14.1 yocto source:
open yocto/kernel/arch/arm/boot/dts/qcom/mdm9607-wp76xx.dtsi
around line 367, add the following line for UART1 DTR: