]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: zynqmp: Display the tristate configuration for all pins
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Thu, 14 Sep 2023 10:06:20 +0000 (15:36 +0530)
committerMichal Simek <michal.simek@amd.com>
Mon, 9 Oct 2023 08:25:32 +0000 (10:25 +0200)
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@amd.com>
Link: https://lore.kernel.org/r/20230914100620.26346-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/pinctrl/pinctrl-zynqmp.c

index 517035961dabeff7ce65189079781ae5ca66226e..eb17a4290b7d6716972b5fe6df1781ed62729145 100644 (file)
@@ -548,6 +548,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:
@@ -568,13 +570,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;
 }