Re: [PATCH v4 06/15] ARM: stm32: enable arm smc watchdog on stm32mp1xx
From: Antonio Borneo
Date: Mon Nov 16 2026 - 11:45:52 EST
On Mon, 2026-11-16 at 06:33 -0800, Guenter Roeck wrote:
> On 11/16/26 05:24, Antonio Borneo wrote:
> > The watchdog IWDG1 is secure by default on STM32MP1xx SoCs.
> > On boards that keep it secure, Linux must use the arm,smc-wdt
> > driver to ping it.
> >
> > Enable the driver for mach-stm32 when ARCH_MULTI_V7 is enabled.
> >
>
> As mentioned before, that doesn't just enable it for STM32MP1xx SoCs,
> it force-enables it for all boards running ARCH_MULTI_V7. It also
> goes well beyond the current scope of "if ARCH_MULTI_V7" configurations.
> I would suggest NACK for that reason, but that isn't my call to make.
>
> Guenter
Hi Guenter,
sorry if I take more of your time on this, but I haven't got your comments on
my reply to this patch as v3 04/13.
On platforms STM32MP1xx the trusted firmware starts the watchdog.
Since on such platforms the defconfig is multi_v7_defconfig, the upstream kernel
configured with multi_v7_defconfig would need ARM_SMC_WATCHDOG to prevent a reset
during kernel boot.
Clearly, my wish is to have an upstream kernel booting properly with defconfig.
arch/arm/mach-stm32/Kconfig handles two series of ARCH_STM32:
- the deprecated ARMv7M platforms that use stm32_defconfig;
- the ARMv7A platforms that use multi_v7_defconfig.
In this patch the condition 'if ARCH_MULTI_V7' is to enable the watchdog only
on ARMv7A, not on ARMv7M.
Clearly any driver enabled for ARCH_STM32 will automatically be enabled for
the other SoC that rely on the same defconfig.
Also reworking this patch by moving the change in drivers/watchdog/Kconfig as
config ARM_SMC_WATCHDOG
+ default y if (ARCH_STM32 && ARCH_MULTI_V7)
would still result in the arm SMC watchdog enabled for all the SoC that use
multi_v7_defconfig.
What would be your suggestion to progress on this topic?
Thanks,
Antonio
>
> > Signed-off-by: Antonio Borneo <antonio.borneo@xxxxxxxxxxx>
> > ---
> > arch/arm/mach-stm32/Kconfig | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
> > index 4ac3384e397aa..de09b2afa0f2e 100644
> > --- a/arch/arm/mach-stm32/Kconfig
> > +++ b/arch/arm/mach-stm32/Kconfig
> > @@ -13,6 +13,8 @@ menuconfig ARCH_STM32
> > select RESET_CONTROLLER
> > select STM32_EXTI if ARM_SINGLE_ARMV7M
> > select STM32_FIREWALL
> > + select WATCHDOG if ARCH_MULTI_V7
> > + select ARM_SMC_WATCHDOG if ARCH_MULTI_V7
> > help
> > Support for STMicroelectronics STM32MP1 processors using Cortex-A7
> > cores. Note that support for the earlier Cortex-M based variants
>