Raspberrypi4 USB-C type host mode setting
I want use USB hub on USB type C port.
The result is success. ^^
Now I can use host mode and power also can use through hub to raspberrypi.

$sudo modprobe -r dwc2 && sudo dtoverlay dwc2 dr_mode=host && sudo modprobe dwc2

one more thing.
If you want setting on booting time. you can add to /boot/config.txt
dtoverlay=dwc2,dr_mode=host
good luck~~
ref : https://www.raspberrypi.org/forums/viewtopic.php?t=246348
Regardless of whether or not you have done this, you can switch into device mode in the shell as root:
Code: Select all
modprobe -r dwc2 && dtoverlay dwc2 dr_mode=peripheral && modprobe dwc2
At this point, you can load the gadget of your choice. When you are done, remove, the gadget driver, and you can switch back to host mode:
Code: Select all
modprobe -r dwc2 && dtoverlay dwc2 dr_mode=host && modprobe dwc2