linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@oss.nxp.com>
To: Sudeep Holla <sudeep.holla@arm.com>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Oleksii Moisieiev <oleksii_moisieiev@epam.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-gpio@vger.kernel.org,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Peng Fan <peng.fan@nxp.com>, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v3 0/6] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support
Date: Mon, 29 Jan 2024 20:36:50 +0800	[thread overview]
Message-ID: <f88d07ef-83b2-4d14-976a-6dbbd71e036f@oss.nxp.com> (raw)
In-Reply-To: <20240121-pinctrl-scmi-v3-0-8d94ba79dca8@nxp.com>

Hi Sudeep, Cristian

Would you pick up patch 1-4?
And for i.MX95 OEM extenstion, do you have any suggestions?
I have two points:
1. use vendor compatible. This would also benefit when supporting vendor 
protocol.
2. Introduce a property saying supporting-generic-pinconf

How do you think?

Thanks,
Peng.

在 1/21/2024 6:21 PM, Peng Fan (OSS) 写道:
> This patchset is a rework from Oleksii's RFC v5 patchset
> https://lore.kernel.org/all/cover.1698353854.git.oleksii_moisieiev@epam.com/
> 
> This patchset introduces some changes based on RFC v5:
> - introduce helper get_max_msg_size
> - support compatible string
> - iterate the id_table
> - Support multiple configs in one command
> - Added i.MX support
> - Patch 5 firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support
>    is almost same as RFCv5 expect multiple configs support.
> - Patch 4 the dt-bindings includes compatible string to support i.MX
> - Rebased on 2023-12-15 linux-next/master
> 
> If any comments from RFC v5 are missed, I am sorry in advance.
> 
> This PINCTRL Protocol is following Version 3.2 SCMI Spec Beta release.
> 
> On ARM-based systems, a separate Cortex-M based System Control Processor
> (SCP) provides control on pins, as well as with power, clocks, reset
> controllers. So implement the driver to support such cases.
> 
> The i.MX95 Example as below:
> 
> Configuration:
> The scmi-pinctrl driver can be configured using DT bindings.
> For example:
> / {
> 	sram0: sram@445b1000 {
> 		compatible = "mmio-sram";
> 		reg = <0x0 0x445b1000 0x0 0x400>;
> 
> 		#address-cells = <1>;
> 		#size-cells = <1>;
> 		ranges = <0x0 0x0 0x445b1000 0x400>;
> 
> 		scmi_buf0: scmi-sram-section@0 {
> 			compatible = "arm,scmi-shmem";
> 			reg = <0x0 0x80>;
> 		};
> 
> 		scmi_buf1: scmi-sram-section@80 {
> 			compatible = "arm,scmi-shmem";
> 			reg = <0x80 0x80>;
> 		};
> 	};
> 
> 	firmware {
> 		scmi {
> 			compatible = "arm,scmi";
> 			mboxes = <&mu2 5 0>, <&mu2 3 0>, <&mu2 3 1>;
> 			shmem = <&scmi_buf0>, <&scmi_buf1>;
> 			#address-cells = <1>;
> 			#size-cells = <0>;
> 
> 			scmi_iomuxc: protocol@19 {
> 				compatible = "fsl,imx95-scmi-pinctrl";
> 				reg = <0x19>;
> 			};
> 		};
> 	};
> };
> 
> &scmi_iomuxc {
> 	pinctrl_tpm3: tpm3grp {
> 		fsl,pins = <
> 			IMX95_PAD_GPIO_IO12__TPM3_CH2		0x51e
> 		>;
> 	};
> };
> 
> This patchset has been tested on i.MX95-19x19-EVK board.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> Changes in v3:
> - Add R-b for dt-binding patch
> - Use 80 chars per line to align with other scmi drivers
> - Add pinctrl_scmi_alloc_configs pinctrl_scmi_free_configs to replace
>    driver global config_value and config_type array to avoid in parrell
>    access issue. When num_configs is larger than 4, use alloc, else use
>    stack.
> - Drop the separate MAITAINERS entry for firmware scmi pinctrl
> - Use enum type, not u8 when referring the scmi or generic pin conf type
> - Drop scmi_pinctrl_config_get_all which is not used at all for now.
> - Update copyright year to 2024
> - Move the enum scmi_pinctrl_conf_type above pinctrl_proto_ops for consistency
> - Link to v2: https://lore.kernel.org/r/20240104-pinctrl-scmi-v2-0-a9bd86ab5a84@nxp.com
> 
> Changes in v2:
>   Added comments, and added R-b for Patch 1
>   Moved the compatile string and i.MX patch to the end, marked NOT APPLY
>   Patchset based on lore.kernel.org/all/20231221151129.325749-1-cristian.marussi@arm.com/
>   Addressed the binding doc issue, dropped i.MX content.
>   For the firmware pinctrl scmi driver, addressed the comments from Cristian
>   For the pinctrl scmi driver, addressed comments from Cristian
> 
>   For the i.MX95 OEM stuff, I not have good idea, expect using compatbile
>   string. Maybe the firmware public an protocol attribute to indicate it is
>   VENDOR stuff or NXP use a new protocol id, not 0x19. But I think
>   current pinctrl-scmi.c not able to support OEM config, should we extend
>   it with some method? Anyway if patch 1-4 is good enough, they could
>   be picked up first.
> 
>   Since I am only able to test the patch on i.MX95 which not support
>   geneirc pinconf, only OEM configs are tested in my side.
> 
> ---
> Oleksii Moisieiev (1):
>        firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support
> 
> Peng Fan (5):
>        firmware: arm_scmi: introduce helper get_max_msg_size
>        dt-bindings: firmware: arm,scmi: support pinctrl protocol
>        pinctrl: Implementation of the generic scmi-pinctrl driver
>        [NOT APPLY]firmware: scmi: support compatible string
>        [NOT APPLY] pinctrl: scmi: implement pinctrl_scmi_imx_dt_node_to_map
> 
>   .../devicetree/bindings/firmware/arm,scmi.yaml     |  50 ++
>   MAINTAINERS                                        |   1 +
>   drivers/firmware/arm_scmi/Makefile                 |   1 +
>   drivers/firmware/arm_scmi/bus.c                    |  39 +-
>   drivers/firmware/arm_scmi/common.h                 |   2 +-
>   drivers/firmware/arm_scmi/driver.c                 |  32 +-
>   drivers/firmware/arm_scmi/pinctrl.c                | 908 +++++++++++++++++++++
>   drivers/firmware/arm_scmi/protocols.h              |   3 +
>   drivers/pinctrl/Kconfig                            |  11 +
>   drivers/pinctrl/Makefile                           |   1 +
>   drivers/pinctrl/pinctrl-scmi-imx.c                 | 117 +++
>   drivers/pinctrl/pinctrl-scmi.c                     | 609 ++++++++++++++
>   drivers/pinctrl/pinctrl-scmi.h                     |  12 +
>   include/linux/scmi_protocol.h                      |  77 ++
>   14 files changed, 1849 insertions(+), 14 deletions(-)
> ---
> base-commit: 5389a88b06eb19c3fb08200cc1519406e299b7b0
> change-id: 20231215-pinctrl-scmi-4c5b0374f4c6
> 
> Best regards,

  parent reply	other threads:[~2024-01-29 12:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21 10:21 [PATCH v3 0/6] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Peng Fan (OSS)
2024-01-21 10:21 ` [PATCH v3 1/6] firmware: arm_scmi: introduce helper get_max_msg_size Peng Fan (OSS)
2024-01-21 10:21 ` [PATCH v3 2/6] dt-bindings: firmware: arm,scmi: support pinctrl protocol Peng Fan (OSS)
2024-01-21 10:21 ` [PATCH v3 3/6] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Peng Fan (OSS)
2024-01-22 17:01   ` Cristian Marussi
2024-01-28  0:23   ` Linus Walleij
2024-01-21 10:21 ` [PATCH v3 4/6] pinctrl: Implementation of the generic scmi-pinctrl driver Peng Fan (OSS)
2024-01-22 17:14   ` Cristian Marussi
2024-01-28  0:27   ` Linus Walleij
2024-01-21 10:21 ` [PATCH NOT APPLY v3 5/6] firmware: scmi: support compatible string Peng Fan (OSS)
2024-01-21 10:21 ` [PATCH NOT APPLY v3 6/6] pinctrl: scmi: implement pinctrl_scmi_imx_dt_node_to_map Peng Fan (OSS)
2024-01-28  0:16   ` Linus Walleij
2024-01-28  0:32     ` Peng Fan
2024-01-28  0:43       ` Linus Walleij
2024-01-29 12:36 ` Peng Fan [this message]
2024-01-29 13:36   ` [PATCH v3 0/6] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Linus Walleij
2024-02-01  7:14     ` Peng Fan
2024-02-01 11:19       ` Cristian Marussi
2024-02-04  9:29         ` Peng Fan
2024-02-04 18:58           ` Linus Walleij
2024-02-05  9:11             ` Peng Fan
2024-02-08 12:17               ` Linus Walleij
2024-02-05 13:52           ` Cristian Marussi
2024-01-29 16:30   ` Sudeep Holla
2024-02-01  8:07     ` 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=f88d07ef-83b2-4d14-976a-6dbbd71e036f@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --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=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=takahiro.akashi@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).