All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Lehner" <stefan-lehner@aon.at>
To: "'Russell King - ARM Linux admin'" <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Subject: AW: SA-1111 USB OHCI driver (Jornada 720) - overcurrent condition
Date: Mon, 17 Feb 2020 10:19:48 +0100	[thread overview]
Message-ID: <001701d5e573$675c9c60$3615d520$@at> (raw)
In-Reply-To: <20200211162439.GJ25745@shell.armlinux.org.uk>

>Well, it seems this has never been tested properly.  The SA1111 docs
>say:
>
>• USB_PWR_SENSE - This is a dedicated active high input which is
>normally used for sensing port over current fault conditions on
>the USB power supply. ...
>
>So, if it is tied high, then by default it is indicating an over-
>current condition.  There is, however, a bit that can be used to
>invert this signal, bit 6 of reset register.  The code does this:
>
>        unsigned int usb_rst = 0;
>...
>        if (machine_is_xp860() ||
>            machine_is_assabet() ||
>            machine_is_pfs168() ||
>            machine_is_badge4())
>                usb_rst = USB_RESET_PWRSENSELOW | USB_RESET_PWRCTRLLOW;
>
>        /*
>         * Configure the power sense and control lines.  Place the USB
>         * host controller in reset.
>         */
>        writel_relaxed(usb_rst | USB_RESET_FORCEIFRESET | USB_RESET_FORCEHCRESET,
>                      dev->mapbase + USB_RESET);
>
>So, bit 6 is left unset on Jornada 720, and hence this issue.
>
>You probably also need to investigate whether the USB_PWRCNTL signal
>is also active high or active low, and consider whether the setting
>for that signal is also correct.  If USB_RESET_PWRCTRLLOW is set,
>then USB_PWRCTRL=low is supposed to turn _on_ the power.

Thank you for your reply! 
You are absolutely right. With my wiring, according to the "StrongARM® SA-1111 Development Module Schematics" the power sense and control line has to be configured as active low. Sadly it does not work as expected...
The machine powers up the USB port and sometimes recognizes a USB device. But it is not mountable/accessible:

[  258.644698] usb 1-1: new full-speed USB device number 2 using sa1111-ohci
[  264.104687] usb 1-1: device descriptor read/64, error -110
[  269.774809] usb 1-1: unable to read config index 0 descriptor/start: -110
[  269.819320] usb 1-1: can't read configurations, error -110
[  270.054718] usb 1-1: new full-speed USB device number 3 using sa1111-ohci
[  280.728528] usb 1-1: New USB device found, idVendor=090c, idProduct=1000
[  280.772179] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  280.815679] usb 1-1: Product: USB DISK
[  280.857967] usb 1-1: Manufacturer: SMI Corporation
[  280.900261] usb 1-1: SerialNumber: AA04012700007537
[  281.310530] usb-storage 1-1:1.0: USB Mass Storage device detected
[  281.390081] scsi host0: usb-storage 1-1:1.0
[  281.434343] usbcore: registered new interface driver usb-storage
[  283.065640] scsi 0:0:0:0: Direct-Access     USB      Flash Disk       1100 PQ: 0 ANSI: 0 CCS
[  300.646937] sd 0:0:0:0: [sda] 15858688 512-byte logical blocks: (8.12 GB/7.56 GiB)
[  300.800529] sd 0:0:0:0: [sda] Write Protect is off
[  300.845434] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[  301.095147] sd 0:0:0:0: [sda] No Caching mode page found
[  301.095183] sd 0:0:0:0: [sda] Assuming drive cache: write through


Sometimes there are only errors like these:
[  175.554707] usb 1-1: new full-speed USB device number 2 using sa1111-ohci
[  180.884999] usb 1-1: device descriptor read/all, error -110
[  181.124717] usb 1-1: new full-speed USB device number 3 using sa1111-ohci
[  192.144682] usb 1-1: device not accepting address 3, error -110
[  192.384697] usb 1-1: new full-speed USB device number 4 using sa1111-ohci
[  197.525621] usb 1-1: unable to read config index 0 descriptor/all
[  197.569172] usb 1-1: can't read configurations, error -110
[  197.804709] usb 1-1: new full-speed USB device number 5 using sa1111-ohci
[  208.544679] usb 1-1: device not accepting address 5, error -110
[  208.586685] usb usb1-port1: unable to enumerate USB device

Tested with different (working) flash drives.
I dont know if this is a Kernel/driver problem or hardware related. I tested the 5V line to the usb port and there is no voltage drop or excessive current drawn.

lsusb output:
Bus 001 Device 003: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Regards
Stefan



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-02-17  9:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 12:27 SA-1111 USB OHCI driver (Jornada 720) - overcurrent condition Stefan Lehner
2020-02-11 16:24 ` Russell King - ARM Linux admin
2020-02-17  9:19   ` Stefan Lehner [this message]
2020-02-27 16:15     ` AW: " Stefan Lehner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001701d5e573$675c9c60$3615d520$@at' \
    --to=stefan-lehner@aon.at \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.