linux/drivers/remoteproc
Peng Fan d8ab94fa43 remoteproc: imx_rproc: Add support for System Manager LMM API
i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and
one Cortex-M7 core. The System Control Management Interface(SCMI)
firmware runs on the M33 core. The i.MX95 SCMI firmware named System
Manager(SM) includes vendor extension protocols, Logical Machine
Management(LMM) protocol and CPU protocol and etc.

Depending on SM configuration, M7 can be used as follows:
 (1) M7 in a separate Logical Machine (LM) from A55 cores, that Linux
     can't control
 (2) M7 in a separate LM from A55 cores that Linux can control using LMM
     protocol.
 (3) M7 runs in same Logical Machine as A55 cores, so Linux can control it
     using CPU protocol

So extend the driver to using LMM and CPU protocol to manage the M7 core.
 - Compare linux LM ID(got using scmi_imx_lmm_info) and M7 LM ID(the ID
   is fixed as 1 in SM firmware if M7 is in a separate LM),
   if Linux LM ID is not same as M7 LM ID(linux and M7 in same LM), use
   LMM protocol to start/stop. CPU protocol support will be added in the
   following patch. Whether using CPU or LMM protocol to start/stop, the
   M7 status detection could use CPU protocol to detect started or not. So
   in imx_rproc_detect_mode, use scmi_imx_cpu_started to check the
   status of M7.
 - For above case (1) and (2), Use SCMI_IMX_LMM_POWER_ON to detect whether
   the M7 LM is under control of A55 LM.
 - For above case , after using SCMI_IMX_LMM_POWER_ON to check
   permission, SCMI_IMX_LMM_SHUTDOWN API should be called to shutdown
   the M7 LM to save power only when M7 LM is going to be started by
   remoteproc framework. Otherwise bypass SCMI_IMX_LMM_SHUTDOWN API if
   M7 LM is started before booting Linux.

Current setup relies on pre-Linux software(U-Boot) to do M7 TCM ECC
initialization. In future, we could add the support in Linux to decouple
U-Boot and Linux.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20260109-imx95-rproc-2026-1-8-v6-4-d2fefb36263d@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
History 2026-01-13 09:52:35 -07:00
..
da8xx_remoteproc.c remoteproc: da8xx: Use devm_rproc_add() helper 2025-08-26 08:21:23 -06:00
imx_dsp_rproc.c remoteproc: imx_dsp_rproc: Only reset carveout memory at RPROC_OFFLINE state 2026-01-05 14:09:31 -07:00
imx_rproc.c remoteproc: imx_rproc: Add support for System Manager LMM API 2026-01-13 09:52:35 -07:00
imx_rproc.h remoteproc: imx_rproc: Add support for System Manager LMM API 2026-01-13 09:52:35 -07:00
ingenic_rproc.c remoteporc: ingenic: Use devm_platform_ioremap_resource_byname() 2024-09-09 09:50:54 -06:00
Kconfig remoteproc: imx_rproc: Add support for System Manager LMM API 2026-01-13 09:52:35 -07:00
keystone_remoteproc.c remoteproc: keystone: Use devm_rproc_add() helper 2025-08-26 09:29:37 -06:00
Makefile remoteproc: k3: Refactor mailbox rx_callback functions into common driver 2025-05-20 11:19:10 -06:00
meson_mx_ao_arc.c remoteproc: Switch back to struct platform_driver::remove() 2024-10-29 11:27:37 -06:00
mtk_common.h remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizes 2024-04-30 10:43:59 -06:00
mtk_scp.c remoteproc: mtk_scp: Simplify with scoped for each OF child loop 2026-01-05 14:28:33 -07:00
mtk_scp_ipi.c remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizes 2024-04-30 10:43:59 -06:00
omap_remoteproc.c remoteproc: omap: Remove redundant pm_runtime_mark_last_busy() calls 2025-11-26 11:37:44 -06:00
omap_remoteproc.h remoteproc/omap: Switch to SPDX license identifiers 2020-03-25 22:29:51 -07:00
pru_rproc.c remoteproc: pru: Fix potential NULL pointer dereference in pru_rproc_set_ctable() 2025-09-23 11:49:58 -06:00
pru_rproc.h remoteproc: pru: Add support for PRU specific interrupt configuration 2020-12-10 10:56:01 -06:00
qcom_common.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_common.h remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_pil_info.c remoteproc: qcom: pil_info: Don't memcpy_toio more than is provided 2021-12-13 16:58:05 -06:00
qcom_pil_info.h remoteproc: qcom: Introduce helper to store pil info in IMEM 2020-07-01 22:10:18 -07:00
qcom_q6v5.c remoteproc: qcom: q6v5: Avoid handling handover twice 2025-09-22 08:33:06 -05:00
qcom_q6v5.h remoteproc: qcom: q6v5: Add interconnect path proxy vote 2022-03-11 14:22:03 -06:00
qcom_q6v5_adsp.c remoteproc: qcom_q6v5_adsp: Fix a NULL vs IS_ERR() check in adsp_alloc_memory_region() 2025-11-29 14:18:23 -06:00
qcom_q6v5_mss.c remoteproc: qcom: Use of_reserved_mem_region_* functions for "memory-region" 2025-11-26 10:27:29 -06:00
qcom_q6v5_pas.c remoteproc: qcom: pas: Fix a couple NULL vs IS_ERR() bugs 2025-11-29 14:18:23 -06:00
qcom_q6v5_wcss.c remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset 2025-11-29 15:20:23 -06:00
qcom_sysmon.c remoteproc: sysmon: Update qcom_add_sysmon_subdev() comment 2025-03-22 08:42:39 -05:00
qcom_wcnss.c remoteproc: qcom_wcnss: Fix NULL vs IS_ERR() bug in wcnss_alloc_memory_region() 2025-11-29 14:18:23 -06:00
qcom_wcnss.h remoteproc: qcom: wcnss: remove unused qcom_iris_driver declaration 2022-12-28 09:50:07 -06:00
qcom_wcnss_iris.c remoteproc: qcom_wcnss_iris: Add missing put_device() on error in probe 2025-05-13 10:10:55 -05:00
rcar_rproc.c remoteproc: Use of_reserved_mem_region_* functions for "memory-region" 2025-11-25 08:34:31 -07:00
remoteproc_cdev.c remoteproc: core: Move state checking to remoteproc_core 2022-04-14 11:13:33 -06:00
remoteproc_core.c remoteproc: core: Remove unused export of rproc_va_to_pa 2025-10-27 09:26:07 -06:00
remoteproc_coredump.c remoteproc: core: Export the rproc coredump APIs 2023-07-15 12:56:48 -07:00
remoteproc_debugfs.c remoteproc: Don't bother checking the return value of debugfs_create* 2022-04-11 10:04:40 -06:00
remoteproc_elf_helpers.h remoteproc: fix an typo in fw_elf_get_class code comments 2021-07-28 14:57:30 -05:00
remoteproc_elf_loader.c ELF: fix all "Elf" typos 2023-04-08 13:45:37 -07:00
remoteproc_internal.h remoteproc: Make rproc_class constant 2024-03-26 11:24:38 -06:00
remoteproc_sysfs.c remoteproc: Make rproc_class constant 2024-03-26 11:24:38 -06:00
remoteproc_virtio.c remoteproc: Don't use %pK through printk 2025-06-17 08:03:24 -05:00
st_remoteproc.c remoteproc: st: Fix indexing of memory-regions 2025-11-27 08:35:19 -07:00
st_slim_rproc.c remoteproc: Don't use %pK through printk 2025-06-17 08:03:24 -05:00
stm32_rproc.c remoteproc: Use of_reserved_mem_region_* functions for "memory-region" 2025-11-25 08:34:31 -07:00
ti_k3_common.c remoteproc: Use of_reserved_mem_region_* functions for "memory-region" 2025-11-25 08:34:31 -07:00
ti_k3_common.h remoteproc: k3: Refactor release_tsp() functions into common driver 2025-05-20 11:19:12 -06:00
ti_k3_dsp_remoteproc.c remoteproc: k3: Correctly release some resources allocated in k3_rproc_request_mbox() 2025-08-29 10:09:52 -06:00
ti_k3_m4_remoteproc.c remoteproc: k3: Refactor release_tsp() functions into common driver 2025-05-20 11:19:12 -06:00
ti_k3_r5_remoteproc.c remoteproc: k3: Correctly release some resources allocated in k3_rproc_request_mbox() 2025-08-29 10:09:52 -06:00
ti_sci_proc.h remoteproc: k3: Factor out TI-SCI processor control OF get function 2024-08-21 11:21:02 -06:00
wkup_m3_rproc.c remoteproc: wkup_m3: Use devm_rproc_add() helper 2025-08-26 09:47:00 -06:00
xlnx_r5_remoteproc.c remoteproc: xlnx_r5: Simplify with scoped for each OF child loop 2026-01-05 14:31:34 -07:00