linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Suspending i.MX watchdog in WAIT mode
@ 2022-10-25  7:25 Andrej Picej
  2022-10-25  7:25 ` [PATCH v2 1/3] watchdog: imx2_wdg: suspend " Andrej Picej
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Andrej Picej @ 2022-10-25  7:25 UTC (permalink / raw)
  To: linux-watchdog
  Cc: wim, linux, robh+dt, krzysztof.kozlowski+dt, shawnguo, s.hauer,
	kernel, festevam, linux-imx, Anson.Huang, devicetree,
	linux-arm-kernel, linux-kernel

The i.MX6 watchdog can't be stopped once started. Additionally, watchdog
hardware configuration needs to be able to handle low-power modes of the
SoC. For low-power modes, there are two configuration bits in the TRM:
- WDZST bit disables the watchdog timer in "deeper" low power modes and
- WDW bit disables the watchdog timer in "WAIT" mode

WDZST bit support is already in place since 1a9c5efa576e ("watchdog: imx2_wdt: disable watchdog timer during low power mode").
On the other hand, handling of WDZST bit was omitted so far but now
these patch series bring support for it.

SoC's "WAIT" low-power mode corresponds to Linux's freeze or
Suspend-to-Idle (S0) mode which can be activated with:

$ echo freeze > /sys/power/state

Without these patches, board would be reset by the watchdog after
timeout of 128 seconds since watchdog would not be stopped when SoC
entered Suspend-to-Idle mode. With patches in place, boards using
imx2-wdt are able to stay in Suspend-to-Idle mode indefinitely.

Last but not least, WDW bit is not found on all imx2-wdt supported i.MX
devices, therefore a new device-tree property "fsl,suspend-in-wait" has
been introduced for this.

Here is a v1: https://lore.kernel.org/lkml/20221019111714.1953262-1-andrej.picej@norik.com/

Change log for v2 in the corresponding patches.

Andrej Picej (3):
  watchdog: imx2_wdg: suspend watchdog in WAIT mode
  dt-bindings: watchdog: fsl-imx: document suspend in wait mode
  ARM: dts: imx6ul/ull: suspend i.MX6UL watchdog in wait mode

 .../bindings/watchdog/fsl-imx-wdt.yaml        | 22 +++++++++++
 .../boot/dts/imx6ul-phytec-phycore-som.dtsi   |  4 ++
 drivers/watchdog/imx2_wdt.c                   | 37 +++++++++++++++++++
 3 files changed, 63 insertions(+)

-- 
2.25.1


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

end of thread, other threads:[~2022-10-27  7:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25  7:25 [PATCH v2 0/3] Suspending i.MX watchdog in WAIT mode Andrej Picej
2022-10-25  7:25 ` [PATCH v2 1/3] watchdog: imx2_wdg: suspend " Andrej Picej
2022-10-25  9:38   ` Alexander Stein
2022-10-25 11:21     ` Andrej Picej
2022-10-26  6:01       ` Alexander Stein
2022-10-26  7:03         ` Andrej Picej
2022-10-25 12:27   ` Marco Felsch
2022-10-25 13:01     ` Andrej Picej
2022-10-25 14:21   ` Guenter Roeck
2022-10-26  6:59     ` Andrej Picej
2022-10-25  7:25 ` [PATCH v2 2/3] dt-bindings: watchdog: fsl-imx: document suspend in wait mode Andrej Picej
2022-10-25 13:48   ` Krzysztof Kozlowski
2022-10-26  6:38     ` Andrej Picej
2022-10-26 14:12       ` Krzysztof Kozlowski
2022-10-27  7:16         ` Andrej Picej
2022-10-25  7:25 ` [PATCH v2 3/3] ARM: dts: imx6ul/ull: suspend i.MX6UL watchdog " Andrej Picej

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).