USB O1 Power switched off in Host mode

On Ixora board we connected the USBO1_ID pin to GND (JP2) to use the USB port in host mode.
If a device (pen drive, mouse,…) is connected during startup, everything works fine.
If the device is disconnected, some seconds later the USB power is switched off and it’s not possible to get it running again without disconnect + reconnect of JP2.

How can we get stable power on the USB? Is this a driver issue?


Which USB port are you using for your “pen drive, mouse,…”?

We use the OTG port and we pull the ID pin to GND (we want to use it as host only)
The same thing happens on our custom carrier board.

I’m going to try to repro this issue. What kind of adapter you are using to connect regular USB mouse/pen drive to OTG port?

I use the bottom connector of X8, but that’s not really relevant because the problem occurs when nothing is connected.
The LED3 (next to the connector) is switched on during boot (or after reconnect of JP2) and then off again.
It also happens with an unmodified CPU module (with the easy installer system).
In the appended video it’s an Apalis iMX6 Dual 512MB


Are you really using one of the V2.5Beta BSPs?

What is the Apalis HW version?

What is the U-Boot version? E.g. the output of ‘ver’ on the U-Boot console?

What is the kernel version? E.g. the ouput of ‘uname -a’ on the Linux console?

Can you provide the output of dmesg when you boot without a USB device connected? Around what time during boot the USBO1 power is switched off?

What exact changes did you make to the device tree files?


It also happens with other images. In the video above I use a completely unmodified SOM (easy installer running).
Also the current logs are from this device:
The Ixora board is a V1.1A, the SOM is an iMX2D 512MB V1,1B.

uname -a

Linux apalis-imx6 4.1.41-1.1.0+g82f0f4f #1 SMP Mon Aug 28 16:43:30 PDT 2017 armv7l GNU/Linux

U-Boot version:

U-Boot 2016.11-1.1.0+g51b53b4 (Sep 06 2017 - 15:19:08 -0700)
arm-oe-linux-gnueabi-gcc (Linaro GCC 6.2-2016.11) 6.2.1 20161016
GNU ld (GNU Binutils)

The time when the power is switched off, you can see in the video.

The same happens on the Apalis Evaluation Board Rev. 1.1.
I connected a cable with ID pin to the OTG port and after some seconds, the power is switched off if there is no device connected.


I could reproduce the issue with the 4.1 kernel you use.
This seems to be expected behaviour when the kernel is compiled with CONFIG_USB_OTG_FSM and the USB port is set in its otg role.
Note that in the latest kernel (4.9, as used in the 2.8 Beta xx images) we by default to not compile with that options.

So besides updating to 2.8 Beta 3 you could do either of:

Unselect CONFIG_USB_OTG_FSM in ‘make menuconfig’ (Drivers->USB) but keep CONFIG_USB_OTG selected and then recompile and deploy the kernel.

Change the device tree, so that the usbotg node defines the property dr_mode = "host";.

The first keeps the ability to change between the host / device role by the ID-pin / JP2 state. The second will use the port in host mode independent of the ID-pin signal.


Changing dr_mode to "host" works.