回复: [PATCH v8 02/19] pinctrl: nxp: add a pin controller driver based on SCMI pin control protocol
Alice Guo (OSS)
alice.guo at oss.nxp.com
Tue Apr 1 12:57:46 CEST 2025
> -----邮件原件-----
> 发件人: Marek Vasut <marex at denx.de>
> 发送时间: 2025年3月27日 21:19
> 收件人: Peng Fan <peng.fan at nxp.com>; Peng Fan (OSS)
> <peng.fan at oss.nxp.com>
> 抄送: Alice Guo (OSS) <alice.guo at oss.nxp.com>; Tom Rini
> <trini at konsulko.com>; Lukasz Majewski <lukma at denx.de>; Sean Anderson
> <seanga2 at gmail.com>; Simon Glass <sjg at chromium.org>; Stefano Babic
> <sbabic at denx.de>; Fabio Estevam <festevam at gmail.com>; dl-uboot-imx
> <uboot-imx at nxp.com>; Alper Nebi Yasak <alpernebiyasak at gmail.com>; Alice
> Guo <alice.guo at nxp.com>; Lothar Waßmann <LW at karo-electronics.de>;
> u-boot at lists.denx.de; Ranjani Vaidyanathan <ranjani.vaidyanathan at nxp.com>;
> Ye Li <ye.li at nxp.com>
> 主题: Re: [PATCH v8 02/19] pinctrl: nxp: add a pin controller driver based on
> SCMI pin control protocol
>
> On 3/26/25 7:42 AM, Peng Fan wrote:
> >> Subject: Re: [PATCH v8 02/19] pinctrl: nxp: add a pin controller
> >> driver based on SCMI pin control protocol
> >>
> >> On 3/26/25 2:52 AM, Peng Fan wrote:
> >>>> Subject: Re: [PATCH v8 02/19] pinctrl: nxp: add a pin controller
> >>>> driver based on SCMI pin control protocol
> >>>>
> >>>> On 3/25/25 9:06 AM, Peng Fan wrote:
> >>>>
> >>>> [...]
> >>>>
> >>>>>>> diff --git a/include/scmi_protocols.h b/include/scmi_protocols.h
> >>>>>>> index 7abb2a6f36b..279ebbad440 100644
> >>>>>>> --- a/include/scmi_protocols.h
> >>>>>>> +++ b/include/scmi_protocols.h
> >>>>>>> @@ -24,6 +24,7 @@ enum scmi_std_protocol {
> >>>>>>> SCMI_PROTOCOL_ID_SENSOR = 0x15,
> >>>>>>> SCMI_PROTOCOL_ID_RESET_DOMAIN = 0x16,
> >>>>>>> SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN = 0x17,
> >>>>>>> + SCMI_PROTOCOL_ID_PINCTRL = 0x19,
> >>>>>> If this is the IMX specific pinctrl protocol, please make sure to
> >>>>>> name it accordingly , SCMI_PROTOCOL_ID_PINCTRL_IMX or
> >>>> something .
> >>>>>
> >>>>> This ID is generic ID, not i.MX specific.
> >>>>>
> >>>>> i.MX SCMI pinctrl follows ARM SCMI spec, but i.MX pinctrl bindings
> >>>> are
> >>>>> different compared with ARM SCMI generic pinconf bindings, so we
> >>>> need
> >>>>> a separate driver for i.MX.
> >>>> But then, why is it using the same protocol ID ?
> >>>
> >>> i.MX System Manager FW pinctrl follows ARM SCMI spec, the ID
> >> value is
> >>> 0x19.
> >>>
> >>>
> >>> If you look at linux kernel driver
> >>>
> >>> drivers/pinctrl/pinctrl-scmi.c
> >>> drivers/pinctrl/freescale/pinctrl-scmi-imx.c
> >>
> >> Is the second driver upstream at all ? I don't see it in linux-next ?
> >
> > Typo: drivers/pinctrl/freescale/pinctrl-imx-scmi.c
>
> Ah, thank you for clarifying.
>
> >>> Both use same ID 0x19.
> >>>
> >>> It is fine to use below, if it is fine to you.
> >>> SCMI_PROTOCOL_ID_PINCTRL_IMX = 0x19.
> >> How does the kernel discern which driver it should use to communicate
> >> with the SCMI provider if both drivers are compiled into the kernel ?
> >
> > There is a check in drivers probe. Only one will succeed.
>
> I have to admit, this is just ... uhhh :(
>
> But I think now, we should also have a driver-side check and two separate
> drivers, similar to this patch:
>
> [PATCH] power: regulator: scmi: Move regulator subnode hack to
> scmi_regulator
Hi Marek,
When will this patch "[PATCH] power: regulator: scmi: Move regulator subnode hack to scmi_regulator" be applied to the uboot next branch? I have already made the next version patch set based on this patch.
Best Regards,
Alice Guo
> right ?
More information about the U-Boot
mailing list