Udc error while enabling g_mass_storage module

Hi Team,

I am working with kernel 4.14, debian build and 820 SoM,

#insmod g_mass_storage.ko
getting this error "udc-core: couldn’t find an available UDC - added [g_mass_storage] to list of pending drivers"

I am trying to operate in usb mass storage mode and getting above error. How to resolve this?

@Loic

Thanks,
Arun

That’s fine, it means that kernel waits for the port to switch in device mode.
What happens at kernel level when connecting a host to your board?

Is it a public SBC? on DB820C, the USB2.0 uB connector is not an OTG connector (ID pin 4 floating), but a standard device connector. The Board can then only work as a device on uB port, and act as a host on the other USB3 A connectors. Depending on your board, you may have to customize the device tree to handle switching between device/host mode (via e.g. ‘id-gpio’ and ‘vbus-gpio’). Cannot say much without schematics.

@Loic

Thanks for the reply.

able to resolve the error and operate in device mode with id-gpio change, but dynamic switch between Host mode and device mode not happening at run time. What changes are needed to switch between Host mode and device mode(using 4.14 kernel).

Thanks,
Arun