This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

66AK2H14: Linux USB device not functional

Part Number: 66AK2H14


We are not able to get the USB bus working with 66AK2H. The bus does not show up in Linux. Drivers should be in place. It works in u-boot. Which Linux kernel drivers and parameters are exactly required for a USB memory stick, i.e. mass storage? Nothing else required. Source, SDK: linux-4.19.59+gitAUTOINC+5f8c1c6121-g5f8c1c6121 (cdns3 is not included in the build.) root@unit2:~# lsusb unable to initialize libusb: -99 root@unit2:~# ls -l /sys/bus/usb/devices/ total 0 root@unit2:~# root@unit2:~# ls -l /sys/bus/usb/drivers total 0 drwxr-xr-x 2 root root 0 Mar 16 2020 hub drwxr-xr-x 2 root root 0 Mar 16 2020 usb drwxr-xr-x 2 root root 0 Mar 16 2020 usb-storage drwxr-xr-x 2 root root 0 Mar 16 2020 usbfs root@unit2:~# Kernel config: (some extra included but should not matter.) CONFIG_USB_NET_DRIVERS=y CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_SUPPORT=y CONFIG_USB_COMMON=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_DEFAULT_PERSIST=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_STORAGE=y CONFIG_EXTCON_USB_GPIO=y Syslog: Dec 2 22:18:12 unit2 kernel: [ 3.488470] usbcore: registered new interface driver usbfs Dec 2 22:18:12 unit2 kernel: [ 3.488624] usbcore: registered new interface driver hub Dec 2 22:18:12 unit2 kernel: [ 3.488715] usbcore: registered new device driver usb Dec 2 22:18:12 unit2 kernel: [ 10.350028] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver Dec 2 22:18:12 unit2 kernel: [ 10.356783] usbcore: registered new interface driver usb-storage
  • Somehow newlines got deleted. Let's try again: We are not able to get the USB bus working with 66AK2H. The bus does not show up in Linux. Drivers should be in place. It works in u-boot. Which Linux kernel drivers and parameters are exactly required for a USB memory stick, i.e. mass storage? Nothing else required. Source, SDK: linux-4.19.59+gitAUTOINC+5f8c1c6121-g5f8c1c6121 (cdns3 is not included in the build.) root@unit2:~# lsusb unable to initialize libusb: -99 root@unit2:~# ls -l /sys/bus/usb/devices/ total 0 root@unit2:~# root@unit2:~# ls -l /sys/bus/usb/drivers total 0 drwxr-xr-x 2 root root 0 Mar 16 2020 hub drwxr-xr-x 2 root root 0 Mar 16 2020 usb drwxr-xr-x 2 root root 0 Mar 16 2020 usb-storage drwxr-xr-x 2 root root 0 Mar 16 2020 usbfs root@unit2:~# Kernel config: (some extra included but should not matter.) CONFIG_USB_NET_DRIVERS=y CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_SUPPORT=y CONFIG_USB_COMMON=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_DEFAULT_PERSIST=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_STORAGE=y CONFIG_EXTCON_USB_GPIO=y Syslog: Dec 2 22:18:12 unit2 kernel: [ 3.488470] usbcore: registered new interface driver usbfs Dec 2 22:18:12 unit2 kernel: [ 3.488624] usbcore: registered new interface driver hub Dec 2 22:18:12 unit2 kernel: [ 3.488715] usbcore: registered new device driver usb Dec 2 22:18:12 unit2 kernel: [ 10.350028] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver Dec 2 22:18:12 unit2 kernel: [ 10.356783] usbcore: registered new interface driver usb-storage
  • For some reason this forum deletes all newlines.
  • Re-posting to see if the newline issue is fixed:

    We are not able to get the USB bus working with 66AK2H.The bus does not show up in Linux. Drivers should be in place. It works in u-boot.

    Which Linux kernel drivers and parameters are exactly required for a USB memory stick, i.e. mass storage? Nothing else required.

    Source, SDK: linux-4.19.59+gitAUTOINC+5f8c1c6121-g5f8c1c6121 (cdns3 is not included in the build.) 

    root@agib:~# lsusb
    unable to initialize libusb: -99
     
    root@agib:~# ls -l /sys/bus/usb/devices/
    total 0
     
    root@agib:~# ls -l /sys/bus/usb/drivers 
    total 0
    drwxr-xr-x 2 root root 0 Mar 16  2020 hub
    drwxr-xr-x 2 root root 0 Mar 16  2020 usb
    drwxr-xr-x 2 root root 0 Mar 16  2020 usb-storage
    drwxr-xr-x 2 root root 0 Mar 16  2020 usbfs
     
    Kernel config:  (some extra listed below but should not matter.)
    CONFIG_USB_NET_DRIVERS=y
    CONFIG_USB_OHCI_LITTLE_ENDIAN=y
    CONFIG_USB_SUPPORT=y
    CONFIG_USB_COMMON=y
    CONFIG_USB_ARCH_HAS_HCD=y
    CONFIG_USB=y
    CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
    CONFIG_USB_DEFAULT_PERSIST=y
    CONFIG_USB_XHCI_HCD=y
    CONFIG_USB_EHCI_HCD=y
    CONFIG_USB_EHCI_TT_NEWSCHED=y
    CONFIG_USB_STORAGE=y
    CONFIG_EXTCON_USB_GPIO=y
     
    Syslog:
    Dec  2 22:18:12 agib kernel: [    3.488470] usbcore: registered new interface driver usbfs
    Dec  2 22:18:12 agib kernel: [    3.488624] usbcore: registered new interface driver hub
    Dec  2 22:18:12 agib kernel: [    3.488715] usbcore: registered new device driver usb
    Dec  2 22:18:12 agib kernel: [   10.350028] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    Dec  2 22:18:12 agib kernel: [   10.356783] usbcore: registered new interface driver usb-storage
    

  • Hi,

    The kernel has USB enabled by default and you shouldn't need to configure anything more. I happened to try the USB on K2H last week for the other thread using prebuilt images from PLSDK release (either 6.0 or 6.1/Kernel 4.19.38 or Kernel 4.19.59). 

    https://e2e.ti.com/support/processors/f/791/t/889895

    The "lsusb" shows the following result, and I had Centon Electronics USB drive plugged in.

    root@k2hk-evm:~# lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 002: ID 111d:1001
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Rex

  • Thank you for help.

    Our kernel is almost the same as the SDK, regarding usb, except it is missing usb/cdns3. Device tree is the same for usb.

    If I try to merge cdns3 from SDK, compilation fails to some trace_ extension macros. Hard to fix.

    Anyway, I think cdns3 should not be needed for usbfs and usb-storage. Is it required?

    In our kernel, there are modifications for srio and rionet. I can't see how these could affect usb.

    (lots of useless drivers but tried to keep identical to SDK)
    Mar 16 06:10:24 unit2 kernel: [    3.492404] usbcore: registered new interface driver usbfs
    Mar 16 06:10:24 unit2 kernel: [    3.492477] usbcore: registered new interface driver hub
    Mar 16 06:10:24 unit2 kernel: [    3.492595] usbcore: registered new device driver usb
    Mar 16 06:10:24 unit2 kernel: [   10.441958] usbcore: registered new interface driver smsc95xx
    Mar 16 06:10:24 unit2 kernel: [   10.448321] keystone-dwc3 2680000.usb: Runtime PM disabled, clock forced on.
    Mar 16 06:10:24 unit2 kernel: [   10.480309] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    Mar 16 06:10:24 unit2 kernel: [   10.492370] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    Mar 16 06:10:24 unit2 kernel: [   10.504401] usbcore: registered new interface driver cdc_acm
    Mar 16 06:10:24 unit2 kernel: [   10.510109] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    Mar 16 06:10:24 unit2 kernel: [   10.518373] usbcore: registered new interface driver usb-storage
    Mar 16 06:10:24 unit2 kernel: [   10.524576] usbcore: registered new interface driver cp210x
    Mar 16 06:10:24 unit2 kernel: [   10.530337] usbserial: USB Serial support registered for cp210x
    Mar 16 06:10:24 unit2 kernel: [   10.536452] usbcore: registered new interface driver ftdi_sio
    Mar 16 06:10:24 unit2 kernel: [   10.542379] usbserial: USB Serial support registered for FTDI USB Serial Device
    Mar 16 06:10:24 unit2 kernel: [   10.549860] usbcore: registered new interface driver option
    Mar 16 06:10:24 unit2 kernel: [   10.555584] usbserial: USB Serial support registered for GSM modem (1-port)
    Mar 16 06:10:24 unit2 kernel: [   10.562711] usbcore: registered new interface driver pl2303
    Mar 16 06:10:24 unit2 kernel: [   10.568438] usbserial: USB Serial support registered for pl2303
    Mar 16 06:10:24 unit2 kernel: [   10.574566] usbcore: registered new interface driver usbtest
    Mar 16 06:10:24 unit2 kernel: [   10.668607] usbcore: registered new interface driver usbhid
    Mar 16 06:10:24 unit2 kernel: [   10.674236] usbhid: USB HID core driver


    Kernel messages:

    Mar 16 06:10:24 unit2 kernel: [   15.725145] dwc3 2690000.dwc3: Failed to get clk 'ref': -2
    (should not matter?)

    Mar 16 06:10:24 unit2 kernel: [   15.876976] dwc3 2690000.dwc3: failed to initialize core

    drivers/usb/dwc3/core.c :
    dwc3_core_init() :
    -> dwc3_core_get_phy() fails

    fails here:
         if (node) {
            dwc->usb2_phy = devm_usb_get_phy_by_phandle(dev, "usb-phy", 0);
            dwc->usb3_phy = devm_usb_get_phy_by_phandle(dev, "usb-phy", 1);
         }
    ...
          if (IS_ERR(dwc->usb2_phy)) {
              ret = PTR_ERR(dwc->usb2_phy);
          if (ret == -ENXIO || ret == -ENODEV) {
              dwc->usb2_phy = NULL;
          } else if (ret == -EPROBE_DEFER) {
    =>     return ret;  (goes here)
          }

    Any ideas?

  • You definitely need dwc3. Please take a look at the keystone.dtsi and usb/dwc3/dwc3-keystone.c. I will have to check where the cdns is used, at least that is not the IP driver for K2H USB.

    Rex