[PATCH] pinctrl: zynqmp: Display the tristate configuration for all pins
Michal Simek
michal.simek at amd.com
Mon Oct 2 12:04:08 CEST 2023
On 9/14/23 12:06, Venkatesh Yadav Abbarapu wrote:
> Read the tristate config for all the pins and display it.
>
> ZynqMP> pinmux status MIO1
> MIO1: slew:fast bias:enabled pull:up input:cmos drive:12mA
> volt:1.8 tri_state:enabled
>
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
> ---
> drivers/pinctrl/pinctrl-zynqmp.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c
> index 02626a7561..d98834b1aa 100644
> --- a/drivers/pinctrl/pinctrl-zynqmp.c
> +++ b/drivers/pinctrl/pinctrl-zynqmp.c
> @@ -533,6 +533,8 @@ static int zynqmp_pinctrl_get_pin_muxing(struct udevice *dev,
> &pinmux.drive_strength);
> zynqmp_pm_pinctrl_get_config(selector, PM_PINCTRL_CONFIG_VOLTAGE_STATUS,
> &pinmux.volt_sts);
> + zynqmp_pm_pinctrl_get_config(selector, PM_PINCTRL_CONFIG_TRI_STATE,
> + &pinmux.tri_state);
>
> switch (pinmux.drive_strength) {
> case PM_PINCTRL_DRIVE_STRENGTH_2MA:
> @@ -553,13 +555,15 @@ static int zynqmp_pinctrl_get_pin_muxing(struct udevice *dev,
> return -EINVAL;
> }
>
> - snprintf(buf, size, "slew:%s\tbias:%s\tpull:%s\tinput:%s\tdrive:%dmA\tvolt:%s",
> + snprintf(buf, size,
> + "slew:%s\tbias:%s\tpull:%s\tinput:%s\tdrive:%dmA\tvolt:%s\ttri_state:%s",
> pinmux.slew ? "slow" : "fast",
> pinmux.bias ? "enabled" : "disabled",
> pinmux.pull_ctrl ? "up" : "down",
> pinmux.input_type ? "schmitt" : "cmos",
> pinmux.drive_strength,
> - pinmux.volt_sts ? "1.8" : "3.3");
> + pinmux.volt_sts ? "1.8" : "3.3",
> + pinmux.tri_state ? "enabled" : "disabled");
>
> return 0;
> }
The patch fixes reported issue
https://lore.kernel.org/all/20230920030006.6488-1-venkatesh.abbarapu@amd.com/
that's why I applied also this patch.
Thanks,
Michal
More information about the U-Boot
mailing list