
Hello Claudius, Fabio,
On Thu, 2019-11-28 at 09:49 -0300, Fabio Estevam wrote:
Hi Claudius,
On Thu, Nov 28, 2019 at 9:07 AM Claudius Heine ch@denx.de wrote:
Signed-off-by: Claudius Heine ch@denx.de
arch/arm/dts/imx6qdl-dhcom-pdk2.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/imx6qdl-dhcom-pdk2.dtsi b/arch/arm/dts/imx6qdl-dhcom-pdk2.dtsi index af4719aaeb..572bcbf8f0 100644 --- a/arch/arm/dts/imx6qdl-dhcom-pdk2.dtsi +++ b/arch/arm/dts/imx6qdl-dhcom-pdk2.dtsi @@ -30,6 +30,11 @@ mux-int-port = <1>; mux-ext-port = <3>; };
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
};
};
Could you use the the same way that Linux handles the imx2_wdt?
Please see the commit below:
commit ceea0c145d0c38badfcfc5443138e94ab094dc4a Author: Robert Hancock hancock@sedsystems.ca Date: Tue Aug 6 11:05:29 2019 -0600
watchdog: imx: Add DT ext-reset handling The Linux imx2_wdt driver uses a fsl,ext-reset-output boolean in the device tree to specify whether the board design should use the external reset instead of the internal reset. Use this boolean to determine which mode to use rather than using external reset unconditionally. For the legacy non-DM mode, the external reset is always used in order to maintain the previous behavior.
I think the source of the problem lies within this: The old behavior (before commit f2929d11a639 ("watchdog: imx: Use immediate reset bits for expire_now")) was asserting *both* external and internal reset. The datasheet mentions the following for the bit to enable external reset:
| There is no effect on [internal reset] upon writing on this bit. | [External reset] gets asserted along with [internal reset] if this bit | is set.
If the intention was to keep the old behavior, the imx_watchdog_expire_now() function needs to be changed to either
- (ext_reset == false) write WCR_WDE | WCR_WDA (ie. assert only internal), or - (ext_reset == true) write WCR_WDE (ie. assert both internal and external).