This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: U-boot crash when RTI watchdog is enabled

Part Number: AM625

Hello TI experts,

We have custom SOM modules based on AM62 platform. My intention is to enable watchdog driver/functionality in u-boot for that. I tried to enable below configs of RTI watchdog in u-boot, however with this change, I see crash in U-boot and system can not recover from it, hence unable to boot linux / kernel.

U-boot configs to enable RTI watchdog:

diff --git a/configs/verdin-am62_a53_defconfig b/configs/verdin-am62_a53_defconfig
index f56617d8b7..d02f781907 100644
--- a/configs/verdin-am62_a53_defconfig
+++ b/configs/verdin-am62_a53_defconfig
@@ -182,3 +182,11 @@ CONFIG_SYSRESET_TI_SCI=y
 CONFIG_DM_THERMAL=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
 CONFIG_HEXDUMP=y
+CONFIG_WDT=y
+CONFIG_CMD_WDT=y
+CONFIG_WDT_K3_RTI=y
+CONFIG_SPL_WDT=y

U-boot crash log snippets when above configs are enabled.

U-Boot SPL 2023.04-00043-g626d73cf84b-dirty (Mar 06 2024 - 15:39:22 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
SPL initial stack usage: 13368 bytes
Trying to boot from MMC1
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3
NOTICE:  BL31: Built : 15:01:16, Dec 13 2023
I/TC: 
I/TC: OP-TEE version: 4.0.0 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Fri Jan  5 08:34:42 UTC 2024 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
I/TC: HUK Initialized
I/TC: Primary CPU switching to normal world boot

U-Boot SPL 2023.04-00043-g626d73cf84b-dirty (Mar 06 2024 - 15:39:32 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
SPL initial stack usage: 1904 bytes
Trying to boot from MMC1
Authentication passed
Authentication passed


U-Boot 2023.04-00043-g626d73cf84b-dirty (Mar 06 2024 - 15:39:32 +0100)

SoC:   AM62X SR1.0 HS-FS
DRAM:  1 GiB
Core:  148 devices, 32 uclasses, devicetree: separate
WDT:   Started watchdog@e000000 with servicing every 1000ms (60s timeout)
WDT:   Started watchdog@e010000 with servicing every 1000ms (60s timeout)
"Synchronous Abort" handler, esr 0x96000010
elr: 000000008085a50c lr : 000000008085a508 (reloc)
elr: 000000009bf5850c lr : 000000009bf58508
x0 : 0000000099f04cd0 x1 : 000000000e020000
x2 : 0000000000000000 x3 : 000000009bf584f4
x4 : 0000000099ee97a8 x5 : 0000000000000000
x6 : 000000000000003c x7 : 000000000000000a
x8 : 0000000099ee9870 x9 : 0000000000000008
x10: 00000000000023ac x11: 0000000099ee951c
x12: 0000000000002378 x13: 0000000000000000
x14: 0000000099ee9870 x15: 0000000000000002
x16: 000000009bf53fcc x17: 0000000000000000
x18: 0000000099efbd70 x19: 000000000000ea60
x20: 000000009bfb2ba1 x21: 000000009bfb2b89
x22: 00000000000003e8 x23: 0000000000000009
x24: 0000000000000000 x25: 00000000800b2193
x26: 0000000000000000 x27: 0000000000000000
x28: 0000000000000000 x29: 0000000099ee9790

Code: f9000bf3 aa0103f3 97ff70c3 f9400001 (b9409021) 
Resetting CPU ...

resetting ...

Full Logs: /cfs-file/__key/communityserver-discussions-components-files/791/AM62_5F00_Uboot_5F00_Crash_5F00_When_5F00_RTI_5F00_Watchdog_5F00_Enabled.txt

Mentioned U-boot crash is persisting across manline u-boot, TI downstream U-boot and with the latest ti-sci FW v9.2.5 when RTI watchdog is enabled.

Questions:

  1. How to enable watchdog in U-boot for AM62 ?
  2. Is U-boot watchdog functionality tested and working on AM62 based platforms ? Any reference to this would be really helpful.

Thank you.

SW details:

U-boot:

DTSI:

Regards,

Parth P

  • Hi Parth,
    Thanks for your detailed descriptions for the issue.
    From the log, it looks like both RTI0 and RTI1 are probed.
    >>>>
    WDT: Started watchdog@e000000 with servicing every 1000ms (60s timeout)
    WDT: Started watchdog@e010000 with servicing every 1000ms (60s timeout)
    <<<<
    In Table 6-3. LPSC Features (continued) in AM62x TRM


    Each RTI instance is associated with one A53 core under one Power Domain (PD)
    A53_0 is ON @u-boot phase, can we try using only RTI0?

    This is one e2e on enabling RTI_WDT in AM64x for your reference
    e2e.ti.com/.../5042683
    Best,
    -Hong

  • Hi Hong,

    Thank you for response. I have tried your suggestion to enable only RTI0 before posting here. With only RTI0 too, the same u-boot crash is seen. Somehow missed to mentioned this in my first post.

    U-Boot SPL 2024.04-rc3-00066-g485bfe1adb-dirty (Mar 08 2024 - 08:49:19 +0100)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 13368 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d3
    NOTICE:  BL31: Built : 15:01:16, Dec 13 2023
    I/TC: 
    I/TC: OP-TEE version: 4.0.0 (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 Fri Jan  5 08:34:42 UTC 2024 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    I/TC: HUK Initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2024.04-rc3-00066-g485bfe1adb-dirty (Mar 08 2024 - 08:49:31 +0100)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 1904 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    
    
    U-Boot 2024.04-rc3-00066-g485bfe1adb-dirty (Mar 08 2024 - 08:49:31 +0100)
    
    SoC:   AM62X SR1.0 HS-FS
    DRAM:  1 GiB
    Core:  142 devices, 30 uclasses, devicetree: separate
    WDT:   Started watchdog@e000000 with servicing every 1000ms (60s timeout)
    "Synchronous Abort" handler, esr 0x96000010, far 0xe020090
    elr: 000000008084db54 lr : 000000008084db50 (reloc)
    elr: 000000009bf75b54 lr : 000000009bf75b50
    x0 : 0000000099f2e110 x1 : 000000000e020000
    x2 : 0000000000000000 x3 : 000000009bf75b3c
    x4 : 0000000099f12d90 x5 : 0000000000000000
    x6 : 000000000000003c x7 : 00000000000000f5
    x8 : 0000000099f12eb0 x9 : 0000000000002a44
    x10: 0000000099f12b0c x11: 0000000000002a04
    x12: 0000000000000000 x13: 0000000099f12eb0
    x14: 00000000ffffffff x15: 0000000099f12925
    x16: 000000009bf73c10 x17: 0000000000000000
    x18: 0000000099f25d70 x19: 000000000000ea60
    x20: 000000009bfbf4a4 x21: 000000009bfbf48c
    x22: 000000000000ea60 x23: 0000000000000009
    x24: 0000000000000000 x25: 00000000800a3d00
    x26: 00000000800a3ce8 x27: 0000000000000000
    x28: 0000000000000000 x29: 0000000099f12d70
    
    Code: f9000bf3 aa0103f3 97ff8320 f9400001 (b9409021) 
    Resetting CPU ...
    
    resetting ...

    I also tried enabling RTI0 watchdog in R5 as described in the shared link of 'AM64' reference, however that does not enable WDT in U-boot as per my understanding (please correct me if I am wrong here). U-boot console command of WDT does not show active watchdog, nor the prints 'DT:   Started watchdog@e000000 ' seen either. When, I enable RTI0 watchdog in a53 u-boot configs, in any case above crash is seen.

    What could be the reason for such a crash ? Is RTI0 watchdog in u-boot supported and tested on AM62 ? Following those questions, I would really appreciate if you could help on my original questions,

    Questions:

    1. How to enable watchdog in U-boot for AM62 ?
    2. Is U-boot watchdog functionality tested and working on AM62 based platforms ? Any reference to this would be really helpful.

    Thank you.

    Regards,

    Parth P

  • Hi Parth,
    Let me check internally on RTI_WDT support in AM62x u-boot.
    In the meantime, have we checked u-boot elf disassembly around 0x8084db54?
    "elr: 000000008084db54"
    Best,
    -Hong

  • Hello,

    We are also using the AM62 from Toradex and having the same problem. But we use the latest version from master branch on github.

    U-Boot SPL 2023.04-6.5.0-devel+git.9c8485712f05 (Dec 19 2023 - 08:33:12 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 13384 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    NOTICE:  BL31: Built : 09:34:15, Aug 24 2023
    
    U-Boot SPL 2023.04-6.5.0-devel+git.9c8485712f05 (Dec 19 2023 - 08:33:12 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 1856 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    
    
    U-Boot 2024.04-rc4-00026-g6ec096a711-dirty (Mar 20 2024 - 09:32:53 +0100)
    
    SoC:   AM62X SR1.0 HS-FS
    DRAM:  1 GiB
    Core:  143 devices, 30 uclasses, devicetree: separate
    WDT:   Started watchdog@e000000 with servicing every 1000ms (60s timeout)
    WDT:   Started watchdog@e010000 with servicing every 1000ms (60s timeout)
    "Synchronous Abort" handler, esr 0x96000010, far 0xe020090
    elr: 000000008084e6b8 lr : 000000008084e6b0 (reloc)
    elr: 000000009bf756b8 lr : 000000009bf756b0
    x0 : 000000000e020000 x1 : 0000000000000000
    x2 : 000000000000000a x3 : 0000000002800000
    x4 : 0000000002800000 x5 : fffffffffffffff8
    x6 : 00000000ffffffc8 x7 : 0000000099f2c4d8
    x8 : 0000000099f11e70 x9 : 0000000000002a44
    x10: 0000000099f11acc x11: 0000000000002a19
    x12: 0000000000002a04 x13: 0000000000000000
    x14: 0000000099f11e70 x15: 0000000099f113ca
    x16: 00000000800a54e8 x17: 0000000000000000
    x18: 0000000099f24d70 x19: 0000000099f2d750
    x20: 000000009bfbf417 x21: 000000000000ea60
    x22: 00000000000003e8 x23: 000000000000ea60
    x24: 0000000000000009 x25: 0000000000000000
    x26: 00000000800b1df7 x27: 0000000000000000
    x28: 0000000000000000 x29: 0000000099f11d20
    
    Code: aa1303e0 97ff8123 aa0003f3 f9400000 (b9409000)
    Resetting CPU ...
    
    resetting ...

    We have the same question. How to enable the watchdog?

    Regards,
    Remco van den Heuvel