diff mbox series

[v2,1/3] dt-bindings: remoteproc: fsl,imx-rproc: Add support for i.MX95

Message ID 20250606-imx95-rproc-1-v2-1-a2bd64438be9@nxp.com
State Superseded
Headers show
Series remoteproc: imx_rproc: Support i.MX95 | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dt-meta-schema success

Commit Message

Peng Fan June 6, 2025, 1:55 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

i.MX95 has a System Manager(SM) core runs the System Control Management
Interface(SCMI) firmware. Vendor extenions are implemented in the
firmware, Logical Machine Management(LMM) protocol to manage
Logical Machines and CPU protocol to manage cores. The documentation
could be found in file drivers/firmware/arm_scmi/vendors/imx/imx95.rst.

Add below to support i.MX95
 - compatible string for i.MX95 M7
 - fsl,lmm-id to indicate the LMM ID of M7 LM
 - fsl,cpu-id to indicate the CPU ID of M7

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 .../bindings/remoteproc/fsl,imx-rproc.yaml         | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Daniel Baluta June 16, 2025, 1:07 p.m. UTC | #1
On Fri, Jun 6, 2025 at 4:57 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> i.MX95 has a System Manager(SM) core runs the System Control Management
> Interface(SCMI) firmware. Vendor extenions are implemented in the
> firmware, Logical Machine Management(LMM) protocol to manage
> Logical Machines and CPU protocol to manage cores. The documentation
> could be found in file drivers/firmware/arm_scmi/vendors/imx/imx95.rst.
>
> Add below to support i.MX95
>  - compatible string for i.MX95 M7
>  - fsl,lmm-id to indicate the LMM ID of M7 LM
>  - fsl,cpu-id to indicate the CPU ID of M7
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  .../bindings/remoteproc/fsl,imx-rproc.yaml         | 27 ++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
> index 57d75acb0b5e52ca49d1361176fdebc18a0bf7a2..a3ffab60df52be6f1d7cf4846ca5ba1c40f03bde 100644
> --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
> @@ -28,6 +28,7 @@ properties:
>        - fsl,imx8qxp-cm4
>        - fsl,imx8ulp-cm33
>        - fsl,imx93-cm33
> +      - fsl,imx95-cm7
>
>    clocks:
>      maxItems: 1
> @@ -68,6 +69,12 @@ properties:
>        Indicate whether need to load the default firmware and start the remote
>        processor automatically.
>
> +  fsl,cpu-id:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      This property is to specify the CPU ID of the remote processor
> +      in SoC which supports System Manager
> +
>    fsl,entry-address:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      description:
> @@ -78,6 +85,12 @@ properties:
>      description:
>        Phandle to IOMUXC GPR block which provide access to CM7 CPUWAIT bit.
>
> +  fsl,lmm-id:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      This property is to specify the Logical Machine ID of the remote processor
> +      in SoC which supports System Manager
> +
>    fsl,resource-id:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      description:
> @@ -114,6 +127,20 @@ allOf:
>        properties:
>          power-domains: false
>
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx95-cm7
> +    then:
> +      required:
> +        - fsl,lmm-id
> +        - fsl,cpu-id
> +    else:
> +      properties:
> +        fsl,lmm-id: false
> +        fsl,cpu-id: false

Hi Peng,

Can you remind me why do we need the else branch here?

I mean if the compatible is not fsl,imx95-cm7 then the properties
fsl,lmm-id and fsl,cpu-id are not required and I think that's fine.
Peng Fan June 17, 2025, 2:36 a.m. UTC | #2
Hi Daniel,

On Mon, Jun 16, 2025 at 04:07:02PM +0300, Daniel Baluta wrote:
>On Fri, Jun 6, 2025 at 4:57???AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>>
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> i.MX95 has a System Manager(SM) core runs the System Control Management
>> Interface(SCMI) firmware. Vendor extenions are implemented in the
>> firmware, Logical Machine Management(LMM) protocol to manage
>> Logical Machines and CPU protocol to manage cores. The documentation
>> could be found in file drivers/firmware/arm_scmi/vendors/imx/imx95.rst.
>>
>> Add below to support i.MX95
>>  - compatible string for i.MX95 M7
>>  - fsl,lmm-id to indicate the LMM ID of M7 LM
>>  - fsl,cpu-id to indicate the CPU ID of M7
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>>  .../bindings/remoteproc/fsl,imx-rproc.yaml         | 27 ++++++++++++++++++++++
>>  1 file changed, 27 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
>> index 57d75acb0b5e52ca49d1361176fdebc18a0bf7a2..a3ffab60df52be6f1d7cf4846ca5ba1c40f03bde 100644
>> --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
>> +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
>> @@ -28,6 +28,7 @@ properties:
>>        - fsl,imx8qxp-cm4
>>        - fsl,imx8ulp-cm33
>>        - fsl,imx93-cm33
>> +      - fsl,imx95-cm7
>>
>>    clocks:
>>      maxItems: 1
>> @@ -68,6 +69,12 @@ properties:
>>        Indicate whether need to load the default firmware and start the remote
>>        processor automatically.
>>
>> +  fsl,cpu-id:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      This property is to specify the CPU ID of the remote processor
>> +      in SoC which supports System Manager
>> +
>>    fsl,entry-address:
>>      $ref: /schemas/types.yaml#/definitions/uint32
>>      description:
>> @@ -78,6 +85,12 @@ properties:
>>      description:
>>        Phandle to IOMUXC GPR block which provide access to CM7 CPUWAIT bit.
>>
>> +  fsl,lmm-id:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description:
>> +      This property is to specify the Logical Machine ID of the remote processor
>> +      in SoC which supports System Manager
>> +
>>    fsl,resource-id:
>>      $ref: /schemas/types.yaml#/definitions/uint32
>>      description:
>> @@ -114,6 +127,20 @@ allOf:
>>        properties:
>>          power-domains: false
>>
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            const: fsl,imx95-cm7
>> +    then:
>> +      required:
>> +        - fsl,lmm-id
>> +        - fsl,cpu-id
>> +    else:
>> +      properties:
>> +        fsl,lmm-id: false
>> +        fsl,cpu-id: false
>
>Hi Peng,
>
>Can you remind me why do we need the else branch here?
>
>I mean if the compatible is not fsl,imx95-cm7 then the properties
>fsl,lmm-id and fsl,cpu-id are not required and I think that's fine.

It is not required, but we should also block others wrongly add
the properties. Such as dt-schema should report error if user wrongly add
these properties in DTS.

DT maintainers may help comment more.

Thanks,
Peng
Krzysztof Kozlowski June 23, 2025, 2:47 p.m. UTC | #3
On 06/06/2025 03:55, Peng Fan (OSS) wrote:
>    fsl,entry-address:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      description:
> @@ -78,6 +85,12 @@ properties:
>      description:
>        Phandle to IOMUXC GPR block which provide access to CM7 CPUWAIT bit.
>  
> +  fsl,lmm-id:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      This property is to specify the Logical Machine ID of the remote processor
> +      in SoC which supports System Manager

As explained on IRC, none of above are suitable for DT, because these
are soc specific. Also, post upstream your DTS, so we will see complete
picture instead of guessing such things.

Best regards,
Krzysztof
Peng Fan June 24, 2025, noon UTC | #4
> Subject: Re: [PATCH v2 1/3] dt-bindings: remoteproc: fsl,imx-rproc:
> Add support for i.MX95
> 
> On 06/06/2025 03:55, Peng Fan (OSS) wrote:
> >    fsl,entry-address:
> >      $ref: /schemas/types.yaml#/definitions/uint32
> >      description:
> > @@ -78,6 +85,12 @@ properties:
> >      description:
> >        Phandle to IOMUXC GPR block which provide access to CM7
> CPUWAIT bit.
> >
> > +  fsl,lmm-id:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description:
> > +      This property is to specify the Logical Machine ID of the remote
> processor
> > +      in SoC which supports System Manager
> 
> As explained on IRC, none of above are suitable for DT, because these
> are soc specific. Also, post upstream your DTS, so we will see complete
> picture instead of guessing such things.

I see. I will include dts in V3.

For lmm-id, and cpu-id, after discussing with Frank, I will remove
them from binding patch.

Thanks,
Peng.

> 
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
index 57d75acb0b5e52ca49d1361176fdebc18a0bf7a2..a3ffab60df52be6f1d7cf4846ca5ba1c40f03bde 100644
--- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml
@@ -28,6 +28,7 @@  properties:
       - fsl,imx8qxp-cm4
       - fsl,imx8ulp-cm33
       - fsl,imx93-cm33
+      - fsl,imx95-cm7
 
   clocks:
     maxItems: 1
@@ -68,6 +69,12 @@  properties:
       Indicate whether need to load the default firmware and start the remote
       processor automatically.
 
+  fsl,cpu-id:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      This property is to specify the CPU ID of the remote processor
+      in SoC which supports System Manager
+
   fsl,entry-address:
     $ref: /schemas/types.yaml#/definitions/uint32
     description:
@@ -78,6 +85,12 @@  properties:
     description:
       Phandle to IOMUXC GPR block which provide access to CM7 CPUWAIT bit.
 
+  fsl,lmm-id:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      This property is to specify the Logical Machine ID of the remote processor
+      in SoC which supports System Manager
+
   fsl,resource-id:
     $ref: /schemas/types.yaml#/definitions/uint32
     description:
@@ -114,6 +127,20 @@  allOf:
       properties:
         power-domains: false
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx95-cm7
+    then:
+      required:
+        - fsl,lmm-id
+        - fsl,cpu-id
+    else:
+      properties:
+        fsl,lmm-id: false
+        fsl,cpu-id: false
+
 additionalProperties: false
 
 examples: