回复: [PATCH v6 04/20] firmware: scmi: add pin control protocol support to SCMI agent

Alice Guo (OSS) alice.guo at oss.nxp.com
Mon Mar 3 09:28:51 CET 2025


> -----邮件原件-----
> 发件人: Marek Vasut <marex at denx.de>
> 发送时间: 2025年3月1日 3:18
> 收件人: Alice Guo (OSS) <alice.guo at oss.nxp.com>; Tom Rini
> <trini at konsulko.com>; Stefano Babic <sbabic at denx.de>; Fabio Estevam
> <festevam at gmail.com>; dl-uboot-imx <uboot-imx at nxp.com>; Lukasz
> Majewski <lukma at denx.de>; Sean Anderson <seanga2 at gmail.com>; Simon
> Glass <sjg at chromium.org>; Alper Nebi Yasak <alpernebiyasak at gmail.com>;
> Alice Guo <alice.guo at nxp.com>
> 抄送: u-boot at lists.denx.de
> 主题: Re: [PATCH v6 04/20] firmware: scmi: add pin control protocol support to
> SCMI agent
> 
> On 2/28/25 11:53 AM, Alice Guo (OSS) 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 8c907c3b03..5f101f4ede 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) &&
> This really shouldn't be in common code, see my previous comment on V4 .

Move drivers/pinctrl/nxp/pinctrl-scmi.c to drivers/pinctrl/pinctrl-scmi.c. Change its name to "scmi_pinctrl". If the generic scmi-pinctrl driver is needed in the future, it can be merged with my driver.

Is this OK?

Best Regards,
Alice Guo



More information about the U-Boot mailing list