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.

TDA4VM: TDA4 A72 linux watchdog issue

Part Number: TDA4VM


SDK verison: Processor SDK RTOS J721E 08_04_00

hello, i have a question!

How can I Enable the A72 linux Watchdog?

Currently in the code “drivers\watchdog\rti_wdt.c” is set to nowayout mode by default.

I want to run the “echo A > /dev/watchdog” command on the linux terminal to running the watchdog and only the following log appears (log is added by myself).

root@c801soc1:~# dmesg |grep watchdog
[ 5.293560] rti-wdt 2200000.watchdog: heartbeat 60, max_hw_heartbeat_ms:1164000.
[ 5.480636] rti-wdt 2210000.watchdog: heartbeat 60, max_hw_heartbeat_ms:1164000.
[ 122.157538] watchdog_start
[ 122.160920] watchdog_need_worker hm 1164000, t 60000, active 1, running 0
[ 122.175851] watchdog_stop release
[ 122.179993] watchdog_stop
[ 122.183261] watchdog: watchdog0: nowayout prevents watchdog being stopped!
[ 122.191853] watchdog: watchdog0: watchdog did not stop!
[ 122.198378] watchdog_need_worker hm 1164000, t 60000, active 1, running 0

  • The log for feeding the dog was not seen.

1. How to turn on and debug the watchdog

2. Why is the watchdog_stop function invoked when you run the echo A > /dev/watchdog command

 

  • Hi,

    I believe you are using the Linux SDK.

    Try the below commands and let me know if you can see the watchdog reset:

    cd /opt/ltp/
    ./runltp -P j721e-idk-gw -f ddt/wdt_test -s "WDT_M_FUNC_WRITE "

    Best Regards,
    Keerthy

  • hello, from the dts

    watchdog0: watchdog@2200000 {
    compatible = "ti,j7-rti-wdt";
    reg = <0x0 0x2200000 0x0 0x100>;
    clocks = <&k3_clks 252 1>;
    power-domains = <&k3_pds 252 TI_SCI_PD_EXCLUSIVE>;
    assigned-clocks = <&k3_clks 252 1>;
    assigned-clock-parents = <&k3_clks 252 5>;
    };

    The freq obtained in rti_wdt.c is 32K. How to configure dts can be changed to 12M, and how to map it.

  • hello, from the dts

    watchdog0: watchdog@2200000 {
    compatible = "ti,j7-rti-wdt";
    reg = <0x0 0x2200000 0x0 0x100>;
    clocks = <&k3_clks 252 1>;
    power-domains = <&k3_pds 252 TI_SCI_PD_EXCLUSIVE>;
    assigned-clocks = <&k3_clks 252 1>;
    assigned-clock-parents = <&k3_clks 252 5>;
    };

    The freq obtained in rti_wdt.c is 32K. How to configure dts can be changed to 12M, and how to map it.

  • Hello,

    Can you please first confirm that the watchdog reset is functional with the above command?

    - Keerthy

  • hello!

    root@c801soc1:/opt/ltp# ./runltp -P j721e-idk-gw -f ddt/wdt_test -s "WDT_M_FUNC_WRITE "
    INFO: creating /opt/ltp/output directory
    INFO: creating /opt/ltp/results directory
    INFO: Filtering testscenarios based on j721e-idk-gw capabilities
    awk: cmd. line:1: warning: regexp escape sequence `\&' is not a known regexp operator
    Checking for required user/group ids

    'nobody' user id and group found.
    'bin' user id and group found.
    'daemon' user id and group found.
    Users group found.
    Sys group found.
    Required users/groups exist.
    If some fields are empty or look unusual you may have an old version.
    Compare to the current minimal requirements in Documentation/Changes.

    /etc/os-release
    ID=arago
    NAME="Arago"
    VERSION="2021.09"
    VERSION_ID=2021.09
    PRETTY_NAME="Arago 2021.09"

    uname:
    Linux c801soc1 5.10.120 #32 SMP PREEMPT Wed Jul 19 23:53:45 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux

    /proc/cmdline
    console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait

    Gnu C gcc (GCC) 9.2.1 20191025
    Clang
    Gnu make 4.3
    util-linux 2.35.1
    mount linux 2.35.1 (libmount 2.35.1: btrfs, namespaces, assert, debug)
    modutils 26
    e2fsprogs 1.45.7
    Linux C Library > libc.2.30
    Dynamic linker (ldd) 2.30
    Linux C++ Library 6..
    Procps 3.3.16
    Net-tools 1.60
    iproute2 iproute2-5.10.0
    iputils 'V'
    ethtool 5.10
    Kbd 2.2.0
    Sh-utils 8.31
    Modules Loaded bluetooth ecdh_generic ecc rfkill ti_am335x_adc rpmsg_char kfifo_buf omap_rng rng_core irq_pruss_intc pru_rproc icss_iep crct10dif_ce ti_j721e_cpsw_virt_mac ti_k3_r5_remoteproc ti_am335x_)
    obuf2_dma_sg v4l2_mem2mem videobuf2_dma_contig ti_k3_dsp_remoteproc videobuf2_memops videobuf2_v4l2 virtio_rpmsg_bus videobuf2_common can_dev rti_wdt sch_fq_codel rpmsg_kdrv_switch cryptodev ipv6

    free reports:
    total used free shared buff/cache available
    Mem: 2239464 85364 2057208 9244 96892 2028116
    Swap: 0 0 0

    cpuinfo:
    Architecture: aarch64
    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    CPU(s): 2
    On-line CPU(s) list: 0,1
    Thread(s) per core: 1
    Core(s) per socket: 2
    Socket(s): 1
    Vendor ID: ARM
    Model: 0
    Model name: Cortex-A72
    Stepping: r1p0
    BogoMIPS: 400.00
    L1d cache: 64 KiB
    L1i cache: 96 KiB
    L2 cache: 1 MiB
    Vulnerability Itlb multihit: Not affected
    Vulnerability L1tf: Not affected
    Vulnerability Mds: Not affected
    Vulnerability Meltdown: Not affected
    Vulnerability Spec store bypass: Not affected
    Vulnerability Spectre v1: Mitigation; __user pointer sanitization
    Vulnerability Spectre v2: Mitigation; CSV2, BHB
    Vulnerability Srbds: Not affected
    Vulnerability Tsx async abort: Not affected
    Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid

    AppArmor disabled

    SELinux mode: unknown
    no big block device was specified on commandline.
    Tests which require a big block device are disabled.
    You can specify it with option -z
    COMMAND: /opt/ltp/bin/ltp-pan -e -S -a 1083 -n 1083 -p -f /tmp/ltp-WbaaG3Eru6/alltests -l /tmp/tmp.JeAUZD6mcx -C /opt/ltp/output/LTP_RUN_ON-tmp.JeAUZD6mcx.failed -T /opt/ltp/output/LTP_RUN_ON-tmp.Jef
    INFO: Restricted to WDT_M_FUNC_WRITE
    LOG File: /tmp/tmp.JeAUZD6mcx
    FAILED COMMAND File: /opt/ltp/output/LTP_RUN_ON-tmp.JeAUZD6mcx.failed
    TCONF COMMAND File: /opt/ltp/output/LTP_RUN_ON-tmp.JeAUZD6mcx.tconf
    Running tests.......
    <<<test_start>>>
    tag=WDT_M_FUNC_WRITE stime=1661850481
    cmdline="source 'common.sh'; do_cmd install_modules.sh 'wdt' ; DEV_NODE=`get_devnode.sh "wdt"` || die "error getting devnode for wdt"; do_cmd wdt_tests -device $DEV_NODE -ioctl -write"
    contacts=""
    analysis=exit
    <<<test_output>>>
    incrementing stop
    |TRACE LOG|Inside do_cmd:CMD=install_modules.sh wdt|
    |TRACE LOG|Inside do_cmd:CMD=wdt_tests -device /dev/watchdog -ioctl -write|


    |TEST START|wdt_tests|
    |TRACE LOG|******** WDT Testcase parameters ******** |[ 92.278963] watchdog: watchdog0: nowayout prevents watchdog being started!

    |TRACE LOG|Device : /dev/watchdog|
    |TRACE LOG|Loop Count : 1|
    |TRACE LOG|I/O Operation : Write|
    |TRACE LOG|Operation : Ioctl|
    |TRACE LOG|Ioctl Name : WDIOC_KEEPALIVE|
    |TRACE LOG|Ioctl Arg : 0 |
    |TRACE LOG| ************* End of Test params ************* |
    |TRACE LOG|Keeping WDT alive, sleep counter -0(sec)|
    |TEST RESULT|PASS|wdt_tests|
    |TEST END|wdt_tests|
    |TRACE LOG|EVM will be rebooted after 150 seconds|
    |TRACE LOG|149 seconds remaining before reboot|
    |TRACE LOG|148 seconds remaining before reboot|

  • I want to know how to change the freq for the RTI0(A72) at main domain

  • I want to modify the control Register CTRLMMR_WWD0_CLKSEL Register on A72 linux, from 32K to 12M, how to modify the code, thank you

  • clocks = <&k3_clks 252 1>; Whether to associate CTRLMMR_WWD0_CLKSEL?

  • Hi,

    I look at the DTS:

    Can you change the assigned-clock-parents and try if you can change the frequency of watchdog?

    Something like:

    assigned-clock-parents = <&k3_clks 252 2>

    Best Regards,
    Keerthy

  • hello, 

    Can you tell me the URL link of the screenshot? I need to take a closer look

    • Thank you, I found the corresponding location, the problem has been solved