Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,037 Views

USB MASS STORAGE on SoCKit

Hello, 

 

I cannot get the USB2.0 OTG port on my Altera SoCKit board (from Terasic), running Linux 3.18.20, to detect USB mass storage devices. The USB OTG port is running in Host mode.  

 

I've done the following: 

 

- enabled usb1 in the device tree in the socfpga_cyclone_5_sockit.dts: 

&usb1 { 

status = "okay" 

}; 

 

Enabled options in the kernel:  

 

- Device Drivers->  

[*]USB Support 

- Device Drivers->  

[*]USB Support-> 

[*] Support for Host-side USB 

- Device Drivers->  

[*]USB Support-> 

[*] USB Announce new devices 

- Device Drivers->  

[*]USB Support-> 

[*] xHCI HCD (USB3.0) support (tried w&w/o) 

- Device Drivers->  

[*]USB Support-> 

[*] EHCI HCD (USB2.0) support 

- Device Drivers->  

[*]USB Support-> 

[*] Generic EHCI driver for a platform device 

- Device Drivers->  

[*]USB Support->[M] OHCI HCD (USB 1.1) support 

- Device Drivers->  

[*]USB Support->[M] OHCI HCD (USB 1.1) support -> [M] Generic OHCI for platform device 

- Device Drivers->  

[*]USB Support-> 

[*] USB Mass Storage support 

- Device Drivers->  

[*]USB Support-> 

[*] USB Mass Storage verbose debug 

 

- Device Drivers->  

[*]USB Support-> 

[*] DesignWare USB3 DRD Core Support (Host only mode) (tried w&w/o) 

- Device Drivers->  

[*]USB Support-> 

[*] DesignWare USB2 DRD Core Support (Host only mode) 

 

- Device Drivers->  

[*]USB Support-> 

[*] USB Physical Layer Drivers 

- Device Drivers->  

[*]USB Support-> 

[*] USB Physical Layer Drivers-> 

[*] NOP USB Transceiver Driver 

 

- Device Drivers->  

[*] SCSI Device Support 

- Device Drivers->  

[*] legacy /proc/scsi/ support 

- Device Drivers->  

[*] SCSI disk support 

 

In dmesg on boot - I see: 

[ 1.680781] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 

[ 1.687554] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 

[ 1.694752] usb usb1: Product: DWC OTG Controller 

[ 1.699436] usb usb1: Manufacturer: Linux 3.18.20PLAIN-USB dwc2_hsotg 

[ 1.705855] usb usb1: SerialNumber: ffb40000.usb 

 

and this corresponds to lsusb output:# lsusb 

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 

 

But if I plug in a USB stick (via adapter cable) neither lsusb or fdisk list the device. 

 

If I stop uboot during autoboot, it has no problem seeing the usb stick and its contents through the same adapter cable via the uboot usb command subset. That being said it would seem I'm missing some kernel configuration option... can anybody suggest what I might be missing? 

 

 

Thanks in advance! 

George Broz 

Moog Industrial Group
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
158 Views

maybe you can try to play with this? nay some steps had missed out at your side. 

 

http://rocketboards.org/foswiki/view/projects/sockitlinarolinuxdesktop 

 

seems like also using the terasic and with usb 2.0 port.
Altera_Forum
Honored Contributor I
158 Views

FYI - for anyone else needing USB mass storage to work. 

 

I thought "dr_mode" was "host" by default for backwards compatibility. I was wrong. It's needed (socfpga_cyclone_5_sockit.dts): 

&usb1 { 

status = "okay" 

dr_mode = "host" 

}; 

 

In addition, one other driver was needed: 

- device drivers-> [*]usb support->[*] usb attached scsi  

 

Some other options were not needed, leaving me with: 

 

- Device Drivers-> [*]USB Support 

- Device Drivers-> [*]USB Support->[*] Support for Host-side USB 

- Device Drivers-> [*]USB Support->[*] USB Announce new devices 

- Device Drivers-> [*]USB Support->[*] EHCI HCD (USB2.0) support 

- Device Drivers-> [*]USB Support->[*] EHCI HCD (USB2.0) support->[*] Root Hub Transaction Translators 

- Device Drivers-> [*]USB Support->[*] EHCI HCD (USB2.0) support->[*] Improved Transaction Translator scheduling 

 

- Device Drivers-> [*]USB Support->[*] USB Mass Storage support 

 

- Device Drivers-> [*]USB Support->[*] DesignWare USB2 DRD Core Support (Host only mode) 

 

- Device Drivers-> [*]USB Support->[*] USB Physical Layer Drivers 

- Device Drivers-> [*]USB Support->[*] USB Physical Layer Drivers->[*] NOP USB Transceiver Driver 

 

- Device Drivers-> [*] SCSI Device Support 

- Device Drivers-> [*] legacy /proc/scsi/ support 

- Device Drivers-> [*] SCSI disk support 

 

 

With these options in place fdisk sees the USB stick and partitions on it can be mounted. 

 

Have fun! 

George Broz 

Moog Industrial Group
Reply