Unable to wake from hibernation on ls1028 platform

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Unable to wake from hibernation on ls1028 platform

跳至解决方案
976 次查看
Eddy1
Contributor IV

Hi:

Recently, we found that we can't wake up from sleep on the ls1028 platform(BSP  OPENIL1.10),

Here are my steps:

echo enabled > /sys/devices/platform/soc/21c0500.serial/tty/ttyS0/power/wakeup

echo mem > /sys/power/state

[ 43.989864] 001: PM: suspend entry (deep)
[ 43.998612] 001: Filesystems sync: 0.008 seconds

[ 64.621811] 001: cfg80211: failed to load regulatory.db
[ 64.623277] 000: Freezing user space processes ...
[ 64.624555] 001: (elapsed 0.001 seconds) done.
[ 64.624559] 001: OOM killer disabled.
[ 64.624562] 001: Freezing remaining freezable tasks ... (elapsed 0.055 seconds) done.
[ 64.680088] 001: printk: Suspending console(s) (use no_console_suspend to debug)

Then I type any character on the keyboard, but i find no response.Could you give me some suggestions to find out this problem?Thanks!

0 项奖励
1 解答
950 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please use the following command

echo 0 > /sys/class/rtc/rtc1/wakealarm && echo +5 >/sys/class/rtc/rtc1/wakealarm && echo mem > /sys/power/state

在原帖中查看解决方案

0 项奖励
9 回复数
969 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Required fsl,rcpm-wakeup property should be added to a device node if the device
can be used as a wakeup source.

- fsl,rcpm-wakeup: Consists of a phandle to the rcpm node and the IPPDEXPCR
register cells. The number of IPPDEXPCR register cells is defined in
"#fsl,rcpm-wakeup-cells" in the rcpm node. The first register cell is
the bit mask that should be set in IPPDEXPCR0, and the second register
cell is for IPPDEXPCR1, and so on.

Note: IPPDEXPCR(IP Powerdown Exception Control Register) provides a
mechanism for keeping certain blocks awake during STANDBY and MEM, in
order to use them as wake-up sources.

Example:
lpuart0: serial@2950000 {
compatible = "fsl,ls1021a-lpuart";
reg = <0x0 0x2950000 0x0 0x1000>;
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&sysclk>;
clock-names = "ipg";
fsl,rcpm-wakeup = <&rcpm 0x0 0x40000000>;
};

0 项奖励
959 次查看
Eddy1
Contributor IV

Hi:

In addition, on the layerscape ls1028a reference design board, the results are the same.

Build image by:

$ cd openil
$ make nxp_ls1028ardb-64b_defconfig

$ make 

The wake-up log:

[root@LS1028ARDB ~] # echo +5 > /sys/class/rtc/rtc1/wakealarm
[root@LS1028ARDB ~] # echo mem > /sys/power/state
[ 77.734072] 001: PM: suspend entry (deep)
[ 77.736608] 001: Filesystems sync: 0.002 seconds
[ 77.737647] 000: Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 77.738885] 000: OOM killer disabled.
[ 77.738888] 000: Freezing remaining freezable tasks ... (elapsed 0.079 seconds) done.
[ 77.818525] 000: printk: Suspending console(s) (use no_console_suspend to debug)
[ 78.461229] 001: rtc-pcf2127-i2c 4-0051: oscillator stop detected, date/time is not reliable

0 项奖励
951 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please use the following command

echo 0 > /sys/class/rtc/rtc1/wakealarm && echo +5 >/sys/class/rtc/rtc1/wakealarm && echo mem > /sys/power/state

0 项奖励
945 次查看
Eddy1
Contributor IV

Hi:

Thank you very much for your help.Entering in mem mode by putting your command. And after that MPU  wakes.

0 项奖励
967 次查看
Eddy1
Contributor IV

Hi:

Thank you for your reply, but it still doesn't work!

0 项奖励
951 次查看
yipingwang
NXP TechSupport
NXP TechSupport

I just confirmed with LSDK development team, waking up from UART is not supported.

0 项奖励
867 次查看
Eddy1
Contributor IV

Hi:

Thank you for your reply. Does it support wake-up from GPIO?I added the wake-up attribute, but it didn't work.

gpio_keys: wakeup_keys@0 {
compatible = "gpio-keys";
user {
label = "User";
gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
gpio-key,wakeup;
linux,code = <KEY_1>;
fsl,rcpm-wakeup = <&rcpm 0x0 0x0 0x0 0x0 0x200 0x0 0x0>;
};

};

0 项奖励
847 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the procedure in page 1308 in LSDK 20.12 user manual.

0 项奖励
840 次查看
Eddy1
Contributor IV

Hi:

Thank you very much for your help.Now it works.

0 项奖励