On Sun, 27 Nov 2022 01:28:30 -0800 (PST)
Artem Komissarov <
artem...@gmail.com> wrote:
Hi Artem,
> I apologize in advance if this has been brought up before or discussed, I'm
> new here and did not find it in the previous posts.
> I'm working on a port of PiKVM to Orange Pi (PC in this case) among other
> SBC's and having an issue running multiple USB gadgets (config-fs) at the
> same time. The most i can seem to run is Keyboard(HID)+Mouse(HID)+ either
> USB Ethernet or MSD. If i try to do USB Ethernet and MSD the UDC crashes
> and nothing works. This is on Armbian BTW, and I'm wondering if there is a
> limit to how many USB gadget devices you can run on Allwinner chips
Yes, there is a hardware limit in the Allwinner implementation of the MUSB
USB controller. The H3 only supports four endpoints (most other
Allwinner SoCs can do five), each with an RX and FX FIFO. So depending on
how much resources your gadget needs, you run out very quickly. For
instance you will be limited to just two serial gadgets, since the normal
one requires three streams (bulk in, bulk out, control), which consumes
two endpoints.
If you dig deeper into the USB setup, it should say somewhere how many
resources your gadgets use, I bet you run into the limit here.
Cheers,
Andre