ARM: imx8m: Fix reset in SPL on NXP iMX8MP EVK
authorMarek Vasut <marex@denx.de>
Wed, 29 Apr 2020 13:04:26 +0000 (15:04 +0200)
committerStefano Babic <sbabic@denx.de>
Fri, 1 May 2020 11:46:22 +0000 (13:46 +0200)
Board files should not re-implement do_reset() to work around this
function not being defined in for specific configurations. Rather,
the fix is to compile in drivers which implement this properly.
This patch enables sysreset and watchdog drivers in SPL and ties
them together to implement the same as the do_reset() hack in the
board file, except correctly in the DM/DT framework.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Flavio Suligoi <f.suligoi@asem.it>
Cc: Harald Seiler <hws@denx.de>
Cc: Igor Opaniuk <igor.opaniuk@toradex.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
arch/arm/dts/imx8mp-evk-u-boot.dtsi
configs/imx8mp_evk_defconfig

index 4675ada0a0a927b6a3b2639019e0c3a4fe09aa63..24a93ac2d6906abe5ae71a5eaa655a3e303519be 100644 (file)
@@ -3,6 +3,14 @@
  * Copyright 2019 NXP
  */
 
+/ {
+       wdt-reboot {
+               compatible = "wdt-reboot";
+               wdt = <&wdog1>;
+               u-boot,dm-spl;
+       };
+};
+
 &{/soc@0} {
        u-boot,dm-pre-reloc;
        u-boot,dm-spl;
 &usdhc3 {
        u-boot,dm-spl;
 };
+
+&wdog1 {
+       u-boot,dm-spl;
+};
index 3086b7b6d7a466540cd85f7b33a73a3c7c0b06f6..44b2935f6998bff4f7a7bccea86c3b0981363dd6 100644 (file)
@@ -79,4 +79,8 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_MXC_UART=y
 CONFIG_SYSRESET=y
+CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_PSCI=y
+CONFIG_SYSRESET_WATCHDOG=y
+# CONFIG_WATCHDOG is not set
+CONFIG_IMX_WATCHDOG=y