summaryrefslogtreecommitdiff
path: root/include/scmi_agent-uclass.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]>
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: Conditionally compile protocol supportPeng Fan
Add conditional compilation for SCMI protocol support in scmi_get_protocol() and scmi_add_protocol() based on corresponding Kconfig options. This ensures that only the enabled protocols are compiled and accessed, and reducing binary size. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-05-03firmware: scmi_agent: add SCMI pin control protocol supportAlice Guo
This patch adds SCMI pin control protocol support to make the pin controller driver based on SCMI, such as drivers/pinctrl/nxp/pinctrl-imx-scmi.c, can be bound to the SCMI agent device whose protocol id is 0x19. Signed-off-by: Alice Guo <[email protected]>
2025-05-03firmware: scmi: support to manage SCMI protocol drivers with a ↵Alice Guo
linker-genetated array U_BOOT_SCMI_PROTO_DRIVER macro is used to add a SCMI protocol driver to scmi_proto_driver list. scmi_proto_driver_get() function can be used to match a SCMI protocol id and its driver. Signed-off-by: Alice Guo <[email protected]>
2023-10-24power: domain: add SCMI driverAKASHI Takahiro
Add power domain driver based on SCMI power domain management protocol. Signed-off-by: AKASHI Takahiro <[email protected]>
2023-10-13firmware: scmi: install base protocol to SCMI agentAKASHI Takahiro
SCMI base protocol is mandatory, and once SCMI node is found in a device tree, the protocol handle (udevice) is unconditionally installed to the agent. Then basic information will be retrieved from SCMI server via the protocol and saved into the agent instance's local storage. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13firmware: scmi: framework for installing additional protocolsAKASHI Takahiro
This framework allows SCMI protocols to be installed and bound to the agent so that the agent can manage and utilize them later. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13firmware: scmi: use a protocol's own channel if assignedAKASHI Takahiro
SCMI specification allows any protocol to have its own channel for the transport. While the current SCMI driver may assign its channel from a device tree, the core function, devm_scmi_process_msg(), doesn't use a protocol's channel, but always use an agent's channel. With this commit, devm_scmi_process_msg() tries to find and use a protocol's channel. If it doesn't exist, use an agent's. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Etienne Carriere <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-23firmware: scmi: add multi-channel supportEtienne Carriere
Adds resources for SCMI protocols to possibly use a dedicated SCMI channel instead of the default channel allocated by the SCMI agent during initialization. As per DT binding documentation, some SCMI transports can define a specific SCMI communication channel for given SCMI protocols. It allows SCMI protocols to pass messages concurrently each other. This change introduces new scmi agent uclass API function devm_scmi_of_get_channel() for SCMI drivers probe sequences to get a reference to the SCMI channel assigned to its related SCMI protocol. The function queries the channel reference to its SCMI transport driver through new scmi agent uclass operator .of_get_channel that uses Device Tree information from related SCMI agent node. Operator .of_get_channel returns a reference to the SCMI channel assigned to SCMI protocol used by the caller device. SCMI transport drivers that do not support multi-channel are not mandated to register this operator. When so, API function devm_scmi_of_get_channel() returns NULL and SCMI transport driver are expected to retrieve by their own means the reference to the unique SCMI channel, for example using platform data as these drivers currently do in U-Boot source tree. Signed-off-by: Etienne Carriere <[email protected]>
2022-06-23firmware: scmi: prepare uclass to pass channel referenceEtienne Carriere
Changes SCMI transport operator ::process_msg to pass the SCMI channel reference provided by caller SCMI protocol device. Signed-off-by: Etienne Carriere <[email protected]>
2022-06-23firmware: scmi: prepare scmi uclass API to multi-channelEtienne Carriere
Changes SCMI driver API function devm_scmi_process_msg() to add an SCMI channel reference argument for when SCMI agent supports SCMI protocol specific channels. First argument of devm_scmi_process_msg() is also change to point to the caller SCMI protocol device rather than its parent device (the SCMI agent device). The argument is a pointer to opaque struct scmi_channel known from the SCMI transport drivers. It is currently unused and caller a pass NULL value. A later change will enable such support once SCMI protocol drivers have means to get the channel reference during initialization. Cc: Lukasz Majewski <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Jaehoon Chung <[email protected]> Signed-off-by: Etienne Carriere <[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]>