watchdog: imx93: add watchdog timer on imx93
authorAlice Guo <alice.guo@nxp.com>
Thu, 25 Aug 2022 08:32:56 +0000 (16:32 +0800)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 2 Oct 2022 10:55:47 +0000 (12:55 +0200)
commit8ed2dc48551354bbf33df869f3968b7805cbaa61
tree2c4597c548f067a49963ae442bbf70c7234c8151
parentcef6bc98d50da24252fb289759f1790e17afa448
watchdog: imx93: add watchdog timer on imx93

The WDOG clocks are sourced from lpo_clk, and lpo_clk is the fixed
32KHz. TOVAL contains the 16-bit value used to set the timeout period of
the watchdog. When the timeout period exceeds 2 seconds, the value
written to the TOVAL register is larger than 16-bit can represent.
Enabling watchdog prescaler can solve this problem.

Two points need to be aware of:
1. watchdog prescaler enables a fixed 256 pre-scaling of watchdog
counter reference clock
2. reconfiguration takes about 55ms on imx93

Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220825083256.14565-8-alice.guo@oss.nxp.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/imx7ulp_wdt.c