User Tools

Site Tools


Translations:
en

en:bpi-r2:otg

OTG

OTG is not yet working, page only created to save debug-steps with musb-driver merged in 5.7

https://github.com/frank-w/BPI-R2-4.14/tree/5.9-otg

kernel-options:

CONFIG_CONFIGFS_FS=y
#OTG
CONFIG_USB_CONN_GPIO=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_MEDIATEK=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_CONFIGFS=y
#CONFIG_USB_CONFIGFS_MASS_STORAGE=y
#CONFIG_PHY_MTK_TPHY=y
CONFIG_USB_GADGET=y
CONFIG_USB_MUSB_DUAL_ROLE=y
CONFIG_USB_INVENTRA_DMA=y

for dma-error i enabled

CONFIG_USB_INVENTRA_DMA=y

and additional for role-switch

CONFIG_USB_GADGET=y
CONFIG_USB_MUSB_DUAL_ROLE=y
mount -t configfs none /sys/kernel/config
cd /sys/kernel/config/usb_gadget
mkdir g1
cd g1
echo "0x0e8d" > idVendor
echo "0x2002" > idProduct
mkdir strings/0x409
echo "0123456789ABCDEF" > strings/0x409/serialnumber
echo "Mediatek Inc." > strings/0x409/manufacturer
echo "mass_storage gadget" > strings/0x409/product
mkdir functions/mass_storage.usb0
mkdir configs/c.1
mkdir configs/c.1/strings/0x409
ln -s functions/mass_storage.usb0/ configs/c.1
ls /sys/class/udc/
echo xxx > UDC 
en/bpi-r2/otg.txt · Last modified: 2020/11/29 16:24 by frank