Please enable CONFIG_GPIO_WATCHDOG in kernel

In our verdin-imx8mp-based project, we use a GPIO-controlled watchdog chip as part of our safety circuit (to ensure safety critical hardware is shut off if the OS and/or application crashes). For this, we would like to use the gpio_wdt kernel driver, but it is not enabled in current TorizonOS images.

Could you enable this in official images? This needs the CONFIG_GPIO_WATCHDOG kernel config option.

Thanks,

Matthijs

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.129-6.5.0+git.6f8fd49366db #1-TorizonCore SMP PREEMPT Fri Dec 22 11:15:52 UTC 2023
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/c4484a9d61a31d7e8b6c2989106da6f78ecd96f97542847a846681442fed5631/0 dyndbg="file drivers/gpu/drm/imx/* +p; file drivers/phy/* +p; file drivers/regulator/* +p;"
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.5.0-build.8
Distro variant:           VARIANT="Docker"
Hostname:                 verdin-imx8mp-15404189
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus on carrierboardv1
Toradex version:          0058 V1.1B
Serial number:            15404189
Processor arch:           aarch64
------------------------------------------------------------

Greetings @matthijs,

When comparing kernel configs always check the latest software available. If you check our latest nightly images you can see this kernel config has already been enabled:

torizon@verdin-imx8mp-06849059:~$ zcat /proc/config.gz | grep CONFIG_GPIO_WATCHDOG
CONFIG_GPIO_WATCHDOG=m
torizon@verdin-imx8mp-06849059:~$ cat /etc/os-release
ID=torizon
NAME="TorizonCore"
VERSION="6.8.0-devel-20240927+build.668 (kirkstone)"
VERSION_ID=6.8.0-devel-20240927-build.668
PRETTY_NAME="TorizonCore 6.8.0-devel-20240927+build.668 (kirkstone)"
DISTRO_CODENAME="kirkstone"
BUILD_ID="668"
ANSI_COLOR="1;34"
VARIANT="Docker"

Best Regards,
Jeremias

W00ps, thanks for checking! I looked at the kernel config that I thought was the latest (in the toradex_5.15-2.2.x-imx branche here), which does not mention this config at all.

In any case, I’ll be sure to just check the nightly image next time. Thanks for the quick followup!

That kernel config you are looking at is for our base BSP. Torizon OS builds on-top of our BSP, this means additional kernel configs are added beyond this base defconfig. The additional kernel configs come from this kernel cache repository here: GitHub - toradex/toradex-kernel-cache: Patches and configuration for the Toradex kernel tree

Best Regards,
Jeremias

Hi @matthijs !

I see that this post was (quickly!) solved :slight_smile:

Please don’t forget to mark the most suitable message as the Solution for your question.

Thanks!

Best regards,

Ah, I had not seen that repo mentioned anywhere yet. Thanks for pointing it out, I’ve added it to our internal docs.

For future reference for anyone else interested in this kernel driver, the change was made four days ago here: features/base: enable watchdog device controlled through GPIO · toradex/toradex-kernel-cache@c8df646 · GitHub