Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: anthonym on March 05, 2015, 06:58:51 PM

Title: A20 SOM USB Mass storage (Solved)
Post by: anthonym on March 05, 2015, 06:58:51 PM
Hi All,

I am trying to get the g_mass_storage USB gadget working so I can access the contents of the SD card via a PC.

I have managed to get it working by including the relevant bits in the kernel and then;

insmod /lib/modules/3.4.102/kernel/drivers/usb/gadget/g_mass_storage.ko file=/dev/mmcblk0p1 stall=0

This seems to work fine except the USB only enumerates the 2nd time it is connected on a given boot. This seems to be port specific so for example with a 4 port usb hub;

1st connection to Port 1 - Nothing
2nd connection to Port 1 - Working
1st connection to Port 2 - Nothing
2nd connection to Port 2 - Working
etc
etc

Once it has worked with a given port it will continue to function (if unplugged and re-plugged) until the A20 is rebooted and then it needs to be plugged in twice again in order to get it working.

Anyone got any ideas?

Thanks
Title: Re: A20 SOM USB Mass storage
Post by: Gerrit on March 06, 2015, 01:23:43 AM
Not any help but i noticed the same with the A10 and A13 so not specific for the A20 SOM
Title: Re: A20 SOM USB Mass storage
Post by: anthonym on March 06, 2015, 11:22:22 AM
Thanks for the reply.

Maybe an Olimex / Sunxi USB OTG driver issues then.

Anybody else had any issues using the OTG port?

Cheers
Title: Re: A20 SOM USB Mass storage
Post by: anthonym on March 06, 2015, 02:06:13 PM
Fixed it, changing the usb_port_type to 0 in the script.bin makes the device detected first time every time.

Not a problem for this project as the USB OTG port is always a device port.

Must be a problem in the OTG driver somewhere.