I found some directions that might help.
Enabling USB-C OTG Device Mode :
Ensure the Linux device has a USB-C port that supports OTG functionality.
In the device tree, set the dr_mode
property of the USB OTG controller to "peripheral" or "otg" to enable device mode.
Configure the TUSB320 USB-C controller (or equivalent) to operate in UFP (Upstream Facing Port) mode, which allows the device to act as a USB peripheral.
Configuring USB Gadget Drivers :
Load the appropriate Linux USB gadget driver for the desired functionality, such as g_ether
for Ethernet over USB, g_serial
for a serial device, etc.
Manually configure the USB network interface, such as assigning an IP address to usb0
.
Connecting to a Host :
Use a USB-C to USB-C or USB-C to USB-A cable to connect the Linux device in OTG device mode to a host PC.
The host PC should then detect the Linux device as a USB peripheral, allowing file transfer, network connectivity, or other functionality depending on the configured gadget driver.