Open alistair23 opened 3 years ago
@boxfire
Well I am sure there is just a missing step. Likely step 2 last bullet from the IMX Reference manual p. 44:
The i.MX 6 and i.MX 7 power management driver maps the low-power modes to the kernel power management states as listed below:
The i.MX 6 and i.MX 7 power management driver performs the following steps to enter and exit low power mode:
In DORMANT mode, the i.MX 6 and i.MX 7 can assert the PMIC_STBY_REQ pin to the PMIC and request a voltage change.The U-Boot or Machine-Specific Layer (MSL) usually sets the standby voltage in STOP mode according to i.MX 6 and i.MX 7data sheet.
Associated code for imx7d is in
* arch/arm/mach-imx/pm-imx7.c
* arch/arm/mach-imx/suspend-imx7.S
* arch/arm/mach-imx/cpuidle-imx7d.c
* arch/arm/mach-imx/imx7d_low_power_idle.
If CONFIG_PM, CONFIG_SUSPEND are on then low power mode should be available from that source code.
So with all of that I might suggest turning on all the debug stuff in the 4.14.78 kernel, perhaps with kernel function tracing, checking out what gets called / taken, and then making sure all of that can happen in the 5.4 kernel. I mean there is probably something obvious like the wakeup interrupt not being programmed correctly, but I can't say easily
interesting. As a debug stopgap:
echo enabled > /sys/class/tty/ttymxc0/power/wakeup
(replace with appropriate pogo uart once I figure out whats going on there?)
I wonder if its as simple as hitting that for the power button gpio?
There is a work in progress branch to add deep sleep support to the 5.4 kernel.
The problem is that deep sleep (called lpsr) doesn't work. The device will go into the deep sleep but I can't get it to wake up.
With lpsr disabled sleep/wake via the physical button work, but automatic sleep doesn't as automatic sleep appears to use lpsr. So I have disabled automatic sleep in Oxide and I have no issues.
This issue is tracking adding support for lpsr and hopefully that fixes the automatic sleep in Oxide and other apps.