Hi to All,
I am trying to use USB OTG on A20-Olinuxino-Lime2-eMMC with own build of Armbian 5.11, U-Boot 2016.05--rec1, mainline kernel 4.5.2 and Debian Jessie without success. I have tested:
I have verified the HW is working fine as 'host' and 'device' with
latest Olimex image with Debian Jessie and kermel 3.4.103.
Some time ago I have also tested it to work with Armbian 5.07 and kernel
3.4.111 (with modified fex file).
I have also verify that device tree seams
to be o.k. according to posts in this forum.
In the boot messages USB OTG is recognized by sunxi musb driver but
usb0-vbus is finally disabled.
There are few confusing messages as well:
[ 3.254996] reg-fixed-voltage usb0-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800 usb0_vbus_pin@0, deferring probe
[ 3.255033] reg-fixed-voltage usb1-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb1_vbus_pin@0, deferring probe
[ 3.255067] reg-fixed-voltage usb2-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb2_vbus_pin@0, deferring probe
[ 3.257948] usbcore: registered new interface driver usbfs
[ 3.258023] usbcore: registered new interface driver hub
[ 3.258127] usbcore: registered new device driver usb
[ 3.369469] sun4i-usb-phy 1c13400.phy: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb0_id_detect_pin@0, deferring probe
...
[ 3.846532] usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 3.847087] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 3.847109] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 5
[ 3.847554] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.847569] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.847579] usb usb5: Product: MUSB HDRC host driver
[ 3.847588] usb usb5: Manufacturer: Linux 4.5.2-sunxi musb-hcd
[ 3.847598] usb usb5: SerialNumber: musb-hdrc.1.auto
[ 3.848439] hub 5-0:1.0: USB hub found
[ 3.848513] hub 5-0:1.0: 1 port detected
[ 3.877070] usb0-vbus: disabling
I have also verified usb0_id_det and usb0_vbus_det wotk fine as inputs (cat /sys/kernel/debug/gpio)
GPIOs 0-287, platform/1c20800.pinctrl, 1c20800.pinctrl:
gpio-50 ( |sysfs ) in hi
gpio-67 ( |ahci-5v ) out hi
gpio-81 ( |usb0-vbus ) out lo
gpio-87 ( |sysfs ) out lo
gpio-88 ( |sysfs ) out hi
gpio-225 ( |cd ) in hi IRQ
gpio-226 ( |? ) out hi
gpio-227 ( |usb2-vbus ) out hi
gpio-228 ( |usb0_id_det ) in hi IRQ
gpio-229 ( |usb0_vbus_det ) in lo IRQ
gpio-230 ( |usb1-vbus ) out hi
In this situation USB OTG enumeration try was registered at both sides but finished with error (probably because of support lack).
Please, help me to find a solution.
Best regards
Chris
root@egpr:~# cat /boot/config-4.5.2-sunxi | grep CONFIG_USB_MUSB_HDRC
CONFIG_USB_MUSB_HDRC=y
root@egpr:~# cat /boot/config-4.5.2-sunxi | grep CONFIG_USB_MUSB_SUNXI
CONFIG_USB_MUSB_SUNXI=y
root@egpr:~# CONFIG_NOP_USB_XCEIV^C
root@egpr:~# cat /boot/config-4.5.2-sunxi | grep CONFIG_NOP_USB_XCEIV
CONFIG_NOP_USB_XCEIV=y
root@egpr:~# cat /boot/config-4.5.2-sunxi | grep CONFIG_USB_GADGET
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=200
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
# CONFIG_USB_GADGET_XILINX is not set
CONFIG_USB_GADGETFS=m
# CONFIG_USB_GADGET_TARGET is not set
CONFIG_USB_GPIO_VBUS=y