configfs-gadget dwc3 failed to start

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

configfs-gadget dwc3 failed to start

Jump to solution
5,292 Views
ankitpanchal167
Contributor III

Hi

I am try to create configfs-gadget  with USB dwc3.

I create gadget  usb_f_fs driver and create gadget structure. it's successfully registered. 

but UDC dwc3 not started its fail every time.

below showing error

root@imx8mp:/run/usb/config/usb_gadget/g1# echo 38100000.dwc3 > UDC
[ 320.941377] configfs-gadget 38100000.dwc3: failed to start g1: -19

 

below My gadget config steps

 

read_model
modprobe libcomposite
mkdir -p /run/usb/config
mount none /run/usb/config -t configfs
cd /run/usb/config/usb_gadget/
mkdir g1
cd g1
echo 0x1600 >idVendor

echo 0x0030 >idProduct

mkdir strings/0x409
echo "0000000000" >strings/0x409/serialnumber
echo "XYZ" >strings/0x409/manufacturer

echo "product1" >strings/0x409/product

mkdir configs/c.1
mkdir configs/c.1/strings/0x409
echo "Config1" >configs/c.1/strings/0x409/configuration

mkdir functions/ffs.usb0
ln -s functions/ffs.usb0 configs/c.1
cd ../../../
mkdir -p ffs
mount usb0 ffs -t functionfs -o gid=1000,uid=1000

echo 38100000.dwc3 > UDC

 

 
 

it's UDC not success fully bind with gadget attach code snap 

dev_dbg(&udc->dev, "registering UDC driver [%s]\n",
driver->function);
udc->driver = driver;
udc->dev.driver = &driver->driver;
udc->gadget->dev.driver = &driver->driver;

usb_gadget_udc_set_speed(udc, driver->max_speed);

ret = driver->bind(udc->gadget, driver);
if (ret)
{
goto err1;
}
 

 

Tags (1)
0 Kudos
1 Solution
5,276 Views
ankitpanchal167
Contributor III

Any one please update me any thing i missing?  

View solution in original post

0 Kudos
3 Replies
1,423 Views
CoreshR
Contributor I

Do you find a solution to that problem?

0 Kudos
1,424 Views
CoreshR
Contributor I

Hi. did you find a  solution to that?

0 Kudos
5,277 Views
ankitpanchal167
Contributor III

Any one please update me any thing i missing?  

0 Kudos