Multiple USB gadgets

Hi. I am trying to configure multiple USB gadget emulation through the ConfigFS. It works when I create an ECM network device and an ACM serial port. But when I add a MIDI device, the ECM device fails. There is a kernel crash report in the logs and the complaint: dwc2_hsotg_ep_enable: No suitable fifo found.

Did I hit some hardware limit or can this be fixed by some configurations (e.g. DTB modification of the FIFO sizes)?

1 Like

I have successfully added the enc28j60 wired ethernet interface to my Zero, which seems a better solution than the USB network device, but I still wonder whether more than two USB gadget configurations could be created.

I guess it goes down to the following FIFO configuration of usb@ff400000 in the DTS:

 g-rx-fifo-size = <0xc0>;
 g-np-tx-fifo-size = <0x80>;
 g-tx-fifo-size = <0x80 0x80 0x10 0x10 0x10>;

Maybe mainly the last line with two larger and three smaller size definitions? It seems these numbers can be adjusted to some degree, as long as the sum is below some maximal limit of the hardware capacity. I suppose lowering some values in order to increase the others is possible, but it may affect the performance, of course.

Hi @wanthalf, can I ask how you add the enc28j60 Module into Zero? I have tried to use dtc to compile the meson-g12a-spi-b-enc28j60.dts, but it’s not working. The Syntax errors are endless, I think I may have made a mistake in the compilation process. How do you compile the dts. into your Zero?

Hi @Enoch_Lee , the hint was given by Yuntian in this message: Using an enc28j60 on the zero But I understand it may be difficult to understand unless you know how C includes work.
But I think I have already seen the precompiled DTB overlays in the later images from Radxa. Are they not there yet?

Hi @wanthalf, thanks for your reply!!! Which Image are you referring to? I’m using the Image Debian Buster from, I only found spi-meson-g12a-spi-spidev.dtbo in overlay.

Yeah, the confusing mess of different images… the Debian Buster images really include just a limited choice of overlays. The “radxa ubuntu” images seem to be the most up-to-date images with the widest choice of overlays precompiled. However, last time I checked, those images were broken by default and did’t even boot until a redundant (broken) configuration file was removed (or fixed) from the boot partition (see in this thread).