mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: Peng Fan <peng.fan@nxp.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	"Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Oleksii Moisieiev <oleksii_moisieiev@epam.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Fabio Estevam <festevam@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 4/7] dt-bindings: firmware: arm,scmi: support pinctrl protocol
Date: Wed, 20 Dec 2023 13:37:45 +0100	[thread overview]
Message-ID: <20231220123745.ksdumfymu4xruufa@pengutronix.de> (raw)
In-Reply-To: <DU0PR04MB9417E926CBD95BD7298B64D28896A@DU0PR04MB9417.eurprd04.prod.outlook.com>

On 23-12-20, Peng Fan wrote:
> > Subject: Re: [PATCH 4/7] dt-bindings: firmware: arm,scmi: support pinctrl
> > protocol
> > 
> > On 23-12-20, Peng Fan wrote:
> > > > Subject: Re: [PATCH 4/7] dt-bindings: firmware: arm,scmi: support
> > > > pinctrl protocol
> > > >
> > > > Hi Peng,
> > > >
> > > > On 23-12-15, Peng Fan (OSS) wrote:
> > > > > From: Peng Fan <peng.fan@nxp.com>
> > > > >
> > > > > Add SCMI v3.2 pinctrl protocol bindings and example.
> > > > >
> > > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > > ---
> > > > >  .../devicetree/bindings/firmware/arm,scmi.yaml     | 99
> > > > ++++++++++++++++++++++
> > > > >  1 file changed, 99 insertions(+)
> > > > >
> > > > > diff --git
> > > > > a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > > > > b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > > > > index 4591523b51a0..bfd2b6a89979 100644
> > > > > --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > > > > +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> > > > > @@ -247,6 +247,85 @@ properties:
> > > > >        reg:
> > > > >          const: 0x18
> > > > >
> > > > > +  protocol@19:
> > > >
> > > > ...
> > > >
> > > > > @@ -401,6 +480,26 @@ examples:
> > > > >              scmi_powercap: protocol@18 {
> > > > >                  reg = <0x18>;
> > > > >              };
> > > > > +
> > > > > +            scmi_pinctrl: protocol@19 {
> > > > > +                reg = <0x19>;
> > > > > +                #pinctrl-cells = <0>;
> > > > > +
> > > > > +                i2c2-pins {
> > > > > +                    groups = "i2c2_a", "i2c2_b";
> > > > > +                    function = "i2c2";
> > > > > +                };
> > > > > +
> > > > > +                mdio-pins {
> > > > > +                    groups = "avb_mdio";
> > > > > +                    drive-strength = <24>;
> > > > > +                };
> > > > > +
> > > > > +                keys_pins: keys-pins {
> > > > > +                    pins = "GP_5_17", "GP_5_20", "GP_5_22", "GP_2_1";
> > > > > +                    bias-pull-up;
> > > > > +                };
> > > > > +            };
> > > >
> > > > This example is different to the one you mentioned within the
> > > > cover-letter. I didn't checked all patches just want to ask which
> > > > API will be implemented by this patchset?
> > >
> > > I kept this change since it was tested by Oleksii, but anyway i.MX not use
> > these.
> > >
> > > The API, I suppose you are asking about this?
> > > static const struct pinctrl_ops pinctrl_scmi_pinctrl_ops = {
> > >         .get_groups_count = pinctrl_scmi_get_groups_count,
> > >         .get_group_name = pinctrl_scmi_get_group_name,
> > >         .get_group_pins = pinctrl_scmi_get_group_pins,
> > > #ifdef CONFIG_OF
> > >         .dt_node_to_map = pinconf_generic_dt_node_to_map_all,
> > >         .dt_free_map = pinconf_generic_dt_free_map,
> > > #endif
> > > };
> > >
> > > static const struct pinctrl_ops pinctrl_scmi_imx_pinctrl_ops = {
> > >         .get_groups_count = pinctrl_scmi_get_groups_count,
> > >         .get_group_name = pinctrl_scmi_get_group_name,
> > >         .get_group_pins = pinctrl_scmi_get_group_pins,
> > > #ifdef CONFIG_OF
> > >         .dt_node_to_map = pinctrl_scmi_imx_dt_node_to_map,
> > >         .dt_free_map = pinconf_generic_dt_free_map,
> > > #endif
> > > };
> > 
> > I see, thanks for the clarification. In short: the i.MX SMCI pinctrl DT-API is the
> > same as the non-SCMI pinctrl API since the dt_node_to_map will convert it.
> 
> Yes, the fsl,pins format is same whether SCMI or non-SCMI. But we need
> to pack the data to a format that matches the i.MX OEM SCMI PINCTRL
> protocol, so we need to dedicated dt_node_to_map here.

Yes, I saw that you're using the enum values 192-255 for the OEM
specific part and the packing. Does you have public access to the FW
implementing the SCMI?

Regards,
  Marco

> 
> Thanks,
> Peng.
> 
> > 
> > Regards,
> >   Marco
> 
> 

  reply	other threads:[~2023-12-20 12:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 11:56 [PATCH 0/7] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Peng Fan (OSS)
2023-12-15 11:56 ` [PATCH 1/7] firmware: arm_scmi: introduce helper get_max_msg_size Peng Fan (OSS)
2023-12-22 15:30   ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 2/7] firmware: scmi: support compatible string Peng Fan (OSS)
2023-12-15 11:56 ` [PATCH 3/7] firmware: arm_scmi: bus: iterate the id_table Peng Fan (OSS)
2023-12-22 15:40   ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 4/7] dt-bindings: firmware: arm,scmi: support pinctrl protocol Peng Fan (OSS)
2023-12-15 20:11   ` Rob Herring
2023-12-16  4:44     ` Peng Fan
2023-12-19 19:29   ` Marco Felsch
2023-12-20  1:58     ` Peng Fan
2023-12-20 12:30       ` Marco Felsch
2023-12-20 12:33         ` Peng Fan
2023-12-20 12:37           ` Marco Felsch [this message]
2023-12-21  1:31             ` Peng Fan
2023-12-20 11:42   ` Linus Walleij
2023-12-22 17:46   ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 5/7] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Peng Fan (OSS)
2023-12-22 15:58   ` Cristian Marussi
2023-12-22 16:26   ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 6/7] pinctrl: Implementation of the generic scmi-pinctrl driver Peng Fan (OSS)
2023-12-22 16:35   ` Cristian Marussi
2023-12-15 11:56 ` [PATCH 7/7] pinctrl: scmi: implement pinctrl_scmi_imx_dt_node_to_map Peng Fan (OSS)
2023-12-22 17:43   ` Cristian Marussi
2023-12-23  2:14     ` Peng Fan

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=20231220123745.ksdumfymu4xruufa@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=conor+dt@kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksii_moisieiev@epam.com \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sudeep.holla@arm.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

all inboxes | Powered by JetHome®