Commit graph

425 commits

Author SHA1 Message Date
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
Jordan Yates
feaf21f80c drivers: watchdog: kconfig option for callback support
Add a non-configurable option which drivers can select to indicate that
they do not support callbacks on watchdog expiry.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-06 08:48:41 +01:00
TOKITA Hiroshi
9043e651ef drivers: watchdog: rpi_pico: Add support for RP2350
The watchdog register configuration of RP2350 differs from that
of RP2040, so we make fit that.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Yishai Jaffe
1b4cef325b shell: use shell_device_get_binding
Use shell_device_get_binding() instead of device_get_binding() so that
we get the device based on its name and in addition by its label.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-18 15:32:10 +01:00
Audun Korneliussen
66ccc2e241 drivers: watchdog: npm2100: Add driver for npm2100 pmic
Add watchdog driver for npm2100 pmic.

This pmic has one timer that can be used for multiple functions,
including a watchdog that can reset or power-cycle connected devices.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-12-04 14:19:53 -05:00
Manuel Argüelles
dbd20bd039 dts: bindings: rename nxp,kinetis-wdog32 compatible
Rename "nxp,kinetis-wdog32" compatible to "nxp,wdog32" to remove the
device family from its name.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-12-02 22:06:39 +00:00
Pieter De Gendt
345f7f1155 drivers: watchdog: Place API into iterable section
Add wrapper DEVICE_API macro to all wdt_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 23:04:34 +01:00
Francois Ramu
278d8e298d drivers: watchdog: stm32 wwdg enable Early WKUP int with pclk
Enable the early WakeUp Interrupt at init, once the WWDG instance
is correclty cloked. Else deadlock can occur.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-02 14:24:51 +01:00
Marcio Ribeiro
63ed84240f driver: wdt: esp32: remove incorrect status check inside isr
Reverts incorrect changes introduced by #79821

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-11-27 21:08:07 +00:00
Marcio Ribeiro
65547044e6 drivers: touch/rtc/wdt: esp32: fix conflict among device drivers
allows use of touch_sensor, rtc_counter, and wdt simultaneously by enabling
ESP_INTR_FLAG_SHARED when calling esp_intr_alloc()

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-11-25 14:42:32 +01:00
Savent Gate
4e879ab518 drivers: watchdog: wdt_dw: add missing header
Needs zephyr/irq.h to compile it.

Signed-off-by: Savent Gate <savent_gate@outlook.com>
2024-10-26 11:30:18 +02:00
Benjamin Björnsson
0d9aa5a68c drivers: watchdog: wdt_counter: Fix overflow warning
Cast variable to uint64_t to ensure the multiplication is
performed using 64-bit arithmetic. Resolves static code
analysis warning from Coverity.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2024-10-24 17:51:08 +02:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Pisit Sawangvonganan
847a4eaad2 style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Sylvio Alves
8233b70ece espressif: clean up unused code
Remove all entries that as not being used.
This also update hal to re-enable warning flags
as such as -Wno-unused-variable.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-09 13:55:39 -04:00
Erwan Gouriou
853b6feb52 drivers: stm32: Make some config symbols menuconfig symbols
Move some STM32 drivers  related Kconfig symbols from `config`
to `menuconfig` when driver options depends on these symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-05 16:58:04 -04:00
Lukasz Stepnicki
83e3c2eb78 drivers: watchdog: nrfx wdt without IRQs
Add config option to build nrfx wdt driver with
NRFX_WDT_CONFIG_NO_IRQ enabled.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-09-03 14:39:37 +01:00
Raffael Rostagno
90c6106926 drivers: esp32: Interrupts flags configuration
Allows configuring interrupts flags in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
bb746cdcc5 drivers: esp32: esp_intr_alloc return condition
Add checks to return value of esp_intr_alloc to avoid drivers init
returning 0 when interrupt allocation fails.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
0b3a34cdca drivers: esp32: Interrupts priority configuration
Allows configuring interrupts priority in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Pisit Sawangvonganan
1bcae0ea9f style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00