Hello everyone.
I am working on a application that needs to put the O.S in sleep mode, so i execute:echo mem > /sys/power/state
it works, but after this, it doesn’t wake up by moving mouse, pressing a key…why?
Hello everyone.
I am working on a application that needs to put the O.S in sleep mode, so i execute:echo mem > /sys/power/state
it works, but after this, it doesn’t wake up by moving mouse, pressing a key…why?
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
The issue you’re experiencing with the Colibri VF61 not resuming from sleep mode after executing echo mem > /sys/power/state
can be due to several factors:
Power Management Settings: Ensure that the operating system’s power management settings are configured to allow wake events from peripherals like the mouse and keyboard. Check the BIOS/UEFI settings to ensure that options like wake-on-USB are enabled.
Wake-Up Sources: Verify that the Colibri VF61 is configured to recognize mouse movements or key presses as wake-up signals. This involves checking the power management settings to ensure that wake-up events are enabled for these inputs.
Driver Support: Make sure that the drivers for the input devices are properly installed and configured to support wake-up functionality.
Hardware Limitations: Check for any hardware limitations or configurations that might prevent the Colibri VF61 from waking up using standard input devices. This could involve reviewing GPIO settings or ensuring that necessary hardware components are configured to handle wake events.
Kernel Configuration: Review the kernel configuration to ensure that the necessary power management options are enabled to allow the system to wake from sleep on input events.
By addressing these areas, you should be able to resolve the issue of the Colibri VF61 not waking up from sleep mode.
Please, also check if these links can help you solve your problem:
Because the current implementation does not include USB wakeup. For other wake methods, please refer to this document.
Thanks for your reply.
So, to work on GPIO’s i need to modify the device tree, i was looking into it a little bit, i found the following (chat gpt):
pinctrl_wakeup: wakeupgrp {
fsl,pins = <
MX6QDL_PAD_EIM_DA3__GPIO3_IO03 0x1b0b0
>;
};
&gpio3 {
wakeup-source;
};
based on the link you refered to me, the node name is “gpio_keys” and the WAKE UP pin on SODIM is 45. so i am not sure this code gonna works or not…any suggestion?
thanks!
My devicetree now is as following:
gpio-keys {
compatible = "gpio-keys";
wakeup {
label = "SODIMM pin 45 wakeup";
gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WAKEUP>;
debounce-interval = <10>;
wakeup-source;
};
};
but it throws out a syntax error…
I cannot see where the error is
This should depends on your Linux kernel Version. I believe that you are on Kernel v4.4.
/ {
...
...
...
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiokeys>;
wakeup_button {
label = "Wake-Up";
gpios = <&gpio5 20 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WAKEUP>;
debounce-interval = <10>;
gpio-key,wakeup;
};
};
};
You should also define GPIO5.20 in your iomuxc → pinctrl_gpiokeys section. You can check vf-colibri-eval-v3.dtsi in the linux-vf50_4_4\arch\arm\boot\dts folder as a reference.
Hello @Fide
First of all, thanks for your reply!.
I execute bitbake -e virtual/kernel | grep ^PV.
output: PV="5.4.172+gitAUTOINC+9eb5a8b554
So my kernel version is supposed 5.4, isn’t ?
Then in the iomux section i have the following:
&iomuxc {
vf610-colibri {
pinctrl_can_int: can_int {
fsl,pins = <
VF610_PAD_PTB21__GPIO_43 0x22ed
>;
};
pinctrl_gpiokeys: gpio-keys-wakeup {
fsl,pins = <
MX6QDL_PAD_GPIO_20__GPIO5_IO20
>;
};
};
};
i added this part:
pinctrl_gpiokeys: gpio-keys-wakeup {
fsl,pins = <
MX6QDL_PAD_GPIO_20__GPIO5_IO20
>;
};
but as the above lines, does MX6QDL_PAD_GPIO_20__GPIO5_IO20 have hexadecimal associated? i asking coz VF610_PAD_PTB21__GPIO_43 as “0x22ed”, if so, how can i get this number? i checked out the datasheet, GPIO mapping section but i did not find any reference…
also i suspect MX6QDL_PAD_GPIO_20__GPIO5_IO20 is not right…watching the reference should be something like VF610_PAD_PTB21__GPIO_43 right?..is there any website or note i can see all these definitions such as VF610_PAD_PTB21__GPIO_43 and more information about it?
Thanks for your helping, i really much appreciate it!
When you executed the bitbake command, what was the MACHINE reported on the screen?
It should be colibri_vf to select the proper linux kernel. Do you use toradex reference yocto or your own custom one?
You can find the hexadecimal number meanings in the reference manual of your vf cpu:
It should be listed under IOMUXC section.
Also please note that the PIN45 of the SOMM module is PTB19. (see toradex som module datasheet and also nxp reference manual page 337)
So it should be VF610_PAD_PTB19__GPIO_41 defined in the linux-toradex_vf_4.4\arch\arm\boot\dts\vf610-pinfunc.h
Hope it helps.
This is what i see when i execute bitbake core-image-sato
If pad is PTB19 (GPIO 41), why in the device-tree i should put 20? what does this 20 means? and also why gpio5? at first compiler give error, cannot find gpio5 definition, so, in order to solve it, i add the following code:
gpio5: gpio@20a0000{
compatible = "fsl,vf610-gpio"
reg...
...
}
in htis line, what’s the meaning of this “20”,i think is the PIN, but i am confusing about GPIO_41 and this “20”
gpios = <&gpio5 **20** GPIO_ACTIVE_HIGH>;
I see there are some confusion here
Where did you get gpio5.20 in your first message here ?
By assuming that you want to use SODIMM Pin 45, according to the toradex datasheet ( https://docs.toradex.com/101355-colibri-vf61-datasheet.pdf )
It is PTB19 → PORT1[9] means GPIO1.9
Also don’t rely on chatgpt. As I see you mix the references for imx6 and vf.
omg…you right! i am so stupid! so sorry! yeah was a mistake trust in chat gpt haha, not as clever as i though!
So now my device tree looks like this:
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiokeys>;
wakeup_button {
label = "SODIMM pin 45 wakeup";
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
linux,code = <0x7f>;
debounce-interval = <10>;
gpio_key,wakeup;
};
};
..
vf610-colibri {
pinctrl_can_int: can_int {
fsl,pins = <
VF610_PAD_PTB21__GPIO_43 0x22ed
>;
};
pinctrl_gpiokeys: gpio-keys-wakeup {
fsl,pins = <
VF610_PAD_PTB19__GPIO_41 0x22ed
>;
};
};
};
..
look like this system recognize it! but still doesn’t work due to it doesn’t wakeup de system.
if i execute this command: dmesg | grep -i gpio i can see this:
hoever, if i execute: ls /sys/class/gpio
i just cannot see this pin…
Hi @Fide.
Finally it works, now system wake up througout GPIO, but i got a surprise…system doesn’t start again the graphc enviroment…it stacks on the following message:
re-mounted. Opts: commit=0
Any idea?
Hello again, finally by using echo mem. system resume succefully :).
Let me leverage this thread to ask a question, does Windows CE 6 a way to access PHY ethernet registers? in linux you can use phytool, what about Windows?
Thanks