[U-Boot] Newbie SPL question for socfpga_sockit
George Broz
brozgeo at gmail.com
Fri Apr 8 01:51:28 CEST 2016
On 7 April 2016 at 16:36, Marek Vasut <marex at denx.de> wrote:
> On 04/08/2016 01:31 AM, George Broz wrote:
>> On 7 April 2016 at 13:39, Marek Vasut <marex at denx.de> wrote:
>>> On 04/07/2016 03:14 PM, George Broz wrote:
>>>> On 6 April 2016 at 19:05, Marek Vasut <marex at denx.de> wrote:
>>>>> On 04/07/2016 03:42 AM, George Broz wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>>>>> U-Boot SPL 2016.03 (Apr 05 2016 - 17:57:23)
>>>>>>>> drivers/ddr/altera/sequencer.c: Preparing to start memory calibration
>>>>>>>> drivers/ddr/altera/sequencer.c: CALIBRATION PASSED
>>>>>>>> drivers/ddr/altera/sequencer.c: Calibration complete
>>>>>>>> Trying to boot from MMC1
>>>>>>>>
>>>>>>>> First time that an SPL built from a recent version has run successfully
>>>>>>>> on that board.
>>>>>>>>
>>>>>>>> Will try it out on de0 tomorrow morning...
>>>>>>>
>>>>>>> This is great news, thanks!
>>>>>>
>>>>>> This patch also fixes the intermittent SDRAM calibration failures on my
>>>>>> de0_nano_soc board. Thanks so much!
>>>>>
>>>>> Great
>>>>>
>>>>>> Now with up-to-date versions of SPL and image... I have some
>>>>>> USB questions/news/observations:
>>>>>>
>>>>>> When using an OTG cable between USB port and mass storage
>>>>>> device, the de0_nano_soc board is able to detect and access some USB
>>>>>> sticks. The detection with these is almost immediate from when 'usb start'
>>>>>> is entered. If the same (working) USB stick is used with a non-OTG cable,
>>>>>> I get the timeout messages from before:
>>>>>>
>>>>>> dwc_otg_core_host_init: Timeout!
>>>>>> dwc_otg_core_host_init: Timeout!
>>>>>>
>>>>>> and this is true even if I add 'dr_mode = "host" '
>>>>>
>>>>> I don't think the driver supports the dr_mode property yet. Patch is
>>>>> welcome.
>>>>>
>>>>>> to the dts for usb1
>>>>>> of the de0
>>>>>> (and rebuild/reload). The older SPL/image that ships from the Terasic factory
>>>>>> detects USB sticks with a non-OTG cable, (the cable that ships with the unit).
>>>>>> What is the correct "expected" behavior here?? Is an OTG cable required or
>>>>>> not?
>>>>>
>>>>> The DWC2 driver tests the value of the OTG ID pin, so if you don't use
>>>>> OTG cable with correct ID pin setup, the host won't work.
>>>>>
>>>>>> Even with the OTG cable, some USB sticks "fail" in a not-so-great way.
>>>>>> I have a Kingston stick and the sequence goes like this:
>>>>>>
>>>>>> => usb reset
>>>>>> resetting USB...
>>>>>> USB0: Core Release: 2.93a
>>>>>> scanning bus 0 for devices...
>>>>>>
>>>>>> <<< 1 minute, 41 seconds pass before >>>
>>>>>> ... Device NOT ready
>>>>>> Request Sense returned 00 00 00
>>>>>>
>>>>>> <<< then another 24 seconds pass before >>>
>>>>>>
>>>>>> 2 USB Device(s) found
>>>>>>
>>>>>> It was able to read some information about the stick:
>>>>>>
>>>>>> => usb info
>>>>>> :
>>>>>> 2: Mass Storage, USB Revision 2.0
>>>>>> - Kingston DataTraveler SE9 0014857749E5ECB0173000D3
>>>>>> - Class: (from Interface) Mass Storage
>>>>>> - PacketSize: 64 Configurations: 1
>>>>>> - Vendor: 0x0930 Product 0x6545 Version 1.0
>>>>>> Configuration: 1
>>>>>> - Interfaces: 1 Bus Powered 200mA
>>>>>> Interface: 0
>>>>>> - Alternate Setting 0, Endpoints: 2
>>>>>> - Class Mass Storage, Transp. SCSI, Bulk only
>>>>>> - Endpoint 1 In Bulk MaxPacket 512
>>>>>> - Endpoint 2 Out Bulk MaxPacket 512
>>>>>>
>>>>>> BUT, the stick cannot be accessed otherwise, for example:
>>>>>>
>>>>>> => usb part 0
>>>>>> ## Unknown partition table type 0
>>>>>>
>>>>>>
>>>>>> Is there any feature of the USB stick that would indicate
>>>>>> whether or not it is "compatible" with u-boot?
>>>>>
>>>>> Can you do "dcache off" before you do "usb reset" and see if that fixes
>>>>> the problem ?
>>>>
>>>> The behavior is unchanged if "dcache off" done before "usb reset".
>>>
>>> Try with the attached patch (and probably with dcache off)
>>
>> The patch applied cleanly. The behavior is unchanged with both
>> dcache on and off. The "good" sticks still work, and "bad" sticks still don't.
>
> OK. Then I should probably go hunting for Kingston DataTraveler SE9,
> right ? Can you give me a link to the stick you have, so I know what
> crappy device to look for ? Thanks!
Here it is [1] - I have the 8GB version.
I think there will always be crappy sticks that don't work... but do you
have any advice as to what properties will/might generally cause a problem?
[1] http://www.amazon.com/Kingston-Digital-DataTraveler-DTSE9H-16GBZET/dp/B00DYQYITG
FYI - here is the verbose lsusb output for this particular device for
what it's worth:
Bus 001 Device 005: ID 0930:6545 Toshiba Corp. Kingston DataTraveler
102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0930 Toshiba Corp.
idProduct 0x6545 Kingston DataTraveler 102 Flash Drive /
HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
bcdDevice 1.00
iManufacturer 1 Kingston
iProduct 2 DataTraveler SE9
iSerial 3 0014857749E5ECB0173000D3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Best regards,
--George Broz
>
> Best regards,
> Marek Vasut
More information about the U-Boot
mailing list