U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@oss.nxp.com>
To: Marek Vasut <marex@denx.de>
Cc: "Alice Guo (OSS)" <alice.guo@oss.nxp.com>,
	"Tom Rini" <trini@konsulko.com>,
	"Lukasz Majewski" <lukma@denx.de>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Simon Glass" <sjg@chromium.org>,
	"Stefano Babic" <sbabic@denx.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
	"Alper Nebi Yasak" <alpernebiyasak@gmail.com>,
	"Alice Guo" <alice.guo@nxp.com>,
	"Lothar Waßmann" <LW@karo-electronics.de>,
	u-boot@lists.denx.de,
	"Ranjani Vaidyanathan" <Ranjani.Vaidyanathan@nxp.com>,
	"Peng Fan" <peng.fan@nxp.com>, "Ye Li" <ye.li@nxp.com>
Subject: Re: [PATCH v8 02/19] pinctrl: nxp: add a pin controller driver based on SCMI pin control protocol
Date: Tue, 25 Mar 2025 16:06:14 +0800	[thread overview]
Message-ID: <20250325080614.GC27303@nxa18884-linux> (raw)
In-Reply-To: <a180b7e6-6978-4814-97ff-05e34223938f@denx.de>

On Sat, Mar 22, 2025 at 01:46:02AM +0100, Marek Vasut wrote:
>On 3/21/25 8:15 AM, Alice Guo (OSS) wrote:
>
>[...]
>
>> +static int imx_scmi_pinctrl_probe(struct udevice *dev)
>> +{
>> +	struct imx_scmi_pinctrl_priv *priv = dev_get_priv(dev);
>> +
>> +	priv->daisy_offset = is_imx93() ? DAISY_OFFSET_IMX93 : DAISY_OFFSET_IMX95;
>> +
>> +	return devm_scmi_of_get_channel(dev);
>> +}
>> +
>> +static int imx_scmi_pinctrl_bind(struct udevice *dev)
>> +{
>> +	if (IS_ENABLED(CONFIG_IMX95))
>> +		return 0;
>
>Why does this driver support iMX93 , but it is explicitly not going to bind
>on iMX93 ?
>
>In case the MX93 support is going to be added, you probably need something
>like:
>
>if (IS_ENABLED(CONFIG_IMX95) && is_imx95())
>  return 0;
>
>Because IS_ENABLED(CONFIG_IMX95) does not automatically imply that this code
>is started on MX95 , that is when is_imx95() comes into play and does runtime
>check for MX95 .
>
>> +	return -ENODEV;
>> +}
>> +
>> +U_BOOT_DRIVER(scmi_pinctrl_imx) = {
>> +	.name = "scmi_pinctrl_imx",
>> +	.id = UCLASS_PINCTRL,
>> +	.bind = imx_scmi_pinctrl_bind,
>> +	.probe = imx_scmi_pinctrl_probe,
>> +	.priv_auto = sizeof(struct imx_scmi_pinctrl_priv),
>> +	.ops = &imx_scmi_pinctrl_ops,
>> +	.flags = DM_FLAG_PRE_RELOC,
>> +};
>> 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.

Regards,
Peng


  reply	other threads:[~2025-03-25  6:58 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21  7:15 [PATCH v8 00/19] imx: add i.MX95 support Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 01/19] firmware: scmi: smt: Interrupt communication enable Alice Guo (OSS)
2025-03-22  0:38   ` Marek Vasut
2025-04-01  8:02     ` 回复: " Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 02/19] pinctrl: nxp: add a pin controller driver based on SCMI pin control protocol Alice Guo (OSS)
2025-03-22  0:46   ` Marek Vasut
2025-03-25  8:06     ` Peng Fan [this message]
2025-03-26  1:24       ` Marek Vasut
2025-03-26  1:52         ` Peng Fan
2025-03-26  3:00           ` Marek Vasut
2025-03-26  6:42             ` Peng Fan
2025-03-27 13:18               ` Marek Vasut
2025-04-01 10:57                 ` 回复: " Alice Guo (OSS)
2025-04-01 12:53                   ` Marek Vasut
2025-04-01 13:22                     ` 回复: " Alice Guo (OSS)
2025-04-01 13:27                     ` Fabio Estevam
2025-04-01  8:17     ` Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 03/19] firmware: scmi_agent: add SCMI pin control protocol support Alice Guo (OSS)
2025-03-22  1:55   ` Marek Vasut
2025-03-21  7:15 ` [PATCH v8 04/19] scmi_protocols: add SCMI misc protocol protocol_id and message_id for getting the ROM passover data Alice Guo (OSS)
2025-03-22  1:55   ` Marek Vasut
2025-03-21  7:15 ` [PATCH v8 05/19] scmi_protocols: add SCMI Performance domain management protocol message IDs Alice Guo (OSS)
2025-03-22  1:55   ` Marek Vasut
2025-03-21  7:15 ` [PATCH v8 06/19] clk: scmi: add the command CLOCK_PARENT_SET Alice Guo (OSS)
2025-03-22  1:57   ` Marek Vasut
2025-03-21  7:15 ` [PATCH v8 07/19] clk: scmi: check the clock state/parent/rate control permissions Alice Guo (OSS)
2025-03-22  2:02   ` Marek Vasut
2025-03-28 10:26     ` 回复: " Alice Guo (OSS)
2025-03-30 21:05       ` Marek Vasut
2025-03-21  7:15 ` [PATCH v8 08/19] sandbox: add SCMI clock control permissions to sandbox Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 09/19] scmi_protocols: update struct scmi_base_discover_list_protocols_out Alice Guo (OSS)
2025-03-22  2:10   ` Marek Vasut
2025-03-21  7:15 ` [PATCH v8 10/19] imx9: scmi: add i.MX95 SoC and clock related code Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 11/19] spl: imx: use trampoline buffer to load images to secure region Alice Guo (OSS)
2025-03-22  2:14   ` Marek Vasut
2025-03-21  7:15 ` [PATCH v8 12/19] imx9: add i.MX95 Kconfig and Makefile Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 13/19] imx: Kconfig: IMX8_ROMAPI is not configured for i.MX95 Alice Guo (OSS)
2025-03-22  2:15   ` Marek Vasut
2025-03-21  7:15 ` [PATCH v8 14/19] binman: add a new entry type for packing DDR PHY firmware images Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 15/19] tools: imx8image: add i.MX95 support Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 16/19] imx: container: add V2X container support for i.MX95 Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 17/19] doc: imx: add document for i.MX95 Image Container Format Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 18/19] imx95_evk: add i.MX95 19x19 EVK board basic support Alice Guo (OSS)
2025-03-21  7:15 ` [PATCH v8 19/19] Makefile: add some files to CLEAN_FILES Alice Guo (OSS)
2025-03-22  2:20 ` [PATCH v8 00/19] imx: add i.MX95 support Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250325080614.GC27303@nxa18884-linux \
    --to=peng.fan@oss.nxp.com \
    --cc=LW@karo-electronics.de \
    --cc=Ranjani.Vaidyanathan@nxp.com \
    --cc=alice.guo@nxp.com \
    --cc=alice.guo@oss.nxp.com \
    --cc=alpernebiyasak@gmail.com \
    --cc=festevam@gmail.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    --cc=ye.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox