mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Vasut <marex@nabladev.com>
To: mateusz.nowicki@posteo.net
Cc: Arnd Bergmann <arnd@arndb.de>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Thomas BOURGOIN <thomas.bourgoin@st.com>,
	Rob Herring <robh@kernel.org>,
	krzk+dt@kernel.org, Conor Dooley <conor+dt@kernel.org>,
	Lionel DEBIEVE <lionel.debieve@foss.st.com>,
	Amelie DELAUNAY <amelie.delaunay@foss.st.com>,
	Patrice Chotard <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>
Subject: Re: [PATCH] arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2
Date: Sun, 1 Nov 2026 05:47:21 +0100	[thread overview]
Message-ID: <3237f9e2-6c80-4adf-ae4f-65f8998ef4eb@nabladev.com> (raw)
In-Reply-To: <799394b5ac7067cd2bb2e06117e53ec3@posteo.net>

On 10/31/26 9:59 PM, mateusz.nowicki@posteo.net 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 !

      reply	other threads:[~2026-11-01  5:39 UTC|newest]

Thread overview: 10+ 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
2026-10-31  8:45     ` Arnd Bergmann
2026-10-31 12:00       ` mateusz.nowicki
2026-10-31 13:35         ` Marek Vasut
2026-10-31 20:59           ` mateusz.nowicki
2026-11-01  4:47             ` Marek Vasut [this message]

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=3237f9e2-6c80-4adf-ae4f-65f8998ef4eb@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®