Before you ask for the module to be included as standard we should check that it works:
1. sudo rpi-update && sudo reboot
This will get you a 4.9.50+ kernel.
2. Download gpio_wdt.ko
. Note that this is compiled for a Pi 1 or Zero, not a Pi 2 or Pi 3, based on the kernel version string you posted.
Code: Select all
sudo mkdir /lib/modules/`uname -r`/kernel/drivers/watchdog
sudo cp gpio_wdt.ko /lib/modules/`uname -r`/kernel/drivers/watchdog
4. Use this modified overlay:
Code: Select all
compatible = "brcm,bcm2708";
target = <&soc>;
compatible = "linux,wdt-gpio";
gpios = <&gpio 19 0>;
hw_algo = "toggle";
hw_margin_ms = <500>; //Maximum time to reset wa
tchdog circuit (milliseconds).
Overwriting the existing watchdog, as the firstoverlay did, stops the usual reboot and poweroff commands working, so this overlay creates a second watchdog (/dev/watchdog1). Compile and install it as before, then reboot. You should find that /dev/watchdog1 exists, and that gpio_wdt is loaded.
5. Now run "sudo cat /dev/watchdog1", and pin 19 should start to pulse. After a minute with no further /dev/watchdog1 activity the pulsing will stop and the signal will remain high, telling the external watchdog hardware to cause a reboot.
Assuming all that works for you, you can then request that the module is included in standard kernel builds:
6. Go to https://github.com/raspberrypi/linux/issues
and click on the green "New Issue" button.
7. Ask for CONFIG_GPIO_WATCHDOG=m to be added to the standard configurations, explaining what it does and why this is useful.
8. I'll put on my other hat (pelwell), confirm that nobody objects, and add it.