Linux BSP can suspend only one time.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux BSP can suspend only one time.

Jump to solution
1,704 Views
takayuki_ishii
Contributor IV

Hello community,

I'm trying to suspend/resume function with i.MX6Q SABRE-AI + base board.

Using Linux BSP is a L4.19.35-1.1.0

In first time, it is success to suspend by following command and success to resume by button on base board.

> echo mem > /sys/power/state

root@imx6qsabreauto:~# echo mem > /sys/power/state
PM: suspend entry (deep)
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend devices took 0.050 seconds
Disabling non-boot CPUs ...
CPU1 killed.
CPU2 killed.
IRQ 17: no longer affine to CPU3
CPU3 killed.
Enabling non-boot CPUs ...
CPU1 is up
CPU2 is up
CPU3 is up
PM: resume devices took 0.060 seconds
OOM killer enabled.
Restarting tasks ... done.
PM: suspend exit
root@imx6qsabreauto:~# ata1: SATA link down (SStatus 0 SControl 300)

But try to suspend after resume, it will be failed.

root@imx6qsabreauto:~# ata1: SATA link down (SStatus 0 SControl 300)
echo mem > /sys/power/state
PM: suspend entry (deep)
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
dpm_run_callback(): egalax_ts_suspend+0x0/0x3c returns -6
PM: Device 1-0004 failed to suspend: error -6
PM: Some devices failed to suspend, or early wake event detected
PM: resume devices took 0.020 seconds
OOM killer enabled.
Restarting tasks ... done.
PM: suspend exit
-sh: echo: write error: No such device or address
root@imx6qsabreauto:~# ata1: SATA link down (SStatus 0 SControl 300)
random: crng init done
random: 7 urandom warning(s) missed due to ratelimiting

In third time, it will dump some trace log.

echo mem > /sys/power/state
PM: suspend entry (deep)
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
------------[ cut here ]------------
WARNING: CPU: 2 PID: 585 at kernel/irq/devres.c:146 devm_free_irq+0x78/0x80
Modules linked in: mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc adv7180_tvin v4l2_int_device mxc_dcic galcore(O)
CPU: 2 PID: 585 Comm: sh Tainted: G O 4.19.35-1.1.0+g0f9917c #1
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<8010f7a0>] (unwind_backtrace) from [<8010b798>] (show_stack+0x10/0x14)
[<8010b798>] (show_stack) from [<80a109a8>] (dump_stack+0x78/0x8c)
[<80a109a8>] (dump_stack) from [<8012f24c>] (__warn+0xd4/0xf0)
[<8012f24c>] (__warn) from [<8012f2a8>] (warn_slowpath_null+0x40/0x48)
[<8012f2a8>] (warn_slowpath_null) from [<8017856c>] (devm_free_irq+0x78/0x80)
[<8017856c>] (devm_free_irq) from [<806a253c>] (egalax_ts_suspend+0x1c/0x3c)
[<806a253c>] (egalax_ts_suspend) from [<80541520>] (dpm_run_callback.constprop.5+0x48/0xd0)
[<80541520>] (dpm_run_callback.constprop.5) from [<80542124>] (__device_suspend+0xf0/0x390)
[<80542124>] (__device_suspend) from [<805433d0>] (dpm_suspend+0x114/0x20c)
[<805433d0>] (dpm_suspend) from [<8016e368>] (suspend_devices_and_enter+0xec/0x60c)
[<8016e368>] (suspend_devices_and_enter) from [<8016ebdc>] (pm_suspend+0x354/0x3ac)
[<8016ebdc>] (pm_suspend) from [<8016d56c>] (state_store+0x6c/0xcc)
[<8016d56c>] (state_store) from [<8028b154>] (kernfs_fop_write+0xe8/0x1c8)
[<8028b154>] (kernfs_fop_write) from [<80217a44>] (__vfs_write+0x2c/0x160)
[<80217a44>] (__vfs_write) from [<80217d00>] (vfs_write+0xa4/0x17c)
[<80217d00>] (vfs_write) from [<80217f18>] (ksys_write+0x4c/0xac)
[<80217f18>] (ksys_write) from [<80101000>] (ret_fast_syscall+0x0/0x54)
Exception stack(0xd8a1ffa8 to 0xd8a1fff0)
ffa0: 00000004 00e5cee0 00000001 00e5cee0 00000004 00000000
ffc0: 00000004 00e5cee0 76eaebe0 00000004 00e5cee0 00000004 00000000 00000000
ffe0: 00000070 7ea2c938 76ddad44 76e3446c
---[ end trace 20e3247c9a996374 ]---
------------[ cut here ]------------
WARNING: CPU: 2 PID: 585 at kernel/irq/manage.c:1600 __free_irq+0xb4/0x310
Trying to free already-free IRQ 146
Modules linked in: mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc adv7180_tvin v4l2_int_device mxc_dcic galcore(O)
CPU: 2 PID: 585 Comm: sh Tainted: G W O 4.19.35-1.1.0+g0f9917c #1
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<8010f7a0>] (unwind_backtrace) from [<8010b798>] (show_stack+0x10/0x14)
[<8010b798>] (show_stack) from [<80a109a8>] (dump_stack+0x78/0x8c)
[<80a109a8>] (dump_stack) from [<8012f24c>] (__warn+0xd4/0xf0)
[<8012f24c>] (__warn) from [<8012eeb0>] (warn_slowpath_fmt+0x48/0x6c)
[<8012eeb0>] (warn_slowpath_fmt) from [<8017443c>] (__free_irq+0xb4/0x310)
[<8017443c>] (__free_irq) from [<80174710>] (free_irq+0x38/0x8c)
[<80174710>] (free_irq) from [<80178544>] (devm_free_irq+0x50/0x80)
[<80178544>] (devm_free_irq) from [<806a253c>] (egalax_ts_suspend+0x1c/0x3c)
[<806a253c>] (egalax_ts_suspend) from [<80541520>] (dpm_run_callback.constprop.5+0x48/0xd0)
[<80541520>] (dpm_run_callback.constprop.5) from [<80542124>] (__device_suspend+0xf0/0x390)
[<80542124>] (__device_suspend) from [<805433d0>] (dpm_suspend+0x114/0x20c)
[<805433d0>] (dpm_suspend) from [<8016e368>] (suspend_devices_and_enter+0xec/0x60c)
[<8016e368>] (suspend_devices_and_enter) from [<8016ebdc>] (pm_suspend+0x354/0x3ac)
[<8016ebdc>] (pm_suspend) from [<8016d56c>] (state_store+0x6c/0xcc)
[<8016d56c>] (state_store) from [<8028b154>] (kernfs_fop_write+0xe8/0x1c8)
[<8028b154>] (kernfs_fop_write) from [<80217a44>] (__vfs_write+0x2c/0x160)
[<80217a44>] (__vfs_write) from [<80217d00>] (vfs_write+0xa4/0x17c)
[<80217d00>] (vfs_write) from [<80217f18>] (ksys_write+0x4c/0xac)
[<80217f18>] (ksys_write) from [<80101000>] (ret_fast_syscall+0x0/0x54)
Exception stack(0xd8a1ffa8 to 0xd8a1fff0)
ffa0: 00000004 00e5cee0 00000001 00e5cee0 00000004 00000000
ffc0: 00000004 00e5cee0 76eaebe0 00000004 00e5cee0 00000004 00000000 00000000
ffe0: 00000070 7ea2c938 76ddad44 76e3446c
---[ end trace 20e3247c9a996375 ]---
dpm_run_callback(): egalax_ts_suspend+0x0/0x3c returns -6
PM: Device 1-0004 failed to suspend: error -6
PM: Some devices failed to suspend, or early wake event detected
PM: resume devices took 0.020 seconds
ata1: SATA link down (SStatus 0 SControl 300)
OOM killer enabled.
Restarting tasks ... done.
PM: suspend exit
-sh: echo: write error: No such device or address
root@imx6qsabreauto:~#

On android BSP N7.1.2-2.0.0, it success to suspend/resume by sw5 on base board.

Why can't Linux BSP suspend properly?

Best regards,

Ishii.

Labels (3)
Tags (1)
0 Kudos
Reply
1 Solution
1,531 Views
igorpadykov
NXP Employee
NXP Employee

Hi Ishii

from log issue is caused by touchscreen:

"dpm_run_callback(): egalax_ts_suspend+0x0/0x3c returns -6
PM: Device 1-0004 failed to suspend: error -6
PM: Some devices failed to suspend, or early wake event detected"

It is known issue with latest AI boards (early revisions like SPF-27142_B1 do not have

such issue) and caused by U1514 on p.15 SPF-27142_d_x4 from

Design files for i.MX 6Quad and i.MX 6DualLite CPU1 Cards

Explanations are given on p.15 that schematic:

"The MCIMX-LVDS1 display with touch can be placed in Sleep
through the I2C port. However, INT_B must be driven
with a falling edge to wake up the display, which is not
allowed due to U1514."

I sent additional details via mail.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
2 Replies
1,532 Views
igorpadykov
NXP Employee
NXP Employee

Hi Ishii

from log issue is caused by touchscreen:

"dpm_run_callback(): egalax_ts_suspend+0x0/0x3c returns -6
PM: Device 1-0004 failed to suspend: error -6
PM: Some devices failed to suspend, or early wake event detected"

It is known issue with latest AI boards (early revisions like SPF-27142_B1 do not have

such issue) and caused by U1514 on p.15 SPF-27142_d_x4 from

Design files for i.MX 6Quad and i.MX 6DualLite CPU1 Cards

Explanations are given on p.15 that schematic:

"The MCIMX-LVDS1 display with touch can be placed in Sleep
through the I2C port. However, INT_B must be driven
with a falling edge to wake up the display, which is not
allowed due to U1514."

I sent additional details via mail.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,531 Views
takayuki_ishii
Contributor IV

Hello Igor,

Thank you for your reply.

It was fixed this problem by your suggestion by mail.

Best regards,

Ishii.

0 Kudos
Reply