* [PATCH v2 0/2] stm32-rproc: Add firmware-name DT property support
@ 2025-03-27 8:27 Arnaud Pouliquen
2025-03-27 8:27 ` [PATCH v2 1/2] dt-bindings: remoteproc: stm32-rproc: Add firmware-name property Arnaud Pouliquen
2025-03-27 8:27 ` [PATCH v2 2/2] drivers: remoteproc: stm32_rproc: Allow to specify firmware default name Arnaud Pouliquen
0 siblings, 2 replies; 4+ messages in thread
From: Arnaud Pouliquen @ 2025-03-27 8:27 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Mathieu Poirier, Alexandre Torgue
Cc: devicetree, linux-stm32, linux-arm-kernel, linux-remoteproc,
linux-kernel, Arnaud Pouliquen
Add flexibility by supporting the optional "firmware-name" property.
This allows specifying in the device tree the firmware that needs to
be loaded on boot, if the "st,auto-boot" DT property is set.
Arnaud Pouliquen (2):
dt-bindings: remoteproc: stm32-rproc: Add firmware-name property
drivers: remoteproc: stm32_rproc: Allow to specify firmware default
name
.../devicetree/bindings/remoteproc/st,stm32-rproc.yaml | 4 ++++
drivers/remoteproc/stm32_rproc.c | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
base-commit: 38fec10eb60d687e30c8c6b5420d86e8149f7557
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] dt-bindings: remoteproc: stm32-rproc: Add firmware-name property
2025-03-27 8:27 [PATCH v2 0/2] stm32-rproc: Add firmware-name DT property support Arnaud Pouliquen
@ 2025-03-27 8:27 ` Arnaud Pouliquen
2025-03-27 16:38 ` Conor Dooley
2025-03-27 8:27 ` [PATCH v2 2/2] drivers: remoteproc: stm32_rproc: Allow to specify firmware default name Arnaud Pouliquen
1 sibling, 1 reply; 4+ messages in thread
From: Arnaud Pouliquen @ 2025-03-27 8:27 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Mathieu Poirier, Alexandre Torgue
Cc: devicetree, linux-stm32, linux-arm-kernel, linux-remoteproc,
linux-kernel, Arnaud Pouliquen
Add the 'firmware-name' property to the remote processor binding
to allow specifying the default firmware name in the device tree.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
---
.../devicetree/bindings/remoteproc/st,stm32-rproc.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
index 370af61d8f28..843679c557e7 100644
--- a/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
@@ -139,6 +139,10 @@ properties:
If defined, when remoteproc is probed, it loads the default firmware and
starts the remote processor.
+ firmware-name:
+ maxItems: 1
+ description: Default name of the remote processor firmware.
+
required:
- compatible
- reg
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] drivers: remoteproc: stm32_rproc: Allow to specify firmware default name
2025-03-27 8:27 [PATCH v2 0/2] stm32-rproc: Add firmware-name DT property support Arnaud Pouliquen
2025-03-27 8:27 ` [PATCH v2 1/2] dt-bindings: remoteproc: stm32-rproc: Add firmware-name property Arnaud Pouliquen
@ 2025-03-27 8:27 ` Arnaud Pouliquen
1 sibling, 0 replies; 4+ messages in thread
From: Arnaud Pouliquen @ 2025-03-27 8:27 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Mathieu Poirier, Alexandre Torgue
Cc: devicetree, linux-stm32, linux-arm-kernel, linux-remoteproc,
linux-kernel, Arnaud Pouliquen
Enhance the stm32_rproc driver to allow enabling the configuration of the
firmware name based on the 'firmware-name' property in the device tree,
offering flexibility compared to using the remote proc device node
name.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
---
drivers/remoteproc/stm32_rproc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
index b02b36a3f515..431648607d53 100644
--- a/drivers/remoteproc/stm32_rproc.c
+++ b/drivers/remoteproc/stm32_rproc.c
@@ -835,6 +835,7 @@ static int stm32_rproc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct stm32_rproc *ddata;
struct device_node *np = dev->of_node;
+ const char *fw_name;
struct rproc *rproc;
unsigned int state;
int ret;
@@ -843,7 +844,12 @@ static int stm32_rproc_probe(struct platform_device *pdev)
if (ret)
return ret;
- rproc = devm_rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata));
+ /* Look for an optional firmware name */
+ ret = rproc_of_parse_firmware(dev, 0, &fw_name);
+ if (ret < 0 && ret != -EINVAL)
+ return ret;
+
+ rproc = devm_rproc_alloc(dev, np->name, &st_rproc_ops, fw_name, sizeof(*ddata));
if (!rproc)
return -ENOMEM;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: remoteproc: stm32-rproc: Add firmware-name property
2025-03-27 8:27 ` [PATCH v2 1/2] dt-bindings: remoteproc: stm32-rproc: Add firmware-name property Arnaud Pouliquen
@ 2025-03-27 16:38 ` Conor Dooley
0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2025-03-27 16:38 UTC (permalink / raw)
To: Arnaud Pouliquen
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Mathieu Poirier, Alexandre Torgue, devicetree, linux-stm32,
linux-arm-kernel, linux-remoteproc, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 329 bytes --]
On Thu, Mar 27, 2025 at 09:27:20AM +0100, Arnaud Pouliquen wrote:
> Add the 'firmware-name' property to the remote processor binding
> to allow specifying the default firmware name in the device tree.
>
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-27 16:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27 8:27 [PATCH v2 0/2] stm32-rproc: Add firmware-name DT property support Arnaud Pouliquen
2025-03-27 8:27 ` [PATCH v2 1/2] dt-bindings: remoteproc: stm32-rproc: Add firmware-name property Arnaud Pouliquen
2025-03-27 16:38 ` Conor Dooley
2025-03-27 8:27 ` [PATCH v2 2/2] drivers: remoteproc: stm32_rproc: Allow to specify firmware default name Arnaud Pouliquen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox