Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gerard Marull-Paretas <gerard@teslabs.com>
To: Bjorn Andersson <andersson@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>,
	Fabien Dessenne <fabien.dessenne@foss.st.com>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dt-bindings: hwlock: st,stm32-hwspinlock: add mailbox cells and interrupt
Date: Wed, 25 Nov 2026 14:52:31 +0100	[thread overview]
Message-ID: <20261125135231.98914-1-gerard@teslabs.com> (raw)

Besides locking, releasing a hardware semaphore raises the interrupt of
each core that enabled it for that semaphore. On multi-core parts
without an IPCC, such as the STM32H745/H747/H755/H757 (Cortex-M7 and
Cortex-M4), this is how the cores signal each other, each semaphore
serving as a doorbell.

Allow '#mbox-cells', its cell being the semaphore, and the interrupt of
the semaphores. Each core has an interrupt of its own (HSEM1 for the
Cortex-M7, HSEM2 for the Cortex-M4 on STM32H747), so a description
gives the one of the CPU it is for.

PebbleOS, whose STM32H747 port uses the semaphores as doorbells between
its two cores, describes and uses these.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
---
 .../bindings/hwlock/st,stm32-hwspinlock.yaml       | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml
index 829d1fdf4c67..3b8d872b7c21 100644
--- a/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml
+++ b/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml
@@ -9,16 +9,30 @@ title: STMicroelectronics STM32 Hardware Spinlock
 maintainers:
   - Fabien Dessenne <fabien.dessenne@foss.st.com>
 
+description: |
+  Hardware semaphores, which also ring doorbells between the cores of a
+  multi-core part: releasing a semaphore raises the interrupt of each core
+  that enabled it, and the core taking the doorbell clears it in its
+  interrupt status.
+
 properties:
   "#hwlock-cells":
     const: 1
 
+  "#mbox-cells":
+    const: 1
+    description: The semaphore ringing the doorbell.
+
   compatible:
     const: st,stm32-hwspinlock
 
   reg:
     maxItems: 1
 
+  interrupts:
+    maxItems: 1
+    description: The interrupt of the semaphores for the CPU the description is for.
+
   clocks:
     maxItems: 1
 
-- 
2.45.2



                 reply	other threads:[~2026-11-25 13:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261125135231.98914-1-gerard@teslabs.com \
    --to=gerard@teslabs.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andersson@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fabien.dessenne@foss.st.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh@kernel.org \
    /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