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.

[FAQ] J721S2XSOMXEVM: How to enable main domain watchdog?

Part Number: J721S2XSOMXEVM
Other Parts Discussed in Thread: TDA4VM

The j721e/TDA4VM has SOC watchdog enabled. How to enable the same on J721s2?

  • Hello,

    Watchdog enabling needs 3 main modules:

    1. Watchdog driver & DT nodes
    2. SOC ESM
    3. PMIC ESM

    #2 & #3 are enabled in U-Boot.
    #1 is enabled in Linux.

    This is the wiring to route the Main domain ESM events(including watchdog) to PMIC.

    So J721s2 has 3 instances of ESM. Main, MCU & WKUP domain ESM
    respevtively. For the main domain ESM event to propagate to
    PMIC the event needs to be routed via MCU ESM & then MCU ESM
    needs to route the event to WKUP ESM & finally to PMIC.

    MAIN ESM --> MCU ESM --> WKUP ESM --> PMIC.

    Below is the patch set on top of 8.6 SDK U-Boot directory:

    j721s2-u-boot-esm.tar

    Steps to compile U-Boot with ESM support & install to SD card:

    cd $PSDK_Linux/board-support/u-boot-2021.01+gitAUTOINC+62a9e51344-g62a9e51344
    tar xvf j721s2-u-boot-esm.tar
    git am j721s2-u-boot-esm/*
    cd ../..
    make u-boot
    cp board-support/k3-image-gen-2022.01/tiboot3.bin board-support/u-boot_build/a72/tispl.bin board-support/u-boot_build/a72/u-boot.img /media/$USER/boot

    Add the below diff to kernel to add the watchdog DTS nodes:

    diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
    index bd6b849fa..d79f98309 100644
    --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
    @@ -78,6 +78,24 @@
                    };
            };
     
    +       watchdog0: watchdog@2200000 {
    +               compatible = "ti,j7-rti-wdt";
    +               reg = <0x0 0x2200000 0x0 0x100>;
    +               clocks = <&k3_clks 286 1>;
    +               power-domains = <&k3_pds 286 TI_SCI_PD_EXCLUSIVE>;
    +               assigned-clocks = <&k3_clks 286 1>;
    +               assigned-clock-parents = <&k3_clks 286 5>;
    +       };
    +
    +       watchdog1: watchdog@2210000 {
    +               compatible = "ti,j7-rti-wdt";
    +               reg = <0x0 0x2210000 0x0 0x100>;
    +               clocks = <&k3_clks 287 1>;
    +               power-domains = <&k3_pds 287 TI_SCI_PD_EXCLUSIVE>;
    +               assigned-clocks = <&k3_clks 287 1>;
    +               assigned-clock-parents = <&k3_clks 287 5>;
    +       };
    +
    

    cd $PSDK_Linux/board-support/linux-5.10.162+gitAUTOINC+76b3e88d56-g76b3e88d56
    "Apply the dts diff to add the watchdog nodes"
    cd ../..
    make linux-dtbs
    sudo make linux-dtbs_install

    With that the watchdog reset is functional.

    Best Regards,
    Keerthy