diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2017-10-26 11:59:17 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-10-27 10:47:15 +0200 |
commit | f4c9a52bd9ff659f035e95eed946d37f4f94dfef (patch) | |
tree | ec66d784043992b96828cd86ef18d1ca2d75af76 | |
parent | efd11c87a4102e8323060e71b71177a174f11f67 (diff) | |
download | barebox-f4c9a52bd9ff659f035e95eed946d37f4f94dfef.tar.gz barebox-f4c9a52bd9ff659f035e95eed946d37f4f94dfef.tar.xz |
usb: imx: implement support for "over-current-active-high" property
This property is already documented in the bindings and supported by
Linux. As on i.MX25 the HW default is active high and up to now barebox
didn't force this to low (which is the default for e.g. i.MX6), add the
property to barebox' imx25.dtsi to keep existing behaviour. If on a
board the OC pin is active low, you need to add
/delete-property/ over-current-active-high;
in the board.dts.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/dts/imx25.dtsi | 8 | ||||
-rw-r--r-- | drivers/usb/imx/chipidea-imx.c | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/dts/imx25.dtsi b/arch/arm/dts/imx25.dtsi index 13fbcc4f8d..2e069e6f03 100644 --- a/arch/arm/dts/imx25.dtsi +++ b/arch/arm/dts/imx25.dtsi @@ -29,3 +29,11 @@ &usbmisc { status = "okay"; }; + +&usbotg { + over-current-active-high; +}; + +&usbhost1 { + over-current-active-high; +}; diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c index 39593c40fb..505f5eb35d 100644 --- a/drivers/usb/imx/chipidea-imx.c +++ b/drivers/usb/imx/chipidea-imx.c @@ -155,6 +155,10 @@ static int imx_chipidea_probe_dt(struct imx_chipidea *ci) "disable-over-current", NULL)) ci->flags |= MXC_EHCI_DISABLE_OVERCURRENT; + else if (!of_find_property(ci->dev->device_node, + "over-current-active-high", NULL)) + ci->flags |= MXC_EHCI_OC_PIN_ACTIVE_LOW; + return 0; } |