USB3.0 Not working with imx7d

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB3.0 Not working with imx7d

1,583 Views
koilarulraj
Contributor II

Hi,

We have custom board with imx7d and TI TUSB7320 USB3.0 controller connected on PCIe. The USB controller is not getting listed with lspci command.
We haved checked that,
 1. PCI Clock from the processor side is coming correctly.
 2. PCI Ref clock is coming correctly.
 3. Reset(PERST#), Wakup(WAKE#) and GRST# are configured correctly to their required state.
 4. Checked that external oscillator frequency in the TUSB7320 USB3.0 controller is 48Mhz.


We also referred the NXP FORUM regarding questions about TUSB7320 USB3.0 controller. Everybody could at least able to list the PCI USB controller using lspci command. But in our case we couldn't able to do it. Kindly guide us resolve this. Also if possible please share us any reference design that we can check interfacing imx7d and TI TUSB7320 USB3.0 controller.

We got the following debug kernel messages about PCI during boot,

[    0.354425] PCI: CLS 0 bytes, default 64
[    0.536323] OF: PCI: host bridge /soc/pcie@0x33800000 ranges:
[    0.536342] OF: PCI:   No bus range found for /soc/pcie@0x33800000, using [bus 00-ff]
[    0.536368] OF: PCI:    IO 0x4ff80000..0x4ff8ffff -> 0x00000000
[    0.536385] OF: PCI:   MEM 0x40000000..0x4fefffff -> 0x40000000
[    0.741938] imx6q-pcie 33800000.pcie: phy link never came up
[    0.741956] imx6q-pcie 33800000.pcie: DEBUG_R0: 0x0000bc43, DEBUG_R1: 0x08000000
[    0.741965] imx6q-pcie 33800000.pcie: Link never came up
[    0.741977] imx6q-pcie 33800000.pcie: PHY DEBUG_R0=0x00004a03 DEBUG_R1=0x08000000
[    0.745095] imx6q-pcie 33800000.pcie: failed to initialize host
[    0.745292] imx6q-pcie: probe of 33800000.pcie failed with error -110
[    1.910751] ehci-pci: EHCI PCI platform driver

The lspci command gives no response as follows,

root@imx7d-2gb:~# lspci -v
root@imx7d-2gb:~#

We are using,
  1. Custom board with iMX7D processor.
  2. Kernel Version - 4.9.11
  3. Latest yocto BSP.

Thanks,
Koil Arul Raj.S

Labels (1)
0 Kudos
5 Replies

1,287 Views
igorpadykov
NXP Employee
NXP Employee

Hi Koil

what about other pcie cards, were they detected, in general one can look at suggestions on

Question, PCIe on i.MX7D SABRE cannot work 

https://community.nxp.com/message/831465 

recommended to try nxp linux from source.codeaurora.org/external/imx repository:

linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,287 Views
koilarulraj
Contributor II

Hi igor,

We are directly interfaced the PCI signals from the iMX7d processor to the TI TUSB7320 USB3.0 controller chip. So it is not possible for us to try other pci cards in our board. But with same software we could able to list "MPEXUSB3S22B" pci usb card on the other iMX7d based custom board.

Regarding the recommended source.codeaurora.org/external/imx repository, I attached the PCIe host controller driver used in our source. Both the driver don't have much difference except additional support is added in our driver to handle "clk_enable_gpio" in various conditions. Using the PCIe host controller driver from the recommended repository makes our board boot process to hang.

We enabled  xHCI driver in kernel.
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_XHCI_PLATFORM=y

The lsusb command gives us the following result,

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


But due to the USB7320 USB3.0 not detected, there is no 3.0 root hub is found.

Thanks,
Koil Arul Raj.S

0 Kudos

1,287 Views
igorpadykov
NXP Employee
NXP Employee

Hi Koil

one can start with new board not soldering TUSB7320

and perform PCIe testing with https://community.nxp.com/docs/DOC-333261 

Best regards
igor

0 Kudos

1,287 Views
koilarulraj
Contributor II

Hi Igor,

Now we could able to enumerate PCI usb card with few hardware reworks. The lspci command gives us the following output.

root@imx7d# lspci
00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01)
01:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)

But the xHCI host controller drivers are not properly loaded. The debug messages while booting are given as follows,

[    1.888273] xhci_hcd 0000:01:00.0: enabling bus mastering
[    1.888291] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.892282] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    1.929749] xhci_hcd 0000:01:00.0: Host not halted after 16000 microseconds.
[    1.935504] xhci_hcd 0000:01:00.0: can't setup: -19
[    1.939090] xhci_hcd 0000:01:00.0: USB bus 1 deregistered
[    1.943262] xhci_hcd 0000:01:00.0: init 0000:01:00.0 fail, -19

On debugging we found that, in xhci_handshake() function present in xhci.c file throws error ENODEV(-19).


I have enabled following options in the kernel,
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_XHCI_PLATFORM=y

What are the essential conditions we need to make sure both in hardware and software to properly initialize the xhci driver? What could be the reason for the above stated error?

Kindly help us to resolve this issue.

Thanks,
Koil Arul Raj.S

0 Kudos

1,287 Views
igorpadykov
NXP Employee
NXP Employee

Hi Koil

reason may be that there are no TUSB73x0 drivers in used linux version,

suggest to apply to ti support for suitable TUSB73x0 drivers.

Best regards
igor

0 Kudos