[PATCH 0/6] watchdog: tegra_wdt: Add Tegra20 support

From: Artur Kowalski

Date: Tue Nov 10 2026 - 09:26:40 EST


The motivation is to improve recovery from kernel hangs which have been
steadily driving me to the doorsteps of psych ward for a few months.
Those events are rare, some happen at boot, others while trying to use
tablet for something real like reading PDFs, browsing web (to the extent
possible without working GPU accel), or just using it as thin client for
another device.

As all my attempts to hunt down even slightest hints of what went down
have fallen fouly (device just refuses hang with UART connected),
therefore this patch series is born in the hope it will finally enable
me and others to catch those bugs (use wdt and pstore).

This series adds Tegra20 watchdog support to tegra_wdt. Tegra20's boot
ROM hangs if VDE partition is off after warm reset (for normal reboots
this is handled by 8f0c714ad9be). The series offers two mitigations:

- By default, tegra_wdt stops the watchdog for good before the
partition is powered off for the first time, using a new PMC power
off notifier (patches 5 and 6). A watchdog started by the
bootloader still covers the early boot (until PMC driver comes up).

- Booting with tegra_pmc.vde_always_on=1 keeps the partition powered
on, so watchdog is fully usable at the expense of higher power
consumption.

This has been tested on ASUS TF101:

- with tegra_pmc.vde_always_on=1, watchdog stays on, the device has been
idling for more than hour (heartbeat 10 s, pinged by userspace every 8
s), no issues encountered. Suspend/resume works. On timeout device
reboots normally, u-boot still works after warm boot, Linux boots.
Tested both with userspace opening watchdog device without pinging,
and by crashing the kernel (panic=0).
- with tegra_pmc.vde_always_on=0 watchdog is permanently turned off when
the PMC driver powers off VDE partition for the first time, after that
userspace is denied opening the device with -EBUSY. No issues
encountered.

Another series for fixing some other issues with warm reboots (not
related to watchdog itself) will follow shortly.

Patch 4 got flagged by checkpatch (WARNING: ENOSYS means 'invalid
syscall nr' and nothing else). I kept it as-is to keep consistency with
existing stubs. If this is not desirable just tell me.

---
Patch 3 depends on patch 1 and should not be merged before or watchdog
driver will conflict with clocksource driver.

To: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxx>
To: Thierry Reding <thierry.reding@xxxxxxxxxx>
To: Jonathan Hunter <jonathanh@xxxxxxxxxx>
To: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>
To: Guenter Roeck <linux@xxxxxxxxxxxx>
To: Jonathan Corbet <corbet@xxxxxxx>
To: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
To: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
To: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-tegra@xxxxxxxxxxxxxxx
Cc: linux-watchdog@xxxxxxxxxxxxxxx
Cc: linux-doc@xxxxxxxxxxxxxxx
Cc: clamor95@xxxxxxxxx
Signed-off-by: Artur Kowalski <arturkow2000@xxxxxxxxx>

---
Artur Kowalski (6):
clocksource/drivers/timer-tegra: Keep Tegra20's watchdog timers free
watchdog: tegra_wdt: Move SoC specific parts into match data
watchdog: tegra_wdt: Support Tegra20
soc/tegra: pmc: Add an option to keep the VDE partition on
soc/tegra: pmc: Add a partition power off notifier
watchdog: tegra_wdt: Stop on Tegra20 VDE power off

Documentation/admin-guide/kernel-parameters.txt | 12 +
Documentation/watchdog/watchdog-parameters.rst | 5 +
drivers/clocksource/timer-tegra.c | 40 ++-
drivers/soc/tegra/pmc.c | 158 +++++++++++-
drivers/watchdog/tegra_wdt.c | 330 +++++++++++++++++++++++-
include/soc/tegra/pmc.h | 19 ++
6 files changed, 540 insertions(+), 24 deletions(-)
---
base-commit: 05441d697f7f9a927264f4058cbbc6a03dfcac9d
change-id: 20261108-t20-for-upstream-497bc765188c

Best regards,
--
Artur Kowalski <arturkow2000@xxxxxxxxx>