Hi,

On 23-06-15 11:55, Philippe Fouquet wrote:
Some more test:
I use:
kernel : https://github.com/jwrdegoede/linux-sunxi.git
branch : sunxi-wip
board : Olinuxino-20-Micro-4Go

kernel is configuring with gadget HID compelling into the kernel


But I would like to use the USB otg but it fail
I din't have error in kernel output, musb-hdrc.1.auto is loading without
error.

If I check exaction class I can see that cable is correctly detected, can I
see on /sys/class/extcon/extcon0/state the USB and USB_HOST switch
correctly, but after that nothing more
In device mode the host have a error like "is having trouble enumerating a
USB device that has been plugged in"

Thanks for taking this to the list.

My first guess would be that you're not loading any gadget drivers,
the musb code will not do anything (not even work in host mode) until
a gadget driver has been registered, you write you're building the
HID gadget into the kernel, but building gadget drivers into
the kernel does not work due to a module load ordering problem
(a fix for this is pending for 4.2 or 4.3 I believe).

I use this in rc.local to get a serial connection between the board
and my workstation over the otg connection:

insmod /root/libcomposite.ko
insmod /root/u_serial.ko
insmod /root/usb_f_acm.ko
insmod /root/g_serial.ko

(I've the modules in /root as my kernel build script just copies over
these 4, since make modules_install is SLOW).

After you do this you should see 2 kernel messages like this:

[   35.939663] g_serial gadget: Gadget Serial v2.4
[   35.948814] g_serial gadget: g_serial ready

And if you then plug in an usb-mini-b to usb-a cable with
the a end plugged into your workstation, on the board you should
get:

[  114.291738] g_serial gadget: high-speed config #2: CDC ACM config

And on your workstation a /dev/ttyACM0 should show up, and if you
start a getty on /dev/ttyGS0 on the board, you can log in to the
board via the serial gadget.

The above logs come from me just trying this on my cubietruck with
my sunxi-wip branch.

I suggest you first give this a try, if this works, it is a just a
matter of figuring out how to get things to work with the HID gadget
instead.

Regards,

Hans

--
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to