All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Suspending i.MX watchdog in WAIT mode
@ 2022-11-04  7:03 ` Andrej Picej
  0 siblings, 0 replies; 14+ messages in thread
From: Andrej Picej @ 2022-11-04  7:03 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 v1: https://lore.kernel.org/lkml/20221019111714.1953262-1-andrej.picej@norik.com/

Here is v2: https://lore.kernel.org/all/20221025072533.2980154-1-andrej.picej@norik.com/#t

Here is v3: https://lore.kernel.org/all/20221103100358.176099-1-andrej.picej@norik.com/

Change log 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        | 37 ++++++++++++-
 .../boot/dts/imx6ul-phytec-phycore-som.dtsi   |  4 ++
 drivers/watchdog/imx2_wdt.c                   | 55 ++++++++++++++++++-
 3 files changed, 90 insertions(+), 6 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2023-01-31 17:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04  7:03 [PATCH v4 0/3] Suspending i.MX watchdog in WAIT mode Andrej Picej
2022-11-04  7:03 ` Andrej Picej
2022-11-04  7:03 ` [PATCH v4 1/3] watchdog: imx2_wdg: suspend " Andrej Picej
2022-11-04  7:03   ` Andrej Picej
2022-11-04  7:03 ` [PATCH v4 2/3] dt-bindings: watchdog: fsl-imx: document suspend in wait mode Andrej Picej
2022-11-04  7:03   ` Andrej Picej
2022-11-08 10:59   ` Krzysztof Kozlowski
2022-11-08 10:59     ` Krzysztof Kozlowski
2023-01-31 17:42   ` Guenter Roeck
2023-01-31 17:42     ` Guenter Roeck
2022-11-04  7:03 ` [PATCH v4 3/3] ARM: dts: imx6ul/ull: suspend i.MX6UL watchdog " Andrej Picej
2022-11-04  7:03   ` Andrej Picej
2022-11-11  6:45   ` Shawn Guo
2022-11-11  6:45     ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.