* [PATCH] usb: imx: implement support for "over-current-active-high" property
@ 2017-10-26 9:59 Uwe Kleine-König
2017-10-27 8:47 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2017-10-26 9:59 UTC (permalink / raw)
To: barebox
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>
---
arch/arm/dts/imx25.dtsi | 8 ++++++++
drivers/usb/imx/chipidea-imx.c | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/arch/arm/dts/imx25.dtsi b/arch/arm/dts/imx25.dtsi
index 13fbcc4f8da6..2e069e6f0314 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 309d5353037c..5f6988540fcb 100644
--- a/drivers/usb/imx/chipidea-imx.c
+++ b/drivers/usb/imx/chipidea-imx.c
@@ -160,6 +160,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;
}
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: imx: implement support for "over-current-active-high" property
2017-10-26 9:59 [PATCH] usb: imx: implement support for "over-current-active-high" property Uwe Kleine-König
@ 2017-10-27 8:47 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-10-27 8:47 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
On Thu, Oct 26, 2017 at 11:59:17AM +0200, Uwe Kleine-König wrote:
> 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>
> ---
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-27 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 9:59 [PATCH] usb: imx: implement support for "over-current-active-high" property Uwe Kleine-König
2017-10-27 8:47 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox