diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2021-02-02 19:54:12 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-04 11:26:45 +0100 |
commit | eb2ad9a793c7d00988e399b9b7a1ebb2a0d85b3f (patch) | |
tree | e65c90ee771274d2deac35c9a8f6cfb557ab25af | |
parent | 70ec84e1470efeea4ab100513e1241b44aa8c2ff (diff) | |
download | barebox-eb2ad9a793c7d00988e399b9b7a1ebb2a0d85b3f.tar.gz barebox-eb2ad9a793c7d00988e399b9b7a1ebb2a0d85b3f.tar.xz |
usb: imx: fix overcurrent polarity handling on i.MX7
The reference manual says the overcurrent polarity is changed to low
with the bit set. We fix that according to the description.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/usb/imx/imx-usb-misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/imx/imx-usb-misc.c b/drivers/usb/imx/imx-usb-misc.c index b663d073aa..660ebecd78 100644 --- a/drivers/usb/imx/imx-usb-misc.c +++ b/drivers/usb/imx/imx-usb-misc.c @@ -353,7 +353,7 @@ static __maybe_unused struct imx_usb_misc_data mx5_data = { #define MX6_USB_CTRL(n) ((n) * 4) #define MX6_USB_CTRL_OVER_CUR_DIS (1 << 7) -#define MX6_USB_CTRL_OVER_CUR_ACT_HIGH (1 << 8) +#define MX6_USB_CTRL_OVER_CUR_ACT_LOW (1 << 8) #define MX6_USB_CTRL_PWR_POLARITY (1 << 9) static void mx6_hsic_pullup(unsigned long reg, int on) @@ -453,9 +453,9 @@ static int usbmisc_imx7d_init(void __iomem *base, int port, } else { reg &= ~MX6_USB_CTRL_OVER_CUR_DIS; if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW) - reg &= ~MX6_USB_CTRL_OVER_CUR_ACT_HIGH; + reg |= MX6_USB_CTRL_OVER_CUR_ACT_LOW; else - reg |= MX6_USB_CTRL_OVER_CUR_ACT_HIGH; + reg &= ~MX6_USB_CTRL_OVER_CUR_ACT_LOW; } if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH) reg |= MX6_USB_CTRL_PWR_POLARITY; |