This driver supports some arm and arm64 boards equipped with "snps,dw-wdt"-compatible watchdog device. Tested on RK3399-based board (RockPro64). There are some nuances still:
# Once started watchdog device cannot be stopped. Interrupt handler has mode to kick watchdog even when software does not do it properly. This can be controlled via sysctl: `dev.dwwdt.prevent_restart`. Also - driver handles system shutdown and prevents from restart when system is asked to reboot.
Bibliography:
- RK3399 TRM Part 1 (it lacks details on clock configuration)
Other implementations:
- OpenBSD driver (it uses watchdog device to reset system): https://github.com/openbsd/src/blob/master/sys/dev/fdt/dwdog.c
- Linux driver (there is no 1:1 compatibility right now, but Linux folks have the same problem with clock configuration): https://github.com/torvalds/linux/blob/master/drivers/watchdog/dw_wdt.c