i.mx53 qsb resume from suspend issue

cancel
Showing results for 
Search instead for 
Did you mean: 

i.mx53 qsb resume from suspend issue

Jump to solution
921 Views
Contributor I

Hi

I have board based on imx53qsb-r (mc34708 as power manager is used) and adeneo android 4.2 bsp (linux from 11.09 linux release as mentioned in release notes).

I'm trying to manage deep sleep mode working. The problem is, that i cannot return board to wake state again, i.e. after suspend is finished the kernel goes back to suspend again. There is how it looks in kernel logs:

power power.0: completing resume

PM: Finishing wakeup.

Restarting tasks ...

hub 1-0:1.0: __pm_runtime_resume()!

usb usb1: __pm_runtime_resume()!

usb usb1: __pm_runtime_resume() returns 1!

pwrkey id 1

pwrkey_event_handler_Keyup

done.

suspend: exit suspend, ret = 0 (1970-01-01 00:05:16.529264377 UTC)

wakeup wake lock: unknown_wakeups

hub 1-0:1.0: __pm_runtime_resume() returns 0!

hub 1-0:1.0: __pm_runtime_suspend()!

hub 1-0:1.0: __pm_runtime_suspend() returns 0!

hub 1-1:1.0: __pm_runtime_resume()!

usb 1-1: __pm_runtime_resume()!

usb 1-1: __pm_runtime_resume() returns 1!

hub 1-1:1.0: __pm_runtime_resume() returns 0!

hub 1-1:1.0: __pm_runtime_suspend()!

hub 1-1:1.0: __pm_runtime_suspend() returns 0!

PM: Syncing filesystems ... done.

PM: Preparing system for mem sleep

Freezing user space processes ... (elapsed 0.01 seconds) done.

Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.

PM: Entering mem sleep

power power.0: preparing suspend

May be someone faced with that problem and could tell how to resolve this or give me some advice. Thanks for any help

Labels (3)
0 Kudos
1 Solution
51 Views
NXP TechSupport
NXP TechSupport

Hello,Lvan,

       Power key wasn't designed as GPIO wakeup resource on this board. you can try to add power key to wake up system.the following is a reference for you . change source code to these :

static void loco_tzic_irq_wakeup(void)
{
void __iomem *tzic_base;
tzic_base = ioremap(MX53_TZIC_BASE_ADDR, SZ_4K);
if (NULL == tzic_base) {
  pr_err("fail to map MX53_TZIC_BASE_ADDR\n");
  return;
}
__raw_writel(0, tzic_base + TZIC_WAKEUP0_OFFSET);
__raw_writel(0, tzic_base + TZIC_WAKEUP1_OFFSET);
__raw_writel(0, tzic_base + TZIC_WAKEUP2_OFFSET);

__raw_writel(GPIO7_0_11_IRQ_BIT, tzic_base + TZIC_WAKEUP3_OFFSET);
iounmap(tzic_base);
pr_info("TZIC irq is wakeup-enabled\n");
}

static void loco_suspend_enter(void)
{
loco_tzic_irq_wakeup();
}

static void loco_suspend_exit(void)
{
printk(KERN_INFO "GPIO7_0 irq is to wakeup system\n");
}

static struct mxc_pm_platform_data loco_pm_data = {
.suspend_enter = loco_suspend_enter,
.suspend_exit = loco_suspend_exit,
};

Recompile linux kernel and burn it into board. when system is running , press power key , system will enter suspend, press it again, system will be waked up. try it please !

Regards,

Weidong

View solution in original post

0 Kudos
2 Replies
52 Views
NXP TechSupport
NXP TechSupport

Hello,Lvan,

       Power key wasn't designed as GPIO wakeup resource on this board. you can try to add power key to wake up system.the following is a reference for you . change source code to these :

static void loco_tzic_irq_wakeup(void)
{
void __iomem *tzic_base;
tzic_base = ioremap(MX53_TZIC_BASE_ADDR, SZ_4K);
if (NULL == tzic_base) {
  pr_err("fail to map MX53_TZIC_BASE_ADDR\n");
  return;
}
__raw_writel(0, tzic_base + TZIC_WAKEUP0_OFFSET);
__raw_writel(0, tzic_base + TZIC_WAKEUP1_OFFSET);
__raw_writel(0, tzic_base + TZIC_WAKEUP2_OFFSET);

__raw_writel(GPIO7_0_11_IRQ_BIT, tzic_base + TZIC_WAKEUP3_OFFSET);
iounmap(tzic_base);
pr_info("TZIC irq is wakeup-enabled\n");
}

static void loco_suspend_enter(void)
{
loco_tzic_irq_wakeup();
}

static void loco_suspend_exit(void)
{
printk(KERN_INFO "GPIO7_0 irq is to wakeup system\n");
}

static struct mxc_pm_platform_data loco_pm_data = {
.suspend_enter = loco_suspend_enter,
.suspend_exit = loco_suspend_exit,
};

Recompile linux kernel and burn it into board. when system is running , press power key , system will enter suspend, press it again, system will be waked up. try it please !

Regards,

Weidong

View solution in original post

0 Kudos
51 Views
Contributor III

Dear Weidong Sun,

We are facing a similar problem at our board. First of all, functions loco_suspend_enter and loco_suspend_exit are not being called at all.

Secondly, we would like to wake up the system when an interrupt occurs on the GPIO IMX_GPIO_NR(7, 11), multiplexed as MX53_PAD_GPIO_16__GPIO7_11.

Can you, please, guide us through this issue?

Thank you!

0 Kudos