USB not working

  • It's working here. I installed kernel and rootfs image again, just to be sure that I do not use another version here on my board.


    Does USB work in U-Boot?
    Do you connect stick or mouse directly or via USB hub?
    Did you install the standard rootfs or the minimal?
    UBIFS, JFFS2 or NFS?
    Have you tried a reboot?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hi,


    I have the same behaviour described by markus.


    Reboot does not change anything.
    I have directly (no Hub) connected different mice, on the standard ubi rootfs.


    I have not checked USB in uboot.


    HoBa

  • Can you both please check behaviour in U-Boot? Just plug in a USB stick and say

    Code
    1. usb start


    This scans the USB port and should find 1 storage device. If this works then we can exlude a hardware problem and must search for the problem in software. However if it doesn't work there either, then this might also be a hardware problem.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • I get the following answer:


    Code
    1. armStoneA8 # usb start
    2. (Re)start USB...
    3. USB: Register 1111 NbrPorts 1
    4. USB EHCI 1.00
    5. scanning bus for devices... 2 USB Device(s) found
    6. scanning bus for storage devices... 1 Storage Device(s) found
    7. armStoneA8 #


    The USB Mouse also worked with the Win CE image.


    The behaviour is the same in the standard and the minimal rootfs.


    HoBa

  • OK, no hardware malfunction.


    Check this USB stick in Linux. Does it work there? Is there a difference if you stop in U-Boot (press a key during the 3 seconds delay), activate USB in U-Boot ("usb start") and start Linux then (with "boot") or if you boot right through to Linux? Can you post the Linux boot messages? Probably we see a difference.


    If you plug in the mouse in U-Boot and say "usb start" and then "usb tree". Does the mouse appear in the tree?


    I can't do any further checks before Monday. I have two days vacation, only checking the forum from home right now where I have no boards and no development environment.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • OK, I will do the tests, without too much hurry.
    I think you and youur colleagues have done much work the last few weeks. So enjoy your vacation! For me it's OK to wait until monday.


    Attached you will find the messages that I get when I directly boot into linux without stopping in uboot.


  • Hello,


    I have done some test, following your recommendation.
    I booted into uboot.
    Connected a USB stick.
    usb start
    usb tree
    I could see the stick in the tree


    removed the stick plugged in the mouse
    usb reset
    usb tree
    nothing to see from the mouse


    removed the mouse plugged in the stick
    usb reset
    usb tree
    stick is back again


    removed the stick
    boot
    plugged in the stick again and watched the output of "tail -f /var/log/messages"


    stick is shown ( in short words )
    removed the stick
    saw the remove message in the messages


    plugged in the stick again and it was again shown in the messages


    Now the interresting thing:
    plugged in the mouse
    nothing happens
    removed the mouse
    nothing happens


    And now plugged plugged in the stick again:


    !! nothing happens !!


    This is can be reproduced.


    When I directly boot into linux the behaviour is the same, the usb stick works until I plug in the mouse than it seems as if the USB is dead.
    When I plug in the mouse in uboot nothing happens but after disconnecting the mouse usb is still working.
    So in both cases the behaviour is different, but the mouse nevers seems to work.


    HTH


    HoBa

  • Thanks for the tests. Is this a mouse with some special features? Maybe we have to activate some special mouse driver in Linux to make it work. We have only activated the standard HID devices. I always thought that even a very sophisticated mouse will also work with the standard driver. Of course it'll only present the basic functions (movement, three buttons) then, but it should generally work. But maybe this assumption is wrong. This mouse actually seems to hang up the USB system.


    Did you try stick and mouse on a USB hub already?


    On Monday I'll also do some testing with several plug-in and plug-out tests.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hi,


    Today at the morning I tested with a passive USB Hub and everything worked well, so far.
    I was able to mount the USB stick and the mouse worked fine.


    But this hub always communicats with 480 Mbit to the armstone. I have some 1.2 Hubs that can only do 12 Mbit. I will try them during the wekend and post the result here. Maybe the 12 Mbit cause the trouble.
    We will see.


    The tests had been done with a nornal three button mouse and the same happend with a standard keyboard.


    Best regards,
    HoBa

  • Hi,


    I encountered a similar problem with USB, mass storage worked, but the mice haven't been detected...


    My Solution: Since mice are (mostly) using lowspeed usb, which is not handled by EHCI, it is necessary to have also OHCI support. EHCI is passing lowspeed devices to the OHCI driver and everything should work.
    To do this, it is necessary to change the kernel .config: (make menuconfig)
    Device Drivers --->
    [*] USB support --->
    <*> OHCI HCD support
    [*] OHCI support for Samsung S5PV210 SoC Series


    Then, after typing "make" u get your new zImage in arch/arm/boot.


    (My gcc gave me first an error: "following symbols must have non local/private scope: fifo_mask" and refused building the zImage. Solution: arch/arm/plat-samsung/include/plat/uncompress.h Line 24: change to "unsigned int fifo_mask;" )


    Best regards
    Daniel

  • Hi all,


    OK, although I have read the above comment from Daniel, I will post the result of the test that I've done.
    The obvious result is that the mouse, keyboard and USB stick do not work when connected via a 12MBit Hub.
    With a 480MBit Hub everything works fine.


    HoBa

  • OK, we can verify the wrong behavior of USB mice, or low-speed and full-speed devices in general. They do work when using a high-speed hub, but not when connected directly.


    We ported both drivers, EHCI and OHCI, with the vague background knowledge that both drivers are needed. However when finally testing EHCI, everything worked with EHCI alone, even low-speed mice. So we wrongly assumed from this observation that newer EHCI drivers already include all OHCI features and a separate OHCI driver is not required anymore. So we switched off OHCI support in the default configuration. Bad idea as it shows now. By pure luck (or bad luck?) we always connected the mouse via the hub and here the hub does some speed conversion that we were not aware of. So behind the high-speed hub all devices show up as high-speed devices and the EHCI driver can talk to them, even to mice. But if connected directly to the board, it must be accessed as low-speed device and this still needs the OHCI driver. So from the view of the board we never actually tested a true low speed device that really needed OHCI.


    As Daniel already pointed out, enabling the two settings for OHCI and recompiling the kernel will work. We'll wait a few more days if other problems come up. And then we'll do a bugfix release 1.1 with a new kernel image where both, EHCI and OHCI are activated.


    Thanks to all of you for the testing and especially to Daniel for pushing our noses directly to the solution.


    daniel : By the way I did not get an error on fifo_mask. Can you give me some more info where building the kernel fails on your machine?


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • @FS Support regarding fifo_mask problem:
    I compiled the kernel with a codesourcery toolchain from 2008. This worked well, except this issue with the fifo_mask.
    Today I compiled the kernel with the toolchain downloaded from your site and it worked without any error. So this was some kind of compiler "bug" (or different handling of the C-Standard).


    Regarding the usb ehci ohci issue:
    Here <!-- m --><a class="postlink" href="http://www.mjmwired.net/kernel/Documentation/usb/ehci.txt">http://www.mjmwired.net/kernel/Document ... b/ehci.txt</a><!-- m --> and <!-- m --><a class="postlink" href="http://www.mjmwired.net/kernel/Documentation/usb/ohci.txt">http://www.mjmwired.net/kernel/Document ... b/ohci.txt</a><!-- m --> is some more general information about this 2 types of hostcontrollers, if anyone want to know more about it.


    Best regards
    Daniel

  • The same information is in the kernel source in Documentation/usb in ohci.txt and ehci.txt.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.