Rock 5 Watchdog

Hello everyone,

I am new to the Rock 5B and I’m trying to get my system with Debian up and running. One thing I noticed is that there is no /dev/watchdog device so I assume the watchdog module is not loaded. Does anyone know how to load the hardware watchdog module on the Rock 5B? Any insights would be greatly appreciated.

Sincerely,
JHKrueger

1 Like

Hello JHKrueger,

Guess it’s months later, but I googled and found your message. After an hour with GPT-4, it suggested changing the dts settings for the kernel. I compiled my own kernel, so I could change the watchdog from “disabled” to “okay”:

git diff
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
index cf016527b918..3b2e9af44d66 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
@@ -5156,7 +5156,7 @@ wdt: watchdog@feaf0000 {
                clocks = <&cru TCLK_WDT0>, <&cru PCLK_WDT0>;
                clock-names = "tclk", "pclk";
                interrupts = <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>;
-               status = "disabled";
+               status = "okay";
        };

        spi0: spi@feb00000 {

Without changing the kernel, you can also find this option in /proc:

cat /proc/device-tree/watchdog@feaf0000/status

It should say either “disabled” before the change or “okay” after the change.

After making the change, you can compile the kernel, but the main bit is copying the dtb (compiled device tree) information to /boot so uboot can see it. From the kernel tree source:

cp ./arch/arm64/boot/dts/rockchip/rk3588-rock-5b*.dtb /boot/usr/lib/linux-image-$(uname -r)/rockchip/

If I recall, by following the kernel compilation instructions, all of these files are generated in the *.deb files.

After a reboot, /dev/watchdog and /dev/watchdog0 exists. Not that I’ve actually tried using it yet…