Skip to contentSkip to conversation

pico-pi-imx7d: Convert to watchdog driver model

PATCH Applied Fabio Estevam 1 participant 2 messages Oct 26, 2023 – Dec 12, 2023

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 pico-pi-imx7d: Convert to watchdog driver model

From: Fabio Estevam <[email protected]>

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

---
 arch/arm/dts/imx7d-pico-pi-u-boot.dtsi | 10 ++++++++++
 configs/pico-pi-imx7d_defconfig        |  3 +++
 2 files changed, 13 insertions(+)
arch/arm/dts/imx7d-pico-pi-u-boot.dtsi +10 -0
index 843b4583e53a..c6856823c64d 100644
@@ -6,6 +6,12 @@
         usb0 = &usbotg1;
         display0 = &lcdif;
     };
+
+	wdt-reboot {
+		compatible = "wdt-reboot";
+		wdt = <&wdog1>;
+		bootph-pre-ram;
+	};
 };
 
 &usbotg1 {
@@ -45,6 +51,10 @@
 	};
 };
 
+&wdog1 {
+	bootph-pre-ram;
+};
+
 &iomuxc {
 	pinctrl_backlight: backlight {
 		fsl,pins = <
configs/pico-pi-imx7d_defconfig +3 -0
index 48364c7548ee..5b615daf4a87 100644
@@ -76,6 +76,8 @@ CONFIG_DM_PMIC=y
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
 CONFIG_SPL_USB_HOST=y
@@ -95,3 +97,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_SPLASH_SCREEN=y
 CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_BMP_16BPP=y
+CONFIG_IMX_WATCHDOG=y
Signature · 1 line
2.34.1
author reviewer Applied
#1 lore raw
Quoted 10 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Applied, thanks.