notes

The JH7110 watchdog: how the block counts, and what was read

Name: provisional, minted 2026-10-24 (UTC) by comments/929-crates-18.

crates/jh7110_watchdog holds the logic (the offsets, the sequences, the arithmetic and the device-tree query), and kernel/src/drivers/jh7110_watchdog.rs walks its sequences. Milestone 593 (a wedged kernel resets itself, through a watchdog that does not need asking) is the plan and holds the bench step.

How the block counts

The block is SP805-like: its registers follow the layout of Arm's SP805 watchdog (Arm DDI 0270), which it resembles and is not shown to be. Software loads a count of core-clock ticks and the counter runs down. At zero it raises its interrupt and reloads. At zero again with the interrupt still raised, it asserts reset. Clearing the interrupt reloads the counter, and that is the pet.

So the reset lands 2 x LOAD / f after the last pet. load_for halves the time a caller asks for, the way Linux's double_timeout variant does, so the number a caller writes is the time to the reset.

Every register write is refused until 0x1ACCE551 is written to the lock word. Each sequence in the crate unlocks first and locks last. A write before the unlock is dropped silently, and a sequence that ends unlocked leaves the timer open to any stray store.

The core clock is wdt_core, a gate of the 24 MHz oscillator. So the longest reset the block can arm is about 357 s (max_reset_after_seconds).

Sources

All were read on 2026-10-20 (UTC).

Limits