]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
smegw01: Convert to watchdog driver model
authorFabio Estevam <festevam@denx.de>
Tue, 8 Aug 2023 21:40:40 +0000 (18:40 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 16 Oct 2023 14:25:10 +0000 (16:25 +0200)
Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
arch/arm/dts/imx7d-smegw01-u-boot.dtsi
configs/smegw01_defconfig

index 90f7500ee34c040831e7ed29db46f5d3f9b14e8f..611bfe52fd86eb098eadcbf590f7080b4f0ad28a 100644 (file)
@@ -1,3 +1,16 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 
 #include "imx7s-u-boot.dtsi"
+
+/ {
+       wdt-reboot {
+               compatible = "wdt-reboot";
+               wdt = <&wdog1>;
+               bootph-pre-ram;
+       };
+};
+
+&wdog1 {
+       bootph-pre-ram;
+};
+
index 13665ecfd3cc948777ca0ce057d19c280aacd620..9f2cac73b8f866e9c8d12ad849ef9e4709a5c6c3 100644 (file)
@@ -81,5 +81,8 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_IMX_THERMAL=y
+CONFIG_IMX_WATCHDOG=y
 # CONFIG_CMD_BOOTEFI_BOOTMGR is not set