Page 1 of 1

USB overcurrent pins v4.14.11

Posted: Fri Jun 08, 2018 3:11 pm
by PowerPenguin
Hi *,

I got this in dmesg

Code: Select all

at91_ohci 500000.ohci: failed to request gpio "overcurrent" IRQ
at91_ohci 500000.ohci: failed to request gpio "overcurrent" IRQ
After I added atmel,oc-gpio
(oc-gpio is not a node of ohci-at91.c; there is only atmel,oc", and wont work too)

Code: Select all

	usb0: ohci@500000 {
			num-ports = <2>;
			status = "okay";
			atmel,oc-gpio = <&pioA 27 GPIO_ACTIVE_LOW>;
		};
i got -1

Code: Select all

at91_ohci 500000.ohci: failed to request gpio "overcurrent" IRQ
how to get rid of the message. We have only one low active overcurrent for monitoring 2 ports

adding the pin twice wont work

regards,
PP

Re: USB overcurrent pins v4.14.11

Posted: Fri Jun 08, 2018 9:12 pm
by blue_z
PowerPenguin wrote:(oc-gpio is not a node of ohci-at91.c; there is only atmel,oc", and wont work too)
Why the confusion? The proper name is clearly specified in Documentation/devicetree/bindings/usb/atmel-usb.txt.

PowerPenguin wrote:i got -1
What???

PowerPenguin wrote:We have only one low active overcurrent for monitoring 2 ports
Besides a confusing post, you seem to have a board design that doesn't conform to the AT91 driver.
What does a single overcurrent sensor for two ports monitor (e.g. the sum of the currents)?
Your DT does not specify any GPIO to control the power, so what do you plan on doing when this overcurrent condition is active?

Regards

Re: USB overcurrent pins v4.14.11

Posted: Mon Jun 11, 2018 11:26 am
by PowerPenguin
We have only one host port and hardware luckily connected it to the right one (first of device tree)
I thought we have 2 host, but beneath the LAN cable and USB stick you could not see thats only one port.

this works if you only use the first.
usb0: ohci@500000 {
num-ports = <1>;
status = "okay";
atmel,vbus-gpio = <&pioA 29 GPIO_ACTIVE_LOW>;
atmel,oc-gpio = <&pioA 27 GPIO_ACTIVE_LOW>;
};