From: Andrej Picej <andrej.picej@norik.com> To: linux-watchdog@vger.kernel.org Cc: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Anson.Huang@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] Suspending i.MX watchdog in WAIT mode Date: Tue, 25 Oct 2022 09:25:30 +0200 [thread overview] Message-ID: <20221025072533.2980154-1-andrej.picej@norik.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Andrej Picej <andrej.picej@norik.com> To: linux-watchdog@vger.kernel.org Cc: wim@linux-watchdog.org, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Anson.Huang@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] Suspending i.MX watchdog in WAIT mode Date: Tue, 25 Oct 2022 09:25:30 +0200 [thread overview] Message-ID: <20221025072533.2980154-1-andrej.picej@norik.com> (raw) 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-10-25 7:26 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-25 7:25 Andrej Picej [this message] 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 7:25 ` Andrej Picej 2022-10-25 9:38 ` Alexander Stein 2022-10-25 9:38 ` Alexander Stein 2022-10-25 11:21 ` Andrej Picej 2022-10-25 11:21 ` Andrej Picej 2022-10-26 6:01 ` Alexander Stein 2022-10-26 6:01 ` Alexander Stein 2022-10-26 7:03 ` Andrej Picej 2022-10-26 7:03 ` Andrej Picej 2022-10-25 12:27 ` Marco Felsch 2022-10-25 12:27 ` Marco Felsch 2022-10-25 13:01 ` Andrej Picej 2022-10-25 13:01 ` Andrej Picej 2022-10-25 14:21 ` Guenter Roeck 2022-10-25 14:21 ` Guenter Roeck 2022-10-26 6:59 ` Andrej Picej 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 7:25 ` Andrej Picej 2022-10-25 13:48 ` Krzysztof Kozlowski 2022-10-25 13:48 ` Krzysztof Kozlowski 2022-10-26 6:38 ` Andrej Picej 2022-10-26 6:38 ` Andrej Picej 2022-10-26 14:12 ` Krzysztof Kozlowski 2022-10-26 14:12 ` Krzysztof Kozlowski 2022-10-27 7:16 ` Andrej Picej 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 2022-10-25 7:25 ` Andrej Picej
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221025072533.2980154-1-andrej.picej@norik.com \ --to=andrej.picej@norik.com \ --cc=Anson.Huang@nxp.com \ --cc=devicetree@vger.kernel.org \ --cc=festevam@gmail.com \ --cc=kernel@pengutronix.de \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-watchdog@vger.kernel.org \ --cc=linux@roeck-us.net \ --cc=robh+dt@kernel.org \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ --cc=wim@linux-watchdog.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.