public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document arm,no-completion-irq property
@ 2026-01-15  0:48 Marek Vasut
  2026-01-15  0:48 ` [PATCH v3 2/2] firmware: arm_scmi: Implement " Marek Vasut
  2026-01-15 11:57 ` [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document " Sudeep Holla
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Vasut @ 2026-01-15  0:48 UTC (permalink / raw)
  To: arm-scmi
  Cc: Marek Vasut, Conor Dooley, Cristian Marussi, Florian Fainelli,
	Krzysztof Kozlowski, Rob Herring, Sudeep Holla, devicetree,
	linux-arm-kernel, linux-renesas-soc

Document new property arm,no-completion-irq, which sets all SCMI
operation into poll mode. This is meant to work around uncooperative
SCP implementations, which do not generate completion interrupts.
This applies primarily on mbox shmem based implementations.

With this property set, such implementations which do not generate
interrupts can be interacted with, until they are fixed to generate
interrupts properly.

Note that, because the original base protocol exchange also requires
some sort of completion mechanism, it is not possible to query SCMI
itself for this property and it must be described in DT. While this
does look a bit like policy, the SCMI provider is part of the
hardware, hence DT.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: arm-scmi@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
---
V2: s@mean@&t and limit poll transport to mailbox/shmem only
V3: - Reformat the commit message, expand property description to
      explicitly spell out this is hardware description.
    - Rename property from arm,poll-transport to arm,no-completion-irq
---
 .../devicetree/bindings/firmware/arm,scmi.yaml        | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index be817fd9cc34b..46d9a0a9a0e58 100644
--- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -146,6 +146,14 @@ properties:
       this platform. If set, the value should be non-zero.
     minimum: 1
 
+  arm,no-completion-irq:
+    type: boolean
+    description:
+      An optional property which unconditionally forces polling in all transports,
+      meant for hardware which does not generate completion interrupts. This is
+      mainly meant to work around uncooperative SCP or SCP firmware, which does
+      not generate completion interrupts.
+
   arm,smc-id:
     $ref: /schemas/types.yaml#/definitions/uint32
     description:
@@ -379,6 +387,9 @@ then:
     - shmem
 
 else:
+  properties:
+    arm,no-completion-irq: false
+
   if:
     properties:
       compatible:
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 2/2] firmware: arm_scmi: Implement arm,no-completion-irq property
  2026-01-15  0:48 [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document arm,no-completion-irq property Marek Vasut
@ 2026-01-15  0:48 ` Marek Vasut
  2026-01-15 11:57 ` [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document " Sudeep Holla
  1 sibling, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2026-01-15  0:48 UTC (permalink / raw)
  To: arm-scmi
  Cc: Marek Vasut, Conor Dooley, Cristian Marussi, Florian Fainelli,
	Krzysztof Kozlowski, Rob Herring, Sudeep Holla, devicetree,
	linux-arm-kernel, linux-renesas-soc

Implement new property arm,no-completion-irq, which sets all SCMI
operation into poll mode. This is meant to work around uncooperative
SCP implementations, which do not generate completion interrupts.
This applies to mbox/shmem based implementations.

With this property set, such implementations which do not generate
interrupts can be interacted with, until they are fixed to generate
interrupts properly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: arm-scmi@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
---
V2: Drop no IRQ handling from SMC transport and update commit message
V3: Rename property from arm,poll-transport to arm,no-completion-irq
---
 drivers/firmware/arm_scmi/common.h | 4 ++++
 drivers/firmware/arm_scmi/driver.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
index 7c35c95fddbaf..7c9617d080a02 100644
--- a/drivers/firmware/arm_scmi/common.h
+++ b/drivers/firmware/arm_scmi/common.h
@@ -235,6 +235,9 @@ struct scmi_transport_ops {
  *		      to have an execution latency lesser-equal to the threshold
  *		      should be considered for atomic mode operation: such
  *		      decision is finally left up to the SCMI drivers.
+ * @no_completion_irq: Flag to indicate that this transport has no completion
+ *		       interrupt and has to be polled. This is similar to the
+ *		       force_polling below, except this is set via DT property.
  * @force_polling: Flag to force this whole transport to use SCMI core polling
  *		   mechanism instead of completion interrupts even if available.
  * @sync_cmds_completed_on_ret: Flag to indicate that the transport assures
@@ -254,6 +257,7 @@ struct scmi_desc {
 	int max_msg;
 	int max_msg_size;
 	unsigned int atomic_threshold;
+	bool no_completion_irq;
 	const bool force_polling;
 	const bool sync_cmds_completed_on_ret;
 	const bool atomic_enabled;
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 3e76a3204ba4f..f167194f7cf67 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -2735,6 +2735,7 @@ static int scmi_chan_setup(struct scmi_info *info, struct device_node *of_node,
 	cinfo->is_p2a = !tx;
 	cinfo->rx_timeout_ms = info->desc->max_rx_timeout_ms;
 	cinfo->max_msg_size = info->desc->max_msg_size;
+	cinfo->no_completion_irq = info->desc->no_completion_irq;
 
 	/* Create a unique name for this transport device */
 	snprintf(name, 32, "__scmi_transport_device_%s_%02X",
@@ -3150,6 +3151,9 @@ static const struct scmi_desc *scmi_transport_setup(struct device *dev)
 	if (ret && ret != -EINVAL)
 		dev_err(dev, "Malformed arm,max-msg DT property.\n");
 
+	trans->desc.no_completion_irq = of_property_read_bool(dev->of_node,
+							      "arm,no-completion-irq");
+
 	dev_info(dev,
 		 "SCMI max-rx-timeout: %dms / max-msg-size: %dbytes / max-msg: %d\n",
 		 trans->desc.max_rx_timeout_ms, trans->desc.max_msg_size,
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document arm,no-completion-irq property
  2026-01-15  0:48 [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document arm,no-completion-irq property Marek Vasut
  2026-01-15  0:48 ` [PATCH v3 2/2] firmware: arm_scmi: Implement " Marek Vasut
@ 2026-01-15 11:57 ` Sudeep Holla
  2026-01-15 19:58   ` Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Sudeep Holla @ 2026-01-15 11:57 UTC (permalink / raw)
  To: Marek Vasut
  Cc: arm-scmi, Conor Dooley, Sudeep Holla, Cristian Marussi,
	Florian Fainelli, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-renesas-soc

On Thu, Jan 15, 2026 at 01:48:56AM +0100, Marek Vasut wrote:
> Document new property arm,no-completion-irq, which sets all SCMI
> operation into poll mode. This is meant to work around uncooperative
> SCP implementations, which do not generate completion interrupts.
> This applies primarily on mbox shmem based implementations.
> 
> With this property set, such implementations which do not generate
> interrupts can be interacted with, until they are fixed to generate
> interrupts properly.
> 
> Note that, because the original base protocol exchange also requires
> some sort of completion mechanism, it is not possible to query SCMI
> itself for this property and it must be described in DT. While this
> does look a bit like policy, the SCMI provider is part of the
> hardware, hence DT.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> ---
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Cristian Marussi <cristian.marussi@arm.com>
> Cc: Florian Fainelli <florian.fainelli@broadcom.com>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: arm-scmi@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
> V2: s@mean@&t and limit poll transport to mailbox/shmem only
> V3: - Reformat the commit message, expand property description to
>       explicitly spell out this is hardware description.
>     - Rename property from arm,poll-transport to arm,no-completion-irq
> ---
>  .../devicetree/bindings/firmware/arm,scmi.yaml        | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> index be817fd9cc34b..46d9a0a9a0e58 100644
> --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> @@ -146,6 +146,14 @@ properties:
>        this platform. If set, the value should be non-zero.
>      minimum: 1
>  
> +  arm,no-completion-irq:
> +    type: boolean
> +    description:
> +      An optional property which unconditionally forces polling in all transports,
> +      meant for hardware which does not generate completion interrupts. This is
> +      mainly meant to work around uncooperative SCP or SCP firmware, which does
> +      not generate completion interrupts.
> +

I would swap the order of the above two points.

“This optional property is intended for hardware that does not generate
completion interrupts and can be used to unconditionally enable forced polling
mode of operation.”

You need to update the commit message accordingly. We do not want to indicate
how this property should be used, as that is left to the implementation. The
emphasis should be on what this property indicates to its users.

Please update only if DT maintainers are also in agreement. I have just
expressed my opinion. IIUC, it is aligned to standard DT binding rules but
I may be wrong.

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document arm,no-completion-irq property
  2026-01-15 11:57 ` [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document " Sudeep Holla
@ 2026-01-15 19:58   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2026-01-15 19:58 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Marek Vasut, arm-scmi, Conor Dooley, Cristian Marussi,
	Florian Fainelli, Krzysztof Kozlowski, devicetree,
	linux-arm-kernel, linux-renesas-soc

On Thu, Jan 15, 2026 at 11:57:32AM +0000, Sudeep Holla wrote:
> On Thu, Jan 15, 2026 at 01:48:56AM +0100, Marek Vasut wrote:
> > Document new property arm,no-completion-irq, which sets all SCMI
> > operation into poll mode. This is meant to work around uncooperative
> > SCP implementations, which do not generate completion interrupts.
> > This applies primarily on mbox shmem based implementations.
> > 
> > With this property set, such implementations which do not generate
> > interrupts can be interacted with, until they are fixed to generate
> > interrupts properly.
> > 
> > Note that, because the original base protocol exchange also requires
> > some sort of completion mechanism, it is not possible to query SCMI
> > itself for this property and it must be described in DT. While this
> > does look a bit like policy, the SCMI provider is part of the
> > hardware, hence DT.
> > 
> > Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> > ---
> > Cc: Conor Dooley <conor+dt@kernel.org>
> > Cc: Cristian Marussi <cristian.marussi@arm.com>
> > Cc: Florian Fainelli <florian.fainelli@broadcom.com>
> > Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> > Cc: Rob Herring <robh@kernel.org>
> > Cc: Sudeep Holla <sudeep.holla@arm.com>
> > Cc: arm-scmi@vger.kernel.org
> > Cc: devicetree@vger.kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linux-renesas-soc@vger.kernel.org
> > ---
> > V2: s@mean@&t and limit poll transport to mailbox/shmem only
> > V3: - Reformat the commit message, expand property description to
> >       explicitly spell out this is hardware description.
> >     - Rename property from arm,poll-transport to arm,no-completion-irq
> > ---
> >  .../devicetree/bindings/firmware/arm,scmi.yaml        | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > index be817fd9cc34b..46d9a0a9a0e58 100644
> > --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > @@ -146,6 +146,14 @@ properties:
> >        this platform. If set, the value should be non-zero.
> >      minimum: 1
> >  
> > +  arm,no-completion-irq:
> > +    type: boolean
> > +    description:
> > +      An optional property which unconditionally forces polling in all transports,
> > +      meant for hardware which does not generate completion interrupts. This is
> > +      mainly meant to work around uncooperative SCP or SCP firmware, which does
> > +      not generate completion interrupts.
> > +
> 
> I would swap the order of the above two points.
> 
> “This optional property is intended for hardware that does not generate
> completion interrupts and can be used to unconditionally enable forced polling
> mode of operation.”
> 
> You need to update the commit message accordingly. We do not want to indicate
> how this property should be used, as that is left to the implementation. The
> emphasis should be on what this property indicates to its users.
> 
> Please update only if DT maintainers are also in agreement. I have just
> expressed my opinion. IIUC, it is aligned to standard DT binding rules but
> I may be wrong.

Makes sense to me.

With Sudeep's suggestion:

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>

Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-15 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15  0:48 [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document arm,no-completion-irq property Marek Vasut
2026-01-15  0:48 ` [PATCH v3 2/2] firmware: arm_scmi: Implement " Marek Vasut
2026-01-15 11:57 ` [PATCH v3 1/2] dt-bindings: firmware: arm,scmi: Document " Sudeep Holla
2026-01-15 19:58   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox