[PATCH 2/2] usb: imx: get power pin polarity from DT
Lucas Stach
l.stach at pengutronix.de
Mon Nov 23 10:29:31 EST 2020
There is a documented DT property to set the power pin polarity,
parse it.
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
drivers/usb/imx/chipidea-imx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c
index b1a77a163798..b144f41437a9 100644
--- a/drivers/usb/imx/chipidea-imx.c
+++ b/drivers/usb/imx/chipidea-imx.c
@@ -168,6 +168,9 @@ static int imx_chipidea_probe_dt(struct imx_chipidea *ci)
"over-current-active-high", NULL))
ci->flags |= MXC_EHCI_OC_PIN_ACTIVE_LOW;
+ if (of_find_property(ci->dev->device_node, "power-active-high", NULL))
+ ci->flags |= MXC_EHCI_PWR_PIN_ACTIVE_HIGH;
+
if (of_usb_get_maximum_speed(ci->dev->device_node, NULL) ==
USB_SPEED_FULL)
ci->flags |= MXC_EHCI_PFSC;
--
2.20.1
More information about the barebox
mailing list