APU2 Internal USB Headers Not Working

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

APU2 Internal USB Headers Not Working

Sam Vaughan
I'm unable to see USB devices connected to the internal USB headers on
a PC Engines APU2c2 board.  The same devices work as expected when
connected to the external USB ports.

I have a TinyCore Linux USB stick handy that I used to update the
board's firmware.  If I boot it and run `lsusb` then I can see my
devices using all of the internal and external USB headers/ports.

So it would seem that the internal headers are wired up and working,
but for some reason I can't use them via ehci.  Note that that the
external USB ports are USB3, so devices appear via xhci.  It could
therefore be a wider issue with ehci on this board.

I've included as much detail as I know how to find below.  If anyone
has any ideas for things I can try to make this work I'd be very
pleased to hear them.

Sam


Host: PC Engines APU2c2 running OpenBSD 6.0, then TinyCore Linux 6.4.
Test device: FTDI Basic USB to Serial board.

- - - - OpenBSD dmesg - - - -

$ dmesg | egrep -i 'hci|hub|usb'
xhci0 at pci0 dev 16 function 0 "AMD Bolton xHCI" rev 0x11: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "AMD xHCI root hub" rev 3.00/1.00 addr 1
ahci0 at pci0 dev 17 function 0 "AMD Hudson-2 SATA" rev 0x40: apic 4 int 19,
AHCI 1.3
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
ehci0 at pci0 dev 19 function 0 "AMD Hudson-2 USB2" rev 0x39: apic 4 int 18
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "AMD EHCI root hub" rev 2.00/1.00 addr 1
uhub2 at uhub1 port 1 "Advanced Micro Devices product 0x7900" rev 2.00/0.18
addr 2

- - - - OpenBSD, FTDI on internal J11 USB header (EHCI) - - - -

$ usbdevs -vd
Controller /dev/usb0:
addr 1: super speed, self powered, config 1, xHCI root hub(0x0000),
AMD(0x1022), rev 1.00
  uhub0
 port 1 disabled
 port 2 disabled
 port 3 disabled
 port 4 disabled
Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
AMD(0x1022), rev 1.00
  uhub1
 port 1 addr 2: high speed, self powered, config 1, product 0x7900(0x7900),
Advanced Micro Devices(0x0438), rev 0.18
   uhub2
  port 1 powered
  port 2 powered
  port 3 powered
  port 4 powered
 port 2 powered

- - - - OpenBSD, FTDI on external USB port (xHCI) - - - -

$ usbdevs -vd
Controller /dev/usb0:
addr 1: super speed, self powered, config 1, xHCI root hub(0x0000),
AMD(0x1022), rev 1.00
  uhub0
 port 1 disabled
 port 2 disabled
 port 3 addr 2: full speed, power 90 mA, config 1, FT232R USB UART(0x6001),
FTDI(0x0403), rev 6.00, iSerialNumber A8004w2k
   uftdi0
 port 4 disabled
Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
AMD(0x1022), rev 1.00
  uhub1
 port 1 addr 2: high speed, self powered, config 1, product 0x7900(0x7900),
Advanced Micro Devices(0x0438), rev 0.18
   uhub2
  port 1 powered
  port 2 powered
  port 3 powered
  port 4 powered
 port 2 powered

- - - - OpenBSD pcidumps - - - -

$ doas pcidump -v 0:16:0
 0:16:0: AMD Bolton xHCI
        0x0000: Vendor ID: 1022 Product ID: 7814
        0x0004: Command: 0006 Status: 0010
        0x0008: Class: 0c Subclass: 03 Interface: 30 Revision: 11
        0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size:
10
        0x0010: BAR mem 64bit addr: 0x00000000feb22000/0x00002000
        0x0018: BAR empty (00000000)
        0x001c: BAR empty (00000000)
        0x0020: BAR empty (00000000)
        0x0024: BAR empty (00000000)
        0x0028: Cardbus CIS: 00000000
        0x002c: Subsystem Vendor ID: 1022 Product ID: 1410
        0x0030: Expansion ROM Base Address: 00000000
        0x0038: 00000000
        0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 00 Max Lat: 00
        0x0050: Capability 0x01: Power Management
                State: D0
        0x0070: Capability 0x05: Message Signaled Interrupts (MSI)
        0x0090: Capability 0x11: Extended Message Signaled Interrupts (MSI-X)
        0x00a0: Capability 0x10: PCI Express

$ doas pcidump -v 0:19:0
 0:19:0: AMD Hudson-2 USB2
        0x0000: Vendor ID: 1022 Product ID: 7808
        0x0004: Command: 0006 Status: 02b0
        0x0008: Class: 0c Subclass: 03 Interface: 20 Revision: 39
        0x000c: BIST: 00 Header Type: 00 Latency Timer: 40 Cache Line Size:
10
        0x0010: BAR mem 32bit addr: 0xfeb25400/0x00000100
        0x0014: BAR empty (00000000)
        0x0018: BAR empty (00000000)
        0x001c: BAR empty (00000000)
        0x0020: BAR empty (00000000)
        0x0024: BAR empty (00000000)
        0x0028: Cardbus CIS: 00000000
        0x002c: Subsystem Vendor ID: 1022 Product ID: 7808
        0x0030: Expansion ROM Base Address: 00000000
        0x0038: 00000000
        0x003c: Interrupt Pin: 01 Line: 00 Min Gnt: 00 Max Lat: 00
        0x00c0: Capability 0x01: Power Management
                State: D0
        0x00e4: Capability 0x0a: Debug Port

- - - - Linux dmesg - - - -

# dmesg | egrep -i 'hci|hub|usb' | cut -c16-
pci 0000:00:11.0: set SATA to AHCI mode
ACPI: bus type USB registered
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ahci 0000:00:11.0: version 3.0
ahci 0000:00:11.0: AHCI 0001.0300 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp fbs pio slum part
scsi0 : ahci
scsi1 : ahci
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-pci 0000:00:13.0: EHCI Host Controller
ehci-pci 0000:00:13.0: new USB bus registered, assigned bus number 1
ehci-pci 0000:00:13.0: applying AMD SB700/SB800/Hudson-2/3 EHCI dummy qh
workaround
ehci-pci 0000:00:13.0: debug port 2
ehci-pci 0000:00:13.0: irq 18, io mem 0xfeb25400
ehci-pci 0000:00:13.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
uhci_hcd: USB Universal Host Controller Interface driver
usbcore: registered new interface driver uas
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver ums-alauda
usbcore: registered new interface driver ums-cypress
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums_eneub6250
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-isd200
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-karma
usbcore: registered new interface driver ums-onetouch
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
usbcore: registered new interface driver ums-usbat
usbcore: registered new interface driver appletouch
usbcore: registered new interface driver bcm5974
usbcore: registered new interface driver synaptics_usb
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usb 1-1: new high-speed USB device number 2 using ehci-pci
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
xhci_hcd 0000:00:10.0: xHCI Host Controller
xhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2
xhci_hcd 0000:00:10.0: irq 77 for MSI/MSI-X
xhci_hcd 0000:00:10.0: irq 78 for MSI/MSI-X
xhci_hcd 0000:00:10.0: irq 79 for MSI/MSI-X
xhci_hcd 0000:00:10.0: irq 80 for MSI/MSI-X
xhci_hcd 0000:00:10.0: irq 81 for MSI/MSI-X
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
xhci_hcd 0000:00:10.0: xHCI Host Controller
xhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 3
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pci 0000:00:14.7: SDHCI controller found [1022:7813] (rev 1)
mmc0: SDHCI controller on PCI [0000:00:14.7] using ADMA
usb 2-1: new high-speed USB device number 2 using xhci_hcd
usb-storage 2-1:1.0: USB Mass Storage device detected
scsi4 : usb-storage 2-1:1.0

- - - - Linux, FTDI on internal J11 USB header (EHCI) - - - -

usb 1-1.1: new full-speed USB device number 3 using ehci-pci

# lsusb
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd
FT232 USB-Serial (UART) IC
Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

# lsusb -v -s 1:3

Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd
FT232 USB-Serial (UART) IC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0403 Future Technology Devices International, Ltd
  idProduct          0x6001 FT232 USB-Serial (UART) IC
  bcdDevice            6.00
  iManufacturer           1 FTDI
  iProduct                2 FT232R USB UART
  iSerial                 3 A8004w2k
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               90mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              2 FT232R USB UART
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 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     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

- - - -

Reply | Threaded
Open this post in threaded view
|

Re: APU2 Internal USB Headers Not Working

Stuart Henderson
On 2016-10-06, Sam Vaughan <[hidden email]> wrote:
> $ dmesg | egrep -i 'hci|hub|usb'

Please don't trim things. Full dmesg, full pcidump (preferably -vxx).
Or better, run sendbug as root which includes acpi tables in the mail
it produces (the latter is not presently working in -current, but since
you're running 6.0 you won't run into that).

Reply | Threaded
Open this post in threaded view
|

Re: APU2 Internal USB Headers Not Working

Sam Vaughan
In reply to this post by Sam Vaughan
> > $ dmesg | egrep -i 'hci|hub|usb'
>
> Please don't trim things. Full dmesg, full pcidump (preferably -vxx).
> Or better, run sendbug as root which includes acpi tables in the mail
> it produces (the latter is not presently working in -current, but since
> you're running 6.0 you won't run into that).

Sorry.  I was trying to keep the noise down and wasn’t sure that it
qualified as a bug.  Will know for next time.  Full report posted just
now using sendbug.

Thanks Stuart,

Sam