Closed johngebbie closed 1 year ago
Closing this as it's not really a "Guides" issue. However...
As far as I know "dtoverlay=dwc2" must be in config.txt. Without it A model Pi and zeros get the host only dwc driver. 2711 based Pi (4B and later) don't get the controller enabled at all.
Also AFAIK, the dtoverlay util on RPiOS cannot change the base device tree setup by the bootloader. It can load (and unload) additional overlays but I have not tested this with dwc2 and USB gadgets.
I can make no comment on that board nor on its support.
For one way to setup a USB gadget vis configfs (/sys/...) see https://github.com/thagrol/usb-gadget/blob/master/set_id.py
Hi thagrol. I'm writing a simple command for the the Rasperry Pi USB On-The-Go functionality, so you can do
echo "type Hello!" | gadget
and the like. I was wondering if it's possible to have the script configure everything at runtime, so you don't need to putdtoverlay=dwc2,dr_mode=peripheral
andmodules-load=dw2,g_hid
in the /boot files.I know there's
modprobe
and there seems to be adtoverlay
util on Rasperry Pi Os but not elsewhere (my Pi is on Void Linux). I also found this page, where (right at the bottom) they use the /sys file system: https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/guides/dt-overlays.md.htmlHere's my little project is here if you're interested: https://git.sr.ht/~geb/gadget