summaryrefslogtreecommitdiff
path: root/drivers/watchdog
AgeCommit message (Collapse)Author
4 dayswatchdog: renesas_wwdt: Convert to common field_{get, prep}() helpersMikhail Kshevetskiy
Drop the driver-specific field_get() and field_prep() macros, in favor of the globally available variants from <linux/bitfield.h>. Signed-off-by: Mikhail Kshevetskiy <[email protected]> Reviewed-by: Simon Glass <[email protected]>
4 dayswatchdog: renesas_wwdt: #undef field_{get, prep}() before definitionMikhail Kshevetskiy
Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
2026-06-25Kconfig: drivers: restyle remainingJohan Jonker
Restyle all Kconfigs for the rest of "drivers": Menu entries : no space left Menu attributes: 1 TAB Help text : 1 TAB + 2 spaces Replace '---help---' by 'help' Signed-off-by: Johan Jonker <[email protected]> [trini: Add missing indentation on a few more multi-paragraph help texts] Signed-off-by: Tom Rini <[email protected]>
2026-06-09drivers: watchdog: Fix dev_read_addr error checkFrancois Berder
dev_read_addr does not return a void* but fdt_addr_t. Replace invalid usage of dev_read_addr by dev_read_addr_ptr. v2: - Replace dev_read_addr by dev_read_addr_ptr - Change error to EINVAL Signed-off-by: Francois Berder <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Hal Feng <[email protected]>
2026-06-09watchdog: mpc8xxx_wdt: Use dev_remap_addr()Peng Fan
Use dev_remap_addr() to replace devfdt_remap_addr which supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. No functional changes. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2026-06-09watchdog: rti: Use dev_read_addr_ptr()Peng Fan
devfdt_get_addr() returns FDT_ADDR_T_NONE(-1UL) when fail, using "!priv->regs" to check return value is wrong. Replace devfdt_read_addr() with dev_read_addr_ptr() when retrieving the register base address. dev_read_addr_ptr() supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. Also use "void __iomem *" to replace "phys_addr_t" to avoid type casting. No functional changes. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2026-06-09watchdog: orion_wdt: use dev_read_addr_size_index()Peng Fan
Replace devfdt_read_addr_size_index() with dev_read_addr_size_index() when retrieving the register base address. dev_read_addr_size_index() supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. No functional changes. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2026-06-09watchdog: octeontx_wdt: fix DT matches to Marvell compatiblesJuuso Rinta
The OcteonTX watchdog driver currently matches arm,sbsa-gwdt. On systems with multiple watchdog devices this can be ambiguous since arm,sbsa-gwdt is a generic SBSA binding. Replace the SBSA match with SoC-specific Marvell compatibles marvell,cn10624-wdt and marvell,cn9670-wdt. These compatibles align with the upstream Linux device tree binding: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/watchdog/marvell,cn10624-wdt.yaml Reviewed-by: Aaro Koskinen <[email protected]> Signed-off-by: Juuso Rinta <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2026-06-09watchdog: sbsa_gwdt: clamp WOR value to hw maxJuuso Rinta
The WOR register is 32 bits, so any tick count exceeding U32_MAX is truncated by writel(). A large requested timeout can wrap to a small value causing the watchdog to fire sooner than requested. Clamp the calculated value to U32_MAX prior to writing the register so over-large requests will be set to the maximum timeout value. Found by code review. Signed-off-by: Juuso Rinta <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2026-06-09watchdog: designware: Fix probe when clk_enable return ENOSYSJonas Karlman
Rockchip SoCs typically reset with all (or most) clocks ungated. Because of this, U-Boot clock drivers for Rockchip typically do not implement the optional clk-uclass enable/disable ops. Normal driver model behavior is to return -ENOSYS when an uclass ops is not implemented. Ignore -ENOSYS to allow the designware watchdog driver to be probed on platforms that do not implement the clk-uclass enable/disable ops, e.g. Rockchip RK3308. Signed-off-by: Jonas Karlman <[email protected]>
2026-06-09watchdog: Correct dependencies for WDT_MAX6370Tom Rini
As exposed by "make randconfig", we have an issue with the dependencies for WDT_MAX6370. It needs to select both GPIO and DM_GPIO not just DM_GPIO. Signed-off-by: Tom Rini <[email protected]>
2026-06-09watchdog: orion_wdt: Add support for armada-xpChris Packham
Update the orion_wdt.c to support armada-xp and similar SoCs. The WDT block used in armada-xp is fairly close to the armada-380 with just a few differences that can be handled based on the compatible property. Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2026-06-05watchdog: ulp_wdog: Use driver model for reset_cpu()Alice Guo
Replace hardcoded WDOG_BASE_ADDR with driver model based dynamic address lookup from device tree, allowing reset_cpu() to dynamically locate watchdog devices from device tree. This change also enables CONFIG_WDT for relevant boards and ensures the watchdog nodes are available for driver model usage. - Remove hardcoded WDOG_BASE_ADDR from hw_watchdog_* functions - Reimplement reset_cpu() using UCLASS_WDT device iteration - Add ulp_wdt_expire_now() callback for standard WDT interface - Pass wdog register pointer to hw_watchdog_set_timeout() - Enable CONFIG_WDT for boards using ULP watchdog - Remove wdog3 status = "disabled" overrides from U-Boot device tree overlays, as the watchdog device needs to be accessible for driver model based reset functionality. Signed-off-by: Alice Guo <[email protected]> Acked-by: Francesco Dolcini <[email protected]> # Toradex boards Reviewed-by: Peng Fan <[email protected]>
2026-05-12watchdog: apple: Add "apple,t8103-wdt" compatibleJanne Grunau
After discussion with the devicetree maintainers we agreed to not extend lists with the generic compatible "apple,wdt" anymore [1]. Use "apple,t8103-wdt" as base compatible as it is the SoC driver and bindings were originally written for. The t602x (M2 Pro/Max/Ultra) devicetrees submitted in [2] use this compatible as fallback instead of "apple,wdt". Link: https://lore.kernel.org/asahi/[email protected]/ [1] Link: https://lore.kernel.org/asahi/[email protected]/ [2] Signed-off-by: Janne Grunau <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Acked-by: Mark Kettenis <[email protected]>
2026-05-05watchdog: Add Renesas R-Car Gen5 window watchdog driverMarek Vasut
Add support of Renesas R-Car Gen5 window watchdog timer. Timeout configuration is derived from CONFIG_WATCHDOG_TIMEOUT_MSECS, which is more accurate than the 1-second granularity 'timeout' passed to .start callback. Reviewed-by: Stefan Roese <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2026-04-07global: Correct duplicate U_BOOT_DRIVER entry namesTom Rini
The U_BOOT_DRIVER macro creates a list of drivers used at link time, and all entries here must be unique. This in turn means that all entries in the code should also be unique in order to not lead to build failures later with unexpected build combinations. Typically, the problem we have here is when a driver is obviously based on another driver and didn't update this particular field and so while the name field reflects something unique the linker entry itself is not. In a few places this provides a more suitable string name as well, however. Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> # Tegra Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2026-04-06Merge branch 'next'Tom Rini
2026-03-24watchdog: qcom: stop watchdog by defaultCasey Connolly
Prevent the Qualcomm watchdog from autostarting and ensure it's stopped when the driver probed. In some cases the watchdog is left running by a previous bootloader stage. Disable autostart so it isn't left running when we boot into the OS, this behaviour can be changed by enabling autostart in the board defconfig. Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Reviewed-by: Tom Rini <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-03-09Merge tag 'v2026.04-rc4' into nextTom Rini
Prepare v2026.04-rc4
2026-03-04treewide: Remove Timesys from ADI ADSP maintenancePhilip Molloy
After years of developing the ADI ADSP platform, Timesys was purchased by another company and is no longer contracted to maintain the platform. Signed-off-by: Philip Molloy <[email protected]> Reviewed-by: Greg Malysa <[email protected]>
2026-02-18Merge patch series "Add MT8195 support"Tom Rini
Julien Stephan <[email protected]> says: This series adds basic support for Mediatek soc MT8195: - clock driver - watchdog - add a new macro helper to define gate clock. Other driver can be cleaned later to use the new macro Other driver will be added later. It will also serve as basis for board support such as MT8395_EVK based on MT8195. Link: https://lore.kernel.org/r/[email protected]
2026-02-18arm: mediatek: add support for MediaTek MT8195 SoCJulien Stephan
This adds basic support for MediaTek MT8195 SoC. Add watchdog support by adding upstream compatible string. Signed-off-by: Julien Stephan <[email protected]>
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2026-01-14watchdog: qcom: Add max timeout check to prevent overflowGopinath Sekar
Added a check to ensure the requested timeout does not exceed the hardware's maximum supported value. This prevents register overflow and ensures watchdog reliability. So, added a check in qcom_wdt_start() to ensure the requested timeout does not exceed the hardware-supported maximum value. If the requested value exceeds the maximum value, then the timeout is clamped at maximum value. The timeout is first converted to watchdog ticks and then compared against QCOM_WDT_MAX_TIMEOUT. This helps prevent misconfiguration and potential watchdog misbehavior due to overflow. QCOM_WDT_MAX_TIMEOUT is set to 0xFFFFF, as Qualcomm SoCs typically use 20 bits to store bark/bite timeout values. This work builds upon the previous submission: https://lore.kernel.org/u-boot/[email protected]/ Signed-off-by: Gopinath Sekar <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-01-06Merge patch series "Add support for MT8188"Tom Rini
Julien Stephan <[email protected]> says: The MediaTek MT8188 is a ARM64-based SoC with a dual-core Cortex-A78 cluster and a six-core Cortex-A55 cluster. It includes UART, SPI, USB3.0 dual role, SD and MMC cards, UFS, PWM, I2C, I2S, S/PDIF, and several LPDDR3 and LPDDR4 options. This series adds basic support for MT8188. Link: https://lore.kernel.org/r/[email protected]
2026-01-06arm: mediatek: add support for MediaTek MT8188 SoCJulien Masson
This adds basic support for MediaTek MT8188 SoC. Add watchdog support by adding upstream compatible string. Add tphy support by adding "mediatek,generic-tphy-v2" compatible string in arch/arm/dts/mt8188-u-boot.dtsi Signed-off-by: Julien Masson <[email protected]> Signed-off-by: Julien Stephan <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Macpaul Lin <[email protected]>
2025-12-31watchdog: npcm: Support more timeout valueStanley Chu
Calculate a timeout value that is close to the requested value. Signed-off-by: Stanley Chu <[email protected]>
2025-10-28watchdog: Add support for Tegra watchdog timerLukasz Majewski
Provide support for Tegra watchdog functionality. The WATCHDOG index 0 in conjunction with TIMER 5 is used inline with existing Linux kernel driver. Signed-off-by: Lukasz Majewski <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-10-16watchdog: Tighten dependencies on WDT_DAVINCITom Rini
The WDT_DAVINCI driver is not safe to compile on 64bit platforms such as allyesconfig on a 64bit host. Tighten the dependencies here to the platforms which could use it today. Signed-off-by: Tom Rini <[email protected]>
2025-10-16watchdog: Tighten some watchdog driver dependenciesTom Rini
A few watchdog drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2025-08-08drivers: watchdog: Enable watchdog support in SPL for AgilexAlif Zakuan Yuslaimi
Enable watchdog as early as possible after clock initialization which is set at 10 seconds. Signed-off-by: Alif Zakuan Yuslaimi <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2025-07-30watchdog: don't autostart watchdog on STM32MP architecturePatrice Chotard
On STM32MP reference boards, the watchdog is started by a previous boot stage (e.g. bootrom or secure OS), so the config flag WATCHDOG_AUTOSTART is not required. It's preferable to rely on the DT properties "u-boot,autostart" or "u-boot,noautostart", if needed. For backward compatibility on defconfigs that are based on SPL, thus cannot rely on a previous boot stage for starting the watchdog, enable WATCHDOG_AUTOSTART in their respective defconfig. The change in stm32mp15_dhsom.config is propagated to: - configs/stm32mp15_dhcom_basic.config - configs/stm32mp15_dhcor_basic.config and then to: - stm32mp15_dhcom_basic_defconfig - stm32mp15_dhcom_drc02_basic_defconfig - stm32mp15_dhcom_pdk2_basic_defconfig - stm32mp15_dhcom_picoitx_basic_defconfig - stm32mp15_dhcor_avenger96_basic_defconfig - stm32mp15_dhcor_basic_defconfig - stm32mp15_dhcor_drc_compact_basic_defconfig - stm32mp15_dhcor_testbench_basic_defconfig Signed-off-by: Patrice Chotard <[email protected]> Signed-off-by: Antonio Borneo <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-07-30watchdog: stm32mp: check the watchdog statusClément Le Goffic
Add a mean to check the IWDG status based on the peripheral version. This is done by either checking the status bit ONF either by updating the reload register with the same value and check if the reload succeed. Signed-off-by: Clément Le Goffic <[email protected]> Signed-off-by: Antonio Borneo <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-07-30watchdog: arm_smc_wdt: get wdt status through SMCWD_GET_TIMELEFTAntonio Borneo
The optional SMCWD_GET_TIMELEFT command can be used to detect if the watchdog has already been started. See the implementation in OP-TEE secure OS [1]. At probe time, check if the watchdog is already started and then call wdt_set_force_autostart(). This will keep U-Boot pinging the watchdog even when the property 'u-boot,noautostart' is present. Link: https://github.com/OP-TEE/optee_os/commit/a7f2d4bd8632 [1] Signed-off-by: Antonio Borneo <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-07-30watchdog: wdt-uclass.c: add wdt_set_force_autostart() helperAntonio Borneo
The watchdog could have been already started by a previous boot stage (e.g. bootrom or secure OS). U-Boot has to start and kick the watchdog even when CONFIG_WATCHDOG_AUTOSTART is not enabled or when the DT property u-boot,noautostart is present. Add the helper wdt_set_force_autostart() that can be called by the driver's probe() when it detects that the watchdog has already been started and is running. Co-developed-by: Patrice Chotard <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Signed-off-by: Antonio Borneo <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-07-14Merge tag 'qcom-main-20250714' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-snapdragon CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/27056 - Fix unused access in ufetch - Add missing clock for SM8650 - Port the Linux SPMI GPIO driver and port over SM8550 (other platforms should follow)
2025-07-14watchdog: qcom-wdt: Drop read check on write-only WDT_EN registerBalaji Selvanathan
On some Qualcomm platforms, such as Dragonwing boards, the WDT_EN register is write-only. Reading it back after enabling the watchdog can return invalid data or cause unexpected behavior. In particular, the check: if (readl(wdt_addr(wdt, WDT_EN)) != 1) may fail even though the watchdog is correctly enabled and running. This leads to misleading error messages and unnecessary failures. Removing the read check ensures compatibility and avoids false negatives on platforms where WDT_EN is not readable. This work builds upon this previous submission: https://lore.kernel.org/u-boot/[email protected]/ Signed-off-by: Balaji Selvanathan <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-07-10arm: imx: Remove the rest of i.MX31 supportTom Rini
With the removal of the last i.MX31 platform we can remove the rest of the underlying architecture code as well. Fixes: f247354708ec ("arm: Remove mx31pdk board") Signed-off-by: Tom Rini <[email protected]> Acked-by: Peng Fan <[email protected]>
2025-06-23drivers: watchdog: qcom: Add timeout configuration support in watchdogBalaji Selvanathan
This patch enhances the Qualcomm watchdog driver by introducing support for dynamic timeout configuration. Specifically: - Calculates and sets the bark and bite timeout values based on the clock rate and the requested timeout in milliseconds. - Adds retrieval of the watchdog clock rate during probe using the common clock framework. - Adds a default timeout value for ARCH_SNAPDRAGON in WATCHDOG_TIMEOUT_MSECS. These changes improve the configurability and accuracy of the watchdog timer on Qualcomm platforms. This work builds upon the previous submission: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Balaji Selvanathan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-06-23watchdog: qcom: introduce qcom-wdt driverCasey Connolly
Some Qualcomm device vendors decide to turn the watchdog on in the bootloader, resulting in the device being reset if it isn't petted every ~30 seconds. Introduce a driver to keep the watchdog happy and prevent this annoying behaviour. Signed-off-by: Paul Sajna <[email protected]> Co-authored-by: Paul Sajna <[email protected]> Tested-by: Paul Sajna <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Acked-by: Sumit Garg <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-06-20Merge tag 'u-boot-at91-2025.10-a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 into next First set of u-boot-at91 features for the 2025.10 cycle: This feature set includes the addition of new sam9x7 SoC and a new board named sam9x7-curiosity. There is also new support for sam9x60 compatible at91 watchdog.
2025-06-19watchdog: at91sam9_wdt: Add SAM9X60 supportZixun LI
SAM9X60 has a slightly different watchdog implementation: - Timer value moved into a new register WLR - Some MR register fields have their position changed This patch add SAM9X60 support, also adds a compatible for SAMA5D4 which is the same as existing SAM9260. Signed-off-by: Zixun LI <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2025-06-19watchdog: at91sam9_wdt: Rename priv to wdtZixun LI
"wdt" is a better name for watchdog rather than generic "priv". Signed-off-by: Zixun LI <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2025-06-19arm: at91: wdt: Rename regval in priv data to mrZixun LI
Use the name "mr" since we are referring to timer mode register. Signed-off-by: Zixun LI <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2025-06-18renesas: Renesas R-Car Gen4 watchdog driverShmuel Leib Melamud
Add support of Renesas R-Car Gen4 watchdog timer. Timeouts up to 8184.0s are supported (CKS1 register is not involved). The watchdog uses the clock of type CLK_TYPE_GEN4_MDSEL. The timeout is set in dts/upstream/src/arm64/renesas/r8a779f0-spider-cpu.dtsi section &rwdt. This driver is based on upstream linux commit: e70140ba0d2b("Get rid of 'remove_new' relic from platform driver struct") Signed-off-by: Shmuel Leib Melamud <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-04-28watchdog: sunxi: add A523 supportAndre Przywara
The Allwinner A523 SoC moved the watchdog into a separate MMIO frame, and also shifted the registers a bit: the control, config, and mode register are located four bytes earlier. Add the new compatible string, and connect it to the new struct describing the new register layout. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2025-03-30Merge patch series "Clarify DM_FLAG_PROBE_AFTER_BIND behaviour"Tom Rini
Caleb Connolly <[email protected]> says: In Simon's series reworking autoprobe, a discussion came up about DM_FLAG_PROBE_AFTER_BIND, specifically that it wasn't very clear where this flag should be used. This series implements my suggestions made there to clarify the use of this flag, and fixup the two driver which erroneously apply it to their driver struct (this does nothing). Link: https://lore.kernel.org/u-boot/[email protected]/ Link: https://lore.kernel.org/r/[email protected]
2025-03-30drivers: remove bogus DM_FLAG_PROBE_AFTER_BIND flagsCaleb Connolly
Some drivers set DM_FLAG_PROBE_AFTER_BIND, this does nothing since it's only every applied on a per-device basis. Remove the flags. Signed-off-by: Caleb Connolly <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Michal Simek <[email protected]>
2025-03-12watchdog: Add support for ADI SC5XX-family watchdog peripheralNathan Barrett-Morrison
Co-developed-by: Greg Malysa <[email protected]> Signed-off-by: Greg Malysa <[email protected]> Co-developed-by: Ian Roberts <[email protected]> Signed-off-by: Ian Roberts <[email protected]> Signed-off-by: Vasileios Bimpikas <[email protected]> Signed-off-by: Utsav Agarwal <[email protected]> Signed-off-by: Arturs Artamonovs <[email protected]> Signed-off-by: Oliver Gaskell <[email protected]> Signed-off-by: Nathan Barrett-Morrison <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2025-01-09Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogTom Rini
- rti: support SPL (or re-start) (Alexander) - rti: drop hack manipulating WDT clock rate (Alexander)