USB OTG wired as host not hotplugging

Dear Toradex,

we are experiencing the same issue as in USB Host Port Suspend/Resume Hot-Plugging Issue - NXP Community.

We don’t see any activity when we hotplug the USB port (normally OTG on the Dahlia carrier board) which we have wired and configured in the device tree to be a host.

Do you know of any solution to this issue?

James

Hi @jrsharp67 , Is it the Verdin iM8M Mini or iMX8M Plus? What is the version of Linux BSP installed on your module?

Hi Benjamin,

it is the Verdin iM8MM Q 2GB IT (which I assume is the mini). This is the version information from bitbake:

BB_VERSION = “1.46.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “aarch64-tdx-linux”
MACHINE = “verdin-imx8mm”
DISTRO = “tdx-xwayland”
DISTRO_VERSION = “5.7.0-devel-20220821225404+build.0”
TUNE_FEATURES = “aarch64”
TARGET_FPU = “”
meta-toradex-nxp = “HEAD:ee63c90fde9fde0229bff9ac1c5cffe356fc4f41”
meta-freescale = “HEAD:3cb29cff92568ea835ef070490f185349d712837”
meta-freescale-3rdparty = “HEAD:c52f64973cd4043a5e8be1c7e29bb9690eb4c3e5”
meta-toradex-tegra = “HEAD:f5753af4a5b9d33f0f474b320a74c2e29a66ec39”
meta-toradex-bsp-common = “HEAD:029a663150449a5e71b84dd4000476754d525c8c”
meta-oe
meta-filesystems
meta-gnome
meta-xfce
meta-initramfs
meta-networking
meta-multimedia
meta-python = “HEAD:8ff12bfffcf0840d5518788a53d88d708ad3aae0”
meta-freescale-distro = “HEAD:5d882cdf079b3bde0bd9869ce3ca3db411acbf3b”
meta-toradex-demos = “HEAD:ce3c1925df34b4d299b2dd1003ced41b9485ce41”
meta-qt5 = “HEAD:5ef3a0ffd3324937252790266e2b2e64d33ef34f”
meta-toradex-distro = “HEAD:cbde0286cb85bc445e70210b8df38f29b4784c08”
meta-poky = “HEAD:7e0063a8546250c4c5b9454cfa89fff451a280ee”
meta = “HEAD:add860e1a69f848097bbc511137a62d5746e5019”

James

Hi @jrsharp67 , have you tried this workaround?

Workaround: Add power-domains = <&usb_otg2_pd>; property to &usbphynop2 node in the device tree.

Thanks Benjamin,

I’ll try it out. NB: hot plug does work if I bring up the USB hub sitting on the other port, after a reboot.

Hi Benjamin,

the power domains work around you mention didn’t seem to fix the problem.

As mentioned, Hotplugging works if I enable the downstream hub (a Microchip USB5826C) and reboot. Then linux correctly finds the hub and hotplugging on the other port (OTG on the Dahlia carrier board but wired as a host on our custom hardware) starts working.

I guess the solution is to enable the hub (via i2c commands) in a u-boot script, so that the hub is up by the time linux boots.

James

Hi James, thanks for your information. Please allow me to ask more questions so I can understand it better.

Hotplugging works if I enable the downstream hub (a Microchip USB5826C) and reboot.

Is USB5826C wired to OTG X3 on Dahlia? How is this downstream hub enabled? For example, by I2C command. Is USB5826C still enabled after a reboot if you don’t explicitly enable it again?

Then linux correctly finds the hub and hotplugging on the other port (OTG on the Dahlia carrier board but wired as a host on our custom hardware) starts working.

Do you mean hotplugging work on USB5826C which is wired to OTG X3 on Dahlia?

Hi Benjamin,

Is USB5826C wired to OTG X3 on Dahlia? How is this downstream hub enabled? For example, by I2C command. Is USB5826C still enabled after a reboot if you don’t explicitly enable it again?

So I refer to Dahlia carrier board rev 1.0. On this carrier board, USB2 goes to a hub chip, and USB1 is an OTG port. On our custom hardware, USB2 goes to the USB5826C, USB1 is wire as a host.

I enable the hub using i2c. This particular hub chip (USB5826C) will detect presence of i2c pull ups and stay in an “SMBus configuration mode” until a command is sent to exit configuration and boot its firmware. It survives a linux (warm) reboot.

Do you mean hotplugging work on USB5826C which is wired to OTG X3 on Dahlia?

I mean I can hotplug USB1 (and ports on hub hanging off USB2) when the hub chip is enabled. When the hub chip is still in “SMBus configuration mode”, I cannot hotplug USB1.

Hi James, thanks. I checked your company purchase history. And I now know the whole picture. Dahlia V1.0C is one of our 1st generation Verdin products. Verdin iM8M Mini V1.1 is 2nd generation product. This combination has limitations, for example, only BSP 5.1.0 quarterly release and older are supported. You can find the detail here. Do you have any chance to test it on one of 2nd Gen. Verdin carrier boards?

Hi Benjamin,

we don’t have the problem on the carrier board, but on our custom hardware, for our product. We don’t own any 2nd gen Verdin carrier boards.

James

Hi James, I think USB5826C requires a driver complementing the I2C configuration, something like this. But I don’t find an existing one for USB5826C.

Hi Benjamin,

we can roll our own driver, but it’s probably easier to boot the hub in the bootloader, so it is available to the bootloader for use there too.

James