public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ipinctrl: pinctrl-zynqmp: Add tri-state configuration support
@ 2023-07-17  9:33 Sai Krishna Potthuri
  2023-07-17  9:33 ` [PATCH 1/4] firmware: xilinx: Add support to get platform information Sai Krishna Potthuri
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sai Krishna Potthuri @ 2023-07-17  9:33 UTC (permalink / raw)
  To: Linus Walleij, Michal Simek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Mathieu Poirier, Tanmay Shah, Ben Levinsky,
	Marek Vasut, Roman Gushchin, Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, devicetree,
	saikrishna12468, git, Sai Krishna Potthuri

Add pinctrl driver support to handle 'output-enable' and
'bias-high-impedance' configurations with proper Configuration Set version
check. This will ensure system not to crash even if older Xilinx ZynqMP
Platform Management Firmware is used.
Initial Commit details:
Commit 133ad0d9af99bdca9070 ("dt-bindings: pinctrl-zynqmp: Add
output-enable configuration").
Commit ad2bea79ef0144043721 ("pinctrl: pinctrl-zynqmp: Add support
for output-enable and bias-high-impedance").

With the above patches, using these pinctrl properties in the device-tree
cause system hang issues with older Xilinx ZynqMP Platform Management
Firmware, hence reverted the patches.
Reverted Commit details:
Commit ff8356060e3a5e126abb ("Revert "dt-bindings: pinctrl-zynqmp: Add
output-enable configuration"").
Commit 9989bc33c4894e075167 ("Revert "pinctrl: pinctrl-zynqmp: Add support
for output-enable and bias-high-impedance"").
With the latest firmware and driver changes, driver will ask firmware if
that feature is supported or not by checking the version. This way it
works with all Xilinx firmwares.

Dhaval Shah (1):
  firmware: xilinx: Add support to get platform information

Sai Krishna Potthuri (3):
  firmware: xilinx: Add version check for TRISTATE configuration
  dt-bindings: pinctrl-zynqmp: Add output-enable configuration
  pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high
    impedance

 .../bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml |  4 ++
 drivers/firmware/xilinx/zynqmp.c              | 51 +++++++++++++++++++
 drivers/pinctrl/pinctrl-zynqmp.c              |  9 ++++
 include/linux/firmware/xlnx-zynqmp.h          | 15 ++++++
 4 files changed, 79 insertions(+)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/4] firmware: xilinx: Add support to get platform information
  2023-07-17  9:33 [PATCH 0/4] ipinctrl: pinctrl-zynqmp: Add tri-state configuration support Sai Krishna Potthuri
@ 2023-07-17  9:33 ` Sai Krishna Potthuri
  2023-07-17  9:33 ` [PATCH 2/4] firmware: xilinx: Add version check for TRISTATE configuration Sai Krishna Potthuri
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Sai Krishna Potthuri @ 2023-07-17  9:33 UTC (permalink / raw)
  To: Linus Walleij, Michal Simek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Mathieu Poirier, Tanmay Shah, Ben Levinsky,
	Marek Vasut, Roman Gushchin, Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, devicetree,
	saikrishna12468, git, Sai Krishna Potthuri

From: Dhaval Shah <dhaval.r.shah@amd.com>

Add function to get family code and sub family code from the idcode. This
family code and sub family code helps to identify the platform.
Family code of any platform is on bits 21 to 27 and Sub family code is on
bits 19 and 20.

Signed-off-by: Dhaval Shah <dhaval.r.shah@amd.com>
Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
---
 drivers/firmware/xilinx/zynqmp.c     | 42 ++++++++++++++++++++++++++++
 include/linux/firmware/xlnx-zynqmp.h | 13 +++++++++
 2 files changed, 55 insertions(+)

diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index a736db4a5825..f9498e7ea694 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -339,6 +339,8 @@ int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1,
 
 static u32 pm_api_version;
 static u32 pm_tz_version;
+static u32 pm_family_code;
+static u32 pm_sub_family_code;
 
 int zynqmp_pm_register_sgi(u32 sgi_num, u32 reset)
 {
@@ -404,6 +406,41 @@ int zynqmp_pm_get_chipid(u32 *idcode, u32 *version)
 }
 EXPORT_SYMBOL_GPL(zynqmp_pm_get_chipid);
 
+/**
+ * zynqmp_pm_get_family_info() - Get family info of platform
+ * @family:	Returned family code value
+ * @subfamily:	Returned sub-family code value
+ *
+ * Return: Returns status, either success or error+reason
+ */
+static int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily)
+{
+	u32 ret_payload[PAYLOAD_ARG_CNT];
+	u32 idcode;
+	int ret;
+
+	/* Check is family or sub-family code already received */
+	if (pm_family_code && pm_sub_family_code) {
+		*family = pm_family_code;
+		*subfamily = pm_sub_family_code;
+		return 0;
+	}
+
+	ret = zynqmp_pm_invoke_fn(PM_GET_CHIPID, 0, 0, 0, 0, ret_payload);
+	if (ret < 0)
+		return ret;
+
+	idcode = ret_payload[1];
+	pm_family_code = FIELD_GET(GENMASK(FAMILY_CODE_MSB, FAMILY_CODE_LSB),
+				   idcode);
+	pm_sub_family_code = FIELD_GET(GENMASK(SUB_FAMILY_CODE_MSB,
+					       SUB_FAMILY_CODE_LSB), idcode);
+	*family = pm_family_code;
+	*subfamily = pm_sub_family_code;
+
+	return 0;
+}
+
 /**
  * zynqmp_pm_get_trustzone_version() - Get secure trustzone firmware version
  * @version:	Returned version value
@@ -1911,6 +1948,11 @@ static int zynqmp_firmware_probe(struct platform_device *pdev)
 	pr_info("%s Platform Management API v%d.%d\n", __func__,
 		pm_api_version >> 16, pm_api_version & 0xFFFF);
 
+	/* Get the Family code and sub family code of platform */
+	ret = zynqmp_pm_get_family_info(&pm_family_code, &pm_sub_family_code);
+	if (ret < 0)
+		return ret;
+
 	/* Check trustzone version number */
 	ret = zynqmp_pm_get_trustzone_version(&pm_tz_version);
 	if (ret)
diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
index f5da51677069..d7f94b42ad4c 100644
--- a/include/linux/firmware/xlnx-zynqmp.h
+++ b/include/linux/firmware/xlnx-zynqmp.h
@@ -34,6 +34,19 @@
 /* PM API versions */
 #define PM_API_VERSION_2	2
 
+#define ZYNQMP_FAMILY_CODE 0x23
+#define VERSAL_FAMILY_CODE 0x26
+
+/* When all subfamily of platform need to support */
+#define ALL_SUB_FAMILY_CODE		0x00
+#define VERSAL_SUB_FAMILY_CODE		0x01
+#define VERSALNET_SUB_FAMILY_CODE	0x03
+
+#define FAMILY_CODE_LSB	21
+#define FAMILY_CODE_MSB	27
+#define SUB_FAMILY_CODE_LSB	19
+#define SUB_FAMILY_CODE_MSB	20
+
 /* ATF only commands */
 #define TF_A_PM_REGISTER_SGI		0xa04
 #define PM_GET_TRUSTZONE_VERSION	0xa03
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] firmware: xilinx: Add version check for TRISTATE configuration
  2023-07-17  9:33 [PATCH 0/4] ipinctrl: pinctrl-zynqmp: Add tri-state configuration support Sai Krishna Potthuri
  2023-07-17  9:33 ` [PATCH 1/4] firmware: xilinx: Add support to get platform information Sai Krishna Potthuri
@ 2023-07-17  9:33 ` Sai Krishna Potthuri
  2023-07-17  9:33 ` [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration Sai Krishna Potthuri
  2023-07-17  9:33 ` [PATCH 4/4] pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high impedance Sai Krishna Potthuri
  3 siblings, 0 replies; 8+ messages in thread
From: Sai Krishna Potthuri @ 2023-07-17  9:33 UTC (permalink / raw)
  To: Linus Walleij, Michal Simek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Mathieu Poirier, Tanmay Shah, Ben Levinsky,
	Marek Vasut, Roman Gushchin, Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, devicetree,
	saikrishna12468, git, Sai Krishna Potthuri

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
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration
  2023-07-17  9:33 [PATCH 0/4] ipinctrl: pinctrl-zynqmp: Add tri-state configuration support Sai Krishna Potthuri
  2023-07-17  9:33 ` [PATCH 1/4] firmware: xilinx: Add support to get platform information Sai Krishna Potthuri
  2023-07-17  9:33 ` [PATCH 2/4] firmware: xilinx: Add version check for TRISTATE configuration Sai Krishna Potthuri
@ 2023-07-17  9:33 ` Sai Krishna Potthuri
  2023-07-18 15:50   ` Conor Dooley
  2023-07-17  9:33 ` [PATCH 4/4] pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high impedance Sai Krishna Potthuri
  3 siblings, 1 reply; 8+ messages in thread
From: Sai Krishna Potthuri @ 2023-07-17  9:33 UTC (permalink / raw)
  To: Linus Walleij, Michal Simek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Mathieu Poirier, Tanmay Shah, Ben Levinsky,
	Marek Vasut, Roman Gushchin, Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, devicetree,
	saikrishna12468, git, Sai Krishna Potthuri

Add 'output-enable' configuration parameter to the properties list.

Using these pinctrl properties observed hang issues with older Xilinx
ZynqMP Platform Management Firmware, hence reverted the patch previously.
Commit ff8356060e3a5e126abb ("Revert "dt-bindings: pinctrl-zynqmp: Add
output-enable configuration"").

Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
---
 .../devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
index 2722dc7bb03d..1e2b9b627b12 100644
--- a/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
@@ -274,6 +274,10 @@ patternProperties:
           slew-rate:
             enum: [0, 1]
 
+          output-enable:
+            description:
+              This will internally disable the tri-state for MIO pins.
+
           drive-strength:
             description:
               Selects the drive strength for MIO pins, in mA.
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high impedance
  2023-07-17  9:33 [PATCH 0/4] ipinctrl: pinctrl-zynqmp: Add tri-state configuration support Sai Krishna Potthuri
                   ` (2 preceding siblings ...)
  2023-07-17  9:33 ` [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration Sai Krishna Potthuri
@ 2023-07-17  9:33 ` Sai Krishna Potthuri
  3 siblings, 0 replies; 8+ messages in thread
From: Sai Krishna Potthuri @ 2023-07-17  9:33 UTC (permalink / raw)
  To: Linus Walleij, Michal Simek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Mathieu Poirier, Tanmay Shah, Ben Levinsky,
	Marek Vasut, Roman Gushchin, Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, devicetree,
	saikrishna12468, git, Sai Krishna Potthuri

Add support to handle 'output-enable' and 'bias-high-impedance'
configurations.

Using these pinctrl properties observed hang issues with older PMUFW(Xilinx
ZynqMP Platform Management Firmware), hence reverted the patch.
Commit 9989bc33c4894e075167 ("Revert "pinctrl: pinctrl-zynqmp: Add support
for output-enable and bias-high-impedance"").

Support for configuring these properties added in PMUFW Configuration Set
version 2.0. When there is a request for these configurations from pinctrl
driver for ZynqMP platform, xilinx firmware driver checks for this version
before configuring these properties to avoid the hang issue and proceeds
further only when firmware version is >=2 otherwise it returns error.

Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
---
 drivers/pinctrl/pinctrl-zynqmp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c
index 8d2cb0999f2f..f2be341f73e1 100644
--- a/drivers/pinctrl/pinctrl-zynqmp.c
+++ b/drivers/pinctrl/pinctrl-zynqmp.c
@@ -415,6 +415,10 @@ static int zynqmp_pinconf_cfg_set(struct pinctrl_dev *pctldev,
 
 			break;
 		case PIN_CONFIG_BIAS_HIGH_IMPEDANCE:
+			param = PM_PINCTRL_CONFIG_TRI_STATE;
+			arg = PM_PINCTRL_TRI_STATE_ENABLE;
+			ret = zynqmp_pm_pinctrl_set_config(pin, param, arg);
+			break;
 		case PIN_CONFIG_MODE_LOW_POWER:
 			/*
 			 * These cases are mentioned in dts but configurable
@@ -423,6 +427,11 @@ static int zynqmp_pinconf_cfg_set(struct pinctrl_dev *pctldev,
 			 */
 			ret = 0;
 			break;
+		case PIN_CONFIG_OUTPUT_ENABLE:
+			param = PM_PINCTRL_CONFIG_TRI_STATE;
+			arg = PM_PINCTRL_TRI_STATE_DISABLE;
+			ret = zynqmp_pm_pinctrl_set_config(pin, param, arg);
+			break;
 		default:
 			dev_warn(pctldev->dev,
 				 "unsupported configuration parameter '%u'\n",
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration
  2023-07-17  9:33 ` [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration Sai Krishna Potthuri
@ 2023-07-18 15:50   ` Conor Dooley
  2023-07-19  6:49     ` Potthuri, Sai Krishna
  0 siblings, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2023-07-18 15:50 UTC (permalink / raw)
  To: Sai Krishna Potthuri
  Cc: Linus Walleij, Michal Simek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Mathieu Poirier, Tanmay Shah, Ben Levinsky,
	Marek Vasut, Roman Gushchin, Arnd Bergmann, linux-arm-kernel,
	linux-kernel, linux-gpio, devicetree, saikrishna12468, git


[-- Attachment #1.1: Type: text/plain, Size: 1461 bytes --]

On Mon, Jul 17, 2023 at 03:03:46PM +0530, Sai Krishna Potthuri wrote:
> Add 'output-enable' configuration parameter to the properties list.
> 
> Using these pinctrl properties observed hang issues with older Xilinx
> ZynqMP Platform Management Firmware, hence reverted the patch previously.
> Commit ff8356060e3a5e126abb ("Revert "dt-bindings: pinctrl-zynqmp: Add
> output-enable configuration"").

And what has changed since then that makes it okay to add?
Is the old firmware not still in the wild?

Thanks,
Conor.

> 
> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
> ---
>  .../devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml      | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
> index 2722dc7bb03d..1e2b9b627b12 100644
> --- a/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
> @@ -274,6 +274,10 @@ patternProperties:
>            slew-rate:
>              enum: [0, 1]
>  
> +          output-enable:
> +            description:
> +              This will internally disable the tri-state for MIO pins.
> +
>            drive-strength:
>              description:
>                Selects the drive strength for MIO pins, in mA.
> -- 
> 2.25.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration
  2023-07-18 15:50   ` Conor Dooley
@ 2023-07-19  6:49     ` Potthuri, Sai Krishna
  2023-07-19 16:02       ` Conor Dooley
  0 siblings, 1 reply; 8+ messages in thread
From: Potthuri, Sai Krishna @ 2023-07-19  6:49 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Linus Walleij, Simek, Michal, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Mathieu Poirier, Shah, Tanmay, Levinsky, Ben,
	Marek Vasut, Roman Gushchin, Arnd Bergmann,
	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-Xilinx)

Hi Conor,

> -----Original Message-----
> From: Conor Dooley <conor@kernel.org>
> Sent: Tuesday, July 18, 2023 9:20 PM
> To: Potthuri, Sai Krishna <sai.krishna.potthuri@amd.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>; Simek, Michal
> <michal.simek@amd.com>; 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>; Shah,
> Tanmay <tanmay.shah@amd.com>; Levinsky, Ben <ben.levinsky@amd.com>;
> Marek Vasut <marex@denx.de>; Roman Gushchin <roman.gushchin@linux.dev>;
> Arnd Bergmann <arnd@arndb.de>; 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-Xilinx) <git@amd.com>
> Subject: Re: [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable
> configuration
> 
> On Mon, Jul 17, 2023 at 03:03:46PM +0530, Sai Krishna Potthuri wrote:
> > Add 'output-enable' configuration parameter to the properties list.
> >
> > Using these pinctrl properties observed hang issues with older Xilinx
> > ZynqMP Platform Management Firmware, hence reverted the patch previously.
> > Commit ff8356060e3a5e126abb ("Revert "dt-bindings: pinctrl-zynqmp: Add
> > output-enable configuration"").
> 
> And what has changed since then that makes it okay to add?
> Is the old firmware not still in the wild?
This time when Linux firmware driver get the request for TRISTATE configuration
from pinctrl driver, it checks if that configuration is supported by the Xilinx ZynqMP
Platform Management firmware. If yes, then calls will be made otherwise it returns error.

Regards
Sai Krishna
> 
> Thanks,
> Conor.
> 
> >
> > Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
> > ---
> >  .../devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml      | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
> > b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
> > index 2722dc7bb03d..1e2b9b627b12 100644
> > ---
> > a/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml
> > +++ b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.ya
> > +++ ml
> > @@ -274,6 +274,10 @@ patternProperties:
> >            slew-rate:
> >              enum: [0, 1]
> >
> > +          output-enable:
> > +            description:
> > +              This will internally disable the tri-state for MIO pins.
> > +
> >            drive-strength:
> >              description:
> >                Selects the drive strength for MIO pins, in mA.
> > --
> > 2.25.1
> >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration
  2023-07-19  6:49     ` Potthuri, Sai Krishna
@ 2023-07-19 16:02       ` Conor Dooley
  0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2023-07-19 16:02 UTC (permalink / raw)
  To: Potthuri, Sai Krishna
  Cc: Linus Walleij, Simek, Michal, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Mathieu Poirier, Shah, Tanmay, Levinsky, Ben,
	Marek Vasut, Roman Gushchin, Arnd Bergmann,
	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-Xilinx)


[-- Attachment #1.1: Type: text/plain, Size: 1991 bytes --]

On Wed, Jul 19, 2023 at 06:49:43AM +0000, Potthuri, Sai Krishna wrote:
> Hi Conor,
> 
> > -----Original Message-----
> > From: Conor Dooley <conor@kernel.org>
> > Sent: Tuesday, July 18, 2023 9:20 PM
> > To: Potthuri, Sai Krishna <sai.krishna.potthuri@amd.com>
> > Cc: Linus Walleij <linus.walleij@linaro.org>; Simek, Michal
> > <michal.simek@amd.com>; 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>; Shah,
> > Tanmay <tanmay.shah@amd.com>; Levinsky, Ben <ben.levinsky@amd.com>;
> > Marek Vasut <marex@denx.de>; Roman Gushchin <roman.gushchin@linux.dev>;
> > Arnd Bergmann <arnd@arndb.de>; 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-Xilinx) <git@amd.com>
> > Subject: Re: [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable
> > configuration
> > 
> > On Mon, Jul 17, 2023 at 03:03:46PM +0530, Sai Krishna Potthuri wrote:
> > > Add 'output-enable' configuration parameter to the properties list.
> > >
> > > Using these pinctrl properties observed hang issues with older Xilinx
> > > ZynqMP Platform Management Firmware, hence reverted the patch previously.
> > > Commit ff8356060e3a5e126abb ("Revert "dt-bindings: pinctrl-zynqmp: Add
> > > output-enable configuration"").
> > 
> > And what has changed since then that makes it okay to add?
> > Is the old firmware not still in the wild?
> This time when Linux firmware driver get the request for TRISTATE configuration
> from pinctrl driver, it checks if that configuration is supported by the Xilinx ZynqMP
> Platform Management firmware. If yes, then calls will be made otherwise it returns error.

Please put that information in your commit message. With that done,
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-19 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17  9:33 [PATCH 0/4] ipinctrl: pinctrl-zynqmp: Add tri-state configuration support Sai Krishna Potthuri
2023-07-17  9:33 ` [PATCH 1/4] firmware: xilinx: Add support to get platform information Sai Krishna Potthuri
2023-07-17  9:33 ` [PATCH 2/4] firmware: xilinx: Add version check for TRISTATE configuration Sai Krishna Potthuri
2023-07-17  9:33 ` [PATCH 3/4] dt-bindings: pinctrl-zynqmp: Add output-enable configuration Sai Krishna Potthuri
2023-07-18 15:50   ` Conor Dooley
2023-07-19  6:49     ` Potthuri, Sai Krishna
2023-07-19 16:02       ` Conor Dooley
2023-07-17  9:33 ` [PATCH 4/4] pinctrl: pinctrl-zynqmp: Add support for output-enable and bias-high impedance Sai Krishna Potthuri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox