drivers: watchdog: Add the OpenTitan watchdog driver

The OpenTitan watchdog driver is a watchdog driver that can be configured
with two stages: a watchdog "bark", which generates an interrupt, and a
watchdog "bite", which resets the system. The two-stage watchdog can be
enabled by setting CONFIG_WDT_MULTISTAGE=y. Otherwise, the driver
functions as a single-stage watchdog.

A callback function may be set for the bark interrupt through the
wdt setup interface, but will only be used if the two-stage watchdog is
enabled. It must be configured for the first watchdog stage.

The driver controls only the watchdog portion of the OpenTitan AON timer.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
4 files changed