Hello, I’m trying to wake up SOM from suspend state using the interrupt signal (active low) from TCA9539 GPIO expander. Simplified HW diagram bellow:
I’ve got custom device tree in which I’ve made these modifications to enable wake up:
cpus {
idle-states {
entry-method = "psci";
CPU_SLEEP: cpu-sleep {
compatible = "arm,idle-state";
arm,psci-suspend-param = <0x0010033>;
entry-latency-us = <1000>;
exit-latency-us = <700>;
min-residency-us = <2700>;
wakeup-latency-us = <1500>;
};
CLUSTER_SLEEP: cluster-sleep {
compatible = "arm,idle-state";
arm,psci-suspend-param = <0x1000000>;
entry-latency-us = <1000>;
exit-latency-us = <700>;
min-residency-us = <2700>;
wakeup-latency-us = <1500>;
};
};
};
&lsio_gpio4 {
pad-wakeup-num = <0x1>;
pad-wakeup = <0x177 0x5 0x24>;
wakeup_line {
gpio-hog;
gpios = <24 1>;
input;
line-name = "foo-bar-wakeup";
};
};
The pad-wakeup
properties are setup according to this NXP post:
I can see the interrupt signal being created and handled by monitoring GPIO4_IO24 in /sys/kernel/debug/gpio
and I can send the SOM to suspend using echo mem > /sys/power/state
. But the SOM doesn’t wake up when the expander sends the interrupt signal. I’ve tried to wake it using UART and I can see the current consumption rise when I send character but the UART doesn’t work (nothing shows up in console).
Could someone assist me with troubleshooting this issue?
Also, are these device tree settings for GPIO4_IO24 entry in iomuxc
correct?:
IMX8QM_QSPI1A_DATA2_LSIO_GPIO4_IO24 0xD8600021
Hi @Martin_Lovric
Thanks for writing to the Toradex Community!
We are using SODIMM37 as an interrupt source for wakeup which works perfectly. The used pinmuxing is described here.
But the SOM doesn’t wake up when the expander sends the interrupt signal.
Do you see any errors?
I’ve tried to wake it using UART and I can see the current consumption rise when I send character but the UART doesn’t work (nothing shows up in console).
To enable the wakeup on UART, you need to do the following: Suspend/Resume (Linux) | Toradex Developer Center
Have you done this?
Please note that the hardware version 1.0B is not supported, you should upgrade to version 1.1B.
Best regards,
Jaski
Hello Jaski,
Do you see any errors?
No, I don’t see any error messages in dmesg, the kernel_loglevel is set to 9
To enable the wakeup on UART, you need to do the following
Yes, I’ve set that.
Please note that the hardware version 1.0B is not supported
Does HW version 1.0B support only SODIMM37 as wakeup source or other GPIOs as well?
HI @Martin_Lovric
Does HW version 1.0B support only SODIMM37 as wakeup source or other GPIOs as well?
No, this is more a kernel feature.
Yes, I’ve set that.
Did you use ttyLP1?
I tested wakeup from UART and SODIMM 37 on Apalis iMX8 1.0B on Ixora 1.2 and it is working fine.
Could you test this too?
Best regards,
Jaski
Hello, I’ve tested on SOM on Evaluation Board v1.1A. I’ve changed device tree to use SODIMM37 for wakeup (as in the dtsi file you’ve linked) and the wakeup behaves same as UART wakeup, when I connect pin 37 to GND the current consumption rises but nothing happens (with pin 291 that I was previously using for wakeup, there wasn’t any changes in current consumption when I tried to wakeup SOM). I’ll try to install default image using TEZI and try wakeup again.
Did you use ttyLP1?
Yes.
BR!
Martin
Edit: Latest Ixora board I have is v1.0A
Hi,
I’ll try to install default image using TEZI and try wakeup again.
Ok, we will wait for your results.
Latest Ixora board I have is v1.0A
This will not work with Apalis iMX8QM since the current consumption of this SoM is very high. You should get at least V1.1B or V1.2A.
Best regards,
Jaski