]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: phytec: phycore-am62ax: Add watchdog start to bootcmd
authorWadim Egorov <w.egorov@phytec.de>
Wed, 30 Jul 2025 15:42:16 +0000 (17:42 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 11 Aug 2025 20:53:56 +0000 (14:53 -0600)
Allows run-time control over watchdog auto-start and the timeout via
setting the environment variable watchdog_timeout_ms. A value of zero
means "do not start". Use CONFIG_WATCHDOG_TIMEOUT_MSECS as initial value.
Users can enable the watchdog to monitor the boot process until userspace
or OS takes over to serve the watchdog.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
board/phytec/phycore_am62ax/phycore_am62ax.env
configs/phycore_am62ax_a53_defconfig

index 797904013dcad890be0582408087aa8bcdc2bf9f..3f4b3cc4f0d780bec985a703f1907a20d65678c0 100644 (file)
@@ -2,6 +2,7 @@
 #include <env/phytec/k3_mmc.env>
 #include <env/phytec/k3_net.env>
 #include <env/phytec/k3_spi.env>
+#include <env/phytec/watchdog.env>
 
 fdtaddr=0x88000000
 loadaddr=0x82000000
@@ -27,3 +28,5 @@ spi_ramdisk_addr=0x2200000
 
 bootmeths=script efi extlinux pxe
 boot_targets=mmc1 mmc0 spi_flash dhcp
+
+watchdog=watchdog@e000000
index 05849d05be472db492965831bdfa816c504800fe..3572d46dc1f7a37f0519fcf4881d23c63a9b8f76 100644 (file)
@@ -40,7 +40,7 @@ CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
 CONFIG_BOOTSTD_FULL=y
 CONFIG_OF_BOARD_SETUP=y
-CONFIG_BOOTCOMMAND="bootflow scan -lb; run ${boot}boot"
+CONFIG_BOOTCOMMAND="run start_watchdog; bootflow scan -lb; run ${boot}boot"
 CONFIG_DEFAULT_FDT_FILE="oftree"
 # CONFIG_BOARD_INIT is not set
 CONFIG_BOARD_LATE_INIT=y
@@ -75,6 +75,7 @@ CONFIG_CMD_MTD=y
 # CONFIG_CMD_POWEROFF is not set
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_MASS_STORAGE=y
+CONFIG_CMD_WDT=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EFIDEBUG=y
 CONFIG_CMD_RTC=y
@@ -185,5 +186,9 @@ CONFIG_USB_GADGET_MANUFACTURER="PHYTEC"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0x6165
 CONFIG_SPL_DFU=y
+# CONFIG_WATCHDOG is not set
+# CONFIG_WATCHDOG_AUTOSTART is not set
+CONFIG_WDT=y
+CONFIG_WDT_K3_RTI=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
 # CONFIG_HEXDUMP is not set