| #
bf491f27 |
| 18-Jul-2025 |
Clément Le Goffic <clement.legoffic@foss.st.com> |
drivers: stm32_iwdg: move setup function in probe
Setup and probe are meaning mostly the same. Moving the `setup` function content in probe improves readability.
Signed-off-by: Clément Le Goffic <c
drivers: stm32_iwdg: move setup function in probe
Setup and probe are meaning mostly the same. Moving the `setup` function content in probe improves readability.
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
4a62f44c |
| 13-May-2025 |
Clément Le Goffic <clement.legoffic@foss.st.com> |
drivers: stm32_iwdg: change prescaler value to 1024
Increase the prescaler value to 1024 in order to increase watchdog timeout value. ((2^12) * 1024) / 32767 = 128 It will allow watchdog timeout up
drivers: stm32_iwdg: change prescaler value to 1024
Increase the prescaler value to 1024 in order to increase watchdog timeout value. ((2^12) * 1024) / 32767 = 128 It will allow watchdog timeout up to 128s. Also multiply the IWDG_TIMEOUT_US by 4, same as the prescaler value.
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
b49d10f7 |
| 06-Feb-2025 |
Patrick Delaunay <patrick.delaunay@foss.st.com> |
drivers: stm32_iwdg: reload for stopped watchdog
For stopped watchdog, use the early interruption to reload the watchdog without panic, the driver uses ULONG_MAX as an infinite reload indication.
S
drivers: stm32_iwdg: reload for stopped watchdog
For stopped watchdog, use the early interruption to reload the watchdog without panic, the driver uses ULONG_MAX as an infinite reload indication.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
f6ee86ec |
| 05-Sep-2024 |
Clément Le Goffic <clement.legoffic@foss.st.com> |
drivers: stm32_iwdg: add support for extended watchdog timeout
This commit enhances the STM32 IWDG driver to support extended watchdog timeouts. It introduces new fields in the `stm32_iwdg_device` s
drivers: stm32_iwdg: add support for extended watchdog timeout
This commit enhances the STM32 IWDG driver to support extended watchdog timeouts. It introduces new fields in the `stm32_iwdg_device` structure, updates the interrupt handler to handle multiple refresh cycles, and improves the timeout handling logic to manage and calculate extended timeouts accurately.
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
dff60fe8 |
| 21-May-2024 |
Clément Le Goffic <clement.legoffic@foss.st.com> |
drivers: stm32_iwdg: add stop watchdog handler
Implement .stop watchdog handler in order to allow the platform to `halt` well.
The platform does not allow a way to stop an IWDG once started but a s
drivers: stm32_iwdg: add stop watchdog handler
Implement .stop watchdog handler in order to allow the platform to `halt` well.
The platform does not allow a way to stop an IWDG once started but a solution exists. We disable the platform reset ability of the IWDG we use and the IRQ associated if the reset property is present in the DT.
Be careful, on STM32MP2 platforms, in A35TDCID, the system reset of the IWDG1 cannot be disabled. Therefore, only the IWDG2 can be stopped. The same behavior applies for IWDG3 in M33TDCID, you'll have to use the IWDG4.
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
235baec9 |
| 18-Dec-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: disable clocks during PM standby
Disable STM32 IWDG clock during low power state.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Clément Le Goffi
drivers: stm32_iwdg: disable clocks during PM standby
Disable STM32 IWDG clock during low power state.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
e4b8d29a |
| 18-Dec-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: early watchdog interrupt
When the secure device tree defines an interrupt, register a handler to notify secure world of a possible watchdog expiration.
Signed-off-by: Etienne C
drivers: stm32_iwdg: early watchdog interrupt
When the secure device tree defines an interrupt, register a handler to notify secure world of a possible watchdog expiration.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
5c7ebea7 |
| 16-May-2025 |
Antonio Borneo <antonio.borneo@foss.st.com> |
drivers: stm32_iwdg: check for error on clk_enable during probe
Check for the error returned by clk_enable() during the driver's probe. While there, if watchdog is started but we cannot control it,
drivers: stm32_iwdg: check for error on clk_enable during probe
Check for the error returned by clk_enable() during the driver's probe. While there, if watchdog is started but we cannot control it, trigger panic instead of return error. This also avoids adding useless clk_disable() in the error exit path.
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
eb47832f |
| 15-May-2023 |
Antonio Borneo <antonio.borneo@foss.st.com> |
drivers: stm32_iwdg: add get_timeleft watchdog handler
Implement .get_timeleft() watchdog operation handler for non-secure world to query the watchdog device state. System time is logged at each wat
drivers: stm32_iwdg: add get_timeleft watchdog handler
Implement .get_timeleft() watchdog operation handler for non-secure world to query the watchdog device state. System time is logged at each watchdog refresh to estimate time remaining before the watchdog elapses.
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
c501c3e1 |
| 18-Dec-2023 |
Lionel Debieve <lionel.debieve@foss.st.com> |
drivers: stm32_iwdg: remove OTP access in driver
Now we know if the watchdog is running by reading the hardware, there is no need to read the OTP fuses related to the watchdog. This allows removing
drivers: stm32_iwdg: remove OTP access in driver
Now we know if the watchdog is running by reading the hardware, there is no need to read the OTP fuses related to the watchdog. This allows removing platform function stm32_get_iwdg_otp_config() and consequently stm32_iwdg.h header file.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
3d5793d2 |
| 18-Dec-2023 |
Antonio Borneo <antonio.borneo@foss.st.com> |
drivers: stm32_iwdg: probe if watchdog is running
Read from the hardware whether watchdog is already running when core initializes. Relax timeout from 1 to 10ms to let the watchdog warm-up when enab
drivers: stm32_iwdg: probe if watchdog is running
Read from the hardware whether watchdog is already running when core initializes. Relax timeout from 1 to 10ms to let the watchdog warm-up when enabled.
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
a096e2d9 |
| 09-Dec-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: remove useless device list
STM32 watchdog driver does not manage several instances of IWDG hence remove the useless code. To simplify code, remove stm32_iwdg_register() local fu
drivers: stm32_iwdg: remove useless device list
STM32 watchdog driver does not manage several instances of IWDG hence remove the useless code. To simplify code, remove stm32_iwdg_register() local function.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
7178041a |
| 22-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: remove registering to shared_resources driver
Remove registering of STM32 IWDG driver to platform shared_resources driver that is deprecated since integration of the firewall fr
drivers: stm32_iwdg: remove registering to shared_resources driver
Remove registering of STM32 IWDG driver to platform shared_resources driver that is deprecated since integration of the firewall framework in stm32mp1 platforms. Since this integration, OP-TEE only consider IWDG secure instances hence remove the useless code for IWDG assigned to non-secure world.
As watchdog drivers are only used when registering to OP-TEE watchdog services (CFG_WDT_SM_HANDLER) simplify the code to always register IWDG instance.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
2f9b82fa |
| 18-Dec-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: enable state helper functions
Add iwdg_wdt_set_enabled() to register the watchdog is activated and rename is_enable() to iwdg_wdt_is_enabled() for consistency.
Acked-by: Jerome
drivers: stm32_iwdg: enable state helper functions
Add iwdg_wdt_set_enabled() to register the watchdog is activated and rename is_enable() to iwdg_wdt_is_enabled() for consistency.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
36d2a417 |
| 18-Dec-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: enable bus clock once for all
Enable STM32 IWDG driver bus clock together with the IWDG kernel clock when the driver is initialized. This clock is needed to propagate IWDG early
drivers: stm32_iwdg: enable bus clock once for all
Enable STM32 IWDG driver bus clock together with the IWDG kernel clock when the driver is initialized. This clock is needed to propagate IWDG early interrupt to the system.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
show more ...
|
| #
b2f17e87 |
| 18-Dec-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: rename bus clock to clk_pclk
Rename STM32 IWDG watchdog bus clock clk_pclk, matching the reference manual naming instead of clock.
Acked-by: Jerome Forissier <jerome.forissier@
drivers: stm32_iwdg: rename bus clock to clk_pclk
Rename STM32 IWDG watchdog bus clock clk_pclk, matching the reference manual naming instead of clock.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
ec797732 |
| 18-Dec-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: remove stm32_iwdg_refresh()
Remove unused stm32_iwdg_refresh() intended to refresh all registered watchdog devices.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Rev
drivers: stm32_iwdg: remove stm32_iwdg_refresh()
Remove unused stm32_iwdg_refresh() intended to refresh all registered watchdog devices.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
fc9063dd |
| 15-Dec-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: provide timeout range
Implement watchdog service init handler that is needed by U-Boot to get min/max timeout range.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Re
drivers: stm32_iwdg: provide timeout range
Implement watchdog service init handler that is needed by U-Boot to get min/max timeout range.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
show more ...
|
| #
077bbb8a |
| 15-Dec-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: stm32_iwdg: fix timeout configuration
Fix test on watchdog refresh command success used to program the watchdog timeout.
Fixes: 0bdd7f5ba821 ("drivers: stm32_iwdg: implementation of indepe
drivers: stm32_iwdg: fix timeout configuration
Fix test on watchdog refresh command success used to program the watchdog timeout.
Fixes: 0bdd7f5ba821 ("drivers: stm32_iwdg: implementation of independent watchdog") Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
9e3c57c8 |
| 28-Feb-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: move related content from dt.h to dt_driver.h
Moves so-called dt_driver related declarations and definitions from dt.h to dt_drivers.h. Incidentally adds an inline description to en
core: dt_driver: move related content from dt.h to dt_driver.h
Moves so-called dt_driver related declarations and definitions from dt.h to dt_drivers.h. Incidentally adds an inline description to enum dt_driver_type. This change clarifies when a source file shall include dt.h and/or dt_driver.h.
This change updates driver source files to include none, one or both of these header files where applicable.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
f354a5d8 |
| 05-Apr-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Cheval
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
0bdd7f5b |
| 28-Mar-2022 |
Etienne Carriere <etienne.carriere@st.com> |
drivers: stm32_iwdg: implementation of independent watchdog
Implements independent watchdog (IWDG) driver to help detecting malfunctions due to software or hardware failures. IWDG instances are cloc
drivers: stm32_iwdg: implementation of independent watchdog
Implements independent watchdog (IWDG) driver to help detecting malfunctions due to software or hardware failures. IWDG instances are clocked by an independent clock and stays active if the main clock fails.
The driver mandates IWDG instances configuration from an embedded DTB.
For the list of features, refer to the reference manuals at: https://wiki.st.com/stm32mpu/wiki/STM32MP15_resources
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|