Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ARM: imx: Add a more agressive idle mode on i.MX6SLL
@ 2026-11-26 11:00 Andreas Kemnade
  2026-11-26 11:00 ` [PATCH v2 1/3] ARM: imx: enable STOP-ON mode in idle if wakeup requirements permit Andreas Kemnade
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Andreas Kemnade @ 2026-11-26 11:00 UTC (permalink / raw)
  To: Russell King, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Daniel Lezcano, Thomas Gleixner, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-kernel, imx, linux-kernel, devicetree, linux,
	Andreas Kemnade

On Ebook readers there are often situations in which the system waits
only for some GPIO IRQs and no module is active, all the clock system
is using most of the power, not every clock gets disabled via RPM,
esp. those are marked as CLK_IS_CRITICAL.
A usual he situation might be mainly wating for touchscreen input.
Since nothing needs to be sent to the display continously, clocks
are not in use. Maybe some frontlight is consuming power, but if it
is not used in maximum brightness mode, the clock system is still
using a significant portion of power.

In contrast to suspend state, that is not forcefully turning things of
and wake up only on selected important things when the device is not used.
E.g. you might still want to have frontlight enabled.
Vendor kernel work around this by adding an extended suspend mode in
which more things are disabled, e.g. the touchscreen.

So rather add another idle state, which is only conditionally used
depending on clock usage.

System timekeeping is currently using a high speed clock, which is a
major blocker for this idle state.
Use 32K clock for the timer and the clock source to avoid that
dependency and allow the timer to be used in stop mode if that low
power clock source is used.

Other things preventing entering that idle state:
- imx-thermal driver: probaly needs some notifier block called by 
  cpu_cluster_pm_enter to avoid false alarms like ti-bandgap does
- PXP and DCP drivers are missing RPM, so they keep clocks enabled.
- serial console: needs to be unbound

With these patches are applied (and the not-yet-upstreamed EPDC driver)
I can run a loop displaying the current consumption in every 20 seconds
for about one week. Power saving is around 70% in such
situations.

Patch 1 and 2 can go in independently,  patch 3 should go in afterwards
since it will break things if the timer driver is not prepared.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
Changes in v2:
- honor disabled idle states when rejecting the new state
- remove redundant imx6_set_int_mem_clk_lpm
- more comments
- do not show new idle state on other cpus and when thermal driver is
  enabled. The latter to avoid misreadings until things are fixed
- block new idle state on dcp activity
- adapt min_delta for clocksource if 32K clock is used

- Link to v1: https://patch.msgid.link/20261123-imx6-idlestop-v1-0-e32f1f44e46f@kemnade.info

---
Andreas Kemnade (3):
      ARM: imx: enable STOP-ON mode in idle if wakeup requirements permit
      timer-imx-gpt: Allow 32K clock to be used as a clock source
      ARM: dts: imx: kobo-clarahd: Use 32K clock for the timer

 arch/arm/boot/dts/nxp/imx/imx6sll-kobo-clarahd.dts |  5 ++
 arch/arm/mach-imx/common.h                         |  1 +
 arch/arm/mach-imx/cpuidle-imx6sx.c                 | 54 +++++++++++++++++++++-
 arch/arm/mach-imx/pm-imx6.c                        | 31 +++++++++++++
 drivers/clocksource/timer-imx-gpt.c                | 17 +++++--
 5 files changed, 102 insertions(+), 6 deletions(-)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
change-id: 20261123-imx6-idlestop-b14454a91e67

Best regards,
--  
Andreas Kemnade <andreas@kemnade.info>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-26 17:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 11:00 [PATCH v2 0/3] ARM: imx: Add a more agressive idle mode on i.MX6SLL Andreas Kemnade
2026-11-26 11:00 ` [PATCH v2 1/3] ARM: imx: enable STOP-ON mode in idle if wakeup requirements permit Andreas Kemnade
2026-11-26 11:00 ` [PATCH v2 2/3] timer-imx-gpt: Allow 32K clock to be used as a clock source Andreas Kemnade
2026-11-26 16:56   ` Frank Li
2026-11-26 11:00 ` [PATCH v2 3/3] ARM: dts: imx: kobo-clarahd: Use 32K clock for the timer Andreas Kemnade
2026-11-26 17:01 ` [PATCH v2 0/3] ARM: imx: Add a more agressive idle mode on i.MX6SLL Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox