I want to enable the USB gadget function, My config is : CONFIG_USB_GADGET=y CONFIG_USB_SUNXI_UDC0=y CONFIG_USB_GADGET_DUALSPEED=y CONFIG_USB_G_ANDROID=y CONFIG_USB_SUNXI_USB=y CONFIG_USB_SUNXI_USB_MANAGER=y CONFIG_USB_SUNXI_USB0_OTG=y CONFIG_USB_SUNXI_USB_DEBUG=y
in sys_config.fex [usbc0] usb_used = 1 usb_port_type = 2 usb_detect_type = 1 usb_id_gpio = port:PH11<0><1> usb_det_vbus_gpio = “axp_ctrl” usb_drv_vbus_gpio = port:power4<1><0><0> usb_restrict_gpio = usb_host_init_state = 0 usb_restric_flag = 0 usb_restric_voltage = 3550000 usb_restric_capacity= 5 usb_regulator_io = “vcc-usb0-33” usb_regulator_vol = 3300000 usb_not_suspend = 0
After build and pack, flash into emmc and reboot,
I can see log on console:
…
[ 3.030147] ------print_msc_config-----
[ 3.034404] vendor_id = 0x18d1
[ 3.038948] mass_storage_id = 0x1
[ 3.043223] adb_id = 0x2
[ 3.047478] usb_manufacturer_name = USB Developer
[ 3.052719] usb_product_name = Android
[ 3.057360] usb_serial_number = 20080411
[ 3.062117] msc_vendor_name = USB 2.0
[ 3.066758] msc_product_name = USB Flash Driver
[ 3.072287] msc_release = 100
[ 3.076542] serial_unique = 1
[ 3.080620] luns = 3
[ 3.084682] ---------------------------
[ 3.089125] udc sunxi_usb_udc: registering UDC driver [android_usb]
[ 3.096282] file system registered
[ 3.101049] gserial_setup: registered 4 ttyGS* devices
[ 3.107735] android_usb gadget: Mass Storage Function, version: 2009/09/11
[ 3.115399] android_usb gadget: Number of LUNs=3
[ 3.120542] lun0: LUN: removable file: (no medium)
[ 3.125956] lun1: LUN: removable file: (no medium)
[ 3.131390] lun2: LUN: removable file: (no medium)
[ 3.136805] android_usb gadget: I/O thread pid: 95
[ 3.142145] lun name: lun
[ 3.145061] lun name: lun1
[ 3.148068] lun name: lun2
[ 3.151441] android_bind, serial_unique = 1
[ 3.156085] get usb_serial_number success from boot command line
[ 3.162601] android_usb gadget: android_usb ready
But I can’t see anything on host PC with lsusb,
What else I missing ?