]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: zynqmp: Add support for output-enable and bias-high-impedance
authorAshok Reddy Soma <ashok.reddy.soma@amd.com>
Fri, 11 Aug 2023 05:48:29 +0000 (23:48 -0600)
committerMichal Simek <michal.simek@amd.com>
Thu, 21 Sep 2023 11:20:10 +0000 (13:20 +0200)
Add support to handle 'output-enable' and 'bias-high-impedance'
configurations in pinctrl driver.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Link: https://lore.kernel.org/r/20230811054829.13162-4-ashok.reddy.soma@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/pinctrl/pinctrl-zynqmp.c

index e9857f5ed9df1d1eb6b341f41256f74fd487a2d6..517035961dabeff7ce65189079781ae5ca66226e 100644 (file)
@@ -473,6 +473,10 @@ static int zynqmp_pinconf_set(struct udevice *dev, unsigned int pin,
                                 pin);
                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_LOW_POWER_MODE:
                /*
                 * This cases are mentioned in dts but configurable
@@ -481,6 +485,11 @@ static int zynqmp_pinconf_set(struct udevice *dev, unsigned int pin,
                 */
                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(dev, "unsupported configuration parameter '%u'\n",
                         param);