Skip to content

Commit 7d7267a

Browse files
svanheuleWim Van Sebroeck
authored andcommitted
watchdog: Add Realtek Otto watchdog timer
Realtek MIPS SoCs (platform name Otto) have a watchdog timer with pretimeout notifitication support. The WDT can (partially) hard reset, or soft reset the SoC. This driver implements all features as described in the devicetree binding, except the phase2 interrupt, and also functions as a restart handler. The cpu reset mode is considered to be a "warm" restart, since this mode does not reset all peripherals. Being an embedded system though, the "cpu" and "software" modes will still cause the bootloader to run on restart. It is not known how a forced system reset can be disabled on the supported platforms. This means that the phase2 interrupt will only fire at the same time as reset, so implementing phase2 is of little use. Signed-off-by: Sander Vanheule <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/6d060bccbdcc709cfa79203485db85aad3c3beb5.1637252610.git.sander@svanheule.net Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 1da9bf7 commit 7d7267a

File tree

4 files changed

+405
-0
lines changed

4 files changed

+405
-0
lines changed

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16142,6 +16142,13 @@ S: Maintained
1614216142
F: include/sound/rt*.h
1614316143
F: sound/soc/codecs/rt*
1614416144

16145+
REALTEK OTTO WATCHDOG
16146+
M: Sander Vanheule <[email protected]>
16147+
16148+
S: Maintained
16149+
F: Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml
16150+
F: drivers/watchdog/realtek_otto_wdt.c
16151+
1614516152
REALTEK RTL83xx SMI DSA ROUTER CHIPS
1614616153
M: Linus Walleij <[email protected]>
1614716154
S: Maintained

drivers/watchdog/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,19 @@ config RTD119X_WATCHDOG
941941
Say Y here to include support for the watchdog timer in
942942
Realtek RTD1295 SoCs.
943943

944+
config REALTEK_OTTO_WDT
945+
tristate "Realtek Otto MIPS watchdog support"
946+
depends on MACH_REALTEK_RTL || COMPILE_TEST
947+
depends on COMMON_CLK
948+
select WATCHDOG_CORE
949+
default MACH_REALTEK_RTL
950+
help
951+
Say Y here to include support for the watchdog timer on Realtek
952+
RTL838x, RTL839x, RTL930x SoCs. This watchdog has pretimeout
953+
notifications and system reset on timeout.
954+
955+
When built as a module this will be called realtek_otto_wdt.
956+
944957
config SPRD_WATCHDOG
945958
tristate "Spreadtrum watchdog support"
946959
depends on ARCH_SPRD || COMPILE_TEST

drivers/watchdog/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ obj-$(CONFIG_IMGPDC_WDT) += imgpdc_wdt.o
169169
obj-$(CONFIG_MT7621_WDT) += mt7621_wdt.o
170170
obj-$(CONFIG_PIC32_WDT) += pic32-wdt.o
171171
obj-$(CONFIG_PIC32_DMT) += pic32-dmt.o
172+
obj-$(CONFIG_REALTEK_OTTO_WDT) += realtek_otto_wdt.o
172173

173174
# PARISC Architecture
174175

0 commit comments

Comments
 (0)