[PATCH 0/5] realtek: Use WDT for system restart

Sander Vanheule sander at svanheule.net
Thu Nov 4 07:55:39 PDT 2021

Backport and enable the Realtek Otto watchdog driver for enhanced system
reliability. The watchdog driver can also be used to restart the system,
but that requires the _machine_restart to be removed.

Removing _machine_restart has the added benefit of enabling the use of other
restart handlers in addition to the watchdog restart, such as gpio-restart,
which may be more reliable than the SoCs internal reset circuitry. Removing the
override also brings the current target closer to upstream, which will become
relevant when switching to the next LTS kernel.

This series contains the watchdog driver as currently submitted upstream,
without the devicetree bindings. If the driver gets accepted before this series
is merged, I can already update it with the final version. Otherwise, a
follow-up will be sent to replace the patch.

The WDT driver was previously tested on my Netgear GS110TPPv1, Zyxel GS1900-8,
and Zyxel XGS1250-12. Testers with other devices should ensure that their
system can still restart after applying the complete series.

Sander Vanheule (5):
  realtek: Consolidate bootargs
  realtek: Add Lexra bus clock
  realtek: backport Realtek Otto WDT driver
  realtek: Add watchdog node
  realtek: Remove _machine_restart and _machine_halt

 target/linux/realtek/config-5.10              |   2 +
 .../dts-5.10/rtl8380_netgear_gigabit.dtsi     |   4 -
 .../dts-5.10/rtl8380_zyxel_gs1900.dtsi        |   4 -
 .../dts-5.10/rtl8382_allnet_all-sg8208m.dts   |   4 -
 .../dts-5.10/rtl8382_d-link_dgs-1210-10p.dts  |   4 -
 .../dts-5.10/rtl8382_d-link_dgs-1210.dtsi     |   4 -
 .../dts-5.10/rtl8382_inaba_aml2-17gp.dts      |   4 -
 target/linux/realtek/dts-5.10/rtl838x.dtsi    |  22 +-
 target/linux/realtek/dts-5.10/rtl930x.dtsi    |  16 +-
 .../files-5.10/arch/mips/rtl838x/setup.c      |  85 ----
 ...hdog-add-realtek-otto-watchdog-timer.patch | 456 ++++++++++++++++++
 ...date-dependency-for-realtek-otto-wdt.patch |  17 +
 ...308-otto-wdt-fix-missing-math-header.patch |  13 +
 13 files changed, 524 insertions(+), 111 deletions(-)
 create mode 100644 target/linux/realtek/patches-5.10/100-watchdog-add-realtek-otto-watchdog-timer.patch
 create mode 100644 target/linux/realtek/patches-5.10/307-wdt-update-dependency-for-realtek-otto-wdt.patch
 create mode 100644 target/linux/realtek/patches-5.10/308-otto-wdt-fix-missing-math-header.patch


More information about the openwrt-devel mailing list