Device connected to USB port is not detected

Hello,

I connected the board to my desktop through USB (J4). Ubuntu is running in my desktop. After connecting, I checked for ‘lsusb’ and it does not list the board.

Am I missing something?

Thanks

I connected the board to my desktop through USB (J4). Ubuntu is running in my desktop. After connecting, I checked for ‘lsusb’ and it does not list the board.

Am I missing something?

Depends what you expect it to do.

J4 is mostly for programming the board; and to put it into programming
mode you need to hold down certain keys during power on. I think it
is possible to run it as a USB gadget whilst Debian is running but you
would have to configure this yourself. It won’t do that out of the box.

Did you press and hold (for a while) the (-) S4 button while powering-up the board?
I suppose you’re trying to re-flash the board via “fastboot method”.

Hi all,

I’m looking at using the db820c as a usb gadget/peripheral too.

in theory this can be tested using a modprobe g_ether/g_serial/g_audio …

That’s for sure feasible since aboot is using it for this purpose.

There is patches that have been posted on linux-arm-msm by codeaurora folks.
It seems dts change are required as well as a new dwc3-qcom driver for vbus detection.
Some usb phy related patch may be required too.

After Applying all these patch, usb peripheral mode is still failing so I may miss something.

If @vgautam is around maybe he can help to find a git test branch to enable the usb2 as a peripheral mode, on top of the linaro 4.14 release.

Regards,
Julien

Hi Julien: You should be able to use the micro USB port on the 820c as a USB gadget. I did something similar with the 410c board so that I could run it headless (no display). My instructions are at developer.qualcomm.com/MLH although these instructions were for the 410c board, they should work for the 820c board.

Full disclosure: I am currently unemployed and looking for work.

Hi Ijking,

Yes basically it should be as simple thant pluging the micro usb cable to my usb host computer,
and running modprobe g_ether on the target.

But the usb support of the DB820c is not ready for peripheral support.

what I see from my computer is that the target doesn’t enumerate


kernel: usb 1-1.4: new high-speed USB device number 5 using ehci-pci

kernel: usb 1-1.4: device descriptor read/64, error -110
kernel: usb 1-1.4: device descriptor read/64, error -71

kernel: usb 1-1.4: device not accepting address 8, error -71
kernel: usb 1-1-port4: unable to enumerate USB device

When looking at dwc3 ‘gadget.c’ driver I noticed that the IRQ callback is
never raised (dwc3_interrupt, dwc3_thread_interrupt)

So there is something missing in 4.14 linaro kernel to make it works.
Either dwc3 patch, usb-phy, dts, regulator ?

Julien

Hi,

Thank you for the response.

I am trying to see if I can connect to the board if I install adb daemon for debian.

Thanks.

@Julien
@sharvin

I am looking for the same. Any progress in this?

Thanks,
Arun

Hi Arun,

A lot of patches land in the kernel since the last year.

dwc3-qcom, extcon management, and patches regarding dwc3 gadget driver.

Now you can almost boot a vanilla Linux 5.1 on db820c,
the only things you have to patch is to revert ee5e41b5f21a5438664effce1ba5bdd11e03ee24
arm64/io: Allow I/O writes to use {W,X}ZR.

AFAIK discussion about this patch are still going on on linux-arm-msm mailing list.

Please test with this kernel.

Regards,
Julien

@Julien

Thanks for the reply.
I am working on 4.14 kernel and debian build with 820 SoM.
ee5e41b5f21a5438664effce1ba5bdd11e03ee24 is reverted and trying to operate 820 SoM in usb peripheral mode.
lsusb on host mache not detecting 820 SoM as usb peripheral device

do I need to enable any modules/configurations/dts entries?

Thanks,
Arun

Arun,

My advice is to use at least kernel 4.19+, which is the first one to work with usb peripheral, this is how I solved my issue.

Please test the 5.1 as I said, and then if it works up to your choice to find the commits you need for backporting 4.14, or forward porting your work on top of 5.1.

I choosed myself the second choice.

Julien

Hi @Arunkumar

Take a look at the db820c schematic here https://github.com/96boards/documentation/blob/master/consumer/dragonboard/dragonboard820c/hardware-docs/files/db820c-schematics.pdf On page 30 of 44 you can see the micro USB connector on the right, and a switch in the middle of the page that enables Emergency Down Load (EDL) mode.

Depending on the state of the switch the micro USB connector is either connected to port USB2, or port USB3.

Which state do you have the switch in?

-Lawrence-

Hello Lawrence,

Thanks for the reply.
I am working on 820 SoM custom board. Currently able to operate target in Host mode. To operate in device/peripheral mode and use it as mass storage what are dts changes, drivers to enable(I am using kernel 4.14, Debian build)?

As per my understanding in Android, drivers/usb/gadget/android.c driver used to enable ADB and Mass storage mode.

@ljking
Thanks,
Arun