imx6q Android 6.0.1_r22 Kernel 4.1.15 suspend/resume

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

imx6q Android 6.0.1_r22 Kernel 4.1.15 suspend/resume

698 Views
benhewson
Contributor I

I have downloaded Android M6.0.1_2.1.0 from NXP and have this running on a custom board with an iMX6Q processor.

I am trying to suspend to memory and then resume. 

There is an external MCU ( Kinetis ) with RTC which generates an interrupt on GPIO6.14. I can see Android setting an alarm time (I have debug in my kernel driver) . With a debugger on the MCU I can see the interrupt happen (this all works in Android 4.4.0)

While awake, the RTC interrupts happen, and I can see the count incremented in /proc/interrupts.

The interrupt is listed as a wakeup source in /sys/kernel/debug/wakeup_sources.

The interrupt is not masked in GPC_IMR3

However once asleep, the CPU never wakes.

Has anyone managed to get Android 6.0.1_r22 suspending and resuming on any imx6 board ?

Labels (2)
0 Kudos
3 Replies

376 Views
JayTu
NXP Employee
NXP Employee

You can check if you left suspend in suspend-imx6.S. If so, you can further trace where it blocks.

If no, it can't wakeup usually because some power are not recovered when resume, i.e., VDD_ARM_CAP/VDD_PU_CAP, ...

0 Kudos

376 Views
jimmychan
NXP TechSupport
NXP TechSupport

please check the gpio pin IOMUX and PAD setting in your board .dtsi file.

For your reference, this is the sabresd dtsi file

linux-2.6-imx.git - Freescale i.MX Linux Tree 

0 Kudos

376 Views
benhewson
Contributor I

the iomux/pad settings are correct. The interrupt is on gpio6_14 and I have an entry in my iomux section of

MX6QDL_PAD_NANDF_CS1__GPIO6_IO14 0x80000000

As I have said, when not sleeping the interrupts appear to work normally, that is the interrupt count in /proc/interrupts increments by 1 every time I set an alarm.

GPIO6_14 is interrupt 108, which is masked or not in GPC_IMR3 ( irq 96-127)

Directly before the cpu_suspend() call in pm-imx6.c, this register contains 0xffffefff. The zero bit by my counting is for irq 108, so the interrupt is not masked.

If I comment out the "wfi" instruction in suspend-imx6.S, the code goes through the shutdown/wakeup sequence OK, so it looks to me that for whatever reason, the interrupt is not waking the processor.

0 Kudos