[PATCH v2 0/3] watchdog: ma35d1: Add support for MA35D1 Watchdog
Zi-Yu Chen <[email protected]> Fri, 24 Jul 2026 17:14:24 +0800
| Newsgroups | org.kernel.vger.linux-watchdog,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
This patch series introduces watchdog timer support for the Nuvoton MA35D1 SoC platform. The MA35D1 watchdog timer hardware provides a programmable countdown timer capable of triggering a system reset upon timeout expiration or generating an interrupt to wake up the system from low-power states. Key features supported in this driver: - Standard watchdog operations (start, stop, ping, set_timeout). - Boot status detection to identify watchdog reset events (WDIOF_CARDRESET). - Power management support including suspend/resume and wakeup functionality. Series breakdown: - Patch 1: Add DT binding documentation for Nuvoton MA35D1 watchdog. - Patch 2: Add the watchdog driver implementation for MA35D1. - Patch 3: Add the watchdog node in the MA35D1 SoC DeviceTree file. Testing: - Tested on the Nuvoton MA35D1 development board using standard watchdog test utilities (e.g., watchdog-test from tools/testing/selftests/watchdog). Signed-off-by: Zi-Yu Chen <[email protected]> --- Changes in v2: - Added `watchdog_stop_on_reboot()` and `watchdog_stop_on_unregister()`. Addressed automated review feedback (Sashiko AI) and reviewer comments: - Remove redundant 'struct device *dev' from driver private structure. - Add ma35d1_wdt_wait_sync() after writing WDTEN to REG_WDT_CTL in ma35d1_wdt_start(). - Preserve wdt_dev->timeout when requested timeout exceeds hardware maximum. - Replace dev_pm_set_wake_irq with devm_pm_set_wake_irq. - Set WDOG_HW_RUNNING if watchdog was already enabled by bootloader. - Fix IRQ variable type from u32 to int. - Removed unnecessary `select MFD_SYSCON` from Kconfig. Note: RMW operations on REG_WDT_CTL have no runtime side-effects on W1C flags as IF/WKF are only utilized during PM suspend/resume window. Zi-Yu Chen (3): dt-bindings: watchdog: Add MA35D1 Watchdog binding watchdog: Add Nuvoton MA35D1 watchdog driver support arm64: dts: nuvoton: Add WDT node for MA35D1 SoC .../bindings/watchdog/nuvoton,ma35d1-wdt.yaml | 55 +++ arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 7 + drivers/watchdog/Kconfig | 10 + drivers/watchdog/Makefile | 1 + drivers/watchdog/ma35d1_wdt.c | 358 ++++++++++++++++++ 5 files changed, 431 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/nuvoton,ma35d1-wdt.yaml create mode 100644 drivers/watchdog/ma35d1_wdt.c -- 2.34.1