RE: [PATCH v4 5/7] firmware: imx: Add i.MX95 SCMI LMM driver

From: Peng Fan
Date: Mon Apr 14 2025 - 07:00:31 EST


> Subject: RE: [PATCH v4 5/7] firmware: imx: Add i.MX95 SCMI LMM
> driver
>
> Hi Sudeep,
>
> > Subject: Re: [PATCH v4 5/7] firmware: imx: Add i.MX95 SCMI LMM
> driver
> >
> > On Mon, Apr 14, 2025 at 09:57:43AM +0000, Peng Fan wrote:
> > > Hi Sudeep,
> > >
> > > > Subject: Re: [PATCH v4 5/7] firmware: imx: Add i.MX95 SCMI
> LMM
> > > > driver
> > > >
> > > > On Tue, Apr 08, 2025 at 04:44:29PM +0800, Peng Fan (OSS)
> wrote:
> > > > > From: Peng Fan <peng.fan@xxxxxxx>
> > > > >
> > > > > The i.MX95 System manager exports SCMI LMM protocol for
> linux
> > to
> > > > > manage Logical Machines. The driver is to use the LMM
> Protocol
> > > > > interface to boot, shutdown a LM.
> > > > >
> > > > > Reviewed-by: Cristian Marussi <cristian.marussi@xxxxxxx>
> > > > > Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
> > > > > ---
> > > > > drivers/firmware/arm_scmi/vendors/imx/Kconfig | 3 +-
> > > > > drivers/firmware/imx/Kconfig | 11 ++++
> > > > > drivers/firmware/imx/Makefile | 1 +
> > > > > drivers/firmware/imx/sm-lmm.c | 91
> > > > +++++++++++++++++++++++++++
> > > > > include/linux/firmware/imx/sm.h | 14 +++++
> > > > > 5 files changed, 119 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/firmware/arm_scmi/vendors/imx/Kconfig
> > > > > b/drivers/firmware/arm_scmi/vendors/imx/Kconfig
> > > > > index
> > > > >
> > > >
> >
> b5f13d0e40155e485f4d1696e9550645d888ef44..4c24e17425f83081
> > > > 0f8ba376ece9
> > > > > db93c8cded6d 100644
> > > > > --- a/drivers/firmware/arm_scmi/vendors/imx/Kconfig
> > > > > +++ b/drivers/firmware/arm_scmi/vendors/imx/Kconfig
> > > > > @@ -26,7 +26,8 @@ config IMX_SCMI_CPU_EXT config
> > > > IMX_SCMI_LMM_EXT
> > > > > tristate "i.MX SCMI LMM EXTENSION"
> > > > > depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
> > > > > - default y if ARCH_MXC
> > > > > + depends on IMX_SCMI_LMM_DRV
> > > > > + default y if ARCH_MXC && ARM64
> > > >
> > > > I can't understand the ARM64 dependency on this and next patch.
> > >
> > > ARCH_MXC both supports ARM32 and ARM64.
> > >
> > > To i.MX ARM32 platform, there is no plan to enable SCMI, so only
> set
> > y
> > > for ARCH_MXC ARM64 platforms.
> > >
> >
> > OK but why is it different for IMX_SCMI_MISC_DRV. I really don't see
> > any dependency. If it is not supported today fine, but do you need
> any
> > issue to use it or compile it for arm32 ?
>
> Seems my over-thinking.
> There is no ARM64 dependency. No issue.
> I just think there is no need to default build in this driver for i.MX
> ARM32 platform, because no i.MX ARM32 platform supports SCMI.
>
> But after a rethink, ARM64 dependency could be dropped, because
> there was already a dependency ARM_SCMI_PROTOCOL(i.MX ARM32
> not select this option), so we could follow same as
> IMX_SCMI_MISC_DRV.

Oops, I just checked wrong Kconfig under drivers/firmware/arm_scmi/
vendors/imx

Build this for ARM32 i.MX is ok, I just think no need. So add
a ARM64 dependency.

For IMX_SCMI_MISC_DRV, I could not recall clearly, seems I forgot
to add. But anyway, w/o ARM64 should be both fine.

I tested ARM32 build with imx_v6_v7_defconfig, no issue.

Thanks,
Peng.

>
> Please let me know if I need post new version for this and Dan's
> comments. Anyway, no rush.
>
> Thanks,
> Peng.
>
> >
> > --
> > Regards,
> > Sudeep