diff mbox series

[1/1] opos6uldev: Convert to watchdog driver model

Message ID 20240223112804.15559-1-sebastien.szymanski@armadeus.com
State Accepted
Commit 7c76b1b91bf67cd09fdf5dbd71590f9e580590fa
Delegated to: Fabio Estevam
Headers show
Series [1/1] opos6uldev: Convert to watchdog driver model | expand

Commit Message

Sébastien Szymanski Feb. 23, 2024, 11:28 a.m. UTC
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: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
---
 arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi | 10 ++++++++++
 configs/opos6uldev_defconfig            |  3 +++
 2 files changed, 13 insertions(+)

Comments

Fabio Estevam Feb. 23, 2024, 1:40 p.m. UTC | #1
On Fri, Feb 23, 2024 at 8:28 AM Sébastien Szymanski
<sebastien.szymanski@armadeus.com> wrote:
>
> 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: Sébastien Szymanski <sebastien.szymanski@armadeus.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>
Fabio Estevam Feb. 24, 2024, 10:14 p.m. UTC | #2
On Fri, Feb 23, 2024 at 8:28 AM Sébastien Szymanski
<sebastien.szymanski@armadeus.com> wrote:
>
> 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: Sébastien Szymanski <sebastien.szymanski@armadeus.com>

Applied, thanks.
diff mbox series

Patch

diff --git a/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi b/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi
index ebfb95dcdf4b..e65eeb8d8ceb 100644
--- a/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi
+++ b/arch/arm/dts/imx6ul-opos6ul-u-boot.dtsi
@@ -9,6 +9,12 @@ 
 	soc {
 		bootph-pre-ram;
 	};
+
+	wdt-reboot {
+		compatible = "wdt-reboot";
+		wdt = <&wdog1>;
+		bootph-pre-ram;
+	};
 };
 
 &aips2 {
@@ -26,3 +32,7 @@ 
 &usdhc1 {
 	bootph-pre-ram;
 };
+
+&wdog1 {
+	bootph-pre-ram;
+};
diff --git a/configs/opos6uldev_defconfig b/configs/opos6uldev_defconfig
index ac4170d2e49a..e1884df9dd23 100644
--- a/configs/opos6uldev_defconfig
+++ b/configs/opos6uldev_defconfig
@@ -102,6 +102,8 @@  CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
@@ -123,4 +125,5 @@  CONFIG_SPLASH_SOURCE=y
 CONFIG_BMP_16BPP=y
 CONFIG_BMP_24BPP=y
 CONFIG_BMP_32BPP=y
+CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set