summaryrefslogtreecommitdiff
path: root/include/scmi_protocols.h
AgeCommit message (Collapse)Author
2026-03-23scmi: pinctrl: add pinctrl driver for SCMIDan Carpenter
This driver adds the base support of pinctrl over SCMI. The driver does two main things. First, it allows you to configure the initial pin states. Secondly, it's used a base to build a GPIO driver on top of it. To configure the states then add a pinmux config to the scmi_pinctrl section: scmi_pinctrl: protocol@19 { reg = <0x19>; pinmux1: pinmux_test { pinmux = <0 1 0xFFFFFFFF 18 1 0 2 0xFFFFFFFF 18 1 0 3 0xFFFFFFFF 18 1>; function = "f_gpio1"; groups = "grp_1", "grp_3"; }; }; Under linux the pinctrl subsystem will parse the function and group properties and use that to handle muxing. However, under u-boot the pin muxing is done using the "pinmux" property, which feeds raw SCMI pinctrl PINCTRL_SETTINGS_CONFIGURE commands to the server. The numbers are: selector, identifier, function_id, config_type, and config_value. In the example above, it sets pins 1, 2, and 3 to 1. The linux-kernel ignores this pinmux property. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-03-23scmi: update comments for scmi_pinctrl_config_set_in()Dan Carpenter
Delete some extra space characters to make checkpatch.pl happy: WARNING: please, no space before tabs Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-03-23scmi: pinctrl: add pinctrl message IDsDan Carpenter
Add all the pinctrl message IDs. I renamed SCMI_MSG_PINCTRL_CONFIG_SET to SCMI_PINCTRL_SETTINGS_CONFIGURE so the naming matches the spec better. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Peng Fan <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-03-16imx9: scmi: Get DDR size through SM SCMI APIYe Li
System Manager(SM) has implemented the MISC protocol to retrieve DDR information. Using this API, U-Boot can obtain the DDR size dynamically instead of relying on static configuration macros. This change addresses the DDR ECC enabled case, where 1/8 of the total DDR size is reserved for ECC data. The scmi_misc_ddrinfo() returns the DDR size with EEC overhead already deducted. Implementation details: - Query the DDR size via scmi_misc_ddrinfo() - Replace direct REG_DDR_CS[0,1]_BNDS register reads with SCMI call - Switch from PHYS_SDRAM[x]_SIZE macros to runtime detection - For backward compatibility with older SM firmware, fall back to static PHYS_SDRAM[x]_SIZE configuration if the SCMI call fails Signed-off-by: Ye Li <[email protected]> Signed-off-by: Alice Guo <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2025-11-10firmware: scmi: Add clock v3.2 CONFIG_SET supportVinh Nguyen
SCMI v3.2 introduces a new clock CONFIG_SET message format that can optionally carry also OEM specific configuration values beside the usual clock enable/disable requests. Add support to use such new format when talking to a v3.2 compliant SCMI platform. Support existing enable/disable operations across different clock protocol versions: this patch still does not add protocol operations to support the new OEM specific optional configuration capabilities. No functional change for the SCMI drivers users of the related enable and disable clock operations. [Marek: Remodel after Linux e49e314a2cf7 ("firmware: arm_scmi: Add clock v3.2 CONFIG_SET support") Support both old < 2.1 and new >= 2.1 protocol versions. Update commit message based on Linux one] Signed-off-by: Vinh Nguyen <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Alice Guo <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-11-10firmware: scmi: Fix up code commentsMarek Vasut
Fix multiple instances of copy-paste errors. Fill in missing headers for CLOCK_GET_PERMISSIONS message and response. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Alice Guo <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-10-24firmware: scmi: Support probe vendor ID 0x80 and 0x82Peng Fan
Preparing to add i.MX LMM and CPU protocol driver, support probe SCMI vendor ID 0x80(i.MX SCMI LMM ID) and 0x82(i.MX SCMI CPU ID). And use Kconfig option to support conditional compilation. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24firmware: scmi: Cleanup the SCMI MISC IDPeng Fan
SCMI_IMX_PROTOCOL_ID_MISC was never used, so drop it. And move SCMI_PROTOCOL_ID_IMX_MISC out of enum scmi_std_protocol to scmi_nxp_protocols.h, because it is i.MX specific and following Linux Kernel style, use macro definition. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-09firmware: scmi: Add error code IN_USEPeng Fan
In SCMI spec 3.2, there is an update: Add IN_USE error code for usage with Pin control protocol So add the error decoding for IN_USE. Signed-off-by: Peng Fan <[email protected]>
2025-06-11clk: scmi: add compatibility with clock protocol 2.0Valentin Caron
Since clock protocol 2.0, SCMI specification add an option field "clock_enable_delay" to CLOCK_ATTRIBUTES command. scmi_read_resp_from_smt() will return an error ("Buffer too small") as the message length coming from the SCMI server is not the same as expected. So implement a condition to SCMI clock protocol version to change the length of the expected message. Signed-off-by: Valentin Caron <[email protected]> Signed-off-by: Patrice Chotard <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2025-05-03scmi_protocols: update struct scmi_base_discover_list_protocols_outYe Li
@protocols is an array of protocol identifiers that are implemented, excluding the Base protocol. Four protocol identifiers are packed into each array element. The number of elements of @protocols is specified by callee-side. Signed-off-by: Ye Li <[email protected]> Signed-off-by: Alice Guo <[email protected]>
2025-05-03clk: scmi: check the clock state/parent/rate control permissionsAlice Guo
Clock driver based on SCMI clock management protocol in Linux checks clock state, parent and rate control permissions. To be consistent with the kernel driver, add this check here. CLOCK_GET_PERMISSIONS is from ARM System Control and Management Interface Platform Design Document 3.2. When using common clock framework (CCF), use the clock signal ID to get the clock registered by clk_register() in scmi_clk_probe(), and then obatin the struct clk_scmi variable with container_of(). Signed-off-by: Alice Guo <[email protected]> Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2025-05-03clk: scmi: add the command CLOCK_PARENT_SETPeng Fan
This patch adds the command CLOCK_PARENT_SET that can be used to set the parent of a clock. ARM SCMI Version 3.2 supports to change the parent of a clock device. Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Alice Guo <[email protected]> Reviewed-by: Ye Li <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-05-03scmi_protocols: add SCMI Performance domain management protocol message IDsPeng Fan
SCMI Performance domain management protocol is intended for performance management of groups of devices or APs that run in the same performance domain. The functionality provided by the callee-side can be used by passing the corresponding message_id. Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Alice Guo <[email protected]> Reviewed-by: Ye Li <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-05-03scmi_protocols: add SCMI misc protocol protocol_id and message_id for ↵Peng Fan
getting the ROM passover data SCMI misc protocol is intended for miscellaneous functions which are device specific and are usually defined to access bit fields. It is i.MX specific. This patch adds SCMI misc protocol protocol_id and message_id for getting the ROM passover data. Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Alice Guo <[email protected]> Reviewed-by: Ye Li <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-05-03pinctrl: nxp: add a pin controller driver based on SCMI pin control protocolAlice Guo
This patch provides a pinctrl driver based on SCMI pin control protocol. Currently, only the PINCTRL_CONFIG_SET command is implemented. Signed-off-by: Ranjani Vaidyanathan <[email protected]> Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Alice Guo <[email protected]> Reviewed-by: Ye Li <[email protected]>
2023-10-24firmware: scmi: add power domain protocol supportAKASHI Takahiro
In this patch, added are helper functions to directly manipulate SCMI power domain management protocol. DM compliant power domain driver will be implemented on top of those interfaces in a succeeding patch. Signed-off-by: AKASHI Takahiro <[email protected]>
2023-10-13firmware: scmi: implement SCMI base protocolAKASHI Takahiro
SCMI base protocol is mandatory according to the SCMI specification. With this patch, SCMI base protocol can be accessed via SCMI transport layers. All the commands, except SCMI_BASE_NOTIFY_ERRORS, are supported. This is because U-Boot doesn't support interrupts and the current transport layers are not able to handle asynchronous messages properly. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2022-03-02clk: scmi: register scmi clocks with CCFEtienne Carriere
Implements SCMI APIs to retrieve the number exposed SCMI clocks using SCMI_PROTOCOL_ATTRIBUTES messages and the names of the clocks using SCMI_CLOCK_ATTRIBUTES messages. This change updates sandbox SCMI clock test driver to manage these 2 new message IDs. Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Clement Leger <[email protected]> Cc: Patrick Delaunay <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]> Signed-off-by: Gabriel Fernandez <[email protected]> Signed-off-by: Etienne Carriere <[email protected]>
2021-10-26firmware: scmi: fix struct layout for scmi_clk_rate_set_inClément Léger
First two fields are reversed compared to what is expected by the SCMI specification. Signed-off-by: Clément Léger <[email protected]> Fixes: 60388844836 ("clk: add clock driver for SCMI agents")
2021-04-12firmware: scmi: voltage regulatorEtienne Carriere
Implement voltage regulators interfaced by the SCMI voltage domain protocol. The DT bindings are defined in the Linux kernel since SCMI voltage domain and regulators patches [1] and [2] integration in v5.11-rc7. Link: [1] https://github.com/torvalds/linux/commit/0f80fcec08e9c50b8d2992cf26495673765ebaba Link: [2] https://github.com/torvalds/linux/commit/2add5cacff3531e54c50b0832128299faa9f0563 Signed-off-by: Etienne Carriere <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2020-09-30reset: add reset controller driver for SCMI agentsEtienne Carriere
This change introduces a reset controller driver for SCMI agent devices. When SCMI agent and SCMI reset domain drivers are enabled, SCMI agent binds a reset controller device for each SCMI reset domain protocol devices enabled in the FDT. SCMI reset driver is embedded upon CONFIG_RESET_SCMI=y. If enabled, CONFIG_SCMI_AGENT is also enabled. SCMI Reset Domain protocol is defined in the SCMI specification [1]. Links: [1] https://developer.arm.com/architectures/system-architectures/software-standards/scmi Signed-off-by: Etienne Carriere <[email protected]> Cc: Simon Glass <[email protected]> Cc: Peng Fan <[email protected]> Cc: Sudeep Holla <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2020-09-30clk: add clock driver for SCMI agentsEtienne Carriere
This change introduces a clock driver for SCMI agent devices. When SCMI agent and SCMI clock drivers are enabled, SCMI agent binds a clock device for each SCMI clock protocol devices enabled in the FDT. SCMI clock driver is embedded upon CONFIG_CLK_SCMI=y. If enabled, CONFIG_SCMI_AGENT is also enabled. SCMI Clock protocol is defined in the SCMI specification [1]. Links: [1] https://developer.arm.com/architectures/system-architectures/software-standards/scmi Signed-off-by: Etienne Carriere <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Simon Glass <[email protected]> Cc: Peng Fan <[email protected]> Cc: Sudeep Holla <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2020-09-30firmware: add SCMI agent uclassEtienne Carriere
This change introduces SCMI agent uclass to interact with a firmware using the SCMI protocols [1]. SCMI agent uclass currently supports a single method to request processing of the SCMI message by an identified server. A SCMI message is made of a byte payload associated to a protocol ID and a message ID, all defined by the SCMI specification [1]. On return from process_msg() method, the caller gets the service response. SCMI agent uclass defines a post bind generic sequence for all devices. The sequence binds all the SCMI protocols listed in the FDT for that SCMI agent device. Currently none, but later change will introduce protocols. This change implements a simple sandbox device for the SCMI agent uclass. The sandbox nicely answers SCMI_NOT_SUPPORTED to SCMI messages. To prepare for further test support, the sandbox exposes a architecture function for test application to read the sandbox emulated devices state. Currently supports 2 SCMI agents, identified by an ID in the FDT device name. The simplistic DM test does nothing yet. SCMI agent uclass is designed for platforms that embed a SCMI server in a firmware hosted somewhere, for example in a companion co-processor or in the secure world of the executing processor. SCMI protocols allow an SCMI agent to discover and access external resources as clock, reset controllers and more. SCMI agent and server communicate following the SCMI specification [1]. This SCMI agent implementation complies with the DT bindings defined in the Linux kernel source tree regarding SCMI agent description since v5.8. Links: [1] https://developer.arm.com/architectures/system-architectures/software-standards/scmi Signed-off-by: Etienne Carriere <[email protected]> Cc: Simon Glass <[email protected]> Cc: Peng Fan <[email protected]> Cc: Sudeep Holla <[email protected]> Reviewed-by: Simon Glass <[email protected]>