Re: [PATCH v4 06/15] ARM: stm32: enable arm smc watchdog on stm32mp1xx
From: Antonio Borneo
Date: Mon Nov 16 2026 - 13:26:53 EST
On Mon, 2026-11-16 at 10:00 -0800, Guenter Roeck wrote:
> On 11/16/26 08:45, Antonio Borneo wrote:
> > 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?
> >
>
> No. As you say yourself above, "the upstream kernel configured with
> multi_v7_defconfig would need ARM_SMC_WATCHDOG to prevent a reset during
> kernel boot". I fail to understand why you don't just add
> "CONFIG_ARM_SMC_WATCHDOG=m" to multi_v7_defconfig and instead want to
> force every single platform using multi_v7_defconfig to build this driver
> into the kernel even though almost all of them won't need (or want) it.
Thanks for the clarification. Understand your point.
So let's drop this patch from this series.
I will send separately the proposal for multi_v7_defconfig.
Best Regards,
Antonio