mbox series

[0/5] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol

Message ID 20250121-imx-lmm-cpu-v1-0-0eab7e073e4e@nxp.com (mailing list archive)
Headers show
Series firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol | expand

Message

Peng Fan (OSS) Jan. 21, 2025, 3:08 p.m. UTC
i.MX95 System Manager(SM) implements Logical Machine Management(LMM) and
CPU protocol to manage Logical Machine(LM) and CPUs(eg, M7).

To manage M7 in a separate LM or in same LM as Linux itself. LMM APIs
and CPU APIs are needed.

When M7 is in LM 'lm-m7', and this LM is managable by 'linux-lm',
linux could use LMM_BOOT, LMM_SHUTDOWN and etc to manage 'lm-m7'.

If in same LM, use CPU_START, CPU_STOP, CPU_RESET_VECTOR_SET and etc to
manage M7.

Both LMM/CPU APIs will be used by remoteproc driver. The remoteproc
patchset will be posted out after this patchset gets reviewed or in
good shape per Maitainer's view.

Build pass with COMPILE_TEST
Tested with remoteproc on i.MX95

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Peng Fan (5):
      firmware: arm_scmi: imx: Add i.MX95 LMM protocol
      firmware: arm_scmi: imx: Add i.MX95 CPU Protocol
      firmware: arm_scmi: imx: Add LMM and CPU documentation
      firmware: imx: Add i.MX95 SCMI LMM driver
      firmware: imx: Add i.MX95 SCMI CPU driver

 drivers/firmware/arm_scmi/vendors/imx/Kconfig      |  22 +
 drivers/firmware/arm_scmi/vendors/imx/Makefile     |   2 +
 drivers/firmware/arm_scmi/vendors/imx/imx-sm-cpu.c | 283 +++++++++
 drivers/firmware/arm_scmi/vendors/imx/imx-sm-lmm.c | 235 +++++++
 drivers/firmware/arm_scmi/vendors/imx/imx95.rst    | 692 +++++++++++++++++++++
 drivers/firmware/imx/Kconfig                       |  22 +
 drivers/firmware/imx/Makefile                      |   2 +
 drivers/firmware/imx/sm-cpu.c                      |  91 +++
 drivers/firmware/imx/sm-lmm.c                      |  89 +++
 include/linux/firmware/imx/sm.h                    |  56 ++
 include/linux/scmi_imx_protocol.h                  |  39 ++
 11 files changed, 1533 insertions(+)
---
base-commit: 0907e7fb35756464aa34c35d6abb02998418164b
change-id: 20250120-imx-lmm-cpu-418daaa257e2

Best regards,

Comments

Cristian Marussi Jan. 21, 2025, 3:31 p.m. UTC | #1
On Tue, Jan 21, 2025 at 11:08:10PM +0800, Peng Fan (OSS) wrote:
> i.MX95 System Manager(SM) implements Logical Machine Management(LMM) and
> CPU protocol to manage Logical Machine(LM) and CPUs(eg, M7).
> 
> To manage M7 in a separate LM or in same LM as Linux itself. LMM APIs
> and CPU APIs are needed.
> 

Hi Peng,

I see that you are really starting to like vendor extensions
capabilities :P ... jokes apart I'll have a deeper look at this in the
next days (togetehr with your other pending patches...), BUT in the
meantime a quick one...where are the bindings for these additional
vendor protocols...seems like a patch is missing to add those in

 Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml

...even if bare simple protocol numbers (like existing protocol@81)
currently these are needed for the protocol to be initialized by the
core.

Thanks,
Cristian
Peng Fan Jan. 22, 2025, 5:31 a.m. UTC | #2
Hi Cristian,

> Subject: Re: [PATCH 0/5] firmware: scmi/imx: Add i.MX95 LMM/CPU
> Protocol
> 
> On Tue, Jan 21, 2025 at 11:08:10PM +0800, Peng Fan (OSS) wrote:
> > i.MX95 System Manager(SM) implements Logical Machine
> Management(LMM)
> > and CPU protocol to manage Logical Machine(LM) and CPUs(eg, M7).
> >
> > To manage M7 in a separate LM or in same LM as Linux itself. LMM
> APIs
> > and CPU APIs are needed.
> >
> 
> Hi Peng,
> 
> I see that you are really starting to like vendor extensions
> capabilities :P ... jokes apart

I not like vendor extensions (:

 I'll have a deeper look at this in the next
> days (togetehr with your other pending patches...),

Thanks for helping reviewing patches.

 BUT in the
> meantime a quick one...where are the bindings for these additional
> vendor protocols...seems like a patch is missing to add those in
> 
>  Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml
> 
> ...even if bare simple protocol numbers (like existing protocol@81)
> currently these are needed for the protocol to be initialized by the core.

I missed that. Thanks for pointing out. I will include the binding in V2.
V2 will be post out later after collecting some comments on V1.

Thanks,
Peng.

> 
> Thanks,
> Cristian