[PATCH v4 04/20] firmware: scmi: add pin control protocol support to SCMI agent
Marek Vasut
marex at denx.de
Fri Jan 24 14:55:26 CET 2025
On 1/15/25 2:28 PM, Alice Guo wrote:
> From: Alice Guo <alice.guo at nxp.com>
>
> This patch adds SCMI pin control protocol support so that the pin
> controller driver based on SCMI, such as
> drivers/pinctrl/nxp/pinctrl-scmi.c, can be bound to the SCMI agent
> device whose protocol id is 0x19.
>
> Signed-off-by: Alice Guo <alice.guo at nxp.com>
> ---
> drivers/firmware/scmi/scmi_agent-uclass.c | 11 +++++++++++
> include/scmi_agent-uclass.h | 2 ++
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
> index 8c907c3b0328095c4b35ba089ed608fcda48b567..5f101f4ede8b585f8c562a42886ea7be4ef09953 100644
> --- a/drivers/firmware/scmi/scmi_agent-uclass.c
> +++ b/drivers/firmware/scmi/scmi_agent-uclass.c
> @@ -97,6 +97,9 @@ struct udevice *scmi_get_protocol(struct udevice *dev,
> case SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN:
> proto = priv->voltagedom_dev;
> break;
> + case SCMI_PROTOCOL_ID_PINCTRL:
> + proto = priv->pinctrl_dev;
> + break;
> default:
> dev_err(dev, "Protocol not supported\n");
> proto = NULL;
> @@ -147,6 +150,9 @@ static int scmi_add_protocol(struct udevice *dev,
> case SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN:
> priv->voltagedom_dev = proto;
> break;
> + case SCMI_PROTOCOL_ID_PINCTRL:
> + priv->pinctrl_dev = proto;
> + break;
> default:
> dev_err(dev, "Protocol not supported\n");
> return -EPROTO;
> @@ -436,6 +442,11 @@ static int scmi_bind_protocols(struct udevice *dev)
> drv = DM_DRIVER_GET(scmi_voltage_domain);
> }
> break;
> + case SCMI_PROTOCOL_ID_PINCTRL:
> + if (IS_ENABLED(CONFIG_PINCTRL_IMX_SCMI) &&
Is this pinctrl protocol really imx specific ?
If not, this needs to use some other config option to gate access to it.
More information about the U-Boot
mailing list