mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Tanmay Shah <tanmay.shah@amd.com>,
	Ben Levinsky <ben.levinsky@amd.com>, Marek Vasut <marex@denx.de>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org, saikrishna12468@gmail.com,
	git@amd.com
Subject: Re: [PATCH v2 2/4] firmware: xilinx: Add version check for TRISTATE configuration
Date: Mon, 24 Jul 2023 12:16:41 +0200	[thread overview]
Message-ID: <77b45165-e6bb-6ed1-f96c-90565740db2f@amd.com> (raw)
In-Reply-To: <20230724084554.1924378-3-sai.krishna.potthuri@amd.com>



On 7/24/23 10:45, Sai Krishna Potthuri wrote:
> Support for configuring TRISTATE parameter is added in ZYNQMP PMUFW(Xilinx
> ZynqMP Platform Management Firmware) Configuration Param Set version 2.0.
> If the requested configuration is TRISTATE and platform is ZYNQMP then
> check the version before requesting Xilinx firmware to set the
> configuration.
> 
> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
> ---
>   drivers/firmware/xilinx/zynqmp.c     | 9 +++++++++
>   include/linux/firmware/xlnx-zynqmp.h | 2 ++
>   2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index f9498e7ea694..307717f24a98 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -1150,6 +1150,15 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_pinctrl_get_config);
>   int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
>   				 u32 value)
>   {
> +	int ret;
> +
> +	if (pm_family_code == ZYNQMP_FAMILY_CODE &&
> +	    param == PM_PINCTRL_CONFIG_TRI_STATE) {
> +		ret = zynqmp_pm_feature(PM_PINCTRL_CONFIG_PARAM_SET);
> +		if (ret < PM_PINCTRL_PARAM_SET_VERSION)
> +			return -EOPNOTSUPP;
> +	}
> +
>   	return zynqmp_pm_invoke_fn(PM_PINCTRL_CONFIG_PARAM_SET, pin,
>   				   param, value, 0, NULL);
>   }
> diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> index d7f94b42ad4c..6359eeea8dd7 100644
> --- a/include/linux/firmware/xlnx-zynqmp.h
> +++ b/include/linux/firmware/xlnx-zynqmp.h
> @@ -34,6 +34,8 @@
>   /* PM API versions */
>   #define PM_API_VERSION_2	2
>   
> +#define PM_PINCTRL_PARAM_SET_VERSION	2
> +
>   #define ZYNQMP_FAMILY_CODE 0x23
>   #define VERSAL_FAMILY_CODE 0x26
>   

Reviewed-by: Michal Simek <michal.simek@amd.com>

Thanks,
Michal

  reply	other threads:[~2023-07-24 10:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  8:45 [PATCH v2 0/4] pinctrl: pinctrl-zynqmp: Add tri-state configuration support Sai Krishna Potthuri
2023-07-24  8:45 ` [PATCH v2 1/4] firmware: xilinx: Add support to get platform information Sai Krishna Potthuri
2023-07-24 10:14   ` Michal Simek
2023-07-24  8:45 ` [PATCH v2 2/4] firmware: xilinx: Add version check for TRISTATE configuration Sai Krishna Potthuri
2023-07-24 10:16   ` Michal Simek [this message]
     [not found]   ` <cde3fef1-7ab0-cd3b-df1a-c29c47770e73@amd.com>
2023-07-27  5:20     ` Potthuri, Sai Krishna
2023-07-24  8:45 ` [PATCH v2 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration Sai Krishna Potthuri
2023-07-24  8:45 ` [PATCH v2 4/4] pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high impedance Sai Krishna Potthuri

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=77b45165-e6bb-6ed1-f96c-90565740db2f@amd.com \
    --to=michal.simek@amd.com \
    --cc=arnd@arndb.de \
    --cc=ben.levinsky@amd.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=git@amd.com \
    --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-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mathieu.poirier@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=roman.gushchin@linux.dev \
    --cc=sai.krishna.potthuri@amd.com \
    --cc=saikrishna12468@gmail.com \
    --cc=tanmay.shah@amd.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®