Hi
i am try to enable configfs gadget using usb_f_fs.ko with imx8mp
kernel version : 5.4
below My gadget configuration.
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
i am using ffs-test utility for test and it's able to endpoint. but after write UDC and connect with ubuntu os geting disabled event.
also test with windows its not geting any event ya response
below attach logs with ubuntu os
root@imx8mp:/run/usb/ffs# ~/ffs-test_magic_v2 64 &
[1] 1139
root@imx8mp:/run/usb/ffs#
ffs-test: info: ep0: writing descriptors (in v2 format)
ffs-test: info: ep0: writing strings
ffs-test: dbg: ep1: starting
ffs-test: dbg: ep2: starting
ffs-test: info: ep1: starts
ffs-test: info: ep0: starts
ffs-test: info: ep2: starts
root@imx8mp:/run/usb/ffs# echo 38100000.dwc3 > ../config/usb_gadget/g1/UDC
Event BIND
root@imx8mp:/run/usb/ffs# [ 483.832965] configfs-gadget gadget: full-speed config #1: c
Event DISABLE
below attach logs with windows os
root@imx8mp:/run/usb/ffs# ~/ffs-test_magic_v2 64 &
[1] 1139
root@imx8mp:/run/usb/ffs#
ffs-test: info: ep0: writing descriptors (in v2 format)
ffs-test: info: ep0: writing strings
ffs-test: dbg: ep1: starting
ffs-test: dbg: ep2: starting
ffs-test: info: ep1: starts
ffs-test: info: ep0: starts
ffs-test: info: ep2: starts
root@imx8mp:/run/usb/ffs# echo 38100000.dwc3 > ../config/usb_gadget/g1/UDC
Event BIND
Solved! Go to Solution.
Can you see what happened in kernel log?
Hi
It's descriptor issue now its resolved
Thanks