Re: [PATCH] arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2

From: Marek Vasut

Date: Sun Nov 01 2026 - 01:39:59 EST


On 10/31/26 9:59 PM, mateusz.nowicki@xxxxxxxxxx wrote:

Hello Mateusz,

But maybe there is some way to probe for the correct ARM SMC WDT ID ?

I agree, the ID is not discoverable. A revert or a board override
would not help firmware built with a custom CFG_WDT_SM_HANDLER_ID
either. Sorry for the trouble on your board.

I like the fallback idea. My suggestion:

- arm,smc-id becomes a list of IDs.
- The driver tries them in order until SMCWD_INIT succeeds.
- The SoC dtsi lists <0xbc000000 0xb200005a>.
- Boards with a custom ID override the list.
- Older kernels read only the first cell, so nothing breaks there.

Yes, that sound good.

Trying a wrong ID is harmless.

That is not exactly accurate. The wrong ID might be populated by some other service, and invoking that might have unexpected consequences. But I do admit that such a thing is unlikely.

Old and new firmware both just return
an error for an ID they do not know, as your two cases and my DK show.

One catch: OP-TEE answers an unknown call with 0xFFFFFFFF in w0, and
smcwd_call() compares a0 with PSCI_RET_NOT_SUPPORTED as a 64-bit
value. The driver gets -EIO, not -ENODEV, so the fallback should move
to the next ID on any error.

If you and the watchdog maintainers are fine with this, I can send
the binding and driver patches.
It sounds nice to me, thank you !