]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: dwc3-generic: Ensure reset GPIO is configured as an output
authorPeter Korsgaard <peter@korsgaard.com>
Wed, 28 Jun 2023 12:26:48 +0000 (14:26 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 3 Jul 2023 08:46:34 +0000 (10:46 +0200)
GPIOD_ACTIVE_LOW is not enough to configure a GPIO as an output, we need
GPIOD_IS_OUT as well.

Fixes: b252d79b0936d60b ("usb: dwc3: Add support to reset usb ULPI phy")
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
drivers/usb/dwc3/dwc3-generic.c

index 66da5a8d6f8c2b71c443205a48f722ec9f179282..35e4b36a695e44e7867dd930d919a9d5d3a78bb3 100644 (file)
@@ -105,7 +105,7 @@ static int dwc3_generic_probe(struct udevice *dev,
        if (CONFIG_IS_ENABLED(DM_GPIO) &&
            device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) {
                priv->ulpi_reset = devm_gpiod_get_optional(dev->parent, "reset",
-                                                               GPIOD_ACTIVE_LOW);
+                                                          GPIOD_IS_OUT | GPIOD_ACTIVE_LOW);
                /* property is optional, don't return error! */
                if (priv->ulpi_reset) {
                        /* Toggle ulpi to reset the phy. */