* [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol
@ 2025-03-03 2:53 Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation Peng Fan (OSS)
` (7 more replies)
0 siblings, 8 replies; 23+ messages in thread
From: Peng Fan (OSS) @ 2025-03-03 2:53 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
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>
---
Changes in v3:
Patch 1: Correct LMM_ATTRIBUTE return values
Update the return status of LM_BOOT/RESET/SHUTDOWN/WAKE
clarify sync/async in the Introduction chapter of LMM
Update the Origin entry in LMM_RESET_REASON
Clarify CPU run/sleep mode
Add note for CPU protocol to indicate AP using PSCI, non-AP use OS.
Specify mandatory for each command in LMM/CPU per firmware owner.
For BBM/MISC which have optional command, I will update doc in separate patch later
Patch 2: Add description in binding doc
Patch 3: Unify scmi_imx_lmm_[boot,power_on], Use le32_get_bits
Patch 4: Unify scmi_imx_cpu_[start,stop], Use le32_encode_bits
Add pointer check in scmi_imx_cpu_started
correct nr_cpus calculation
Patch 5: Unify lmm shutdown,boot/power_on, update kconfig to avoid build bot issue
Add R-b
Patch 6: Unity cpu start/stop, update Kconfig to avoid build bot issue.
Add R-b
Ran smatch as below, no issue found.
~/smatch/smatch_scripts/kchecker drivers/firmware/arm_scmi/vendors/imx/
~/smatch/smatch_scripts/kchecker drivers/firmware/imx/
- Link to v2: https://lore.kernel.org/r/20250212-imx-lmm-cpu-v2-0-3aee005968c1@nxp.com
Changes in v2:
- Add dt-bindings patch 2
- Add a maintainer entry with patch 7
- Update doc to address various questions and make it clear
- Use strscpy to use scmi server returned string
- Drop extra blank line
- Shrink scmi_imx_cpu_attributes_get function args.
- Typo fixes
- Add LMM_RESET_VECTOR_SET
- Link to v1: https://lore.kernel.org/r/20250121-imx-lmm-cpu-v1-0-0eab7e073e4e@nxp.com
---
Peng Fan (7):
firmware: arm_scmi: imx: Add LMM and CPU documentation
dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol
firmware: arm_scmi: imx: Add i.MX95 LMM protocol
firmware: arm_scmi: imx: Add i.MX95 CPU Protocol
firmware: imx: Add i.MX95 SCMI LMM driver
firmware: imx: Add i.MX95 SCMI CPU driver
MAINTAINERS: add entry for i.MX SCMI extensions
.../bindings/firmware/nxp,imx95-scmi.yaml | 23 +
MAINTAINERS | 9 +
drivers/firmware/arm_scmi/vendors/imx/Kconfig | 24 +
drivers/firmware/arm_scmi/vendors/imx/Makefile | 2 +
drivers/firmware/arm_scmi/vendors/imx/imx-sm-cpu.c | 276 +++++++
drivers/firmware/arm_scmi/vendors/imx/imx-sm-lmm.c | 257 +++++++
drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 +++++++++++++++++++++
drivers/firmware/imx/Kconfig | 22 +
drivers/firmware/imx/Makefile | 2 +
drivers/firmware/imx/sm-cpu.c | 85 +++
drivers/firmware/imx/sm-lmm.c | 91 +++
include/linux/firmware/imx/sm.h | 19 +
include/linux/scmi_imx_protocol.h | 42 ++
13 files changed, 1653 insertions(+)
---
base-commit: fb2b3e3bd74b8a3f742eaade06f6565323cf4bdf
change-id: 20250120-imx-lmm-cpu-418daaa257e2
Best regards,
--
Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
@ 2025-03-03 2:53 ` Peng Fan (OSS)
2025-04-01 14:15 ` Sudeep Holla
2025-04-01 14:51 ` Cristian Marussi
2025-03-03 2:53 ` [PATCH v3 2/7] dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol Peng Fan (OSS)
` (6 subsequent siblings)
7 siblings, 2 replies; 23+ messages in thread
From: Peng Fan (OSS) @ 2025-03-03 2:53 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add i.MX95 Logical Machine Management and CPU Protocol documentation.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 ++++++++++++++++++++++++
1 file changed, 801 insertions(+)
diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..74326bf2ea8586282a735713e0ab7eb90ccce8ff 100644
--- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
+++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
@@ -32,6 +32,501 @@ port, and deploy the SM on supported processors.
The SM implements an interface compliant with the Arm SCMI Specification
with additional vendor specific extensions.
+SCMI_LMM: System Control and Management Logical Machine Management Vendor Protocol
+==================================================================================
+
+This protocol is intended for boot, shutdown, and reset of other logical
+machines (LM). It is usually used to allow one LM(e.g. OSPM) to manage
+another LM which is usually an offload or accelerator engine.. Notifications
+from this protocol can also be used to manage a communication link to another
+LM. The LMM protocol provides functions to:
+
+- Describe the protocol version.
+- Discover implementation attributes.
+- Discover the LMs defined in the system.
+- Boot an LM.
+- Shutdown an LM (gracefully or forcibly).
+- Reset an LM (gracefully or forcibly).
+- Wake an LM from suspend.
+- Suspend an LM (gracefully).
+- Read boot/shutdown/reset information for an LM.
+- Get notifications when an LM boots or shuts down (e.g. LM[X] requested
+ notification of LM[Y] boots or shuts down, when LM[Y] boots or shuts down,
+ SCMI firmware will send notification to LM[X]).
+
+'Graceful' means asking LM itself to shutdown/reset/etc (e.g. sending
+notification to Linux, Then Linux reboots or powers down itself). It is async
+command that the SUCCESS of the command just means the command successfully
+return, not means reboot/reset successfully finished.
+'Forceful' means the SM will force shutdown/reset/etc the LM. It is sync
+command that the SUCCESS of the command means the LM has been successfully
+shutdown/reset/etc.
+If the commands not have Graceful/Forceful flag settings, such as WAKE, SUSEND,
+it is async command.
+
+Commands:
+_________
+
+PROTOCOL_VERSION
+~~~~~~~~~~~~~~~~
+
+message_id: 0x0
+protocol_id: 0x80
+This command is mandatory.
+
++---------------+--------------------------------------------------------------+
+|Return values |
++---------------+--------------------------------------------------------------+
+|Name |Description |
++---------------+--------------------------------------------------------------+
+|int32 status | See ARM SCMI Specification for status code definitions. |
++---------------+--------------------------------------------------------------+
+|uint32 version | For this revision of the specification, this value must be |
+| | 0x10000. |
++---------------+--------------------------------------------------------------+
+
+PROTOCOL_ATTRIBUTES
+~~~~~~~~~~~~~~~~~~~
+
+message_id: 0x1
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status | See ARM SCMI Specification for status code definitions. |
++------------------+-----------------------------------------------------------+
+|uint32 attributes |Protocol attributes: |
+| |Bits[31:8] Reserved, must be zero. |
+| |Bits[7:0] Number of Logical Machines |
++------------------+-----------------------------------------------------------+
+
+PROTOCOL_MESSAGE_ATTRIBUTES
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+message_id: 0x2
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: in case the message is implemented and available |
+| |to use. |
+| |NOT_FOUND: if the message identified by message_id is |
+| |invalid or not implemented |
++------------------+-----------------------------------------------------------+
+|uint32 attributes |Flags that are associated with a specific function in the |
+| |protocol. For all functions in this protocol, this |
+| |parameter has a value of 0 |
++------------------+-----------------------------------------------------------+
+
+LMM_ATTRIBUTES
+~~~~~~~~~~~~~~
+
+message_id: 0x3
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if valid attributes are returned. |
+| |NOT_FOUND: if lmId not points to a valid logical machine. |
+| |DENIED: if the agent does not have permission to get info |
+| |for the LM specified by lmid. |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |Identifier of the LM whose identification is requested. |
+| |This field is: Populated with the lmId of the calling |
+| |agent, when the lmId parameter passed via the function is |
+| |0xFFFFFFFF. Identical to the lmId field passed via the |
+| |calling parameters, in all other cases |
++------------------+-----------------------------------------------------------+
+|uint32 attributes | Bits[31:0] reserved. must be zero |
++------------------+-----------------------------------------------------------+
+|uint32 state | Current state of the LM |
++------------------+-----------------------------------------------------------+
+|uint32 errStatus | Last error status recorded |
++------------------+-----------------------------------------------------------+
+|char name[16] | A NULL terminated ASCII string with the LM name, of up |
+| | to 16 bytes |
++------------------+-----------------------------------------------------------+
+
+LMM_BOOT
+~~~~~~~~
+
+message_id: 0x4
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if LM boots successfully started. |
+| |NOT_FOUND: if lmId not points to a valid logical machine. |
+| |INVALID_PARAMETERS: if lmId is same as the caller. |
+| |DENIED: if the agent does not have permission to manage the|
+| |the LM specified by lmid. |
++------------------+-----------------------------------------------------------+
+
+LMM_RESET
+~~~~~~~~~
+
+message_id: 0x5
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++------------------+-----------------------------------------------------------+
+|uint32 flags |Reset flags: |
+| |Bits[31:1] Reserved, must be zero. |
+| |Bit[0] Graceful request: |
+| |Set to 1 if the request is a graceful request. |
+| |Set to 0 if the request is a forceful request. |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: The LMM RESET command finished successfully in |
+| |graceful reset or LM successfully resets in forceful reset.|
+| |NOT_FOUND: if lmId not points to a valid logical machine. |
+| |INVALID_PARAMETERS: if lmId is same as the caller. |
+| |DENIED: if the agent does not have permission to manage the|
+| |the LM specified by lmid. |
++------------------+-----------------------------------------------------------+
+
+LMM_SHUTDOWN
+~~~~~~~~~~~~
+
+message_id: 0x6
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++------------------+-----------------------------------------------------------+
+|uint32 flags |Reset flags: |
+| |Bits[31:1] Reserved, must be zero. |
+| |Bit[0] Graceful request: |
+| |Set to 1 if the request is a graceful request. |
+| |Set to 0 if the request is a forceful request. |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: The LMM shutdown command finished successfully in |
+| |graceful request or LM successfully shutdown in forceful |
+| |request. |
+| |NOT_FOUND: if lmId not points to a valid logical machine. |
+| |INVALID_PARAMETERS: if lmId is same as the caller. |
+| |DENIED: if the agent does not have permission to manage the|
+| |the LM specified by lmid. |
++------------------+-----------------------------------------------------------+
+
+LMM_WAKE
+~~~~~~~~
+
+message_id: 0x7
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if LM wake command successfully returns. |
+| |NOT_FOUND: if lmId not points to a valid logical machine. |
+| |INVALID_PARAMETERS: if lmId is same as the caller. |
+| |DENIED: if the agent does not have permission to manage the|
+| |the LM specified by lmid. |
++------------------+-----------------------------------------------------------+
+
+LMM_SUSPEND
+~~~~~~~~~~~
+
+message_id: 0x8
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if LM suspend command successfully returns. |
+| |NOT_FOUND: if lmId not points to a valid logical machine. |
+| |INVALID_PARAMETERS: if lmId is same as the caller. |
+| |DENIED: if the agent does not have permission to manage the|
+| |the LM specified by lmid. |
++------------------+-----------------------------------------------------------+
+
+LMM_NOTIFY
+~~~~~~~~~~
+
+message_id: 0x9
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++------------------+-----------------------------------------------------------+
+|uint32 flags |Notification flags: |
+| |Bits[31:3] Reserved, must be zero. |
+| |Bit[3] Wake (resume) notification: |
+| |Set to 1 to send notification. |
+| |Set to 0 if no notification. |
+| |Bit[2] Suspend (sleep) notification: |
+| |Set to 1 to send notification. |
+| |Set to 0 if no notification. |
+| |Bit[1] Shutdown (off) notification: |
+| |Set to 1 to send notification. |
+| |Set to 0 if no notification. |
+| |Bit[0] Boot (on) notification: |
+| |Set to 1 to send notification. |
+| |Set to 0 if no notification |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if the notification state successfully updated. |
+| |NOT_FOUND: if lmId not points to a valid logical machine. |
+| |INVALID_PARAMETERS: if input attributes flag specifies |
+| |unsupported or invalid configurations. |
+| |DENIED: if the agent does not have permission to request |
+| |the notification. |
++------------------+-----------------------------------------------------------+
+
+LMM_RESET_REASON
+~~~~~~~~~~~~~~~~
+
+message_id: 0xA
+protocol_id: 0x80
+This command is mandatory.
+
+This command is to return the reset reason that caused the last reset, such as
+POR, WDOG, JTAG and etc.
+
++---------------------+--------------------------------------------------------+
+|Parameters |
++---------------------+--------------------------------------------------------+
+|Name |Description |
++---------------------+--------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++---------------------+--------------------------------------------------------+
+|Return values |
++---------------------+--------------------------------------------------------+
+|Name |Description |
++---------------------+--------------------------------------------------------+
+|int32 status |SUCCESS: if the reset reason of the LM successfully |
+| |updated. |
+| |NOT_FOUND: if lmId not points to a valid logical machine|
+| |DENIED: if the agent does not have permission to request|
+| |the reset reason. |
++---------------------+--------------------------------------------------------+
+|uint32 bootflags |Boot reason flags. This parameter has the format: |
+| |Bits[31] Valid. |
+| |Set to 1 if the entire reason is valid. |
+| |Set to 0 if the entire reason is not valid. |
+| |Bits[30:29] Reserved, must be zero. |
+| |Bit[28] Valid origin: |
+| |Set to 1 if the origin field is valid. |
+| |Set to 0 if the origin field is not valid. |
+| |Bits[27:24] Origin. |
+| |Logical Machine(LM) ID that causes the BOOT of this LM |
+| |Bit[23] Valid err ID: |
+| |Set to 1 if the error ID field is valid. |
+| |Set to 0 if the error ID field is not valid. |
+| |Bits[22:8] Error ID(Agent ID of the system). |
+| |Bit[7:0] Reason(WDOG, POR, FCCU and etc) |
++---------------------+--------------------------------------------------------+
+|uint32 shutdownflags |Shutdown reason flags. This parameter has the format: |
+| |Bits[31] Valid. |
+| |Set to 1 if the entire reason is valid. |
+| |Set to 0 if the entire reason is not valid. |
+| |Bits[30:29] Number of valid extended info words. |
+| |Bit[28] Valid origin: |
+| |Set to 1 if the origin field is valid. |
+| |Set to 0 if the origin field is not valid. |
+| |Bits[27:24] Origin. |
+| |Logical Machine(LM) ID that causes the BOOT of this LM |
+| |Bit[23] Valid err ID: |
+| |Set to 1 if the error ID field is valid. |
+| |Set to 0 if the error ID field is not valid. |
+| |Bits[22:8] Error ID(Agent ID of the System). |
+| |Bit[7:0] Reason |
++---------------------+--------------------------------------------------------+
+|uint32 extinfo[3] |Array of extended info words(e.g. fault pc) |
++---------------------+--------------------------------------------------------+
+
+LMM_POWER_ON
+~~~~~~~~~~~~
+
+message_id: 0xB
+protocol_id: 0x80
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if LM successfully powers on. |
+| |NOT_FOUND: if lmId not points to a valid logical machine. |
+| |INVALID_PARAMETERS: if lmId is same as the caller. |
+| |DENIED: if the agent does not have permission to manage the|
+| |the LM specified by lmid. |
++------------------+-----------------------------------------------------------+
+
+LMM_RESET_VECTOR_SET
+~~~~~~~~~~~~~~~~~~~~
+
+message_id: 0xC
+protocol_id: 0x80
+This command is mandatory.
+
++-----------------------+------------------------------------------------------+
+|Parameters |
++-----------------------+------------------------------------------------------+
+|Name |Description |
++-----------------------+------------------------------------------------------+
+|uint32 lmid |ID of the Logical Machine |
++-----------------------+------------------------------------------------------+
+|uint32 cpuid |ID of the CPU inside the LM |
++-----------------------+------------------------------------------------------+
+|uint32 flags |Reset vector flags |
+| |Bits[31:0] Reserved, must be zero. |
++-----------------------+------------------------------------------------------+
+|uint32 resetVectorLow |Lower vector |
++-----------------------+------------------------------------------------------+
+|uint32 resetVectorHigh |Higher vector |
++-----------------------+------------------------------------------------------+
+|Return values |
++-----------------------+------------------------------------------------------+
+|Name |Description |
++-----------------------+------------------------------------------------------+
+|int32 status |SUCCESS: If reset vector is set successfully. |
+| |NOT_FOUND: if lmId not points to a valid logical |
+| |machine, or cpuId is not valid. |
+| |INVALID_PARAMETERS: if reset vector is invalid. |
+| |DENIED: if the agent does not have permission to set |
+| |the reset vector for the CPU in the LM. |
++-----------------------+------------------------------------------------------+
+
+NEGOTIATE_PROTOCOL_VERSION
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+message_id: 0x10
+protocol_id: 0x80
+This command is mandatory.
+
++--------------------+---------------------------------------------------------+
+|Parameters |
++--------------------+---------------------------------------------------------+
+|Name |Description |
++--------------------+---------------------------------------------------------+
+|uint32 version |The negotiated protocol version the agent intends to use |
++--------------------+---------------------------------------------------------+
+|Return values |
++--------------------+---------------------------------------------------------+
+|Name |Description |
++--------------------+---------------------------------------------------------+
+|int32 status |SUCCESS: if the negotiated protocol version is supported |
+| |by the platform. All commands, responses, and |
+| |notifications post successful return of this command must|
+| |comply with the negotiated version. |
+| |NOT_SUPPORTED: if the protocol version is not supported. |
++--------------------+---------------------------------------------------------+
+
+Notifications
+_____________
+
+LMM_EVENT
+~~~~~~~~~
+
+message_id: 0x0
+protocol_id: 0x80
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 lmid |Identifier for the LM that caused the transition. |
++------------------+-----------------------------------------------------------+
+|uint32 eventlm |Identifier of the LM this event refers to. |
++------------------+-----------------------------------------------------------+
+|uint32 flags |LM events: |
+| |Bits[31:3] Reserved, must be zero. |
+| |Bit[3] Wake (resume) event: |
+| |1 LM has awakened. |
+| |0 not a wake event. |
+| |Bit[2] Suspend (sleep) event: |
+| |1 LM has suspended. |
+| |0 not a suspend event. |
+| |Bit[1] Shutdown (off) event: |
+| |1 LM has shutdown. |
+| |0 not a shutdown event. |
+| |Bit[0] Boot (on) event: |
+| |1 LM has booted. |
+| |0 not a boot event. |
++------------------+-----------------------------------------------------------+
+
SCMI_BBM: System Control and Management BBM Vendor Protocol
==============================================================
@@ -436,6 +931,312 @@ protocol_id: 0x81
| |0 no button change detected. |
+------------------+-----------------------------------------------------------+
+SCMI_CPU: System Control and Management CPU Vendor Protocol
+==============================================================
+
+This protocol allows an agent to start or stop a CPU. It is used to manage
+auxiliary CPUs in an LM (e.g. additional cores in an AP cluster or
+Cortex-M cores).
+Note:
+ - For cores in AP cluster, PSCI should be used and ATF will use CPU
+ protocol to handle them. For cores in non-AP cluster, Operating System(e.g.
+ Linux OS) could use CPU protocols to control Cortex-M7 cores.
+ - CPU indicates the core and its auxiliary peripherals(e.g. TCM) inside
+ i.MX SoC
+
+The CPU protocol provides functions to:
+
+- Describe the protocol version.
+- Discover implementation attributes.
+- Discover the CPUs defined in the system.
+- Start a CPU.
+- Stop a CPU.
+- Set the boot and resume addresses for a CPU.
+- Set the sleep mode of a CPU.
+- Configure wake-up sources for a CPU.
+- Configure power domain reactions (LPM mode and retention mask) for a CPU.
+- The CPU IDs can be found in the CPU section of the SoC DEVICE: SM Device
+ Interface. They can also be found in the SoC RM. See the CPU Mode Control
+ (CMC) list in General Power Controller (GPC) section.
+
+CPU settings are not aggregated and setting their state is normally exclusive
+to one client.
+
+Commands:
+_________
+
+PROTOCOL_VERSION
+~~~~~~~~~~~~~~~~
+
+message_id: 0x0
+protocol_id: 0x82
+This command is mandatory.
+
++---------------+--------------------------------------------------------------+
+|Return values |
++---------------+--------------------------------------------------------------+
+|Name |Description |
++---------------+--------------------------------------------------------------+
+|int32 status | See ARM SCMI Specification for status code definitions. |
++---------------+--------------------------------------------------------------+
+|uint32 version | For this revision of the specification, this value must be |
+| | 0x10000. |
++---------------+--------------------------------------------------------------+
+
+PROTOCOL_ATTRIBUTES
+~~~~~~~~~~~~~~~~~~~
+
+message_id: 0x1
+protocol_id: 0x82
+This command is mandatory.
+
++---------------+--------------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status | See ARM SCMI Specification for status code definitions. |
++------------------+-----------------------------------------------------------+
+|uint32 attributes |Protocol attributes: |
+| |Bits[31:16] Reserved, must be zero. |
+| |Bits[15:0] Number of CPUs |
++------------------+-----------------------------------------------------------+
+
+PROTOCOL_MESSAGE_ATTRIBUTES
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+message_id: 0x2
+protocol_id: 0x82
+This command is mandatory.
+
++---------------+--------------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: in case the message is implemented and available |
+| |to use. |
+| |NOT_FOUND: if the message identified by message_id is |
+| |invalid or not implemented |
++------------------+-----------------------------------------------------------+
+|uint32 attributes |Flags that are associated with a specific function in the |
+| |protocol. For all functions in this protocol, this |
+| |parameter has a value of 0 |
++------------------+-----------------------------------------------------------+
+
+CPU_ATTRIBUTES
+~~~~~~~~~~~~~~
+
+message_id: 0x4
+protocol_id: 0x82
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 cpuid |Identifier for the CPU |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if valid attributes are returned successfully. |
+| |NOT_FOUND: if the cpuid is not valid. |
++------------------+-----------------------------------------------------------+
+|uint32 attributes |Bits[31:0] Reserved, must be zero |
++------------------+-----------------------------------------------------------+
+|char name[16] |NULL terminated ASCII string with CPU name up to 16 bytes |
++------------------+-----------------------------------------------------------+
+
+CPU_START
+~~~~~~~~~
+
+message_id: 0x4
+protocol_id: 0x82
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 cpuid |Identifier for the CPU |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if the cpu is started successfully. |
+| |NOT_FOUND: if cpuid is not valid. |
+| |DENIED: the calling agent is not allowed to start this CPU.|
++------------------+-----------------------------------------------------------+
+
+CPU_STOP
+~~~~~~~~
+
+message_id: 0x5
+protocol_id: 0x82
+This command is mandatory.
+
++------------------+-----------------------------------------------------------+
+|Parameters |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|uint32 cpuid |Identifier for the CPU |
++------------------+-----------------------------------------------------------+
+|Return values |
++------------------+-----------------------------------------------------------+
+|Name |Description |
++------------------+-----------------------------------------------------------+
+|int32 status |SUCCESS: if the cpu is started successfully. |
+| |NOT_FOUND: if cpuid is not valid. |
+| |DENIED: the calling agent is not allowed to stop this CPU. |
++------------------+-----------------------------------------------------------+
+
+CPU_RESET_VECTOR_SET
+~~~~~~~~~~~~~~~~~~~~
+
+message_id: 0x6
+protocol_id: 0x82
+This command is mandatory.
+
++----------------------+-------------------------------------------------------+
+|Parameters |
++----------------------+-------------------------------------------------------+
+|Name |Description |
++----------------------+-------------------------------------------------------+
+|uint32 cpuid |Identifier for the CPU |
++----------------------+-------------------------------------------------------+
+|uint32 flags |Reset vector flags: |
+| |Bit[31] Resume flag. |
+| |Set to 1 to update the reset vector used on resume. |
+| |Bit[30] Boot flag. |
+| |Set to 1 to update the reset vector used for boot. |
+| |Bits[29:1] Reserved, must be zero. |
+| |Bit[0] Table flag. |
+| |Set to 1 if vector is the vector table base address. |
++----------------------+-------------------------------------------------------+
+|uint32 resetVectorLow |Lower vector: |
+| |If bit[0] of flags is 0, the lower 32 bits of the |
+| |physical address where the CPU should execute from on |
+| |reset. If bit[0] of flags is 1, the lower 32 bits of |
+| |the vector table base address |
++----------------------+-------------------------------------------------------+
+|uint32 resetVectorhigh|Upper vector: |
+| |If bit[0] of flags is 0, the upper 32 bits of the |
+| |physical address where the CPU should execute from on |
+| |reset. If bit[0] of flags is 1, the upper 32 bits of |
+| |the vector table base address |
++----------------------+-------------------------------------------------------+
+|Return values |
++----------------------+-------------------------------------------------------+
+|Name |Description |
++----------------------+-------------------------------------------------------+
+|int32 status |SUCCESS: if the CPU reset vector is set successfully. |
+| |NOT_FOUND: if cpuId does not point to a valid CPU. |
+| |INVALID_PARAMETERS: the requested vector type is not |
+| |supported by this CPU. |
+| |DENIED: the calling agent is not allowed to set the |
+| |reset vector of this CPU |
++----------------------+-------------------------------------------------------+
+
+CPU_SLEEP_MODE_SET
+~~~~~~~~~~~~~~~~~~
+
+message_id: 0x7
+protocol_id: 0x82
+This command is mandatory.
+
++----------------------+-------------------------------------------------------+
+|Parameters |
++----------------------+-------------------------------------------------------+
+|Name |Description |
++----------------------+-------------------------------------------------------+
+|uint32 cpuid |Identifier for the CPU |
++----------------------+-------------------------------------------------------+
+|uint32 flags |Sleep mode flags: |
+| |Bits[31:1] Reserved, must be zero. |
+| |Bit[0] IRQ mux: |
+| |If set to 1 the wakeup mux source is the GIC, else if 0|
+| |then the GPC |
++----------------------+-------------------------------------------------------+
+|uint32 sleepmode |target sleep mode. When CPU runs into WFI, the GPC mode|
+| |will be triggered to be in below modes: |
+| |RUN(0), WAIT(1), STOP(2), SUSPEND(3) |
++----------------------+-------------------------------------------------------+
+|Return values |
++----------------------+-------------------------------------------------------+
+|Name |Description |
++----------------------+-------------------------------------------------------+
+|int32 status |SUCCESS: if the CPU sleep mode is set successfully. |
+| |NOT_FOUND: if cpuId does not point to a valid CPU. |
+| |INVALID_PARAMETERS: the sleepmode or flags is invalid. |
+| |DENIED: the calling agent is not allowed to configure |
+| |the CPU |
++----------------------+-------------------------------------------------------+
+
+CPU_INFO_GET
+~~~~~~~~~~~~
+
+message_id: 0xC
+protocol_id: 0x82
+This command is mandatory.
+
++----------------------+-------------------------------------------------------+
+|Parameters |
++----------------------+-------------------------------------------------------+
+|Name |Description |
++----------------------+-------------------------------------------------------+
+|uint32 cpuid |Identifier for the CPU |
++----------------------+-------------------------------------------------------+
+|Return values |
++----------------------+-------------------------------------------------------+
+|Name |Description |
++----------------------+-------------------------------------------------------+
+|int32 status |SUCCESS: if valid attributes are returned successfully.|
+| |NOT_FOUND: if the cpuid is not valid. |
++----------------------+-------------------------------------------------------+
+|uint32 runmode |Run mode for the CPU |
+| |RUN(0):cpu started |
+| |HOLD(1):cpu powered up and reset asserted |
+| |STOP(2):cpu reseted and hold cpu |
+| |SUSPEND(3):in cpuidle state |
++----------------------+-------------------------------------------------------+
+|uint32 sleepmode |Sleep mode for the CPU, see CPU_SLEEP_MODE_SET |
++----------------------+-------------------------------------------------------+
+|uint32 resetvectorlow |Reset vector low 32 bits for the CPU |
++----------------------+-------------------------------------------------------+
+|uint32 resetvecothigh |Reset vector high 32 bits for the CPU |
++----------------------+-------------------------------------------------------+
+
+NEGOTIATE_PROTOCOL_VERSION
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+message_id: 0x10
+protocol_id: 0x82
+This command is mandatory.
+
++--------------------+---------------------------------------------------------+
+|Parameters |
++--------------------+---------------------------------------------------------+
+|Name |Description |
++--------------------+---------------------------------------------------------+
+|uint32 version |The negotiated protocol version the agent intends to use |
++--------------------+---------------------------------------------------------+
+|Return values |
++--------------------+---------------------------------------------------------+
+|Name |Description |
++--------------------+---------------------------------------------------------+
+|int32 status |SUCCESS: if the negotiated protocol version is supported |
+| |by the platform. All commands, responses, and |
+| |notifications post successful return of this command must|
+| |comply with the negotiated version. |
+| |NOT_SUPPORTED: if the protocol version is not supported. |
++--------------------+---------------------------------------------------------+
+
SCMI_MISC: System Control and Management MISC Vendor Protocol
================================================================
--
2.37.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v3 2/7] dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation Peng Fan (OSS)
@ 2025-03-03 2:53 ` Peng Fan (OSS)
2025-04-01 22:21 ` Rob Herring (Arm)
2025-03-03 2:53 ` [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol Peng Fan (OSS)
` (5 subsequent siblings)
7 siblings, 1 reply; 23+ messages in thread
From: Peng Fan (OSS) @ 2025-03-03 2:53 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add i.MX SCMI Extension protocols bindings for:
- Logic Machine Management(LMM) Protocol
intended for boot, shutdown, and reset of other logical machines (LM).
It is usually used to allow one LM to manager another used as an offload
or accelerator engine..
- CPU Protocol.
allows an agent to start or stop a CPU. It is used to manage auxiliary
CPUs in an LM (e.g. additional cores in an AP cluster).
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
.../bindings/firmware/nxp,imx95-scmi.yaml | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml b/Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml
index 1a95010a546b14b1d3d97aa990c0305a551f2620..2bda2e0e13693f12816762137e07dc308d2c49e4 100644
--- a/Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/nxp,imx95-scmi.yaml
@@ -11,6 +11,18 @@ maintainers:
- Peng Fan <peng.fan@nxp.com>
properties:
+ protocol@80:
+ description:
+ SCMI LMM protocol which is for boot, shutdown, and reset of other logical
+ machines (LM). It is usually used to allow one LM to manage another used
+ as an offload or accelerator engine.
+ $ref: '/schemas/firmware/arm,scmi.yaml#/$defs/protocol-node'
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ const: 0x80
+
protocol@81:
$ref: '/schemas/firmware/arm,scmi.yaml#/$defs/protocol-node'
unevaluatedProperties: false
@@ -19,6 +31,17 @@ properties:
reg:
const: 0x81
+ protocol@82:
+ description:
+ SCMI CPU Protocol which allows an agent to start or stop a CPU. It is
+ used to manage auxiliary CPUs in a LM.
+ $ref: '/schemas/firmware/arm,scmi.yaml#/$defs/protocol-node'
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ const: 0x82
+
protocol@84:
$ref: '/schemas/firmware/arm,scmi.yaml#/$defs/protocol-node'
unevaluatedProperties: false
--
2.37.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 2/7] dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol Peng Fan (OSS)
@ 2025-03-03 2:53 ` Peng Fan (OSS)
2025-03-03 8:03 ` Dan Carpenter
` (2 more replies)
2025-03-03 2:53 ` [PATCH v3 4/7] firmware: arm_scmi: imx: Add i.MX95 CPU Protocol Peng Fan (OSS)
` (4 subsequent siblings)
7 siblings, 3 replies; 23+ messages in thread
From: Peng Fan (OSS) @ 2025-03-03 2:53 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add Logical Machine Management(LMM) protocol which is intended for boot,
shutdown, and reset of other logical machines (LM). It is usually used to
allow one LM to manager another used as an offload or accelerator engine.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/arm_scmi/vendors/imx/Kconfig | 11 +
drivers/firmware/arm_scmi/vendors/imx/Makefile | 1 +
drivers/firmware/arm_scmi/vendors/imx/imx-sm-lmm.c | 257 +++++++++++++++++++++
include/linux/scmi_imx_protocol.h | 32 +++
4 files changed, 301 insertions(+)
diff --git a/drivers/firmware/arm_scmi/vendors/imx/Kconfig b/drivers/firmware/arm_scmi/vendors/imx/Kconfig
index a01bf5e47301d2f93c9bfc7eebc77e083ea4ed75..1a936fc87d2350e2a21bccd45dfbeebfa3b90286 100644
--- a/drivers/firmware/arm_scmi/vendors/imx/Kconfig
+++ b/drivers/firmware/arm_scmi/vendors/imx/Kconfig
@@ -12,6 +12,17 @@ config IMX_SCMI_BBM_EXT
To compile this driver as a module, choose M here: the
module will be called imx-sm-bbm.
+config IMX_SCMI_LMM_EXT
+ tristate "i.MX SCMI LMM EXTENSION"
+ depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
+ default y if ARCH_MXC
+ help
+ This enables i.MX System Logical Machine Protocol to
+ manage Logical Machines boot, shutdown and etc.
+
+ To compile this driver as a module, choose M here: the
+ module will be called imx-sm-lmm.
+
config IMX_SCMI_MISC_EXT
tristate "i.MX SCMI MISC EXTENSION"
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
diff --git a/drivers/firmware/arm_scmi/vendors/imx/Makefile b/drivers/firmware/arm_scmi/vendors/imx/Makefile
index d3ee6d5449244a4f5cdf6abcf1845f312c512325..f39a99ccaf9af757475e8b112d224669444d7ddc 100644
--- a/drivers/firmware/arm_scmi/vendors/imx/Makefile
+++ b/drivers/firmware/arm_scmi/vendors/imx/Makefile
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_IMX_SCMI_BBM_EXT) += imx-sm-bbm.o
+obj-$(CONFIG_IMX_SCMI_LMM_EXT) += imx-sm-lmm.o
obj-$(CONFIG_IMX_SCMI_MISC_EXT) += imx-sm-misc.o
diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx-sm-lmm.c b/drivers/firmware/arm_scmi/vendors/imx/imx-sm-lmm.c
new file mode 100644
index 0000000000000000000000000000000000000000..b56a566fb96ee72c025096c025847f4e9d0fefe9
--- /dev/null
+++ b/drivers/firmware/arm_scmi/vendors/imx/imx-sm-lmm.c
@@ -0,0 +1,257 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * System control and Management Interface (SCMI) NXP LMM Protocol
+ *
+ * Copyright 2025 NXP
+ */
+
+#include <linux/bits.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/scmi_protocol.h>
+#include <linux/scmi_imx_protocol.h>
+
+#include "../../protocols.h"
+#include "../../notify.h"
+
+#define SCMI_PROTOCOL_SUPPORTED_VERSION 0x10000
+
+enum scmi_imx_lmm_protocol_cmd {
+ SCMI_IMX_LMM_ATTRIBUTES = 0x3,
+ SCMI_IMX_LMM_BOOT = 0x4,
+ SCMI_IMX_LMM_RESET = 0x5,
+ SCMI_IMX_LMM_SHUTDOWN = 0x6,
+ SCMI_IMX_LMM_WAKE = 0x7,
+ SCMI_IMX_LMM_SUSPEND = 0x8,
+ SCMI_IMX_LMM_NOTIFY = 0x9,
+ SCMI_IMX_LMM_RESET_REASON = 0xA,
+ SCMI_IMX_LMM_POWER_ON = 0xB,
+ SCMI_IMX_LMM_RESET_VECTOR_SET = 0xC,
+};
+
+struct scmi_imx_lmm_priv {
+ u32 nr_lmm;
+};
+
+#define SCMI_IMX_LMM_NR_LM_MASK GENMASK(7, 0)
+struct scmi_msg_imx_lmm_protocol_attributes {
+ __le32 attributes;
+};
+
+struct scmi_msg_imx_lmm_attributes_out {
+ __le32 lmid;
+ __le32 attributes;
+ __le32 state;
+ __le32 errstatus;
+ u8 name[LMM_MAX_NAME];
+};
+
+struct scmi_imx_lmm_reset_vector_set_in {
+ __le32 lmid;
+ __le32 cpuid;
+ __le32 flags; /* reserved for future extension */
+ __le32 resetvectorlow;
+ __le32 resetvectorhigh;
+};
+
+struct scmi_imx_lmm_shutdown_in {
+ __le32 lmid;
+#define SCMI_IMX_LMM_SHUTDOWN_GRACEFUL BIT(0)
+ __le32 flags;
+};
+
+static int scmi_imx_lmm_validate_lmid(const struct scmi_protocol_handle *ph, u32 lmid)
+{
+ struct scmi_imx_lmm_priv *priv = ph->get_priv(ph);
+
+ if (lmid >= priv->nr_lmm)
+ return -EINVAL;
+
+ return 0;
+}
+
+static int scmi_imx_lmm_attributes(const struct scmi_protocol_handle *ph,
+ u32 lmid, struct scmi_imx_lmm_info *info)
+{
+ struct scmi_msg_imx_lmm_attributes_out *out;
+ struct scmi_xfer *t;
+ int ret;
+
+ ret = ph->xops->xfer_get_init(ph, SCMI_IMX_LMM_ATTRIBUTES, sizeof(u32), 0, &t);
+ if (ret)
+ return ret;
+
+ put_unaligned_le32(lmid, t->tx.buf);
+ ret = ph->xops->do_xfer(ph, t);
+ if (!ret) {
+ out = t->rx.buf;
+ info->lmid = le32_to_cpu(out->lmid);
+ info->state = le32_to_cpu(out->state);
+ info->errstatus = le32_to_cpu(out->errstatus);
+ strscpy(info->name, out->name);
+ dev_dbg(ph->dev, "i.MX LMM: Logical Machine(%d), name: %s\n",
+ info->lmid, out->name);
+ } else {
+ dev_err(ph->dev, "i.MX LMM: Failed to get info of Logical Machine(%u)\n", lmid);
+ }
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static int
+scmi_imx_lmm_power_boot(const struct scmi_protocol_handle *ph, u32 lmid, bool boot)
+{
+ struct scmi_xfer *t;
+ u8 msg_id;
+ int ret;
+
+ ret = scmi_imx_lmm_validate_lmid(ph, lmid);
+ if (ret)
+ return ret;
+
+ if (boot)
+ msg_id = SCMI_IMX_LMM_BOOT;
+ else
+ msg_id = SCMI_IMX_LMM_POWER_ON;
+
+ ret = ph->xops->xfer_get_init(ph, msg_id, sizeof(u32), 0, &t);
+ if (ret)
+ return ret;
+
+ put_unaligned_le32(lmid, t->tx.buf);
+ ret = ph->xops->do_xfer(ph, t);
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static int scmi_imx_lmm_reset_vector_set(const struct scmi_protocol_handle *ph,
+ u32 lmid, u32 cpuid, u32 flags, u64 vector)
+{
+ struct scmi_imx_lmm_reset_vector_set_in *in;
+ struct scmi_xfer *t;
+ int ret;
+
+ ret = ph->xops->xfer_get_init(ph, SCMI_IMX_LMM_RESET_VECTOR_SET, sizeof(*in),
+ 0, &t);
+ if (ret)
+ return ret;
+
+ in = t->tx.buf;
+ in->lmid = cpu_to_le32(lmid);
+ in->cpuid = cpu_to_le32(cpuid);
+ in->flags = cpu_to_le32(0);
+ in->resetvectorlow = cpu_to_le32(lower_32_bits(vector));
+ in->resetvectorhigh = cpu_to_le32(upper_32_bits(vector));
+ ret = ph->xops->do_xfer(ph, t);
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static int scmi_imx_lmm_shutdown(const struct scmi_protocol_handle *ph, u32 lmid,
+ u32 flags)
+{
+ struct scmi_imx_lmm_shutdown_in *in;
+ struct scmi_xfer *t;
+ int ret;
+
+ ret = scmi_imx_lmm_validate_lmid(ph, lmid);
+ if (ret)
+ return ret;
+
+ ret = ph->xops->xfer_get_init(ph, SCMI_IMX_LMM_SHUTDOWN, sizeof(*in),
+ 0, &t);
+ if (ret)
+ return ret;
+
+ in = t->tx.buf;
+ in->lmid = cpu_to_le32(lmid);
+ if (flags & SCMI_IMX_LMM_SHUTDOWN_GRACEFUL)
+ in->flags = cpu_to_le32(SCMI_IMX_LMM_SHUTDOWN_GRACEFUL);
+ else
+ in->flags = cpu_to_le32(0);
+ ret = ph->xops->do_xfer(ph, t);
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static const struct scmi_imx_lmm_proto_ops scmi_imx_lmm_proto_ops = {
+ .lmm_power_boot = scmi_imx_lmm_power_boot,
+ .lmm_info = scmi_imx_lmm_attributes,
+ .lmm_reset_vector_set = scmi_imx_lmm_reset_vector_set,
+ .lmm_shutdown = scmi_imx_lmm_shutdown,
+};
+
+static int scmi_imx_lmm_protocol_attributes_get(const struct scmi_protocol_handle *ph,
+ struct scmi_imx_lmm_priv *priv)
+{
+ struct scmi_msg_imx_lmm_protocol_attributes *attr;
+ struct scmi_xfer *t;
+ int ret;
+
+ ret = ph->xops->xfer_get_init(ph, PROTOCOL_ATTRIBUTES, 0,
+ sizeof(*attr), &t);
+ if (ret)
+ return ret;
+
+ attr = t->rx.buf;
+
+ ret = ph->xops->do_xfer(ph, t);
+ if (!ret) {
+ priv->nr_lmm = le32_get_bits(attr->attributes, SCMI_IMX_LMM_NR_LM_MASK);
+ dev_info(ph->dev, "i.MX LMM: %d Logical Machines\n",
+ priv->nr_lmm);
+ }
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static int scmi_imx_lmm_protocol_init(const struct scmi_protocol_handle *ph)
+{
+ struct scmi_imx_lmm_priv *info;
+ u32 version;
+ int ret;
+
+ ret = ph->xops->version_get(ph, &version);
+ if (ret)
+ return ret;
+
+ dev_info(ph->dev, "NXP SM LMM Version %d.%d\n",
+ PROTOCOL_REV_MAJOR(version), PROTOCOL_REV_MINOR(version));
+
+ info = devm_kzalloc(ph->dev, sizeof(*info), GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+
+ ret = scmi_imx_lmm_protocol_attributes_get(ph, info);
+ if (ret)
+ return ret;
+
+ return ph->set_priv(ph, info, version);
+}
+
+static const struct scmi_protocol scmi_imx_lmm = {
+ .id = SCMI_PROTOCOL_IMX_LMM,
+ .owner = THIS_MODULE,
+ .instance_init = &scmi_imx_lmm_protocol_init,
+ .ops = &scmi_imx_lmm_proto_ops,
+ .supported_version = SCMI_PROTOCOL_SUPPORTED_VERSION,
+ .vendor_id = SCMI_IMX_VENDOR,
+ .sub_vendor_id = SCMI_IMX_SUBVENDOR,
+};
+module_scmi_protocol(scmi_imx_lmm);
+
+MODULE_ALIAS("scmi-protocol-" __stringify(SCMI_PROTOCOL_IMX_LMM) "-" SCMI_IMX_VENDOR);
+MODULE_DESCRIPTION("i.MX SCMI LMM driver");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/scmi_imx_protocol.h b/include/linux/scmi_imx_protocol.h
index 53b356a26414279f4aaaa8287c32209ed1ad57b4..2a96fc29cb6f4dd1e4c29e0aaaa614ae9783da4a 100644
--- a/include/linux/scmi_imx_protocol.h
+++ b/include/linux/scmi_imx_protocol.h
@@ -11,8 +11,10 @@
#include <linux/bitfield.h>
#include <linux/device.h>
#include <linux/notifier.h>
+#include <linux/scmi_protocol.h>
#include <linux/types.h>
+#define SCMI_PROTOCOL_IMX_LMM 0x80
#define SCMI_PROTOCOL_IMX_BBM 0x81
#define SCMI_PROTOCOL_IMX_MISC 0x84
@@ -57,4 +59,34 @@ struct scmi_imx_misc_proto_ops {
int (*misc_ctrl_req_notify)(const struct scmi_protocol_handle *ph,
u32 ctrl_id, u32 evt_id, u32 flags);
};
+
+/* See LMM_ATTRIBUTES in imx95.rst */
+#define LMM_ID_DISCOVER 0xFFFFFFFFU
+#define LMM_MAX_NAME 16
+
+enum scmi_imx_lmm_state {
+ LMM_STATE_LM_OFF,
+ LMM_STATE_LM_ON,
+ LMM_STATE_LM_SUSPEND,
+ LMM_STATE_LM_POWERED,
+};
+
+struct scmi_imx_lmm_info {
+ u32 lmid;
+ enum scmi_imx_lmm_state state;
+ u32 errstatus;
+ u8 name[LMM_MAX_NAME];
+};
+
+struct scmi_imx_lmm_proto_ops {
+ int (*lmm_power_boot)(const struct scmi_protocol_handle *ph, u32 lmid,
+ bool boot);
+ int (*lmm_info)(const struct scmi_protocol_handle *ph, u32 lmid,
+ struct scmi_imx_lmm_info *info);
+ int (*lmm_reset_vector_set)(const struct scmi_protocol_handle *ph,
+ u32 lmid, u32 cpuid, u32 flags, u64 vector);
+ int (*lmm_shutdown)(const struct scmi_protocol_handle *ph, u32 lmid,
+ u32 flags);
+};
+
#endif
--
2.37.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v3 4/7] firmware: arm_scmi: imx: Add i.MX95 CPU Protocol
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
` (2 preceding siblings ...)
2025-03-03 2:53 ` [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol Peng Fan (OSS)
@ 2025-03-03 2:53 ` Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 5/7] firmware: imx: Add i.MX95 SCMI LMM driver Peng Fan (OSS)
` (3 subsequent siblings)
7 siblings, 0 replies; 23+ messages in thread
From: Peng Fan (OSS) @ 2025-03-03 2:53 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
This protocol allows an agent to start, stop a CPU or set reset vector. It
is used to manage auxiliary CPUs in an LM (e.g. additional cores in an AP
cluster).
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/arm_scmi/vendors/imx/Kconfig | 11 +
drivers/firmware/arm_scmi/vendors/imx/Makefile | 1 +
drivers/firmware/arm_scmi/vendors/imx/imx-sm-cpu.c | 276 +++++++++++++++++++++
include/linux/scmi_imx_protocol.h | 10 +
4 files changed, 298 insertions(+)
diff --git a/drivers/firmware/arm_scmi/vendors/imx/Kconfig b/drivers/firmware/arm_scmi/vendors/imx/Kconfig
index 1a936fc87d2350e2a21bccd45dfbeebfa3b90286..b5f13d0e40155e485f4d1696e9550645d888ef44 100644
--- a/drivers/firmware/arm_scmi/vendors/imx/Kconfig
+++ b/drivers/firmware/arm_scmi/vendors/imx/Kconfig
@@ -12,6 +12,17 @@ config IMX_SCMI_BBM_EXT
To compile this driver as a module, choose M here: the
module will be called imx-sm-bbm.
+config IMX_SCMI_CPU_EXT
+ tristate "i.MX SCMI CPU EXTENSION"
+ depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
+ default y if ARCH_MXC
+ help
+ This enables i.MX System CPU Protocol to manage cpu
+ start, stop and etc.
+
+ To compile this driver as a module, choose M here: the
+ module will be called imx-sm-cpu.
+
config IMX_SCMI_LMM_EXT
tristate "i.MX SCMI LMM EXTENSION"
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
diff --git a/drivers/firmware/arm_scmi/vendors/imx/Makefile b/drivers/firmware/arm_scmi/vendors/imx/Makefile
index f39a99ccaf9af757475e8b112d224669444d7ddc..e3a5ea46345c89da1afae25e55698044672b7c28 100644
--- a/drivers/firmware/arm_scmi/vendors/imx/Makefile
+++ b/drivers/firmware/arm_scmi/vendors/imx/Makefile
@@ -1,4 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_IMX_SCMI_BBM_EXT) += imx-sm-bbm.o
+obj-$(CONFIG_IMX_SCMI_CPU_EXT) += imx-sm-cpu.o
obj-$(CONFIG_IMX_SCMI_LMM_EXT) += imx-sm-lmm.o
obj-$(CONFIG_IMX_SCMI_MISC_EXT) += imx-sm-misc.o
diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx-sm-cpu.c b/drivers/firmware/arm_scmi/vendors/imx/imx-sm-cpu.c
new file mode 100644
index 0000000000000000000000000000000000000000..7fa9a89d825396de00ae666f525e8d6a2d2aed18
--- /dev/null
+++ b/drivers/firmware/arm_scmi/vendors/imx/imx-sm-cpu.c
@@ -0,0 +1,276 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * System control and Management Interface (SCMI) NXP CPU Protocol
+ *
+ * Copyright 2025 NXP
+ */
+
+#include <linux/bits.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/scmi_protocol.h>
+#include <linux/scmi_imx_protocol.h>
+
+#include "../../protocols.h"
+#include "../../notify.h"
+
+#define SCMI_PROTOCOL_SUPPORTED_VERSION 0x10000
+
+enum scmi_imx_cpu_protocol_cmd {
+ SCMI_IMX_CPU_ATTRIBUTES = 0x3,
+ SCMI_IMX_CPU_START = 0x4,
+ SCMI_IMX_CPU_STOP = 0x5,
+ SCMI_IMX_CPU_RESET_VECTOR_SET = 0x6,
+ SCMI_IMX_CPU_INFO_GET = 0xC,
+};
+
+struct scmi_imx_cpu_info {
+ u32 nr_cpu;
+};
+
+#define SCMI_IMX_CPU_NR_CPU_MASK GENMASK(15, 0)
+struct scmi_msg_imx_cpu_protocol_attributes {
+ __le32 attributes;
+};
+
+struct scmi_msg_imx_cpu_attributes_out {
+ __le32 attributes;
+#define CPU_MAX_NAME 16
+ u8 name[CPU_MAX_NAME];
+};
+
+struct scmi_imx_cpu_reset_vector_set_in {
+ __le32 cpuid;
+#define CPU_VEC_FLAGS_RESUME BIT(31)
+#define CPU_VEC_FLAGS_START BIT(30)
+#define CPU_VEC_FLAGS_BOOT BIT(29)
+ __le32 flags;
+ __le32 resetvectorlow;
+ __le32 resetvectorhigh;
+};
+
+struct scmi_imx_cpu_info_get_out {
+#define CPU_RUN_MODE_START 0
+#define CPU_RUN_MODE_HOLD 1
+#define CPU_RUN_MODE_STOP 2
+#define CPU_RUN_MODE_SLEEP 3
+ __le32 runmode;
+ __le32 sleepmode;
+ __le32 resetvectorlow;
+ __le32 resetvectorhigh;
+};
+
+static int scmi_imx_cpu_validate_cpuid(const struct scmi_protocol_handle *ph,
+ u32 cpuid)
+{
+ struct scmi_imx_cpu_info *info = ph->get_priv(ph);
+
+ if (cpuid >= info->nr_cpu)
+ return -EINVAL;
+
+ return 0;
+}
+
+static int scmi_imx_cpu_start(const struct scmi_protocol_handle *ph,
+ u32 cpuid, bool start)
+{
+ struct scmi_xfer *t;
+ u8 msg_id;
+ int ret;
+
+ ret = scmi_imx_cpu_validate_cpuid(ph, cpuid);
+ if (ret)
+ return ret;
+
+ if (start)
+ msg_id = SCMI_IMX_CPU_START;
+ else
+ msg_id = SCMI_IMX_CPU_STOP;
+
+ ret = ph->xops->xfer_get_init(ph, msg_id, sizeof(u32), 0, &t);
+ if (ret)
+ return ret;
+
+ put_unaligned_le32(cpuid, t->tx.buf);
+ ret = ph->xops->do_xfer(ph, t);
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static int scmi_imx_cpu_reset_vector_set(const struct scmi_protocol_handle *ph,
+ u32 cpuid, u64 vector, bool start,
+ bool boot, bool resume)
+{
+ struct scmi_imx_cpu_reset_vector_set_in *in;
+ struct scmi_xfer *t;
+ int ret;
+
+ ret = scmi_imx_cpu_validate_cpuid(ph, cpuid);
+ if (ret)
+ return ret;
+
+ ret = ph->xops->xfer_get_init(ph, SCMI_IMX_CPU_RESET_VECTOR_SET, sizeof(*in),
+ 0, &t);
+ if (ret)
+ return ret;
+
+ in = t->tx.buf;
+ in->cpuid = cpu_to_le32(cpuid);
+ in->flags = cpu_to_le32(0);
+ if (start)
+ in->flags |= le32_encode_bits(1, CPU_VEC_FLAGS_START);
+ if (boot)
+ in->flags |= le32_encode_bits(1, CPU_VEC_FLAGS_BOOT);
+ if (resume)
+ in->flags |= le32_encode_bits(1, CPU_VEC_FLAGS_RESUME);
+ in->resetvectorlow = cpu_to_le32(lower_32_bits(vector));
+ in->resetvectorhigh = cpu_to_le32(upper_32_bits(vector));
+ ret = ph->xops->do_xfer(ph, t);
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static int scmi_imx_cpu_started(const struct scmi_protocol_handle *ph, u32 cpuid,
+ bool *started)
+{
+ struct scmi_imx_cpu_info_get_out *out;
+ struct scmi_xfer *t;
+ u32 mode;
+ int ret;
+
+ if (!started)
+ return -EINVAL;
+
+ *started = false;
+ ret = scmi_imx_cpu_validate_cpuid(ph, cpuid);
+ if (ret)
+ return ret;
+
+ ret = ph->xops->xfer_get_init(ph, SCMI_IMX_CPU_INFO_GET, sizeof(u32),
+ 0, &t);
+ if (ret)
+ return ret;
+
+ put_unaligned_le32(cpuid, t->tx.buf);
+ ret = ph->xops->do_xfer(ph, t);
+ if (!ret) {
+ out = t->rx.buf;
+ mode = le32_to_cpu(out->runmode);
+ if ((mode == CPU_RUN_MODE_START) || (mode == CPU_RUN_MODE_SLEEP))
+ *started = true;
+ }
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static const struct scmi_imx_cpu_proto_ops scmi_imx_cpu_proto_ops = {
+ .cpu_reset_vector_set = scmi_imx_cpu_reset_vector_set,
+ .cpu_start = scmi_imx_cpu_start,
+ .cpu_started = scmi_imx_cpu_started,
+};
+
+static int scmi_imx_cpu_protocol_attributes_get(const struct scmi_protocol_handle *ph,
+ struct scmi_imx_cpu_info *info)
+{
+ struct scmi_msg_imx_cpu_protocol_attributes *attr;
+ struct scmi_xfer *t;
+ int ret;
+
+ ret = ph->xops->xfer_get_init(ph, PROTOCOL_ATTRIBUTES, 0,
+ sizeof(*attr), &t);
+ if (ret)
+ return ret;
+
+ attr = t->rx.buf;
+
+ ret = ph->xops->do_xfer(ph, t);
+ if (!ret) {
+ info->nr_cpu = le32_get_bits(attr->attributes, SCMI_IMX_CPU_NR_CPU_MASK);
+ dev_info(ph->dev, "i.MX SM CPU: %d cpus\n",
+ info->nr_cpu);
+ }
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static int scmi_imx_cpu_attributes_get(const struct scmi_protocol_handle *ph,
+ u32 cpuid)
+{
+ struct scmi_msg_imx_cpu_attributes_out *out;
+ char name[SCMI_SHORT_NAME_MAX_SIZE] = {'\0'};
+ struct scmi_xfer *t;
+ int ret;
+
+ ret = ph->xops->xfer_get_init(ph, SCMI_IMX_CPU_ATTRIBUTES, sizeof(u32), 0, &t);
+ if (ret)
+ return ret;
+
+ put_unaligned_le32(cpuid, t->tx.buf);
+ ret = ph->xops->do_xfer(ph, t);
+ if (!ret) {
+ out = t->rx.buf;
+ strscpy(name, out->name, SCMI_SHORT_NAME_MAX_SIZE);
+ dev_info(ph->dev, "i.MX CPU: name: %s\n", name);
+ } else {
+ dev_err(ph->dev, "i.MX cpu: Failed to get info of cpu(%u)\n", cpuid);
+ }
+
+ ph->xops->xfer_put(ph, t);
+
+ return ret;
+}
+
+static int scmi_imx_cpu_protocol_init(const struct scmi_protocol_handle *ph)
+{
+ struct scmi_imx_cpu_info *info;
+ u32 version;
+ int ret, i;
+
+ ret = ph->xops->version_get(ph, &version);
+ if (ret)
+ return ret;
+
+ dev_info(ph->dev, "NXP SM CPU Protocol Version %d.%d\n",
+ PROTOCOL_REV_MAJOR(version), PROTOCOL_REV_MINOR(version));
+
+ info = devm_kzalloc(ph->dev, sizeof(*info), GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+
+ ret = scmi_imx_cpu_protocol_attributes_get(ph, info);
+ if (ret)
+ return ret;
+
+ for (i = 0; i < info->nr_cpu; i++) {
+ ret = scmi_imx_cpu_attributes_get(ph, i);
+ if (ret)
+ return ret;
+ }
+
+ return ph->set_priv(ph, info, version);
+}
+
+static const struct scmi_protocol scmi_imx_cpu = {
+ .id = SCMI_PROTOCOL_IMX_CPU,
+ .owner = THIS_MODULE,
+ .instance_init = &scmi_imx_cpu_protocol_init,
+ .ops = &scmi_imx_cpu_proto_ops,
+ .supported_version = SCMI_PROTOCOL_SUPPORTED_VERSION,
+ .vendor_id = SCMI_IMX_VENDOR,
+ .sub_vendor_id = SCMI_IMX_SUBVENDOR,
+};
+module_scmi_protocol(scmi_imx_cpu);
+
+MODULE_ALIAS("scmi-protocol-" __stringify(SCMI_PROTOCOL_IMX_CPU) "-" SCMI_IMX_VENDOR);
+MODULE_DESCRIPTION("i.MX SCMI CPU driver");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/scmi_imx_protocol.h b/include/linux/scmi_imx_protocol.h
index 2a96fc29cb6f4dd1e4c29e0aaaa614ae9783da4a..27bd372cbfb142b6acb0b1cf4b82f061529d0d45 100644
--- a/include/linux/scmi_imx_protocol.h
+++ b/include/linux/scmi_imx_protocol.h
@@ -16,6 +16,7 @@
#define SCMI_PROTOCOL_IMX_LMM 0x80
#define SCMI_PROTOCOL_IMX_BBM 0x81
+#define SCMI_PROTOCOL_IMX_CPU 0x82
#define SCMI_PROTOCOL_IMX_MISC 0x84
#define SCMI_IMX_VENDOR "NXP"
@@ -89,4 +90,13 @@ struct scmi_imx_lmm_proto_ops {
u32 flags);
};
+struct scmi_imx_cpu_proto_ops {
+ int (*cpu_reset_vector_set)(const struct scmi_protocol_handle *ph,
+ u32 cpuid, u64 vector, bool start,
+ bool boot, bool resume);
+ int (*cpu_start)(const struct scmi_protocol_handle *ph, u32 cpuid,
+ bool start);
+ int (*cpu_started)(const struct scmi_protocol_handle *ph, u32 cpuid,
+ bool *started);
+};
#endif
--
2.37.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v3 5/7] firmware: imx: Add i.MX95 SCMI LMM driver
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
` (3 preceding siblings ...)
2025-03-03 2:53 ` [PATCH v3 4/7] firmware: arm_scmi: imx: Add i.MX95 CPU Protocol Peng Fan (OSS)
@ 2025-03-03 2:53 ` Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 6/7] firmware: imx: Add i.MX95 SCMI CPU driver Peng Fan (OSS)
` (2 subsequent siblings)
7 siblings, 0 replies; 23+ messages in thread
From: Peng Fan (OSS) @ 2025-03-03 2:53 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
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@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
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..4c24e17425f830810f8ba376ece9db93c8cded6d 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
help
This enables i.MX System Logical Machine Protocol to
manage Logical Machines boot, shutdown and etc.
diff --git a/drivers/firmware/imx/Kconfig b/drivers/firmware/imx/Kconfig
index c964f4924359fcd375560ee8263021b0fe65db1b..70c092424328067ea6b946cee59f072661e27e47 100644
--- a/drivers/firmware/imx/Kconfig
+++ b/drivers/firmware/imx/Kconfig
@@ -23,6 +23,17 @@ config IMX_SCU
This driver manages the IPC interface between host CPU and the
SCU firmware running on M4.
+config IMX_SCMI_LMM_DRV
+ tristate "IMX SCMI LMM Protocol driver"
+ depends on ARCH_MXC && ARM64 || COMPILE_TEST
+ default y if ARCH_MXC && ARM64
+ help
+ The System Controller Management Interface firmware (SCMI FW) is
+ a low-level system function which runs on a dedicated Cortex-M
+ core that could provide Logical Machine management features.
+
+ This driver can also be built as a module.
+
config IMX_SCMI_MISC_DRV
tristate "IMX SCMI MISC Protocol driver"
depends on ARCH_MXC || COMPILE_TEST
diff --git a/drivers/firmware/imx/Makefile b/drivers/firmware/imx/Makefile
index 8d046c341be878bb6dd1e6277992ff66ae90e292..7762855d2a771169d4f1867d27e0d51be7c9ad03 100644
--- a/drivers/firmware/imx/Makefile
+++ b/drivers/firmware/imx/Makefile
@@ -2,3 +2,4 @@
obj-$(CONFIG_IMX_DSP) += imx-dsp.o
obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o imx-scu-irq.o rm.o imx-scu-soc.o
obj-${CONFIG_IMX_SCMI_MISC_DRV} += sm-misc.o
+obj-${CONFIG_IMX_SCMI_LMM_DRV} += sm-lmm.o
diff --git a/drivers/firmware/imx/sm-lmm.c b/drivers/firmware/imx/sm-lmm.c
new file mode 100644
index 0000000000000000000000000000000000000000..6807bf563c03d21a68022ecf3469c38bee4fc2f5
--- /dev/null
+++ b/drivers/firmware/imx/sm-lmm.c
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2025 NXP
+ */
+
+#include <linux/firmware/imx/sm.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/scmi_protocol.h>
+#include <linux/scmi_imx_protocol.h>
+
+static const struct scmi_imx_lmm_proto_ops *imx_lmm_ops;
+static struct scmi_protocol_handle *ph;
+
+int scmi_imx_lmm_info(u32 lmid, struct scmi_imx_lmm_info *info)
+{
+ if (!ph)
+ return -EPROBE_DEFER;
+
+ if (!info)
+ return -EINVAL;
+
+ return imx_lmm_ops->lmm_info(ph, lmid, info);
+};
+EXPORT_SYMBOL(scmi_imx_lmm_info);
+
+int scmi_imx_lmm_reset_vector_set(u32 lmid, u32 cpuid, u32 flags, u64 vector)
+{
+ if (!ph)
+ return -EPROBE_DEFER;
+
+ return imx_lmm_ops->lmm_reset_vector_set(ph, lmid, cpuid, flags, vector);
+}
+EXPORT_SYMBOL(scmi_imx_lmm_reset_vector_set);
+
+int scmi_imx_lmm_operation(u32 lmid, enum scmi_imx_lmm_op op, u32 flags)
+{
+ if (!ph)
+ return -EPROBE_DEFER;
+
+ switch (op) {
+ case SCMI_IMX_LMM_BOOT:
+ return imx_lmm_ops->lmm_power_boot(ph, lmid, true);
+ case SCMI_IMX_LMM_POWER_ON:
+ return imx_lmm_ops->lmm_power_boot(ph, lmid, false);
+ case SCMI_IMX_LMM_SHUTDOWN:
+ return imx_lmm_ops->lmm_shutdown(ph, lmid, flags);
+ default:
+ break;
+ }
+
+ return -EINVAL;
+}
+EXPORT_SYMBOL(scmi_imx_lmm_operation);
+
+static int scmi_imx_lmm_probe(struct scmi_device *sdev)
+{
+ const struct scmi_handle *handle = sdev->handle;
+
+ if (!handle)
+ return -ENODEV;
+
+ if (imx_lmm_ops) {
+ dev_err(&sdev->dev, "lmm already initialized\n");
+ return -EEXIST;
+ }
+
+ imx_lmm_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_IMX_LMM, &ph);
+ if (IS_ERR(imx_lmm_ops))
+ return PTR_ERR(imx_lmm_ops);
+
+ return 0;
+}
+
+static const struct scmi_device_id scmi_id_table[] = {
+ { SCMI_PROTOCOL_IMX_LMM, "imx-lmm" },
+ { },
+};
+MODULE_DEVICE_TABLE(scmi, scmi_id_table);
+
+static struct scmi_driver scmi_imx_lmm_driver = {
+ .name = "scmi-imx-lmm",
+ .probe = scmi_imx_lmm_probe,
+ .id_table = scmi_id_table,
+};
+module_scmi_driver(scmi_imx_lmm_driver);
+
+MODULE_AUTHOR("Peng Fan <peng.fan@nxp.com>");
+MODULE_DESCRIPTION("IMX SM LMM driver");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/firmware/imx/sm.h b/include/linux/firmware/imx/sm.h
index 9b85a3f028d1b0a5287b453eb3ad8412a363fe6c..bc27b04afb2f68b048955f51c07a106f4c7e5852 100644
--- a/include/linux/firmware/imx/sm.h
+++ b/include/linux/firmware/imx/sm.h
@@ -8,6 +8,7 @@
#include <linux/bitfield.h>
#include <linux/errno.h>
+#include <linux/scmi_imx_protocol.h>
#include <linux/types.h>
#define SCMI_IMX_CTRL_PDM_CLK_SEL 0 /* AON PDM clock sel */
@@ -20,4 +21,17 @@
int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val);
int scmi_imx_misc_ctrl_set(u32 id, u32 val);
+enum scmi_imx_lmm_op {
+ SCMI_IMX_LMM_BOOT,
+ SCMI_IMX_LMM_POWER_ON,
+ SCMI_IMX_LMM_SHUTDOWN,
+};
+
+/* For shutdown pperation */
+#define SCMI_IMX_LMM_OP_FORCEFUL 0
+#define SCMI_IMX_LMM_OP_GRACEFUL BIT(0)
+
+int scmi_imx_lmm_operation(u32 lmid, enum scmi_imx_lmm_op op, u32 flags);
+int scmi_imx_lmm_info(u32 lmid, struct scmi_imx_lmm_info *info);
+int scmi_imx_lmm_reset_vector_set(u32 lmid, u32 cpuid, u32 flags, u64 vector);
#endif
--
2.37.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v3 6/7] firmware: imx: Add i.MX95 SCMI CPU driver
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
` (4 preceding siblings ...)
2025-03-03 2:53 ` [PATCH v3 5/7] firmware: imx: Add i.MX95 SCMI LMM driver Peng Fan (OSS)
@ 2025-03-03 2:53 ` Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 7/7] MAINTAINERS: add entry for i.MX SCMI extensions Peng Fan (OSS)
2025-03-18 8:28 ` [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan
7 siblings, 0 replies; 23+ messages in thread
From: Peng Fan (OSS) @ 2025-03-03 2:53 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
The i.MX95 System manager exports SCMI CPU protocol for linux to manage
cpu cores. The driver is to use the cpu Protocol interface to
start, stop a cpu cores (eg, M7).
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/firmware/arm_scmi/vendors/imx/Kconfig | 3 +-
drivers/firmware/imx/Kconfig | 11 ++++
drivers/firmware/imx/Makefile | 1 +
drivers/firmware/imx/sm-cpu.c | 85 +++++++++++++++++++++++++++
include/linux/firmware/imx/sm.h | 5 ++
5 files changed, 104 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/arm_scmi/vendors/imx/Kconfig b/drivers/firmware/arm_scmi/vendors/imx/Kconfig
index 4c24e17425f830810f8ba376ece9db93c8cded6d..9b4339b93826804599371f2e3a2e79f27449582b 100644
--- a/drivers/firmware/arm_scmi/vendors/imx/Kconfig
+++ b/drivers/firmware/arm_scmi/vendors/imx/Kconfig
@@ -15,7 +15,8 @@ config IMX_SCMI_BBM_EXT
config IMX_SCMI_CPU_EXT
tristate "i.MX SCMI CPU EXTENSION"
depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
- default y if ARCH_MXC
+ depends on IMX_SCMI_CPU_DRV
+ default y if ARCH_MXC && ARM64
help
This enables i.MX System CPU Protocol to manage cpu
start, stop and etc.
diff --git a/drivers/firmware/imx/Kconfig b/drivers/firmware/imx/Kconfig
index 70c092424328067ea6b946cee59f072661e27e47..8236f81e054ff43c5fbc660a67c53ea9324ab402 100644
--- a/drivers/firmware/imx/Kconfig
+++ b/drivers/firmware/imx/Kconfig
@@ -23,6 +23,17 @@ config IMX_SCU
This driver manages the IPC interface between host CPU and the
SCU firmware running on M4.
+config IMX_SCMI_CPU_DRV
+ tristate "IMX SCMI CPU Protocol driver"
+ depends on ARCH_MXC && ARM64 || COMPILE_TEST
+ default y if ARCH_MXC && ARM64
+ help
+ The System Controller Management Interface firmware (SCMI FW) is
+ a low-level system function which runs on a dedicated Cortex-M
+ core that could provide cpu management features.
+
+ This driver can also be built as a module.
+
config IMX_SCMI_LMM_DRV
tristate "IMX SCMI LMM Protocol driver"
depends on ARCH_MXC && ARM64 || COMPILE_TEST
diff --git a/drivers/firmware/imx/Makefile b/drivers/firmware/imx/Makefile
index 7762855d2a771169d4f1867d27e0d51be7c9ad03..3bbaffa6e3478112638ed031375602389f18ef09 100644
--- a/drivers/firmware/imx/Makefile
+++ b/drivers/firmware/imx/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_IMX_DSP) += imx-dsp.o
obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o imx-scu-irq.o rm.o imx-scu-soc.o
+obj-${CONFIG_IMX_SCMI_CPU_DRV} += sm-cpu.o
obj-${CONFIG_IMX_SCMI_MISC_DRV} += sm-misc.o
obj-${CONFIG_IMX_SCMI_LMM_DRV} += sm-lmm.o
diff --git a/drivers/firmware/imx/sm-cpu.c b/drivers/firmware/imx/sm-cpu.c
new file mode 100644
index 0000000000000000000000000000000000000000..091b014f739f68d815d71f9b53a2a7eaf0bd607b
--- /dev/null
+++ b/drivers/firmware/imx/sm-cpu.c
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2025 NXP
+ */
+
+#include <linux/firmware/imx/sm.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/scmi_protocol.h>
+#include <linux/scmi_imx_protocol.h>
+
+static const struct scmi_imx_cpu_proto_ops *imx_cpu_ops;
+static struct scmi_protocol_handle *ph;
+
+int scmi_imx_cpu_reset_vector_set(u32 cpuid, u64 vector, bool start, bool boot,
+ bool resume)
+{
+ if (!ph)
+ return -EPROBE_DEFER;
+
+ return imx_cpu_ops->cpu_reset_vector_set(ph, cpuid, vector, start,
+ boot, resume);
+}
+EXPORT_SYMBOL(scmi_imx_cpu_reset_vector_set);
+
+int scmi_imx_cpu_start(u32 cpuid, bool start)
+{
+ if (!ph)
+ return -EPROBE_DEFER;
+
+ if (start)
+ return imx_cpu_ops->cpu_start(ph, cpuid, true);
+
+ return imx_cpu_ops->cpu_start(ph, cpuid, false);
+};
+EXPORT_SYMBOL(scmi_imx_cpu_start);
+
+int scmi_imx_cpu_started(u32 cpuid, bool *started)
+{
+ if (!ph)
+ return -EPROBE_DEFER;
+
+ if (!started)
+ return -EINVAL;
+
+ return imx_cpu_ops->cpu_started(ph, cpuid, started);
+};
+EXPORT_SYMBOL(scmi_imx_cpu_started);
+
+static int scmi_imx_cpu_probe(struct scmi_device *sdev)
+{
+ const struct scmi_handle *handle = sdev->handle;
+
+ if (!handle)
+ return -ENODEV;
+
+ if (imx_cpu_ops) {
+ dev_err(&sdev->dev, "sm cpu already initialized\n");
+ return -EEXIST;
+ }
+
+ imx_cpu_ops = handle->devm_protocol_get(sdev, SCMI_PROTOCOL_IMX_CPU, &ph);
+ if (IS_ERR(imx_cpu_ops))
+ return PTR_ERR(imx_cpu_ops);
+
+ return 0;
+}
+
+static const struct scmi_device_id scmi_id_table[] = {
+ { SCMI_PROTOCOL_IMX_CPU, "imx-cpu" },
+ { },
+};
+MODULE_DEVICE_TABLE(scmi, scmi_id_table);
+
+static struct scmi_driver scmi_imx_cpu_driver = {
+ .name = "scmi-imx-cpu",
+ .probe = scmi_imx_cpu_probe,
+ .id_table = scmi_id_table,
+};
+module_scmi_driver(scmi_imx_cpu_driver);
+
+MODULE_AUTHOR("Peng Fan <peng.fan@nxp.com>");
+MODULE_DESCRIPTION("IMX SM CPU driver");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/firmware/imx/sm.h b/include/linux/firmware/imx/sm.h
index bc27b04afb2f68b048955f51c07a106f4c7e5852..a8a17eeb7d907ef8ac074c4ed1d3ac83f1104627 100644
--- a/include/linux/firmware/imx/sm.h
+++ b/include/linux/firmware/imx/sm.h
@@ -21,6 +21,11 @@
int scmi_imx_misc_ctrl_get(u32 id, u32 *num, u32 *val);
int scmi_imx_misc_ctrl_set(u32 id, u32 val);
+int scmi_imx_cpu_start(u32 cpuid, bool start);
+int scmi_imx_cpu_started(u32 cpuid, bool *started);
+int scmi_imx_cpu_reset_vector_set(u32 cpuid, u64 vector, bool start, bool boot,
+ bool resume);
+
enum scmi_imx_lmm_op {
SCMI_IMX_LMM_BOOT,
SCMI_IMX_LMM_POWER_ON,
--
2.37.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v3 7/7] MAINTAINERS: add entry for i.MX SCMI extensions
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
` (5 preceding siblings ...)
2025-03-03 2:53 ` [PATCH v3 6/7] firmware: imx: Add i.MX95 SCMI CPU driver Peng Fan (OSS)
@ 2025-03-03 2:53 ` Peng Fan (OSS)
2025-03-18 8:28 ` [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan
7 siblings, 0 replies; 23+ messages in thread
From: Peng Fan (OSS) @ 2025-03-03 2:53 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add entry for i.MX SCMI extensions and myself as maintainer
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
MAINTAINERS | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index bd15d86a3ad7f832e189451a2ebdbed1e5d46c96..23cac57ee9dffcfaa729f736457359841766106d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23169,6 +23169,15 @@ F: include/linux/sc[mp]i_protocol.h
F: include/trace/events/scmi.h
F: include/uapi/linux/virtio_scmi.h
+SYSTEM CONTROL MANAGEMENT INTERFACE (SCMI) i.MX Extension Message Protocol drivers
+M: Peng Fan <peng.fan@nxp.com>
+L: arm-scmi@vger.kernel.org
+L: imx@lists.linux.dev
+L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
+S: Maintained
+F: Documentation/devicetree/bindings/firmware/nxp,*scmi.yaml
+F: drivers/firmware/arm_scmi/vendors/imx/
+
SYSTEM RESET/SHUTDOWN DRIVERS
M: Sebastian Reichel <sre@kernel.org>
L: linux-pm@vger.kernel.org
--
2.37.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol
2025-03-03 2:53 ` [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol Peng Fan (OSS)
@ 2025-03-03 8:03 ` Dan Carpenter
2025-04-01 14:21 ` Sudeep Holla
2025-04-01 15:00 ` Cristian Marussi
2 siblings, 0 replies; 23+ messages in thread
From: Dan Carpenter @ 2025-03-03 8:03 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-kernel, arm-scmi,
linux-arm-kernel, imx, devicetree, Peng Fan
On Mon, Mar 03, 2025 at 10:53:24AM +0800, Peng Fan (OSS) wrote:
> +static int scmi_imx_lmm_attributes(const struct scmi_protocol_handle *ph,
> + u32 lmid, struct scmi_imx_lmm_info *info)
> +{
> + struct scmi_msg_imx_lmm_attributes_out *out;
> + struct scmi_xfer *t;
> + int ret;
> +
> + ret = ph->xops->xfer_get_init(ph, SCMI_IMX_LMM_ATTRIBUTES, sizeof(u32), 0, &t);
> + if (ret)
> + return ret;
> +
> + put_unaligned_le32(lmid, t->tx.buf);
> + ret = ph->xops->do_xfer(ph, t);
> + if (!ret) {
> + out = t->rx.buf;
> + info->lmid = le32_to_cpu(out->lmid);
> + info->state = le32_to_cpu(out->state);
> + info->errstatus = le32_to_cpu(out->errstatus);
> + strscpy(info->name, out->name);
> + dev_dbg(ph->dev, "i.MX LMM: Logical Machine(%d), name: %s\n",
> + info->lmid, out->name);
Print info->name instead of out->name.
> + } else {
> + dev_err(ph->dev, "i.MX LMM: Failed to get info of Logical Machine(%u)\n", lmid);
> + }
> +
> + ph->xops->xfer_put(ph, t);
> +
> + return ret;
> +}
regards,
dan carpenter
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
` (6 preceding siblings ...)
2025-03-03 2:53 ` [PATCH v3 7/7] MAINTAINERS: add entry for i.MX SCMI extensions Peng Fan (OSS)
@ 2025-03-18 8:28 ` Peng Fan
2025-03-19 9:54 ` Sudeep Holla
7 siblings, 1 reply; 23+ messages in thread
From: Peng Fan @ 2025-03-18 8:28 UTC (permalink / raw)
To: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
Hi Sudeep, Cristian
On Mon, Mar 03, 2025 at 10:53:21AM +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).
Any comments?
I am thinking to address comments and post v4 after 6.15 merge window close.
Thanks,
Peng
>
>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>
>---
>Changes in v3:
>Patch 1: Correct LMM_ATTRIBUTE return values
> Update the return status of LM_BOOT/RESET/SHUTDOWN/WAKE
> clarify sync/async in the Introduction chapter of LMM
> Update the Origin entry in LMM_RESET_REASON
> Clarify CPU run/sleep mode
> Add note for CPU protocol to indicate AP using PSCI, non-AP use OS.
> Specify mandatory for each command in LMM/CPU per firmware owner.
> For BBM/MISC which have optional command, I will update doc in separate patch later
>Patch 2: Add description in binding doc
>Patch 3: Unify scmi_imx_lmm_[boot,power_on], Use le32_get_bits
>Patch 4: Unify scmi_imx_cpu_[start,stop], Use le32_encode_bits
> Add pointer check in scmi_imx_cpu_started
> correct nr_cpus calculation
>Patch 5: Unify lmm shutdown,boot/power_on, update kconfig to avoid build bot issue
> Add R-b
>Patch 6: Unity cpu start/stop, update Kconfig to avoid build bot issue.
> Add R-b
>
>Ran smatch as below, no issue found.
>~/smatch/smatch_scripts/kchecker drivers/firmware/arm_scmi/vendors/imx/
>~/smatch/smatch_scripts/kchecker drivers/firmware/imx/
>
>- Link to v2: https://lore.kernel.org/r/20250212-imx-lmm-cpu-v2-0-3aee005968c1@nxp.com
>
>Changes in v2:
>- Add dt-bindings patch 2
>- Add a maintainer entry with patch 7
>- Update doc to address various questions and make it clear
>- Use strscpy to use scmi server returned string
>- Drop extra blank line
>- Shrink scmi_imx_cpu_attributes_get function args.
>- Typo fixes
>- Add LMM_RESET_VECTOR_SET
>- Link to v1: https://lore.kernel.org/r/20250121-imx-lmm-cpu-v1-0-0eab7e073e4e@nxp.com
>
>---
>Peng Fan (7):
> firmware: arm_scmi: imx: Add LMM and CPU documentation
> dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol
> firmware: arm_scmi: imx: Add i.MX95 LMM protocol
> firmware: arm_scmi: imx: Add i.MX95 CPU Protocol
> firmware: imx: Add i.MX95 SCMI LMM driver
> firmware: imx: Add i.MX95 SCMI CPU driver
> MAINTAINERS: add entry for i.MX SCMI extensions
>
> .../bindings/firmware/nxp,imx95-scmi.yaml | 23 +
> MAINTAINERS | 9 +
> drivers/firmware/arm_scmi/vendors/imx/Kconfig | 24 +
> drivers/firmware/arm_scmi/vendors/imx/Makefile | 2 +
> drivers/firmware/arm_scmi/vendors/imx/imx-sm-cpu.c | 276 +++++++
> drivers/firmware/arm_scmi/vendors/imx/imx-sm-lmm.c | 257 +++++++
> drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 +++++++++++++++++++++
> drivers/firmware/imx/Kconfig | 22 +
> drivers/firmware/imx/Makefile | 2 +
> drivers/firmware/imx/sm-cpu.c | 85 +++
> drivers/firmware/imx/sm-lmm.c | 91 +++
> include/linux/firmware/imx/sm.h | 19 +
> include/linux/scmi_imx_protocol.h | 42 ++
> 13 files changed, 1653 insertions(+)
>---
>base-commit: fb2b3e3bd74b8a3f742eaade06f6565323cf4bdf
>change-id: 20250120-imx-lmm-cpu-418daaa257e2
>
>Best regards,
>--
>Peng Fan <peng.fan@nxp.com>
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol
2025-03-18 8:28 ` [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan
@ 2025-03-19 9:54 ` Sudeep Holla
0 siblings, 0 replies; 23+ messages in thread
From: Sudeep Holla @ 2025-03-19 9:54 UTC (permalink / raw)
To: Peng Fan
Cc: Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
On Tue, Mar 18, 2025 at 04:28:04PM +0800, Peng Fan wrote:
> Hi Sudeep, Cristian
>
> On Mon, Mar 03, 2025 at 10:53:21AM +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).
>
> Any comments?
> I am thinking to address comments and post v4 after 6.15 merge window close.
>
Sure I will take a look later this week or next week.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation
2025-03-03 2:53 ` [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation Peng Fan (OSS)
@ 2025-04-01 14:15 ` Sudeep Holla
2025-04-02 12:35 ` Peng Fan
2025-04-01 14:51 ` Cristian Marussi
1 sibling, 1 reply; 23+ messages in thread
From: Sudeep Holla @ 2025-04-01 14:15 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Cristian Marussi, Sudeep Holla, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
On Mon, Mar 03, 2025 at 10:53:22AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add i.MX95 Logical Machine Management and CPU Protocol documentation.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 ++++++++++++++++++++++++
> 1 file changed, 801 insertions(+)
>
> diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..74326bf2ea8586282a735713e0ab7eb90ccce8ff 100644
> --- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> +++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> @@ -32,6 +32,501 @@ port, and deploy the SM on supported processors.
> The SM implements an interface compliant with the Arm SCMI Specification
> with additional vendor specific extensions.
>
> +SCMI_LMM: System Control and Management Logical Machine Management Vendor Protocol
> +==================================================================================
> +
> +This protocol is intended for boot, shutdown, and reset of other logical
s/for/to support/ ?
> +machines (LM). It is usually used to allow one LM(e.g. OSPM) to manage
Does it make sense to describe what is LM first before the first statement
here ?
> +another LM which is usually an offload or accelerator engine.. Notifications
Spirious "." above ?
> +from this protocol can also be used to manage a communication link to another
> +LM. The LMM protocol provides functions to:
Either redefine LMM here or add acronym LMM in the title above and drop SCMI_LMM
"System Control and Management Logical Machine Management(LMM) Vendor Protocol"
> +
> +- Describe the protocol version.
> +- Discover implementation attributes.
> +- Discover the LMs defined in the system.
all the LMs
> +- Boot an LM.
s/an LM/ a target LM/
Applies for the list below.
> +- Shutdown an LM (gracefully or forcibly).
> +- Reset an LM (gracefully or forcibly).
> +- Wake an LM from suspend.
> +- Suspend an LM (gracefully).
> +- Read boot/shutdown/reset information for an LM.
> +- Get notifications when an LM boots or shuts down (e.g. LM[X] requested
> + notification of LM[Y] boots or shuts down, when LM[Y] boots or shuts down,
> + SCMI firmware will send notification to LM[X]).
> +
s/[X]/ 'X' / and similarly s/[Y]/ 'Y'/
> +'Graceful' means asking LM itself to shutdown/reset/etc (e.g. sending
> +notification to Linux, Then Linux reboots or powers down itself). It is async
> +command that the SUCCESS of the command just means the command successfully
> +return, not means reboot/reset successfully finished.
Extra blank line here would be good.
> +'Forceful' means the SM will force shutdown/reset/etc the LM. It is sync
> +command that the SUCCESS of the command means the LM has been successfully
> +shutdown/reset/etc.
> +If the commands not have Graceful/Forceful flag settings, such as WAKE, SUSEND,
> +it is async command.
I would rather put it as Graceful above instead of async as the relation
is established above. I assume you are referring to the interface that doesn't
have this flag and not flag being 0.
> +
> +Commands:
> +_________
> +
> +PROTOCOL_VERSION
> +~~~~~~~~~~~~~~~~
> +
> +message_id: 0x0
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++---------------+--------------------------------------------------------------+
> +|Return values |
> ++---------------+--------------------------------------------------------------+
> +|Name |Description |
> ++---------------+--------------------------------------------------------------+
> +|int32 status | See ARM SCMI Specification for status code definitions. |
> ++---------------+--------------------------------------------------------------+
> +|uint32 version | For this revision of the specification, this value must be |
> +| | 0x10000. |
> ++---------------+--------------------------------------------------------------+
> +
> +PROTOCOL_ATTRIBUTES
> +~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x1
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status | See ARM SCMI Specification for status code definitions. |
> ++------------------+-----------------------------------------------------------+
> +|uint32 attributes |Protocol attributes: |
> +| |Bits[31:8] Reserved, must be zero. |
> +| |Bits[7:0] Number of Logical Machines |
> ++------------------+-----------------------------------------------------------+
> +
> +PROTOCOL_MESSAGE_ATTRIBUTES
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x2
> +protocol_id: 0x80
> +This command is mandatory.
> +
For completeness add parameters here for message_id as in the spec as it is
referred in the returned value and seems incomplete without it.
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: in case the message is implemented and available |
> +| |to use. |
> +| |NOT_FOUND: if the message identified by message_id is |
> +| |invalid or not implemented |
> ++------------------+-----------------------------------------------------------+
> +|uint32 attributes |Flags that are associated with a specific function in the |
> +| |protocol. For all functions in this protocol, this |
s/functions/commands/ just to be in sync with the spec.
> +| |parameter has a value of 0 |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_ATTRIBUTES
> +~~~~~~~~~~~~~~
> +
> +message_id: 0x3
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if valid attributes are returned. |
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
s/lmId/lmid/ (everywhere applicable for consistency, the parameter name is
lmid while the description refers lmId)
> +| |DENIED: if the agent does not have permission to get info |
> +| |for the LM specified by lmid. |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |Identifier of the LM whose identification is requested. |
> +| |This field is: Populated with the lmId of the calling |
> +| |agent, when the lmId parameter passed via the function is |
> +| |0xFFFFFFFF. Identical to the lmId field passed via the |
> +| |calling parameters, in all other cases |
Is this to avoid another interface to get the LM ID of the caller ?
> ++------------------+-----------------------------------------------------------+
> +|uint32 attributes | Bits[31:0] reserved. must be zero |
> ++------------------+-----------------------------------------------------------+
> +|uint32 state | Current state of the LM |
> ++------------------+-----------------------------------------------------------+
> +|uint32 errStatus | Last error status recorded |
> ++------------------+-----------------------------------------------------------+
> +|char name[16] | A NULL terminated ASCII string with the LM name, of up |
> +| | to 16 bytes |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_BOOT
> +~~~~~~~~
> +
> +message_id: 0x4
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if LM boots successfully started. |
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
> +| |DENIED: if the agent does not have permission to manage the|
> +| |the LM specified by lmid. |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_RESET
> +~~~~~~~~~
> +
> +message_id: 0x5
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|uint32 flags |Reset flags: |
> +| |Bits[31:1] Reserved, must be zero. |
> +| |Bit[0] Graceful request: |
> +| |Set to 1 if the request is a graceful request. |
> +| |Set to 0 if the request is a forceful request. |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: The LMM RESET command finished successfully in |
> +| |graceful reset or LM successfully resets in forceful reset.|
If graceful reset is async, will the return value indicate success ?
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
> +| |DENIED: if the agent does not have permission to manage the|
> +| |the LM specified by lmid. |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_SHUTDOWN
> +~~~~~~~~~~~~
> +
> +message_id: 0x6
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|uint32 flags |Reset flags: |
> +| |Bits[31:1] Reserved, must be zero. |
> +| |Bit[0] Graceful request: |
> +| |Set to 1 if the request is a graceful request. |
> +| |Set to 0 if the request is a forceful request. |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: The LMM shutdown command finished successfully in |
> +| |graceful request or LM successfully shutdown in forceful |
> +| |request. |
Ditto as above ?
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
> +| |DENIED: if the agent does not have permission to manage the|
> +| |the LM specified by lmid. |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_WAKE
> +~~~~~~~~
> +
> +message_id: 0x7
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if LM wake command successfully returns. |
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
> +| |DENIED: if the agent does not have permission to manage the|
> +| |the LM specified by lmid. |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_SUSPEND
> +~~~~~~~~~~~
> +
> +message_id: 0x8
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if LM suspend command successfully returns. |
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
> +| |DENIED: if the agent does not have permission to manage the|
> +| |the LM specified by lmid. |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_NOTIFY
> +~~~~~~~~~~
> +
> +message_id: 0x9
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|uint32 flags |Notification flags: |
> +| |Bits[31:3] Reserved, must be zero. |
> +| |Bit[3] Wake (resume) notification: |
> +| |Set to 1 to send notification. |
> +| |Set to 0 if no notification. |
> +| |Bit[2] Suspend (sleep) notification: |
> +| |Set to 1 to send notification. |
> +| |Set to 0 if no notification. |
> +| |Bit[1] Shutdown (off) notification: |
> +| |Set to 1 to send notification. |
> +| |Set to 0 if no notification. |
> +| |Bit[0] Boot (on) notification: |
> +| |Set to 1 to send notification. |
> +| |Set to 0 if no notification |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if the notification state successfully updated. |
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> +| |INVALID_PARAMETERS: if input attributes flag specifies |
> +| |unsupported or invalid configurations. |
> +| |DENIED: if the agent does not have permission to request |
> +| |the notification. |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_RESET_REASON
> +~~~~~~~~~~~~~~~~
> +
> +message_id: 0xA
> +protocol_id: 0x80
> +This command is mandatory.
> +
> +This command is to return the reset reason that caused the last reset, such as
> +POR, WDOG, JTAG and etc.
> +
> ++---------------------+--------------------------------------------------------+
> +|Parameters |
> ++---------------------+--------------------------------------------------------+
> +|Name |Description |
> ++---------------------+--------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++---------------------+--------------------------------------------------------+
> +|Return values |
> ++---------------------+--------------------------------------------------------+
> +|Name |Description |
> ++---------------------+--------------------------------------------------------+
> +|int32 status |SUCCESS: if the reset reason of the LM successfully |
> +| |updated. |
> +| |NOT_FOUND: if lmId not points to a valid logical machine|
> +| |DENIED: if the agent does not have permission to request|
> +| |the reset reason. |
> ++---------------------+--------------------------------------------------------+
> +|uint32 bootflags |Boot reason flags. This parameter has the format: |
> +| |Bits[31] Valid. |
> +| |Set to 1 if the entire reason is valid. |
> +| |Set to 0 if the entire reason is not valid. |
> +| |Bits[30:29] Reserved, must be zero. |
> +| |Bit[28] Valid origin: |
> +| |Set to 1 if the origin field is valid. |
> +| |Set to 0 if the origin field is not valid. |
> +| |Bits[27:24] Origin. |
> +| |Logical Machine(LM) ID that causes the BOOT of this LM |
So you support only 16 LMs on the system ? From the initial command it seemed
256. So what exactly is it ? Please document the same clearly.
> +| |Bit[23] Valid err ID: |
> +| |Set to 1 if the error ID field is valid. |
> +| |Set to 0 if the error ID field is not valid. |
> +| |Bits[22:8] Error ID(Agent ID of the system). |
> +| |Bit[7:0] Reason(WDOG, POR, FCCU and etc) |
Is there a mapping for this ?
> ++---------------------+--------------------------------------------------------+
> +|uint32 shutdownflags |Shutdown reason flags. This parameter has the format: |
> +| |Bits[31] Valid. |
> +| |Set to 1 if the entire reason is valid. |
> +| |Set to 0 if the entire reason is not valid. |
> +| |Bits[30:29] Number of valid extended info words. |
> +| |Bit[28] Valid origin: |
> +| |Set to 1 if the origin field is valid. |
> +| |Set to 0 if the origin field is not valid. |
> +| |Bits[27:24] Origin. |
> +| |Logical Machine(LM) ID that causes the BOOT of this LM |
Ditto as above.
> +| |Bit[23] Valid err ID: |
> +| |Set to 1 if the error ID field is valid. |
> +| |Set to 0 if the error ID field is not valid. |
> +| |Bits[22:8] Error ID(Agent ID of the System). |
> +| |Bit[7:0] Reason |
Mapping again ?
> ++---------------------+--------------------------------------------------------+
> +|uint32 extinfo[3] |Array of extended info words(e.g. fault pc) |
> ++---------------------+--------------------------------------------------------+
> +
> +LMM_POWER_ON
> +~~~~~~~~~~~~
> +
> +message_id: 0xB
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if LM successfully powers on. |
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
> +| |DENIED: if the agent does not have permission to manage the|
> +| |the LM specified by lmid. |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_RESET_VECTOR_SET
> +~~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0xC
> +protocol_id: 0x80
> +This command is mandatory.
> +
I can't recall if I had asked this before. How is this different from
CPU_RESET_VECTOR_SET ? Why do you need this ? Why can't you use
CPU_RESET_VECTOR_SET with an additional LMM_* command.
I am sure there is a valid reason. If so please document the same.
> ++-----------------------+------------------------------------------------------+
> +|Parameters |
> ++-----------------------+------------------------------------------------------+
> +|Name |Description |
> ++-----------------------+------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++-----------------------+------------------------------------------------------+
> +|uint32 cpuid |ID of the CPU inside the LM |
> ++-----------------------+------------------------------------------------------+
> +|uint32 flags |Reset vector flags |
> +| |Bits[31:0] Reserved, must be zero. |
> ++-----------------------+------------------------------------------------------+
> +|uint32 resetVectorLow |Lower vector |
> ++-----------------------+------------------------------------------------------+
> +|uint32 resetVectorHigh |Higher vector |
> ++-----------------------+------------------------------------------------------+
> +|Return values |
> ++-----------------------+------------------------------------------------------+
> +|Name |Description |
> ++-----------------------+------------------------------------------------------+
> +|int32 status |SUCCESS: If reset vector is set successfully. |
> +| |NOT_FOUND: if lmId not points to a valid logical |
> +| |machine, or cpuId is not valid. |
> +| |INVALID_PARAMETERS: if reset vector is invalid. |
> +| |DENIED: if the agent does not have permission to set |
> +| |the reset vector for the CPU in the LM. |
> ++-----------------------+------------------------------------------------------+
> +
> +NEGOTIATE_PROTOCOL_VERSION
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x10
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++--------------------+---------------------------------------------------------+
> +|Parameters |
> ++--------------------+---------------------------------------------------------+
> +|Name |Description |
> ++--------------------+---------------------------------------------------------+
> +|uint32 version |The negotiated protocol version the agent intends to use |
> ++--------------------+---------------------------------------------------------+
> +|Return values |
> ++--------------------+---------------------------------------------------------+
> +|Name |Description |
> ++--------------------+---------------------------------------------------------+
> +|int32 status |SUCCESS: if the negotiated protocol version is supported |
> +| |by the platform. All commands, responses, and |
> +| |notifications post successful return of this command must|
> +| |comply with the negotiated version. |
> +| |NOT_SUPPORTED: if the protocol version is not supported. |
> ++--------------------+---------------------------------------------------------+
> +
> +Notifications
> +_____________
> +
> +LMM_EVENT
> +~~~~~~~~~
> +
> +message_id: 0x0
> +protocol_id: 0x80
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |Identifier for the LM that caused the transition. |
> ++------------------+-----------------------------------------------------------+
> +|uint32 eventlm |Identifier of the LM this event refers to. |
> ++------------------+-----------------------------------------------------------+
> +|uint32 flags |LM events: |
> +| |Bits[31:3] Reserved, must be zero. |
> +| |Bit[3] Wake (resume) event: |
> +| |1 LM has awakened. |
> +| |0 not a wake event. |
> +| |Bit[2] Suspend (sleep) event: |
> +| |1 LM has suspended. |
> +| |0 not a suspend event. |
> +| |Bit[1] Shutdown (off) event: |
> +| |1 LM has shutdown. |
> +| |0 not a shutdown event. |
> +| |Bit[0] Boot (on) event: |
> +| |1 LM has booted. |
> +| |0 not a boot event. |
> ++------------------+-----------------------------------------------------------+
> +
> SCMI_BBM: System Control and Management BBM Vendor Protocol
> ==============================================================
>
> @@ -436,6 +931,312 @@ protocol_id: 0x81
> | |0 no button change detected. |
> +------------------+-----------------------------------------------------------+
>
> +SCMI_CPU: System Control and Management CPU Vendor Protocol
> +==============================================================
> +
> +This protocol allows an agent to start or stop a CPU. It is used to manage
> +auxiliary CPUs in an LM (e.g. additional cores in an AP cluster or
> +Cortex-M cores).
> +Note:
> + - For cores in AP cluster, PSCI should be used and ATF will use CPU
s/ATF/PSCI firmware/
> + protocol to handle them. For cores in non-AP cluster, Operating System(e.g.
> + Linux OS) could use CPU protocols to control Cortex-M7 cores.
> + - CPU indicates the core and its auxiliary peripherals(e.g. TCM) inside
> + i.MX SoC
> +
> +The CPU protocol provides functions to:
> +
> +- Describe the protocol version.
> +- Discover implementation attributes.
> +- Discover the CPUs defined in the system.
> +- Start a CPU.
> +- Stop a CPU.
> +- Set the boot and resume addresses for a CPU.
> +- Set the sleep mode of a CPU.
> +- Configure wake-up sources for a CPU.
> +- Configure power domain reactions (LPM mode and retention mask) for a CPU.
> +- The CPU IDs can be found in the CPU section of the SoC DEVICE: SM Device
> + Interface. They can also be found in the SoC RM. See the CPU Mode Control
> + (CMC) list in General Power Controller (GPC) section.
> +
> +CPU settings are not aggregated and setting their state is normally exclusive
> +to one client.
> +
> +Commands:
> +_________
> +
> +PROTOCOL_VERSION
> +~~~~~~~~~~~~~~~~
> +
> +message_id: 0x0
> +protocol_id: 0x82
> +This command is mandatory.
> +
> ++---------------+--------------------------------------------------------------+
> +|Return values |
> ++---------------+--------------------------------------------------------------+
> +|Name |Description |
> ++---------------+--------------------------------------------------------------+
> +|int32 status | See ARM SCMI Specification for status code definitions. |
> ++---------------+--------------------------------------------------------------+
> +|uint32 version | For this revision of the specification, this value must be |
> +| | 0x10000. |
> ++---------------+--------------------------------------------------------------+
> +
> +PROTOCOL_ATTRIBUTES
> +~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x1
> +protocol_id: 0x82
> +This command is mandatory.
> +
> ++---------------+--------------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status | See ARM SCMI Specification for status code definitions. |
> ++------------------+-----------------------------------------------------------+
> +|uint32 attributes |Protocol attributes: |
> +| |Bits[31:16] Reserved, must be zero. |
> +| |Bits[15:0] Number of CPUs |
> ++------------------+-----------------------------------------------------------+
> +
> +PROTOCOL_MESSAGE_ATTRIBUTES
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x2
> +protocol_id: 0x82
> +This command is mandatory.
> +
> ++---------------+--------------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: in case the message is implemented and available |
> +| |to use. |
> +| |NOT_FOUND: if the message identified by message_id is |
> +| |invalid or not implemented |
> ++------------------+-----------------------------------------------------------+
> +|uint32 attributes |Flags that are associated with a specific function in the |
> +| |protocol. For all functions in this protocol, this |
> +| |parameter has a value of 0 |
> ++------------------+-----------------------------------------------------------+
> +
> +CPU_ATTRIBUTES
> +~~~~~~~~~~~~~~
> +
> +message_id: 0x4
> +protocol_id: 0x82
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 cpuid |Identifier for the CPU |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if valid attributes are returned successfully. |
> +| |NOT_FOUND: if the cpuid is not valid. |
> ++------------------+-----------------------------------------------------------+
> +|uint32 attributes |Bits[31:0] Reserved, must be zero |
> ++------------------+-----------------------------------------------------------+
> +|char name[16] |NULL terminated ASCII string with CPU name up to 16 bytes |
> ++------------------+-----------------------------------------------------------+
> +
> +CPU_START
> +~~~~~~~~~
> +
> +message_id: 0x4
> +protocol_id: 0x82
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 cpuid |Identifier for the CPU |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if the cpu is started successfully. |
> +| |NOT_FOUND: if cpuid is not valid. |
> +| |DENIED: the calling agent is not allowed to start this CPU.|
> ++------------------+-----------------------------------------------------------+
> +
> +CPU_STOP
> +~~~~~~~~
> +
> +message_id: 0x5
> +protocol_id: 0x82
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 cpuid |Identifier for the CPU |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if the cpu is started successfully. |
> +| |NOT_FOUND: if cpuid is not valid. |
> +| |DENIED: the calling agent is not allowed to stop this CPU. |
> ++------------------+-----------------------------------------------------------+
> +
> +CPU_RESET_VECTOR_SET
> +~~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x6
> +protocol_id: 0x82
> +This command is mandatory.
> +
> ++----------------------+-------------------------------------------------------+
> +|Parameters |
> ++----------------------+-------------------------------------------------------+
> +|Name |Description |
> ++----------------------+-------------------------------------------------------+
> +|uint32 cpuid |Identifier for the CPU |
> ++----------------------+-------------------------------------------------------+
> +|uint32 flags |Reset vector flags: |
> +| |Bit[31] Resume flag. |
> +| |Set to 1 to update the reset vector used on resume. |
> +| |Bit[30] Boot flag. |
> +| |Set to 1 to update the reset vector used for boot. |
> +| |Bits[29:1] Reserved, must be zero. |
> +| |Bit[0] Table flag. |
> +| |Set to 1 if vector is the vector table base address. |
> ++----------------------+-------------------------------------------------------+
> +|uint32 resetVectorLow |Lower vector: |
> +| |If bit[0] of flags is 0, the lower 32 bits of the |
> +| |physical address where the CPU should execute from on |
> +| |reset. If bit[0] of flags is 1, the lower 32 bits of |
> +| |the vector table base address |
> ++----------------------+-------------------------------------------------------+
> +|uint32 resetVectorhigh|Upper vector: |
> +| |If bit[0] of flags is 0, the upper 32 bits of the |
> +| |physical address where the CPU should execute from on |
> +| |reset. If bit[0] of flags is 1, the upper 32 bits of |
> +| |the vector table base address |
> ++----------------------+-------------------------------------------------------+
> +|Return values |
> ++----------------------+-------------------------------------------------------+
> +|Name |Description |
> ++----------------------+-------------------------------------------------------+
> +|int32 status |SUCCESS: if the CPU reset vector is set successfully. |
> +| |NOT_FOUND: if cpuId does not point to a valid CPU. |
> +| |INVALID_PARAMETERS: the requested vector type is not |
> +| |supported by this CPU. |
> +| |DENIED: the calling agent is not allowed to set the |
> +| |reset vector of this CPU |
> ++----------------------+-------------------------------------------------------+
> +
> +CPU_SLEEP_MODE_SET
> +~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x7
> +protocol_id: 0x82
> +This command is mandatory.
> +
> ++----------------------+-------------------------------------------------------+
> +|Parameters |
> ++----------------------+-------------------------------------------------------+
> +|Name |Description |
> ++----------------------+-------------------------------------------------------+
> +|uint32 cpuid |Identifier for the CPU |
> ++----------------------+-------------------------------------------------------+
> +|uint32 flags |Sleep mode flags: |
> +| |Bits[31:1] Reserved, must be zero. |
> +| |Bit[0] IRQ mux: |
> +| |If set to 1 the wakeup mux source is the GIC, else if 0|
> +| |then the GPC |
> ++----------------------+-------------------------------------------------------+
> +|uint32 sleepmode |target sleep mode. When CPU runs into WFI, the GPC mode|
> +| |will be triggered to be in below modes: |
> +| |RUN(0), WAIT(1), STOP(2), SUSPEND(3) |
Split above values into multiple line and mark rest of them as reserved. This
applies to any similar parameter. Easy to miss when reading 800 lines of text 😄
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol
2025-03-03 2:53 ` [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol Peng Fan (OSS)
2025-03-03 8:03 ` Dan Carpenter
@ 2025-04-01 14:21 ` Sudeep Holla
2025-04-01 14:36 ` Cristian Marussi
2025-04-01 15:00 ` Cristian Marussi
2 siblings, 1 reply; 23+ messages in thread
From: Sudeep Holla @ 2025-04-01 14:21 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Cristian Marussi, Shawn Guo, Sudeep Holla, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
On Mon, Mar 03, 2025 at 10:53:24AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add Logical Machine Management(LMM) protocol which is intended for boot,
> shutdown, and reset of other logical machines (LM). It is usually used to
> allow one LM to manager another used as an offload or accelerator engine.
>
This and next patch LGTM. Just curious as why Cristian has given tags only
for the drivers using these but not these changes.
Cristian, any specific concerns you had that had to be addressed or addressed
in this version ?
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol
2025-04-01 14:21 ` Sudeep Holla
@ 2025-04-01 14:36 ` Cristian Marussi
2025-04-01 14:48 ` Sudeep Holla
0 siblings, 1 reply; 23+ messages in thread
From: Cristian Marussi @ 2025-04-01 14:36 UTC (permalink / raw)
To: Sudeep Holla
Cc: Peng Fan (OSS), Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
On Tue, Apr 01, 2025 at 03:21:51PM +0100, Sudeep Holla wrote:
> On Mon, Mar 03, 2025 at 10:53:24AM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add Logical Machine Management(LMM) protocol which is intended for boot,
> > shutdown, and reset of other logical machines (LM). It is usually used to
> > allow one LM to manager another used as an offload or accelerator engine.
> >
>
> This and next patch LGTM. Just curious as why Cristian has given tags only
> for the drivers using these but not these changes.
>
> Cristian, any specific concerns you had that had to be addressed or addressed
> in this version ?
I think I had some review comments on the previous version of this
series for Documentation and protocol....let me see wth I said about
this :D and if they have been addressed...
Thanks,
Cristian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol
2025-04-01 14:36 ` Cristian Marussi
@ 2025-04-01 14:48 ` Sudeep Holla
0 siblings, 0 replies; 23+ messages in thread
From: Sudeep Holla @ 2025-04-01 14:48 UTC (permalink / raw)
To: Cristian Marussi
Cc: Peng Fan (OSS), Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
On Tue, Apr 01, 2025 at 03:36:31PM +0100, Cristian Marussi wrote:
> On Tue, Apr 01, 2025 at 03:21:51PM +0100, Sudeep Holla wrote:
> > On Mon, Mar 03, 2025 at 10:53:24AM +0800, Peng Fan (OSS) wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > Add Logical Machine Management(LMM) protocol which is intended for boot,
> > > shutdown, and reset of other logical machines (LM). It is usually used to
> > > allow one LM to manager another used as an offload or accelerator engine.
> > >
> >
> > This and next patch LGTM. Just curious as why Cristian has given tags only
> > for the drivers using these but not these changes.
> >
> > Cristian, any specific concerns you had that had to be addressed or addressed
> > in this version ?
>
> I think I had some review comments on the previous version of this
> series for Documentation and protocol....let me see wth I said about
> this :D and if they have been addressed...
>
Thanks that would be great. I can't recall which version I had a look,
hence thought of asking.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation
2025-03-03 2:53 ` [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation Peng Fan (OSS)
2025-04-01 14:15 ` Sudeep Holla
@ 2025-04-01 14:51 ` Cristian Marussi
2025-04-02 12:42 ` Peng Fan
1 sibling, 1 reply; 23+ messages in thread
From: Cristian Marussi @ 2025-04-01 14:51 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
On Mon, Mar 03, 2025 at 10:53:22AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add i.MX95 Logical Machine Management and CPU Protocol documentation.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 ++++++++++++++++++++++++
> 1 file changed, 801 insertions(+)
>
> diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..74326bf2ea8586282a735713e0ab7eb90ccce8ff 100644
> --- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> +++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> @@ -32,6 +32,501 @@ port, and deploy the SM on supported processors.
> The SM implements an interface compliant with the Arm SCMI Specification
> with additional vendor specific extensions.
>
> +SCMI_LMM: System Control and Management Logical Machine Management Vendor Protocol
> +==================================================================================
> +
> +This protocol is intended for boot, shutdown, and reset of other logical
> +machines (LM). It is usually used to allow one LM(e.g. OSPM) to manage
> +another LM which is usually an offload or accelerator engine.. Notifications
> +from this protocol can also be used to manage a communication link to another
> +LM. The LMM protocol provides functions to:
> +
> +- Describe the protocol version.
> +- Discover implementation attributes.
> +- Discover the LMs defined in the system.
> +- Boot an LM.
> +- Shutdown an LM (gracefully or forcibly).
> +- Reset an LM (gracefully or forcibly).
> +- Wake an LM from suspend.
> +- Suspend an LM (gracefully).
> +- Read boot/shutdown/reset information for an LM.
> +- Get notifications when an LM boots or shuts down (e.g. LM[X] requested
> + notification of LM[Y] boots or shuts down, when LM[Y] boots or shuts down,
> + SCMI firmware will send notification to LM[X]).
> +
> +'Graceful' means asking LM itself to shutdown/reset/etc (e.g. sending
> +notification to Linux, Then Linux reboots or powers down itself). It is async
> +command that the SUCCESS of the command just means the command successfully
> +return, not means reboot/reset successfully finished.
> +'Forceful' means the SM will force shutdown/reset/etc the LM. It is sync
> +command that the SUCCESS of the command means the LM has been successfully
> +shutdown/reset/etc.
> +If the commands not have Graceful/Forceful flag settings, such as WAKE, SUSEND,
> +it is async command.
> +
Hi,
> +Commands:
> +_________
> +
> +PROTOCOL_VERSION
> +~~~~~~~~~~~~~~~~
> +
> +message_id: 0x0
> +protocol_id: 0x80
> +This command is mandatory.
> +
Good that you added the mandatory/optional description..
> ++---------------+--------------------------------------------------------------+
> +|Return values |
> ++---------------+--------------------------------------------------------------+
> +|Name |Description |
> ++---------------+--------------------------------------------------------------+
> +|int32 status | See ARM SCMI Specification for status code definitions. |
> ++---------------+--------------------------------------------------------------+
> +|uint32 version | For this revision of the specification, this value must be |
> +| | 0x10000. |
> ++---------------+--------------------------------------------------------------+
> +
> +PROTOCOL_ATTRIBUTES
> +~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x1
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status | See ARM SCMI Specification for status code definitions. |
> ++------------------+-----------------------------------------------------------+
> +|uint32 attributes |Protocol attributes: |
> +| |Bits[31:8] Reserved, must be zero. |
> +| |Bits[7:0] Number of Logical Machines |
> ++------------------+-----------------------------------------------------------+
> +
> +PROTOCOL_MESSAGE_ATTRIBUTES
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +message_id: 0x2
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: in case the message is implemented and available |
> +| |to use. |
> +| |NOT_FOUND: if the message identified by message_id is |
> +| |invalid or not implemented |
> ++------------------+-----------------------------------------------------------+
> +|uint32 attributes |Flags that are associated with a specific function in the |
> +| |protocol. For all functions in this protocol, this |
> +| |parameter has a value of 0 |
> ++------------------+-----------------------------------------------------------+
> +
> +LMM_ATTRIBUTES
> +~~~~~~~~~~~~~~
> +
> +message_id: 0x3
> +protocol_id: 0x80
> +This command is mandatory.
> +
> ++------------------+-----------------------------------------------------------+
> +|Parameters |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |ID of the Logical Machine |
> ++------------------+-----------------------------------------------------------+
> +|Return values |
> ++------------------+-----------------------------------------------------------+
> +|Name |Description |
> ++------------------+-----------------------------------------------------------+
> +|int32 status |SUCCESS: if valid attributes are returned. |
> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> +| |DENIED: if the agent does not have permission to get info |
> +| |for the LM specified by lmid. |
..mmmmm... regardig this next field...
> ++------------------+-----------------------------------------------------------+
> +|uint32 lmid |Identifier of the LM whose identification is requested. |
> +| |This field is: Populated with the lmId of the calling |
> +| |agent, when the lmId parameter passed via the function is |
> +| |0xFFFFFFFF. Identical to the lmId field passed via the |
> +| |calling parameters, in all other cases |
In V2 there was an issue with the description and you told me
>> ++------------------+-----------------------------------------------------------+
> >> +|Parameters |
> >> ++------------------+-----------------------------------------------------------+
> >> +|Name |Description |
> >> ++------------------+-----------------------------------------------------------+
> >> +|uint32 lmid |ID of the Logical Machine |
> >> ++------------------+-----------------------------------------------------------+
> >> +|Return values |
> >> ++------------------+-----------------------------------------------------------+
> >> +|Name |Description |
> >> ++------------------+-----------------------------------------------------------+
> >> +|int32 status |SUCCESS: if valid attributes are returned. |
> >> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> >> +| |DENIED: if the agent does not have permission to get info |
> >> +| |for the LM specified by lmid. |
> >> ++------------------+-----------------------------------------------------------+
> >> +|uint32 attributes | Bits[31:8] reserved. |
> >> +| | Bits[7:0] Number of Logical Machines. |
> >
> >...BUT this returns again the number of LMs while asking the attributes
> >of a specific LM ? .... is it a typo or what ? ...if it is just as a
> >sort of placeholder for when you'll have really LM's attributes to show,
> >consider that once this is documented and supported in this version of
> >your vendor protocol it will be needed to be kept and maintained...maybe
> >better just to declare this as zero in this version of the protocol if
> >you dont really have anything for this command in this version...(like
> >many times are defined the attributes fields in PROTOCOL_MESSAGE_ATTRIBUTES
> >above, if you really know you could want/need this command in the
> >future...is it used now ?
>
> My bad. This should be updated with below
> +------------------+-----------------------------------------------------------+
> |uint32 attributes | Bits[31:0] reserved. must be zero |
> +------------------+-----------------------------------------------------------+
> |uint32 state | Current state of the LM |
> +------------------+-----------------------------------------------------------+
> |uint32 errStatus | Last error status recorded |
> +------------------+-----------------------------------------------------------+
> |char name[16] | A NULL terminated ASCII string with the LM name, of up |
> | | to 16 bytes |
> +------------------+-----------------------------------------------------------+
...so it seems to me that the above lmid is a new addition that was not
mentioned ... bad cut&paste ? it does NOT seem to make so much
sense...or I am missing something
Other than this, LGTM.
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Thanks,
Cristian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol
2025-03-03 2:53 ` [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol Peng Fan (OSS)
2025-03-03 8:03 ` Dan Carpenter
2025-04-01 14:21 ` Sudeep Holla
@ 2025-04-01 15:00 ` Cristian Marussi
2 siblings, 0 replies; 23+ messages in thread
From: Cristian Marussi @ 2025-04-01 15:00 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Sudeep Holla, Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
On Mon, Mar 03, 2025 at 10:53:24AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add Logical Machine Management(LMM) protocol which is intended for boot,
> shutdown, and reset of other logical machines (LM). It is usually used to
> allow one LM to manager another used as an offload or accelerator engine.
>
Hi,
LGTM.
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Thanks,
Cristian
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 2/7] dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol
2025-03-03 2:53 ` [PATCH v3 2/7] dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol Peng Fan (OSS)
@ 2025-04-01 22:21 ` Rob Herring (Arm)
0 siblings, 0 replies; 23+ messages in thread
From: Rob Herring (Arm) @ 2025-04-01 22:21 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Krzysztof Kozlowski, imx, Cristian Marussi, Fabio Estevam,
arm-scmi, devicetree, linux-arm-kernel, Sascha Hauer, Peng Fan,
Sudeep Holla, Dan Carpenter, Shawn Guo, Pengutronix Kernel Team,
linux-kernel, Conor Dooley
On Mon, 03 Mar 2025 10:53:23 +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add i.MX SCMI Extension protocols bindings for:
> - Logic Machine Management(LMM) Protocol
> intended for boot, shutdown, and reset of other logical machines (LM).
> It is usually used to allow one LM to manager another used as an offload
> or accelerator engine..
> - CPU Protocol.
> allows an agent to start or stop a CPU. It is used to manage auxiliary
> CPUs in an LM (e.g. additional cores in an AP cluster).
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> .../bindings/firmware/nxp,imx95-scmi.yaml | 23 ++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation
2025-04-02 12:35 ` Peng Fan
@ 2025-04-02 11:46 ` Sudeep Holla
2025-04-02 16:10 ` Peng Fan
0 siblings, 1 reply; 23+ messages in thread
From: Sudeep Holla @ 2025-04-02 11:46 UTC (permalink / raw)
To: Peng Fan
Cc: Cristian Marussi, Sudeep Holla, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
On Wed, Apr 02, 2025 at 08:35:03PM +0800, Peng Fan wrote:
> Hi Sudeep,
>
> Thanks for reviewing the patch.
>
> For comments that I am not very clear, I marked with [TODO] for easily
> jump to.
>
> On Tue, Apr 01, 2025 at 03:15:46PM +0100, Sudeep Holla wrote:
> >On Mon, Mar 03, 2025 at 10:53:22AM +0800, Peng Fan (OSS) wrote:
> >> From: Peng Fan <peng.fan@nxp.com>
> >>
> >> Add i.MX95 Logical Machine Management and CPU Protocol documentation.
> >>
> >> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >> ---
> >> drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 ++++++++++++++++++++++++
> >> 1 file changed, 801 insertions(+)
> >>
> >> diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> >> index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..74326bf2ea8586282a735713e0ab7eb90ccce8ff 100644
> >> --- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> >> +++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> >> +
> >> +PROTOCOL_MESSAGE_ATTRIBUTES
> >> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> +
> >> +message_id: 0x2
> >> +protocol_id: 0x80
> >> +This command is mandatory.
> >> +
> >
> >For completeness add parameters here for message_id as in the spec as it is
> >referred in the returned value and seems incomplete without it.
>
> [TODO]
> Sorry, I may not get your point here. You mean below format?
>
> +------------------+-----------------------------------------------------------+
> |message_id: 0x2
> |protocol_id: 0x80
> |This command is mandatory.
> +------------------+-----------------------------------------------------------+
> |Return values |
> +------------------+-----------------------------------------------------------+
> |Name |Description |
> +------------------+-----------------------------------------------------------+
> |int32 status |SUCCESS: in case the message is implemented and available |
> | |to use. |
> | |NOT_FOUND: if the message identified by message_id is |
> | |invalid or not implemented |
> +------------------+-----------------------------------------------------------+
> |uint32 attributes |Flags that are associated with a specific function in the |
> | |protocol. For all functions in this protocol, this |
>
> message_id is not put in the table, but it is list above just below
> the protocol name. I would prefer to keep current layout and align with
> the MISC and BBM protocol.
>
I meant why is the input parameter message_id not described in the table,
but is referred in the return values. For completeness, just add it even
though it may match the SCMI spec in terms of input parameter.
[...]
> >> +| |Bit[23] Valid err ID: |
> >> +| |Set to 1 if the error ID field is valid. |
> >> +| |Set to 0 if the error ID field is not valid. |
> >> +| |Bits[22:8] Error ID(Agent ID of the system). |
> >> +| |Bit[7:0] Reason(WDOG, POR, FCCU and etc) |
> >
> >Is there a mapping for this ?
>
> I will add a note in V4:
> See the SRESR register description in the System Reset Controller (SRC) section
> in SoC reference mannual.
>
A reference would be good here then. I would be hard to imagine what it means
otherwise.
> >> +
> >> +LMM_RESET_VECTOR_SET
> >> +~~~~~~~~~~~~~~~~~~~~
> >> +
> >> +message_id: 0xC
> >> +protocol_id: 0x80
> >> +This command is mandatory.
> >> +
> >
> >I can't recall if I had asked this before. How is this different from
> >CPU_RESET_VECTOR_SET ? Why do you need this ? Why can't you use
> >CPU_RESET_VECTOR_SET with an additional LMM_* command.
> >
> >I am sure there is a valid reason. If so please document the same.
>
> CPU_RESET_VECTOR_SET is for cases that M7 and A55 in the same LM.
> LMM_RESET_VECTOR_SET is for cases that M7 and A55 in different LM.
> M7 LM is under control of A55 LM
>
That still doesn't answer my question. I was asking why do you need this
extra interface ? If LMM_RESET_VECTOR_SET can take both cpu id and LM id,
it can be used even for cpus within same LM with current LM ID. Why the
need for separate interface ?
Other than these 2, I am fine with your response on all other comments.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation
2025-04-01 14:15 ` Sudeep Holla
@ 2025-04-02 12:35 ` Peng Fan
2025-04-02 11:46 ` Sudeep Holla
0 siblings, 1 reply; 23+ messages in thread
From: Peng Fan @ 2025-04-02 12:35 UTC (permalink / raw)
To: Sudeep Holla
Cc: Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
Hi Sudeep,
Thanks for reviewing the patch.
For comments that I am not very clear, I marked with [TODO] for easily
jump to.
On Tue, Apr 01, 2025 at 03:15:46PM +0100, Sudeep Holla wrote:
>On Mon, Mar 03, 2025 at 10:53:22AM +0800, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> Add i.MX95 Logical Machine Management and CPU Protocol documentation.
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>> drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 ++++++++++++++++++++++++
>> 1 file changed, 801 insertions(+)
>>
>> diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>> index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..74326bf2ea8586282a735713e0ab7eb90ccce8ff 100644
>> --- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>> +++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>> @@ -32,6 +32,501 @@ port, and deploy the SM on supported processors.
>> The SM implements an interface compliant with the Arm SCMI Specification
>> with additional vendor specific extensions.
>>
>> +SCMI_LMM: System Control and Management Logical Machine Management Vendor Protocol
>> +==================================================================================
>> +
>> +This protocol is intended for boot, shutdown, and reset of other logical
>
>s/for/to support/ ?
Fix in v4.
>
>> +machines (LM). It is usually used to allow one LM(e.g. OSPM) to manage
>
>Does it make sense to describe what is LM first before the first statement
>here ?
Add below in V4
"The SM adds the concept of logical machines (LMs). These are analogous to
VMs and each has its own instance of SCMI. All normal SCMI calls only apply
the LM running the calling agent. That includes boot, shutdown, reset,
suspend, wake, etc. If a caller makes the SCMI base call to get a list
of agents it will only get those on that LM. Each LM is completely isolated
from the others. This is mandatory for these to operate independently."
>
>> +another LM which is usually an offload or accelerator engine.. Notifications
>
>Spirious "." above ?
Drop extra '.' in V4.
>
>> +from this protocol can also be used to manage a communication link to another
>> +LM. The LMM protocol provides functions to:
>
>Either redefine LMM here or add acronym LMM in the title above and drop SCMI_LMM
>
>"System Control and Management Logical Machine Management(LMM) Vendor Protocol"
As write above, will add LM concept in the beginning and drop SCMI_LMM
from title.
>
>> +
>> +- Describe the protocol version.
>> +- Discover implementation attributes.
>> +- Discover the LMs defined in the system.
>
>all the LMs
Fix all in v4.
>
>> +- Boot an LM.
>
>s/an LM/ a target LM/
>
>Applies for the list below.
Ditto.
>
>> +- Shutdown an LM (gracefully or forcibly).
>> +- Reset an LM (gracefully or forcibly).
>> +- Wake an LM from suspend.
>> +- Suspend an LM (gracefully).
>> +- Read boot/shutdown/reset information for an LM.
>
>
>> +- Get notifications when an LM boots or shuts down (e.g. LM[X] requested
>> + notification of LM[Y] boots or shuts down, when LM[Y] boots or shuts down,
>> + SCMI firmware will send notification to LM[X]).
>> +
>
>s/[X]/ 'X' / and similarly s/[Y]/ 'Y'/
Fix in v4.
>
>> +'Graceful' means asking LM itself to shutdown/reset/etc (e.g. sending
>> +notification to Linux, Then Linux reboots or powers down itself). It is async
>> +command that the SUCCESS of the command just means the command successfully
>> +return, not means reboot/reset successfully finished.
>
>Extra blank line here would be good.
Fix in v4.
>
>> +'Forceful' means the SM will force shutdown/reset/etc the LM. It is sync
>> +command that the SUCCESS of the command means the LM has been successfully
>> +shutdown/reset/etc.
>
>> +If the commands not have Graceful/Forceful flag settings, such as WAKE, SUSEND,
>> +it is async command.
>
>I would rather put it as Graceful above instead of async as the relation
>is established above. I assume you are referring to the interface that doesn't
>have this flag and not flag being 0.
Right. Not have this flag. Will use below in V4,
"
If the commands not have Graceful/Forceful flag settings, such as WAKE, SUSPEND,
it is Graceful command.
"
>
>> +
>> +Commands:
>> +_________
>> +
>> +PROTOCOL_VERSION
>> +~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x0
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++---------------+--------------------------------------------------------------+
>> +|Return values |
>> ++---------------+--------------------------------------------------------------+
>> +|Name |Description |
>> ++---------------+--------------------------------------------------------------+
>> +|int32 status | See ARM SCMI Specification for status code definitions. |
>> ++---------------+--------------------------------------------------------------+
>> +|uint32 version | For this revision of the specification, this value must be |
>> +| | 0x10000. |
>> ++---------------+--------------------------------------------------------------+
>> +
>> +PROTOCOL_ATTRIBUTES
>> +~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x1
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status | See ARM SCMI Specification for status code definitions. |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 attributes |Protocol attributes: |
>> +| |Bits[31:8] Reserved, must be zero. |
>> +| |Bits[7:0] Number of Logical Machines |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +PROTOCOL_MESSAGE_ATTRIBUTES
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x2
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>
>For completeness add parameters here for message_id as in the spec as it is
>referred in the returned value and seems incomplete without it.
[TODO]
Sorry, I may not get your point here. You mean below format?
+------------------+-----------------------------------------------------------+
|message_id: 0x2
|protocol_id: 0x80
|This command is mandatory.
+------------------+-----------------------------------------------------------+
|Return values |
+------------------+-----------------------------------------------------------+
|Name |Description |
+------------------+-----------------------------------------------------------+
|int32 status |SUCCESS: in case the message is implemented and available |
| |to use. |
| |NOT_FOUND: if the message identified by message_id is |
| |invalid or not implemented |
+------------------+-----------------------------------------------------------+
|uint32 attributes |Flags that are associated with a specific function in the |
| |protocol. For all functions in this protocol, this |
message_id is not put in the table, but it is list above just below
the protocol name. I would prefer to keep current layout and align with
the MISC and BBM protocol.
>
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: in case the message is implemented and available |
>> +| |to use. |
>> +| |NOT_FOUND: if the message identified by message_id is |
>> +| |invalid or not implemented |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 attributes |Flags that are associated with a specific function in the |
>> +| |protocol. For all functions in this protocol, this |
>
>s/functions/commands/ just to be in sync with the spec.
Fix in V4.
>
>> +| |parameter has a value of 0 |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_ATTRIBUTES
>> +~~~~~~~~~~~~~~
>> +
>> +message_id: 0x3
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if valid attributes are returned. |
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>
>s/lmId/lmid/ (everywhere applicable for consistency, the parameter name is
>lmid while the description refers lmId)
Fix in V4.
>
>> +| |DENIED: if the agent does not have permission to get info |
>> +| |for the LM specified by lmid. |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |Identifier of the LM whose identification is requested. |
>> +| |This field is: Populated with the lmId of the calling |
>> +| |agent, when the lmId parameter passed via the function is |
>> +| |0xFFFFFFFF. Identical to the lmId field passed via the |
>> +| |calling parameters, in all other cases |
>
>Is this to avoid another interface to get the LM ID of the caller ?
Yes, one LM could only get its own lmid with value 0xFFFFFFFF, it is not able
to get other agent's lmid.
>
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 attributes | Bits[31:0] reserved. must be zero |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 state | Current state of the LM |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 errStatus | Last error status recorded |
>> ++------------------+-----------------------------------------------------------+
>> +|char name[16] | A NULL terminated ASCII string with the LM name, of up |
>> +| | to 16 bytes |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_BOOT
>> +~~~~~~~~
>> +
>> +message_id: 0x4
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if LM boots successfully started. |
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
>> +| |DENIED: if the agent does not have permission to manage the|
>> +| |the LM specified by lmid. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_RESET
>> +~~~~~~~~~
>> +
>> +message_id: 0x5
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 flags |Reset flags: |
>> +| |Bits[31:1] Reserved, must be zero. |
>> +| |Bit[0] Graceful request: |
>> +| |Set to 1 if the request is a graceful request. |
>> +| |Set to 0 if the request is a forceful request. |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: The LMM RESET command finished successfully in |
>> +| |graceful reset or LM successfully resets in forceful reset.|
>
>If graceful reset is async, will the return value indicate success ?
Yes. As write 'command finished successfully'
the return value just indicates the command finish successfully,
not indicate LM reset done gracefully.
>
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
>> +| |DENIED: if the agent does not have permission to manage the|
>> +| |the LM specified by lmid. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_SHUTDOWN
>> +~~~~~~~~~~~~
>> +
>> +message_id: 0x6
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 flags |Reset flags: |
>> +| |Bits[31:1] Reserved, must be zero. |
>> +| |Bit[0] Graceful request: |
>> +| |Set to 1 if the request is a graceful request. |
>> +| |Set to 0 if the request is a forceful request. |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: The LMM shutdown command finished successfully in |
>> +| |graceful request or LM successfully shutdown in forceful |
>> +| |request. |
>
>
>Ditto as above ?
Same reply as above.
>
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
>> +| |DENIED: if the agent does not have permission to manage the|
>> +| |the LM specified by lmid. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_WAKE
>> +~~~~~~~~
>> +
>> +message_id: 0x7
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if LM wake command successfully returns. |
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
>> +| |DENIED: if the agent does not have permission to manage the|
>> +| |the LM specified by lmid. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_SUSPEND
>> +~~~~~~~~~~~
>> +
>> +message_id: 0x8
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if LM suspend command successfully returns. |
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
>> +| |DENIED: if the agent does not have permission to manage the|
>> +| |the LM specified by lmid. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_NOTIFY
>> +~~~~~~~~~~
>> +
>> +message_id: 0x9
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 flags |Notification flags: |
>> +| |Bits[31:3] Reserved, must be zero. |
>> +| |Bit[3] Wake (resume) notification: |
>> +| |Set to 1 to send notification. |
>> +| |Set to 0 if no notification. |
>> +| |Bit[2] Suspend (sleep) notification: |
>> +| |Set to 1 to send notification. |
>> +| |Set to 0 if no notification. |
>> +| |Bit[1] Shutdown (off) notification: |
>> +| |Set to 1 to send notification. |
>> +| |Set to 0 if no notification. |
>> +| |Bit[0] Boot (on) notification: |
>> +| |Set to 1 to send notification. |
>> +| |Set to 0 if no notification |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if the notification state successfully updated. |
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>> +| |INVALID_PARAMETERS: if input attributes flag specifies |
>> +| |unsupported or invalid configurations. |
>> +| |DENIED: if the agent does not have permission to request |
>> +| |the notification. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_RESET_REASON
>> +~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0xA
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> +This command is to return the reset reason that caused the last reset, such as
>> +POR, WDOG, JTAG and etc.
>> +
>> ++---------------------+--------------------------------------------------------+
>> +|Parameters |
>> ++---------------------+--------------------------------------------------------+
>> +|Name |Description |
>> ++---------------------+--------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++---------------------+--------------------------------------------------------+
>> +|Return values |
>> ++---------------------+--------------------------------------------------------+
>> +|Name |Description |
>> ++---------------------+--------------------------------------------------------+
>> +|int32 status |SUCCESS: if the reset reason of the LM successfully |
>> +| |updated. |
>> +| |NOT_FOUND: if lmId not points to a valid logical machine|
>> +| |DENIED: if the agent does not have permission to request|
>> +| |the reset reason. |
>> ++---------------------+--------------------------------------------------------+
>> +|uint32 bootflags |Boot reason flags. This parameter has the format: |
>> +| |Bits[31] Valid. |
>> +| |Set to 1 if the entire reason is valid. |
>> +| |Set to 0 if the entire reason is not valid. |
>> +| |Bits[30:29] Reserved, must be zero. |
>> +| |Bit[28] Valid origin: |
>> +| |Set to 1 if the origin field is valid. |
>> +| |Set to 0 if the origin field is not valid. |
>> +| |Bits[27:24] Origin. |
>> +| |Logical Machine(LM) ID that causes the BOOT of this LM |
>
>So you support only 16 LMs on the system ? From the initial command it seemed
>256. So what exactly is it ? Please document the same clearly.
Based on our current SoC, 16 is enough.
Since the doc is from imx-sm repo, I need to check with owner and update
in V4.
>
>> +| |Bit[23] Valid err ID: |
>> +| |Set to 1 if the error ID field is valid. |
>> +| |Set to 0 if the error ID field is not valid. |
>> +| |Bits[22:8] Error ID(Agent ID of the system). |
>> +| |Bit[7:0] Reason(WDOG, POR, FCCU and etc) |
>
>Is there a mapping for this ?
I will add a note in V4:
See the SRESR register description in the System Reset Controller (SRC) section
in SoC reference mannual.
>
>> ++---------------------+--------------------------------------------------------+
>> +|uint32 shutdownflags |Shutdown reason flags. This parameter has the format: |
>> +| |Bits[31] Valid. |
>> +| |Set to 1 if the entire reason is valid. |
>> +| |Set to 0 if the entire reason is not valid. |
>> +| |Bits[30:29] Number of valid extended info words. |
>> +| |Bit[28] Valid origin: |
>> +| |Set to 1 if the origin field is valid. |
>> +| |Set to 0 if the origin field is not valid. |
>> +| |Bits[27:24] Origin. |
>> +| |Logical Machine(LM) ID that causes the BOOT of this LM |
>
>
>Ditto as above.
16 should be enough as of now, but for 256, I need check with firmware owner
and update in V4.
>
>> +| |Bit[23] Valid err ID: |
>> +| |Set to 1 if the error ID field is valid. |
>> +| |Set to 0 if the error ID field is not valid. |
>> +| |Bits[22:8] Error ID(Agent ID of the System). |
>> +| |Bit[7:0] Reason |
>
>
>Mapping again ?
Same as above
>
>> ++---------------------+--------------------------------------------------------+
>> +|uint32 extinfo[3] |Array of extended info words(e.g. fault pc) |
>> ++---------------------+--------------------------------------------------------+
>> +
>> +LMM_POWER_ON
>> +~~~~~~~~~~~~
>> +
>> +message_id: 0xB
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if LM successfully powers on. |
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>> +| |INVALID_PARAMETERS: if lmId is same as the caller. |
>> +| |DENIED: if the agent does not have permission to manage the|
>> +| |the LM specified by lmid. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_RESET_VECTOR_SET
>> +~~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0xC
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>
>I can't recall if I had asked this before. How is this different from
>CPU_RESET_VECTOR_SET ? Why do you need this ? Why can't you use
>CPU_RESET_VECTOR_SET with an additional LMM_* command.
>
>I am sure there is a valid reason. If so please document the same.
CPU_RESET_VECTOR_SET is for cases that M7 and A55 in the same LM.
LMM_RESET_VECTOR_SET is for cases that M7 and A55 in different LM.
M7 LM is under control of A55 LM
>
>> ++-----------------------+------------------------------------------------------+
>> +|Parameters |
>> ++-----------------------+------------------------------------------------------+
>> +|Name |Description |
>> ++-----------------------+------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++-----------------------+------------------------------------------------------+
>> +|uint32 cpuid |ID of the CPU inside the LM |
>> ++-----------------------+------------------------------------------------------+
>> +|uint32 flags |Reset vector flags |
>> +| |Bits[31:0] Reserved, must be zero. |
>> ++-----------------------+------------------------------------------------------+
>> +|uint32 resetVectorLow |Lower vector |
>> ++-----------------------+------------------------------------------------------+
>> +|uint32 resetVectorHigh |Higher vector |
>> ++-----------------------+------------------------------------------------------+
>> +|Return values |
>> ++-----------------------+------------------------------------------------------+
>> +|Name |Description |
>> ++-----------------------+------------------------------------------------------+
>> +|int32 status |SUCCESS: If reset vector is set successfully. |
>> +| |NOT_FOUND: if lmId not points to a valid logical |
>> +| |machine, or cpuId is not valid. |
>> +| |INVALID_PARAMETERS: if reset vector is invalid. |
>> +| |DENIED: if the agent does not have permission to set |
>> +| |the reset vector for the CPU in the LM. |
>> ++-----------------------+------------------------------------------------------+
>> +
>> +NEGOTIATE_PROTOCOL_VERSION
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x10
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++--------------------+---------------------------------------------------------+
>> +|Parameters |
>> ++--------------------+---------------------------------------------------------+
>> +|Name |Description |
>> ++--------------------+---------------------------------------------------------+
>> +|uint32 version |The negotiated protocol version the agent intends to use |
>> ++--------------------+---------------------------------------------------------+
>> +|Return values |
>> ++--------------------+---------------------------------------------------------+
>> +|Name |Description |
>> ++--------------------+---------------------------------------------------------+
>> +|int32 status |SUCCESS: if the negotiated protocol version is supported |
>> +| |by the platform. All commands, responses, and |
>> +| |notifications post successful return of this command must|
>> +| |comply with the negotiated version. |
>> +| |NOT_SUPPORTED: if the protocol version is not supported. |
>> ++--------------------+---------------------------------------------------------+
>> +
>> +Notifications
>> +_____________
>> +
>> +LMM_EVENT
>> +~~~~~~~~~
>> +
>> +message_id: 0x0
>> +protocol_id: 0x80
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |Identifier for the LM that caused the transition. |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 eventlm |Identifier of the LM this event refers to. |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 flags |LM events: |
>> +| |Bits[31:3] Reserved, must be zero. |
>> +| |Bit[3] Wake (resume) event: |
>> +| |1 LM has awakened. |
>> +| |0 not a wake event. |
>> +| |Bit[2] Suspend (sleep) event: |
>> +| |1 LM has suspended. |
>> +| |0 not a suspend event. |
>> +| |Bit[1] Shutdown (off) event: |
>> +| |1 LM has shutdown. |
>> +| |0 not a shutdown event. |
>> +| |Bit[0] Boot (on) event: |
>> +| |1 LM has booted. |
>> +| |0 not a boot event. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> SCMI_BBM: System Control and Management BBM Vendor Protocol
>> ==============================================================
>>
>> @@ -436,6 +931,312 @@ protocol_id: 0x81
>> | |0 no button change detected. |
>> +------------------+-----------------------------------------------------------+
>>
>> +SCMI_CPU: System Control and Management CPU Vendor Protocol
>> +==============================================================
>> +
>> +This protocol allows an agent to start or stop a CPU. It is used to manage
>> +auxiliary CPUs in an LM (e.g. additional cores in an AP cluster or
>> +Cortex-M cores).
>> +Note:
>> + - For cores in AP cluster, PSCI should be used and ATF will use CPU
>
>s/ATF/PSCI firmware/
Fix in V4.
>
>> + protocol to handle them. For cores in non-AP cluster, Operating System(e.g.
>> + Linux OS) could use CPU protocols to control Cortex-M7 cores.
>> + - CPU indicates the core and its auxiliary peripherals(e.g. TCM) inside
>> + i.MX SoC
>> +
>> +The CPU protocol provides functions to:
>> +
>> +- Describe the protocol version.
>> +- Discover implementation attributes.
>> +- Discover the CPUs defined in the system.
>> +- Start a CPU.
>> +- Stop a CPU.
>> +- Set the boot and resume addresses for a CPU.
>> +- Set the sleep mode of a CPU.
>> +- Configure wake-up sources for a CPU.
>> +- Configure power domain reactions (LPM mode and retention mask) for a CPU.
>> +- The CPU IDs can be found in the CPU section of the SoC DEVICE: SM Device
>> + Interface. They can also be found in the SoC RM. See the CPU Mode Control
>> + (CMC) list in General Power Controller (GPC) section.
>> +
>> +CPU settings are not aggregated and setting their state is normally exclusive
>> +to one client.
>> +
>> +Commands:
>> +_________
>> +
>> +PROTOCOL_VERSION
>> +~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x0
>> +protocol_id: 0x82
>> +This command is mandatory.
>> +
>> ++---------------+--------------------------------------------------------------+
>> +|Return values |
>> ++---------------+--------------------------------------------------------------+
>> +|Name |Description |
>> ++---------------+--------------------------------------------------------------+
>> +|int32 status | See ARM SCMI Specification for status code definitions. |
>> ++---------------+--------------------------------------------------------------+
>> +|uint32 version | For this revision of the specification, this value must be |
>> +| | 0x10000. |
>> ++---------------+--------------------------------------------------------------+
>> +
>> +PROTOCOL_ATTRIBUTES
>> +~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x1
>> +protocol_id: 0x82
>> +This command is mandatory.
>> +
>> ++---------------+--------------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status | See ARM SCMI Specification for status code definitions. |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 attributes |Protocol attributes: |
>> +| |Bits[31:16] Reserved, must be zero. |
>> +| |Bits[15:0] Number of CPUs |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +PROTOCOL_MESSAGE_ATTRIBUTES
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x2
>> +protocol_id: 0x82
>> +This command is mandatory.
>> +
>> ++---------------+--------------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: in case the message is implemented and available |
>> +| |to use. |
>> +| |NOT_FOUND: if the message identified by message_id is |
>> +| |invalid or not implemented |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 attributes |Flags that are associated with a specific function in the |
>> +| |protocol. For all functions in this protocol, this |
>> +| |parameter has a value of 0 |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +CPU_ATTRIBUTES
>> +~~~~~~~~~~~~~~
>> +
>> +message_id: 0x4
>> +protocol_id: 0x82
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 cpuid |Identifier for the CPU |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if valid attributes are returned successfully. |
>> +| |NOT_FOUND: if the cpuid is not valid. |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 attributes |Bits[31:0] Reserved, must be zero |
>> ++------------------+-----------------------------------------------------------+
>> +|char name[16] |NULL terminated ASCII string with CPU name up to 16 bytes |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +CPU_START
>> +~~~~~~~~~
>> +
>> +message_id: 0x4
>> +protocol_id: 0x82
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 cpuid |Identifier for the CPU |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if the cpu is started successfully. |
>> +| |NOT_FOUND: if cpuid is not valid. |
>> +| |DENIED: the calling agent is not allowed to start this CPU.|
>> ++------------------+-----------------------------------------------------------+
>> +
>> +CPU_STOP
>> +~~~~~~~~
>> +
>> +message_id: 0x5
>> +protocol_id: 0x82
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 cpuid |Identifier for the CPU |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if the cpu is started successfully. |
>> +| |NOT_FOUND: if cpuid is not valid. |
>> +| |DENIED: the calling agent is not allowed to stop this CPU. |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +CPU_RESET_VECTOR_SET
>> +~~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x6
>> +protocol_id: 0x82
>> +This command is mandatory.
>> +
>> ++----------------------+-------------------------------------------------------+
>> +|Parameters |
>> ++----------------------+-------------------------------------------------------+
>> +|Name |Description |
>> ++----------------------+-------------------------------------------------------+
>> +|uint32 cpuid |Identifier for the CPU |
>> ++----------------------+-------------------------------------------------------+
>> +|uint32 flags |Reset vector flags: |
>> +| |Bit[31] Resume flag. |
>> +| |Set to 1 to update the reset vector used on resume. |
>> +| |Bit[30] Boot flag. |
>> +| |Set to 1 to update the reset vector used for boot. |
>> +| |Bits[29:1] Reserved, must be zero. |
>> +| |Bit[0] Table flag. |
>> +| |Set to 1 if vector is the vector table base address. |
>> ++----------------------+-------------------------------------------------------+
>> +|uint32 resetVectorLow |Lower vector: |
>> +| |If bit[0] of flags is 0, the lower 32 bits of the |
>> +| |physical address where the CPU should execute from on |
>> +| |reset. If bit[0] of flags is 1, the lower 32 bits of |
>> +| |the vector table base address |
>> ++----------------------+-------------------------------------------------------+
>> +|uint32 resetVectorhigh|Upper vector: |
>> +| |If bit[0] of flags is 0, the upper 32 bits of the |
>> +| |physical address where the CPU should execute from on |
>> +| |reset. If bit[0] of flags is 1, the upper 32 bits of |
>> +| |the vector table base address |
>> ++----------------------+-------------------------------------------------------+
>> +|Return values |
>> ++----------------------+-------------------------------------------------------+
>> +|Name |Description |
>> ++----------------------+-------------------------------------------------------+
>> +|int32 status |SUCCESS: if the CPU reset vector is set successfully. |
>> +| |NOT_FOUND: if cpuId does not point to a valid CPU. |
>> +| |INVALID_PARAMETERS: the requested vector type is not |
>> +| |supported by this CPU. |
>> +| |DENIED: the calling agent is not allowed to set the |
>> +| |reset vector of this CPU |
>> ++----------------------+-------------------------------------------------------+
>> +
>> +CPU_SLEEP_MODE_SET
>> +~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x7
>> +protocol_id: 0x82
>> +This command is mandatory.
>> +
>> ++----------------------+-------------------------------------------------------+
>> +|Parameters |
>> ++----------------------+-------------------------------------------------------+
>> +|Name |Description |
>> ++----------------------+-------------------------------------------------------+
>> +|uint32 cpuid |Identifier for the CPU |
>> ++----------------------+-------------------------------------------------------+
>> +|uint32 flags |Sleep mode flags: |
>> +| |Bits[31:1] Reserved, must be zero. |
>> +| |Bit[0] IRQ mux: |
>> +| |If set to 1 the wakeup mux source is the GIC, else if 0|
>> +| |then the GPC |
>> ++----------------------+-------------------------------------------------------+
>> +|uint32 sleepmode |target sleep mode. When CPU runs into WFI, the GPC mode|
>> +| |will be triggered to be in below modes: |
>> +| |RUN(0), WAIT(1), STOP(2), SUSPEND(3) |
>
>Split above values into multiple line and mark rest of them as reserved. This
>applies to any similar parameter. Easy to miss when reading 800 lines of text 😄
Fix in V4.
Thanks again for reviewing the large text.
Thanks,
Peng
>
>--
>Regards,
>Sudeep
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation
2025-04-01 14:51 ` Cristian Marussi
@ 2025-04-02 12:42 ` Peng Fan
0 siblings, 0 replies; 23+ messages in thread
From: Peng Fan @ 2025-04-02 12:42 UTC (permalink / raw)
To: Cristian Marussi
Cc: Sudeep Holla, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Dan Carpenter, linux-kernel, arm-scmi, linux-arm-kernel, imx,
devicetree, Peng Fan
Hi Cristian,
Thanks for reviewing the patch.
On Tue, Apr 01, 2025 at 03:51:40PM +0100, Cristian Marussi wrote:
>On Mon, Mar 03, 2025 at 10:53:22AM +0800, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> Add i.MX95 Logical Machine Management and CPU Protocol documentation.
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>> drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 ++++++++++++++++++++++++
>> 1 file changed, 801 insertions(+)
>>
>> diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>> index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..74326bf2ea8586282a735713e0ab7eb90ccce8ff 100644
>> --- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>> +++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>> @@ -32,6 +32,501 @@ port, and deploy the SM on supported processors.
>> The SM implements an interface compliant with the Arm SCMI Specification
>> with additional vendor specific extensions.
>>
>> +SCMI_LMM: System Control and Management Logical Machine Management Vendor Protocol
>> +==================================================================================
>> +
>> +This protocol is intended for boot, shutdown, and reset of other logical
>> +machines (LM). It is usually used to allow one LM(e.g. OSPM) to manage
>> +another LM which is usually an offload or accelerator engine.. Notifications
>> +from this protocol can also be used to manage a communication link to another
>> +LM. The LMM protocol provides functions to:
>> +
>> +- Describe the protocol version.
>> +- Discover implementation attributes.
>> +- Discover the LMs defined in the system.
>> +- Boot an LM.
>> +- Shutdown an LM (gracefully or forcibly).
>> +- Reset an LM (gracefully or forcibly).
>> +- Wake an LM from suspend.
>> +- Suspend an LM (gracefully).
>> +- Read boot/shutdown/reset information for an LM.
>> +- Get notifications when an LM boots or shuts down (e.g. LM[X] requested
>> + notification of LM[Y] boots or shuts down, when LM[Y] boots or shuts down,
>> + SCMI firmware will send notification to LM[X]).
>> +
>> +'Graceful' means asking LM itself to shutdown/reset/etc (e.g. sending
>> +notification to Linux, Then Linux reboots or powers down itself). It is async
>> +command that the SUCCESS of the command just means the command successfully
>> +return, not means reboot/reset successfully finished.
>> +'Forceful' means the SM will force shutdown/reset/etc the LM. It is sync
>> +command that the SUCCESS of the command means the LM has been successfully
>> +shutdown/reset/etc.
>> +If the commands not have Graceful/Forceful flag settings, such as WAKE, SUSEND,
>> +it is async command.
>> +
>
>Hi,
>
>> +Commands:
>> +_________
>> +
>> +PROTOCOL_VERSION
>> +~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x0
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>
>Good that you added the mandatory/optional description..
>
>> ++---------------+--------------------------------------------------------------+
>> +|Return values |
>> ++---------------+--------------------------------------------------------------+
>> +|Name |Description |
>> ++---------------+--------------------------------------------------------------+
>> +|int32 status | See ARM SCMI Specification for status code definitions. |
>> ++---------------+--------------------------------------------------------------+
>> +|uint32 version | For this revision of the specification, this value must be |
>> +| | 0x10000. |
>> ++---------------+--------------------------------------------------------------+
>> +
>> +PROTOCOL_ATTRIBUTES
>> +~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x1
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status | See ARM SCMI Specification for status code definitions. |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 attributes |Protocol attributes: |
>> +| |Bits[31:8] Reserved, must be zero. |
>> +| |Bits[7:0] Number of Logical Machines |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +PROTOCOL_MESSAGE_ATTRIBUTES
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +
>> +message_id: 0x2
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: in case the message is implemented and available |
>> +| |to use. |
>> +| |NOT_FOUND: if the message identified by message_id is |
>> +| |invalid or not implemented |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 attributes |Flags that are associated with a specific function in the |
>> +| |protocol. For all functions in this protocol, this |
>> +| |parameter has a value of 0 |
>> ++------------------+-----------------------------------------------------------+
>> +
>> +LMM_ATTRIBUTES
>> +~~~~~~~~~~~~~~
>> +
>> +message_id: 0x3
>> +protocol_id: 0x80
>> +This command is mandatory.
>> +
>> ++------------------+-----------------------------------------------------------+
>> +|Parameters |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |ID of the Logical Machine |
>> ++------------------+-----------------------------------------------------------+
>> +|Return values |
>> ++------------------+-----------------------------------------------------------+
>> +|Name |Description |
>> ++------------------+-----------------------------------------------------------+
>> +|int32 status |SUCCESS: if valid attributes are returned. |
>> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
>> +| |DENIED: if the agent does not have permission to get info |
>> +| |for the LM specified by lmid. |
>
>..mmmmm... regardig this next field...
>
>> ++------------------+-----------------------------------------------------------+
>> +|uint32 lmid |Identifier of the LM whose identification is requested. |
>> +| |This field is: Populated with the lmId of the calling |
>> +| |agent, when the lmId parameter passed via the function is |
>> +| |0xFFFFFFFF. Identical to the lmId field passed via the |
>> +| |calling parameters, in all other cases |
>
>In V2 there was an issue with the description and you told me
>
> >> ++------------------+-----------------------------------------------------------+
> > >> +|Parameters |
> > >> ++------------------+-----------------------------------------------------------+
> > >> +|Name |Description |
> > >> ++------------------+-----------------------------------------------------------+
> > >> +|uint32 lmid |ID of the Logical Machine |
> > >> ++------------------+-----------------------------------------------------------+
> > >> +|Return values |
> > >> ++------------------+-----------------------------------------------------------+
> > >> +|Name |Description |
> > >> ++------------------+-----------------------------------------------------------+
> > >> +|int32 status |SUCCESS: if valid attributes are returned. |
> > >> +| |NOT_FOUND: if lmId not points to a valid logical machine. |
> > >> +| |DENIED: if the agent does not have permission to get info |
> > >> +| |for the LM specified by lmid. |
> > >> ++------------------+-----------------------------------------------------------+
> > >> +|uint32 attributes | Bits[31:8] reserved. |
> > >> +| | Bits[7:0] Number of Logical Machines. |
> > >
> > >...BUT this returns again the number of LMs while asking the attributes
> > >of a specific LM ? .... is it a typo or what ? ...if it is just as a
> > >sort of placeholder for when you'll have really LM's attributes to show,
> > >consider that once this is documented and supported in this version of
> > >your vendor protocol it will be needed to be kept and maintained...maybe
> > >better just to declare this as zero in this version of the protocol if
> > >you dont really have anything for this command in this version...(like
> > >many times are defined the attributes fields in PROTOCOL_MESSAGE_ATTRIBUTES
> > >above, if you really know you could want/need this command in the
> > >future...is it used now ?
> >
> > My bad. This should be updated with below
> > +------------------+-----------------------------------------------------------+
> > |uint32 attributes | Bits[31:0] reserved. must be zero |
> > +------------------+-----------------------------------------------------------+
> > |uint32 state | Current state of the LM |
> > +------------------+-----------------------------------------------------------+
> > |uint32 errStatus | Last error status recorded |
> > +------------------+-----------------------------------------------------------+
> > |char name[16] | A NULL terminated ASCII string with the LM name, of up |
> > | | to 16 bytes |
> > +------------------+-----------------------------------------------------------+
>
>...so it seems to me that the above lmid is a new addition that was not
>mentioned ... bad cut&paste ? it does NOT seem to make so much
>sense...or I am missing something
Sorry for not made it clear in V2. This V3 is correct.
In https://github.com/nxp-imx/imx-sm code: sm/rpc/scmi/rpc_scmi_lmm.c
There is lmId in return.
/* Response type for LmmAttributes() */
typedef struct
{
/* Header word */
uint32_t header;
/* Return status */
int32_t status;
/* Return LM */
uint32_t lmId;
/* LM attributes */
uint32_t attributes;
/* Current state of the LM */
uint32_t state;
/* Last error status recorded */
int32_t errStatus;
/* ASCII name string */
uint8_t name[LMM_MAX_NAME];
} msg_tlmm3_t;
>
>Other than this, LGTM.
>
>Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Appreciate.
Thanks,
Peng
>
>Thanks,
>Cristian
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation
2025-04-02 16:10 ` Peng Fan
@ 2025-04-02 15:30 ` Sudeep Holla
0 siblings, 0 replies; 23+ messages in thread
From: Sudeep Holla @ 2025-04-02 15:30 UTC (permalink / raw)
To: Peng Fan
Cc: Cristian Marussi, Sudeep Holla, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
On Thu, Apr 03, 2025 at 12:10:37AM +0800, Peng Fan wrote:
> Hi Sudeep,
>
> On Wed, Apr 02, 2025 at 12:46:14PM +0100, Sudeep Holla wrote:
> >On Wed, Apr 02, 2025 at 08:35:03PM +0800, Peng Fan wrote:
> >> Hi Sudeep,
> >>
> >> Thanks for reviewing the patch.
> >>
> >> For comments that I am not very clear, I marked with [TODO] for easily
> >> jump to.
> >>
> >> On Tue, Apr 01, 2025 at 03:15:46PM +0100, Sudeep Holla wrote:
> >> >On Mon, Mar 03, 2025 at 10:53:22AM +0800, Peng Fan (OSS) wrote:
> >> >> From: Peng Fan <peng.fan@nxp.com>
> >> >>
> >> >> Add i.MX95 Logical Machine Management and CPU Protocol documentation.
> >> >>
> >> >> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >> >> ---
> >> >> drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 ++++++++++++++++++++++++
> >> >> 1 file changed, 801 insertions(+)
> >> >>
> >> >> diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> >> >> index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..74326bf2ea8586282a735713e0ab7eb90ccce8ff 100644
> >> >> --- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> >> >> +++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> >
> >> >> +
> >> >> +PROTOCOL_MESSAGE_ATTRIBUTES
> >> >> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> >> +
> >> >> +message_id: 0x2
> >> >> +protocol_id: 0x80
> >> >> +This command is mandatory.
> >> >> +
> >> >
> >> >For completeness add parameters here for message_id as in the spec as it is
> >> >referred in the returned value and seems incomplete without it.
> >>
> >> [TODO]
> >> Sorry, I may not get your point here. You mean below format?
> >>
> >> +------------------+-----------------------------------------------------------+
> >> |message_id: 0x2
> >> |protocol_id: 0x80
> >> |This command is mandatory.
> >> +------------------+-----------------------------------------------------------+
> >> |Return values |
> >> +------------------+-----------------------------------------------------------+
> >> |Name |Description |
> >> +------------------+-----------------------------------------------------------+
> >> |int32 status |SUCCESS: in case the message is implemented and available |
> >> | |to use. |
> >> | |NOT_FOUND: if the message identified by message_id is |
> >> | |invalid or not implemented |
> >> +------------------+-----------------------------------------------------------+
> >> |uint32 attributes |Flags that are associated with a specific function in the |
> >> | |protocol. For all functions in this protocol, this |
> >>
> >> message_id is not put in the table, but it is list above just below
> >> the protocol name. I would prefer to keep current layout and align with
> >> the MISC and BBM protocol.
> >>
> >
> >I meant why is the input parameter message_id not described in the table,
> >but is referred in the return values. For completeness, just add it even
> >though it may match the SCMI spec in terms of input parameter.
>
> I will add below only for PROTOCOL_MESSAGE_ATTRIBUTES which refer message_id
> in the return values. Please raise if you have concern.
>
Ignore this. I see even existing BBM and MISC follow the same pattern for
standard protocol commands(0x0-0x2). We can fix them all at once if it
needs to be in the future. For now, it should be fine as is.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation
2025-04-02 11:46 ` Sudeep Holla
@ 2025-04-02 16:10 ` Peng Fan
2025-04-02 15:30 ` Sudeep Holla
0 siblings, 1 reply; 23+ messages in thread
From: Peng Fan @ 2025-04-02 16:10 UTC (permalink / raw)
To: Sudeep Holla
Cc: Cristian Marussi, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Dan Carpenter, linux-kernel,
arm-scmi, linux-arm-kernel, imx, devicetree, Peng Fan
Hi Sudeep,
On Wed, Apr 02, 2025 at 12:46:14PM +0100, Sudeep Holla wrote:
>On Wed, Apr 02, 2025 at 08:35:03PM +0800, Peng Fan wrote:
>> Hi Sudeep,
>>
>> Thanks for reviewing the patch.
>>
>> For comments that I am not very clear, I marked with [TODO] for easily
>> jump to.
>>
>> On Tue, Apr 01, 2025 at 03:15:46PM +0100, Sudeep Holla wrote:
>> >On Mon, Mar 03, 2025 at 10:53:22AM +0800, Peng Fan (OSS) wrote:
>> >> From: Peng Fan <peng.fan@nxp.com>
>> >>
>> >> Add i.MX95 Logical Machine Management and CPU Protocol documentation.
>> >>
>> >> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> >> ---
>> >> drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 801 ++++++++++++++++++++++++
>> >> 1 file changed, 801 insertions(+)
>> >>
>> >> diff --git a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>> >> index b2dfd6c46ca2f5f12f0475c24cb54c060e9fa421..74326bf2ea8586282a735713e0ab7eb90ccce8ff 100644
>> >> --- a/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>> >> +++ b/drivers/firmware/arm_scmi/vendors/imx/imx95.rst
>
>> >> +
>> >> +PROTOCOL_MESSAGE_ATTRIBUTES
>> >> +~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> >> +
>> >> +message_id: 0x2
>> >> +protocol_id: 0x80
>> >> +This command is mandatory.
>> >> +
>> >
>> >For completeness add parameters here for message_id as in the spec as it is
>> >referred in the returned value and seems incomplete without it.
>>
>> [TODO]
>> Sorry, I may not get your point here. You mean below format?
>>
>> +------------------+-----------------------------------------------------------+
>> |message_id: 0x2
>> |protocol_id: 0x80
>> |This command is mandatory.
>> +------------------+-----------------------------------------------------------+
>> |Return values |
>> +------------------+-----------------------------------------------------------+
>> |Name |Description |
>> +------------------+-----------------------------------------------------------+
>> |int32 status |SUCCESS: in case the message is implemented and available |
>> | |to use. |
>> | |NOT_FOUND: if the message identified by message_id is |
>> | |invalid or not implemented |
>> +------------------+-----------------------------------------------------------+
>> |uint32 attributes |Flags that are associated with a specific function in the |
>> | |protocol. For all functions in this protocol, this |
>>
>> message_id is not put in the table, but it is list above just below
>> the protocol name. I would prefer to keep current layout and align with
>> the MISC and BBM protocol.
>>
>
>I meant why is the input parameter message_id not described in the table,
>but is referred in the return values. For completeness, just add it even
>though it may match the SCMI spec in terms of input parameter.
I will add below only for PROTOCOL_MESSAGE_ATTRIBUTES which refer message_id
in the return values. Please raise if you have concern.
+------------------+-----------------------------------------------------------+
|Parameters |
+------------------+-----------------------------------------------------------+
|Name |Description |
+------------------+-----------------------------------------------------------+
|uint32 message_id |ID of the message, const: 0x2 |
+------------------+-----------------------------------------------------------+
|Return values |
...
>
>
>[...]
>
>> >> +| |Bit[23] Valid err ID: |
>> >> +| |Set to 1 if the error ID field is valid. |
>> >> +| |Set to 0 if the error ID field is not valid. |
>> >> +| |Bits[22:8] Error ID(Agent ID of the system). |
>> >> +| |Bit[7:0] Reason(WDOG, POR, FCCU and etc) |
>> >
>> >Is there a mapping for this ?
>>
>> I will add a note in V4:
>> See the SRESR register description in the System Reset Controller (SRC) section
>> in SoC reference mannual.
>>
>
>A reference would be good here then. I would be hard to imagine what it means
>otherwise.
Understood.
>
>> >> +
>> >> +LMM_RESET_VECTOR_SET
>> >> +~~~~~~~~~~~~~~~~~~~~
>> >> +
>> >> +message_id: 0xC
>> >> +protocol_id: 0x80
>> >> +This command is mandatory.
>> >> +
>> >
>> >I can't recall if I had asked this before. How is this different from
>> >CPU_RESET_VECTOR_SET ? Why do you need this ? Why can't you use
>> >CPU_RESET_VECTOR_SET with an additional LMM_* command.
>> >
>> >I am sure there is a valid reason. If so please document the same.
>>
>> CPU_RESET_VECTOR_SET is for cases that M7 and A55 in the same LM.
>> LMM_RESET_VECTOR_SET is for cases that M7 and A55 in different LM.
>> M7 LM is under control of A55 LM
>>
>
>That still doesn't answer my question. I was asking why do you need this
>extra interface ? If LMM_RESET_VECTOR_SET can take both cpu id and LM id,
>it can be used even for cpus within same LM with current LM ID. Why the
>need for separate interface ?
For this one, I need check with firmware owner. loop you in
internal mail.
Thanks,
Peng
>
>Other than these 2, I am fine with your response on all other comments.
>
>--
>Regards,
>Sudeep
>
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2025-04-02 15:32 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-03 2:53 [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 1/7] firmware: arm_scmi: imx: Add LMM and CPU documentation Peng Fan (OSS)
2025-04-01 14:15 ` Sudeep Holla
2025-04-02 12:35 ` Peng Fan
2025-04-02 11:46 ` Sudeep Holla
2025-04-02 16:10 ` Peng Fan
2025-04-02 15:30 ` Sudeep Holla
2025-04-01 14:51 ` Cristian Marussi
2025-04-02 12:42 ` Peng Fan
2025-03-03 2:53 ` [PATCH v3 2/7] dt-bindings: firmware: Add i.MX95 SCMI LMM and CPU protocol Peng Fan (OSS)
2025-04-01 22:21 ` Rob Herring (Arm)
2025-03-03 2:53 ` [PATCH v3 3/7] firmware: arm_scmi: imx: Add i.MX95 LMM protocol Peng Fan (OSS)
2025-03-03 8:03 ` Dan Carpenter
2025-04-01 14:21 ` Sudeep Holla
2025-04-01 14:36 ` Cristian Marussi
2025-04-01 14:48 ` Sudeep Holla
2025-04-01 15:00 ` Cristian Marussi
2025-03-03 2:53 ` [PATCH v3 4/7] firmware: arm_scmi: imx: Add i.MX95 CPU Protocol Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 5/7] firmware: imx: Add i.MX95 SCMI LMM driver Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 6/7] firmware: imx: Add i.MX95 SCMI CPU driver Peng Fan (OSS)
2025-03-03 2:53 ` [PATCH v3 7/7] MAINTAINERS: add entry for i.MX SCMI extensions Peng Fan (OSS)
2025-03-18 8:28 ` [PATCH v3 0/7] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Peng Fan
2025-03-19 9:54 ` Sudeep Holla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).