From: Marek Vasut <marex@nabladev.com>
To: Alexandre TORGUE <alexandre.torgue@foss.st.com>,
Mateusz Nowicki <mateusz.nowicki@posteo.net>,
mcoquelin.stm32@gmail.com,
Thomas BOURGOIN <thomas.bourgoin@st.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
lionel.debieve@foss.st.com, amelie.delaunay@foss.st.com,
patrice.chotard@foss.st.com, devicetree@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel <kernel@dh-electronics.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Fabrice Gasnier <fabrice.gasnier@foss.st.com>,
Stefano Babic <sbabic@nabladev.com>,
Etienne Carriere <etienne.carriere@foss.st.com>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2
Date: Sat, 31 Oct 2026 06:59:55 +0100 [thread overview]
Message-ID: <1b14e1e4-962f-4391-91fd-b09143641643@nabladev.com> (raw)
In-Reply-To: <7ee09655-2fef-4334-b0aa-b56f7ae03f74@foss.st.com>
On 9/28/26 10:45 AM, Alexandre TORGUE wrote:
Hello all,
> On 9/7/26 11:14, Mateusz Nowicki wrote:
>> OP-TEE implements the STM32MP2 watchdog SMC service with function ID
>> 0xbc000000 (CFG_WDT_SM_HANDLER_ID), not 0xb200005a. With the current
>> value the arm_smc_wdt probe fails with -EIO and the IWDG started by the
>> bootloader is never refreshed.
>>
>> Fixes: 89fca38168c9 ("arm64: dts: st: add arm-wdt node for watchdog
>> support on stm32mp251")
>> Fixes: e9b03ef21386 ("arm64: dts: st: introduce stm32mp23 SoCs family")
>> Signed-off-by: Mateusz Nowicki <mateusz.nowicki@posteo.net>
>> ---
>> arch/arm64/boot/dts/st/stm32mp231.dtsi | 2 +-
>> arch/arm64/boot/dts/st/stm32mp251.dtsi | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/st/stm32mp231.dtsi b/arch/arm64/boot/
>> dts/st/stm32mp231.dtsi
>> index 9e1d240888ff..35e247af957c 100644
>> --- a/arch/arm64/boot/dts/st/stm32mp231.dtsi
>> +++ b/arch/arm64/boot/dts/st/stm32mp231.dtsi
>> @@ -35,7 +35,7 @@ arm-pmu {
>> arm_wdt: watchdog {
>> compatible = "arm,smc-wdt";
>> - arm,smc-id = <0xb200005a>;
>> + arm,smc-id = <0xbc000000>;
>> status = "disabled";
>> };
>> diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/
>> dts/st/stm32mp251.dtsi
>> index 9c63fdb5a885..2dcbba65e298 100644
>> --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
>> +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
>> @@ -36,7 +36,7 @@ arm-pmu {
>> arm_wdt: watchdog {
>> compatible = "arm,smc-wdt";
>> - arm,smc-id = <0xb200005a>;
>> + arm,smc-id = <0xbc000000>;
>> status = "disabled";
>> };
>
> Applied on stm32-next.
Since this change, my STM32MP255C board started rebooting after 32
seconds. It turns out, this is caused by an ABI break.
Here is the thing -- old ST downstream fork of OP-TEE OS did expect ARM
SMC WDT ID 0xb200005a (that was the ST ecosystem v5), the OP-TEE OS
4.0.0 fork seems to have handled both, and the new 4.8.0 fork expects
0xbc000000 ID only and does not handle 0xb200005a .
At this point, with Linux 6.18 the kernel is trying to trigger the WDT
using SMC ID 0xb200005a , which on my machine works (older OP-TEE OS).
When I boot linux-next , it is using ID 0xbc000000 and my system reboots
after 32 seconds. (not even mainline Linux versions are consistent here
now, sigh)
I actually found this behavior the other way around -- while forward
porting a system to the new OP-TEE OS 4.8.0 port, which I installed,
then booted Linux 6.18.y, machine started rebooting (SMC ID mismatch,
new OP-TEE expects 0xbc000000 and linux-stable sends 0xb200005a), so I
booted recovery, and ... recovery is also Linux 6.18.y, so I could not
recover the machine that way anymore.
Currently, I added [1] to OP-TEE OS as a mitigation of this ABI break,
but I don't think everyone can still update their bootloader stack in
this way. And with this patch in place (and inconsistency between Linux
stable 6.18.y and upcoming 7.4.y) the ABI break will cause some serious
mess.
How shall we deal with this ?
Thank you for your help !
[1]
https://github.com/STMicroelectronics/optee_os/commit/8450f25923c0c98465decc975f25efed19f82ba0
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2026-10-31 6:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 9:14 Mateusz Nowicki
2026-09-08 8:52 ` [Linux-stm32] [PATCH] arm64: dts: st: fix arm, smc-id " Antonio Borneo
2026-09-23 11:52 ` [PATCH] arm64: dts: st: fix arm,smc-id " Mateusz Nowicki
2026-09-28 8:45 ` Alexandre TORGUE
2026-10-31 5:59 ` Marek Vasut [this message]
2026-10-31 8:45 ` Arnd Bergmann
2026-10-31 12:00 ` mateusz.nowicki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1b14e1e4-962f-4391-91fd-b09143641643@nabladev.com \
--to=marex@nabladev.com \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=etienne.carriere@foss.st.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=geert+renesas@glider.be \
--cc=kernel@dh-electronics.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=lionel.debieve@foss.st.com \
--cc=mateusz.nowicki@posteo.net \
--cc=mcoquelin.stm32@gmail.com \
--cc=patrice.chotard@foss.st.com \
--cc=robh@kernel.org \
--cc=sbabic@nabladev.com \
--cc=thomas.bourgoin@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®