From b17c594ac499c8cfb91093d62ff83d90a547ecf1 Mon Sep 17 00:00:00 2001 From: Wadim Egorov Date: Wed, 30 Jul 2025 17:42:11 +0200 Subject: [PATCH 1/7] arch: arm: dts: k3-am625-phyboard-lyra: Disable unused watchdogs in U-Boot The watchdog driver probes all available watchdog devices. This causes SMP boot errors when bringing up secondary CPUs. In our setup, only a single watchdog is needed to monitor the boot process until userspace or the OS takes over. Disable all unnecessary watchdog devices in U-Boot to avoid conflicts during CPU bring-up. Signed-off-by: Wadim Egorov --- .../dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi b/arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi index ee273563e83..3a1a8b06dc6 100644 --- a/arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi +++ b/arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi @@ -95,6 +95,22 @@ bootph-all; }; +&main_rti1 { + status = "disabled"; +}; + +&main_rti2 { + status = "disabled"; +}; + +&main_rti3 { + status = "disabled"; +}; + +&main_rti15 { + status = "disabled"; +}; + &main_uart0 { bootph-all; }; From dfd185939d9e4dc89e4365b142a14ffd7e775854 Mon Sep 17 00:00:00 2001 From: Wadim Egorov Date: Wed, 30 Jul 2025 17:42:12 +0200 Subject: [PATCH 2/7] arch: arm: dts: k3-am62a7-phyboard-lyra: Disable unused watchdogs in U-Boot The watchdog driver probes all available watchdog devices. This causes SMP boot errors when bringing up secondary CPUs. In our setup, only a single watchdog is needed to monitor the boot process until userspace or the OS takes over. Disable all unnecessary watchdog devices in U-Boot to avoid conflicts during CPU bring-up. Signed-off-by: Wadim Egorov --- .../dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi b/arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi index 73255a18e9b..8afd844460a 100644 --- a/arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi +++ b/arch/arm/dts/k3-am62a7-phyboard-lyra-rdk-u-boot.dtsi @@ -156,6 +156,22 @@ bootph-all; }; +&main_rti1 { + status = "disabled"; +}; + +&main_rti2 { + status = "disabled"; +}; + +&main_rti3 { + status = "disabled"; +}; + +&main_rti4 { + status = "disabled"; +}; + &main_uart0 { bootph-all; }; From dcc85e9aba41c82e9b54d2d925f83233842285a1 Mon Sep 17 00:00:00 2001 From: Wadim Egorov Date: Wed, 30 Jul 2025 17:42:13 +0200 Subject: [PATCH 3/7] arch: arm: dts: k3-am642-phyboard-electra: Disable unused watchdogs in U-Boot The watchdog driver probes all available watchdog devices. This causes SMP boot errors when bringing up secondary CPUs. In our setup, only a single watchdog is needed to monitor the boot process until userspace or the OS takes over. Disable all unnecessary watchdog devices in U-Boot to avoid conflicts during CPU bring-up. Signed-off-by: Wadim Egorov --- arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi b/arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi index c68a48678a2..56547cbd28a 100644 --- a/arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi +++ b/arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi @@ -156,6 +156,10 @@ bootph-all; }; +&main_rti1 { + status = "disabled"; +}; + &sdhci0 { bootph-all; }; From d27b7a1c777abe1bc103c983d0af082345457e7d Mon Sep 17 00:00:00 2001 From: Wadim Egorov Date: Wed, 30 Jul 2025 17:42:14 +0200 Subject: [PATCH 4/7] board: phytec: phycore-am62x: Add watchdog start to bootcmd 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 --- board/phytec/phycore_am62x/phycore_am62x.env | 3 +++ configs/phycore_am62x_a53_defconfig | 7 ++++++- include/env/phytec/watchdog.env | 11 +++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 include/env/phytec/watchdog.env diff --git a/board/phytec/phycore_am62x/phycore_am62x.env b/board/phytec/phycore_am62x/phycore_am62x.env index 797904013dc..3f4b3cc4f0d 100644 --- a/board/phytec/phycore_am62x/phycore_am62x.env +++ b/board/phytec/phycore_am62x/phycore_am62x.env @@ -2,6 +2,7 @@ #include #include #include +#include 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 diff --git a/configs/phycore_am62x_a53_defconfig b/configs/phycore_am62x_a53_defconfig index 978604b0232..931ec39905b 100644 --- a/configs/phycore_am62x_a53_defconfig +++ b/configs/phycore_am62x_a53_defconfig @@ -44,7 +44,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 @@ -79,6 +79,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_MTD=y CONFIG_CMD_USB=y +CONFIG_CMD_WDT=y CONFIG_CMD_CACHE=y CONFIG_CMD_EFIDEBUG=y CONFIG_CMD_RTC=y @@ -175,5 +176,9 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0x6165 CONFIG_USB_GADGET_DOWNLOAD=y 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 diff --git a/include/env/phytec/watchdog.env b/include/env/phytec/watchdog.env new file mode 100644 index 00000000000..f2e65baf1e9 --- /dev/null +++ b/include/env/phytec/watchdog.env @@ -0,0 +1,11 @@ +watchdog_timeout_ms=CONFIG_WATCHDOG_TIMEOUT_MSECS +start_watchdog= + if test ${watchdog_timeout_ms} -gt 0; then; + if test -z "${watchdog}"; then; + echo No watchdog device set, skipping watchdog start; + else; + wdt dev ${watchdog}; + wdt start ${watchdog_timeout_ms}; + echo Watchdog started, timeout ${watchdog_timeout_ms} ms; + fi; + fi; From 9de098a9f85eaec64389fd7ea1848110e6da36f6 Mon Sep 17 00:00:00 2001 From: Wadim Egorov Date: Wed, 30 Jul 2025 17:42:15 +0200 Subject: [PATCH 5/7] board: phytec: phycore-am64x: Add watchdog start to bootcmd 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 --- board/phytec/phycore_am64x/phycore_am64x.env | 3 +++ configs/phycore_am64x_a53_defconfig | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/board/phytec/phycore_am64x/phycore_am64x.env b/board/phytec/phycore_am64x/phycore_am64x.env index 36ab16e2f7a..3775a27c1a3 100644 --- a/board/phytec/phycore_am64x/phycore_am64x.env +++ b/board/phytec/phycore_am64x/phycore_am64x.env @@ -1,6 +1,7 @@ #include #include #include +#include fdtaddr=0x88000000 loadaddr=0x82000000 @@ -26,3 +27,5 @@ spi_ramdisk_addr=0x2200000 bootmeths=script efi extlinux pxe boot_targets=mmc1 mmc0 spi_flash dhcp + +watchdog=watchdog@e000000 diff --git a/configs/phycore_am64x_a53_defconfig b/configs/phycore_am64x_a53_defconfig index 62c9eec971d..cf1e9061f3c 100644 --- a/configs/phycore_am64x_a53_defconfig +++ b/configs/phycore_am64x_a53_defconfig @@ -39,7 +39,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 @@ -77,6 +77,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_MTD=y CONFIG_CMD_USB=y +CONFIG_CMD_WDT=y CONFIG_CMD_CACHE=y CONFIG_CMD_EFIDEBUG=y CONFIG_CMD_RTC=y @@ -182,4 +183,8 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0x6165 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_MASS_STORAGE=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 From cc6291e3b4a4a8520a3c4bb44eae2ecd8f1e9c0e Mon Sep 17 00:00:00 2001 From: Wadim Egorov Date: Wed, 30 Jul 2025 17:42:16 +0200 Subject: [PATCH 6/7] board: phytec: phycore-am62ax: Add watchdog start to bootcmd 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 --- board/phytec/phycore_am62ax/phycore_am62ax.env | 3 +++ configs/phycore_am62ax_a53_defconfig | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/board/phytec/phycore_am62ax/phycore_am62ax.env b/board/phytec/phycore_am62ax/phycore_am62ax.env index 797904013dc..3f4b3cc4f0d 100644 --- a/board/phytec/phycore_am62ax/phycore_am62ax.env +++ b/board/phytec/phycore_am62ax/phycore_am62ax.env @@ -2,6 +2,7 @@ #include #include #include +#include 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 diff --git a/configs/phycore_am62ax_a53_defconfig b/configs/phycore_am62ax_a53_defconfig index 05849d05be4..3572d46dc1f 100644 --- a/configs/phycore_am62ax_a53_defconfig +++ b/configs/phycore_am62ax_a53_defconfig @@ -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 From e8eab15d14a9fd17ee5e99cc045ca15ff5aa8eb1 Mon Sep 17 00:00:00 2001 From: Wadim Egorov Date: Wed, 30 Jul 2025 17:42:17 +0200 Subject: [PATCH 7/7] include: env: phytec: k3: Add deprecation warning to legacy boot flow We switched towards standard boot with still keeping a fallback using legacy boot command alive. Add a deprecation warning to make it more clear that we will remove it in future versions. Signed-off-by: Wadim Egorov --- include/env/phytec/k3_mmc.env | 3 ++- include/env/phytec/k3_net.env | 3 ++- include/env/phytec/k3_spi.env | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/env/phytec/k3_mmc.env b/include/env/phytec/k3_mmc.env index 3f67e312f65..95d0204b6da 100644 --- a/include/env/phytec/k3_mmc.env +++ b/include/env/phytec/k3_mmc.env @@ -14,7 +14,8 @@ mmcargs=setenv bootargs console=${console} earlycon=${earlycon} ${optargs} mmcloadimage=load mmc ${mmcdev}:${mmcpart} ${kernel_addr_r} Image mmcloadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile} -mmcboot=if test ${doraucboot} = 1; then run raucinit; fi; +mmcboot=echo DEPRECATION WARNING: mmcboot will be removed in future versions. Use standard boot instead.; + if test ${doraucboot} = 1; then run raucinit; fi; run mmcargs; mmc dev ${mmcdev}; mmc rescan; diff --git a/include/env/phytec/k3_net.env b/include/env/phytec/k3_net.env index 4d5c703cae9..669787928a2 100644 --- a/include/env/phytec/k3_net.env +++ b/include/env/phytec/k3_net.env @@ -12,7 +12,8 @@ netargs=setenv bootargs console=${console} root=/dev/nfs ip=dhcp rw nfsroot=${serverip}:${nfsroot},vers=4,tcp ${optargs} netloadimage=${get_cmd} ${kernel_addr_r} ${serverip}:/Image netloadfdt=${get_cmd} ${fdt_addr_r} ${serverip}:/${fdtfile} -netboot=run netargs; +netboot=echo DEPRECATION WARNING: netboot will be removed in future versions. Use standard boot instead.; + run netargs; setenv autoload no; dhcp; run netloadimage; diff --git a/include/env/phytec/k3_spi.env b/include/env/phytec/k3_spi.env index 8e9cfce3b4c..28fe69b4e57 100644 --- a/include/env/phytec/k3_spi.env +++ b/include/env/phytec/k3_spi.env @@ -10,7 +10,9 @@ spiargs=setenv bootargs console=${console} earlycon=${earlycon} ${optargs} spiloadimage=sf read ${kernel_addr_r} ${spi_image_addr} ${size_kern} spiloadfdt=sf read ${fdt_addr_r} ${spi_fdt_addr} ${size_fdt} spiloadramdisk=sf read ${ramdisk_addr_r} ${spi_ramdisk_addr} ${size_fs} -spiboot=run spiargs; + +spiboot=echo DEPRECATION WARNING: spiboot will be removed in future versions. Use standard boot instead.; + run spiargs; sf probe; run spiloadimage; run spiloadfdt;