Commit graph

445 commits

Author SHA1 Message Date
Yurii Lozynskyi
c09edc10fc drivers: watchdog: Shift watchdog to pdl
Shift ifx_cat1 watchdog driver to using pdl instead of hal calls

Signed-off-by: Yurii Lozynskyi <yurii.lozynskyi@infineon.com>
2025-09-06 18:16:55 -04:00
Luc BEAUFILS
d31f0138ad drivers: wdt_iwdg_stm32.c: freeze watchdog in debug mode for mp2x SoCs
The IWDG4 is on the APB3 bus on STM32MP2x SoCs. When the system is
in debug mode, the watchdog should be frozen to prevent it from
expiring and resetting the system during debugging sessions.

Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
2025-09-02 15:53:41 +02:00
Luc BEAUFILS
43b63b13e6 drivers: wdt_wwdg_stm32: freeze watchdog in debug mode for mp2x SoCs
Like the H7x series, the MP2x series has a WWDG1 peripheral in the APB3
bus. The MP2 has the same LL function to freeze the watchdog in debug
mode.

Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
2025-09-02 15:53:41 +02:00
Aksel Skauge Mellbye
3f7e614da6 drivers: watchdog: gecko: Fix API corner cases
Properly return the correct error codes when the watchdog API
is misused. Fail timeout install if WDT_FLAG_RESET_CPU_CORE is
set, a watchdog reset will at a minimum cause a soft reset of
the entire SoC.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-08-28 00:40:04 +02:00
Raffael Rostagno
1bd2734991 drivers: wdt: esp32h2: Add support
Add WDT support for ESP32-H2.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-08-26 22:07:36 +02:00
Yves Wang
201f70bfa9 drivers: watchdog: Make clock divider optional
Some SoCs did not provide ewm clock divider

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-08-22 09:45:18 +02:00
Francois Ramu
c32b481413 drivers: watchdog: stm32 wwdg check callback before calling
Check that the callback function exists before calling it
inside the ISR.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-08-18 13:07:00 +02:00
Lucien Zhao
8f94c91c5b drivers: watchdog: wdt_nxp_ewm.c: add clk_sel feature for ewm IP
emw clk designed on RT1180 can be chosen by CLKCTRL register,
add code to get sel from dts and configure it in driver.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-08-08 11:53:18 +03:00
Khoa Nguyen
3aa72e4e9e drivers: Update p_context for all Renesas drivers
The p_context no longer has the const type, so all
Renesas-supported drivers need to be updated accordingly.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-08-08 11:52:13 +03:00
Ayush Singh
15377632c0 drivers: watchdog: Add ti rti driver
- This driver is used in k3 generation CPUs from TI.
- Does not support callbacks right now.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-08-04 11:50:20 +01:00
Alvis Sun
5b1d16dd6f drivers: wdt: npcx: add wdt driver support for npck3
Enables the extended Watchdog Timer driver for npck3.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2025-07-19 15:36:47 -04:00
Hao Luo
e6f986f907 drivers: watchdog: bugfix for ambiq wdt clk select
This commit fixed the watchdog clock select error in
ambiq driver.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-07-19 13:49:29 -04:00
Declan Snyder
efdd8580ca soc: nxp: Flatten MCX SOCs
Turn MCX series into families.

Reasoning:
 1. The MCX SOCs are quite different from each other and having them all
    under one family in the HWMv2 hierarchy is fruitless because there
    are so many differences that it is confusing to try to introduce
    family-level code and configs since they would each only apply to a
    subset of the series. There is almost nothing that can be shared
    between all of them. Which is why there are comments in the MCX
    family files saying not to put anything in them. This is a technical
    waste.
 2. Therefore, turning all of them into families is almost 0 effort and
    makes sense. It will allow these different types of MCX to be
    further subdivided into series in the future as the MCX portfolio
    expands and such division will be necessary as new SOCs within each
    letter family are released.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-19 13:25:29 -04:00
Harini T
e343379510 drivers: watchdog: Add Xilinx Window Watchdog driver support
Xilinx Window Watchdog driver uses window watchdog mode. Window watchdog
timer(WWDT) contains closed(first) and open(second) window with 32bit
width each. Write to the watchdog timer within predefined window periods
of time. This means a period that is not too soon and a period that is
not too late. The WWDT has to be restarted within the open window time.
If the software tries to restart WWDT outside of open window time
period, it generates a SoC reset.

Signed-off-by: Harini T <harini.t@amd.com>
2025-07-19 10:00:33 +02:00
David Leach
a132ebfe17 drivers: watchdog: Add enableWait setting for wdt_mcux_imx_wdog
When WDT_OPT_PAUSE_IN_SLEEP option is passed in set enableWait flag
in addition to the enableStop.

Fixes #86437

Signed-off-by: David Leach <david.leach@nxp.com>
2025-07-03 11:57:17 -05:00
Pieter De Gendt
f38527035a drivers: watchdog: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Steven Chang
03227c3520 drivers: watchdog: watchdog driver
Add watchdog driver for ENE KB106X

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Sergei Ovchinnikov
645159dc26 drivers: npm13xx: add support for nPM1304
Add support for nPM1304 in the npm13xx drivers. The nPM1304 supports
different voltage and current ranges which are handled through the
initialization macros.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2025-06-23 16:19:43 +01:00
Sergei Ovchinnikov
89b8383633 drivers: npm13xx: rename npm1300 to npm13xx
Rename npm1300 to npm13xx in function names, documentation, etc. where
applicable for all the npm13xx drivers

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2025-06-23 16:19:43 +01:00
Sergei Ovchinnikov
fb007db50a drivers: npm1300: rename to npm13xx
Rename npm1300 drivers and header files to npm13xx to allow for usage
with other nPM13xx product variants.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2025-06-23 16:19:43 +01:00
cyliang tw
bf86f1f1c0 drivers: watchdog: support numaker m55m1x
Modify driver code to support m55m1x series.
Update m55m1x.dtsi, to add wdt node for wdt driver support.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2025-06-18 09:29:20 -04:00
Benjamin Cabé
3096ea0216 watchdog: shell: adopt SHELL_HELP
have wdt shell commands use the new SHELL_HELP macro

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Sylvio Alves
e0a915a178 soc: espressif: convert rtc peripheral to clock subsystem
Current ESP32 clock system is mixed with RTC labeling/registers,
but it doesn't implement a real-time clock (RTC) driver.

To avoid confusion and allow adding a proper RTC driver later,
this commit renames the existing RTC interface to CLOCK and make
it as a subsystem without any peripheral attached to it.

This better reflects its actual purpose as a general clock controller.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-02 17:38:08 +02:00
5c2e2b7edc drivers: wch: fix the ch32vfun.h path after the recent HAL update
https://github.com/zephyrproject-rtos/zephyr/pull/87125 renamed the
`ch32vfun.h` header but missed some of the drivers. Fix.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-28 05:54:28 +02:00
Alex Rodriguez
64b8d9e0cf drivers: watchdog: wdt_mcux_wwdt: Add PM support for low power modes
Enables sleep mode (PM3) on RW61x. The driver
re-enables the wdt on wake-up based on the previous
configuration. Note that the wdt counter value always
resets to the max window value on wake-up

Signed-off-by: Alex Rodriguez <alejandro.rodriguezlimon@nxp.com>
2025-05-16 19:01:08 +02:00
Furkan Akkiz
ccc26a53bb drivers: watchdog: Update driver to enable WDT for MAX32650 SoC
This commit changes clock property of watchdog to optional and updates
driver according to this change.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-05-14 11:03:22 +01:00
Emilio Benavente
5fd6715917 drivers: watchdog: Added Driver for the EWM
Added a driver for the External Watchdog Driver

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-05-09 01:39:56 +02:00
Stoyan Bogdanov
741879b362 drivers: watchdog: cc23x0: Add support for watchdog
Because of hardware limitations watchdog driver supports:
 * Start Watchdog
 * Feed Watchdog

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2025-05-07 00:01:38 +02:00
7f21dc2dfa drivers: watchdog: add a CH32V00x Independent Watchdog (IWDT) driver
The CH32V003 has a built-in watchdog that runs off the low speed
internal oscillator. Add a driver.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-04-26 10:55:17 +02:00
Hao Luo
706770b50f drivers: watchdog: Add support for Apollo510 watchdog
This commit adds support for Apollo510 SoC in ambiq wdt driver

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-21 20:04:31 +02:00
Hao Luo
6f4b92d64d soc: ambiq: Optimize the inclusion relationship of header files
Optimized the inclusion relationship of header files

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-17 09:06:18 +02:00
Ruibin Chang
41bc8efbee drivers/watchdog/it51xxx: implement watchdog driver
Implement watchdog driver for ITE it51xxx series chip.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2025-04-15 09:28:19 +02:00
Raffael Rostagno
4b8dc5f3ff drivers: esp32: Update for shared intc
Drivers update to use shared interrupt allocator for Xtensa
and RISCV devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-04-02 19:02:27 +02:00
Mathieu Choplain
d0639fedcf drivers: watchdog: iwdg_stm32: add support for STM32WB0
Add support for the STM32WB0 series to the existing STM32 driver for
Independent Watchdog peripheral.

NOTE: this commit only includes basic support for the watchdog.
STM32WB0 specificities such as the different possible clock sources, LSI
frequency measurement or window support are left for future implementation.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-03-22 13:38:22 +01:00
The Nguyen
22b9a06327 soc: renesas: ra: enable wdt support on RA4M1
Add config to enable wdt after reset reflect wdt Kconfig value

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-03-18 08:26:40 +01:00
The Nguyen
710fb596df drivers: watchdog: initial support for watchdog driver on Renesas RA family
First commit to add support for Renesas RA watchdog driver

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-03-18 08:26:40 +01:00
Sai Santhosh Malae
c6198008f5 drivers: watchdog: siwx91x: Add siwx91x WDT driver
Implement Watchdog driver for siwx91x device

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-03-17 13:56:24 +01:00
Jordan Yates
f4fda91e0b watchdog: cmsdk_apb: don't reconfigure after start
Do not allow attempting to install new channels after the watchdog has
been started.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-15 13:07:05 +01:00
Jordan Yates
1f02f39b9e watchdog: cmsdk_apb: reset state before starting
Reset the watchdog back to the initial state before enabling the
expiry interrupt. This prevents the watchdog expiring immediately if
there is a long gap between `wdt_install_timeout` and `wdt_setup`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-15 13:07:05 +01:00
Lucien Zhao
d4f62b7c38 drivers: watchdog: add rt700_cm33_cpu0/1 support when getting wwdt clock
add rt700_cm33_cpu0/1 support when getting wwdt clock

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-03-14 17:53:53 +01:00
Titan Chen
865b8aa91d drivers: wdog: add Realtek RTS5912 wdog driver
Port Realtek RTS5912 wdog driver to Zephyr.

Signed-off-by: Titan Chen <titan.chen@realtek.com>
2025-03-07 19:52:17 +01:00
Adrien MARTIN
355143b4ab drivers: wdt_gecko: wdt opt pause in sleep also in EM1 mode
default watchdog initialization disable counting in EM1, EM2 and EM3
modes. If user use the WDT_OPT_PAUSE_IN_SLEEP flag via the watchdog api,
all 3 EM modes must take this flag into account to avoid wdt count
being frozen if we don't want to.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2025-02-25 07:56:43 +01:00
Jun Lin
6c3b617bca drivers: watchdog: npcx: fix T0 timer reload procedure
The correct procedure to reload the T0 timer is:
    1. Load TWDT0 register with the new value or write 1 to RST bit in
       T0CSR register to load the old value.
    2. Wait until RST bit in T0CSR register becomes 1.
    3. Wait until RST bit in T0CSR register becomes 0.
The current watchdog driver misses step 2.
Fix the issue in this commit.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-02-18 05:32:22 +01:00
Fabio Baltieri
b5c6b6c4e5 wdt_shell: add shell device filtering
Add shell device filtering using DEVICE_API_IS.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-01-29 04:17:47 +01:00
Ruijia Wang
b1395eabce drivers: rtwdog: add NXP rtwdog driver
Port NXP rtwdog driver to Zephyr.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2025-01-25 20:07:05 +01:00
Gerson Fernando Budke
0cf7fd1023 drivers: watchdog: atmel: Introduce sam4l wdt
Introduce sam4l watchdog configuration. This entry is necessary to
select proper watchdog configuration at board init due to #83429.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-01-24 22:08:29 +01:00
Michał Stasiak
b578ffa49a drivers: watchdog: nrfx: add synchronization after stop
In order to ensure that watchdog channels are freed in proper
driver state, synchronization in form of simple loop needs
to be added after stopping. In no irq variant, it is already done
on nrfx level. NRFY function can be replaced by NRFX one in
the future.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-01-14 08:59:04 +01:00
Jordan Yates
5faf471ce0 drivers: watchdog: stm32 iwdg: constant to config
Move the instance pointer, which is a constant value, into a dedicated
config structure. At the same time, remove the type casting macros as
this pattern has been removed from the tree for some years now.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-10 11:58:31 +01:00
Jordan Yates
2509de7d3e drivers: watchdog: stm32 iwdg: explicit single channel
The STM32 IWDG is a single channel watchdog, and therefore should be
returning `-ENOMEM` when a user attempt to install additional timeouts,
instead of overwriting previous values.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-10 11:58:31 +01:00
Neil Chen
d7f0fbe7db drivers: watchdog: add wdt support on mcxa156 board
Update wdt clock frequency get function for mcxa156

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-08 01:28:51 +01:00