AnsweredAssumed Answered

Troubleshooting/Initializing the PCIE up on imx6

Question asked by A Thomas on Feb 9, 2016
Latest reply on Oct 9, 2016 by Anuradha Ranasinghe

I am having trouble getting the PCIE up on the IMX6 and interfacing with a TW6869 Video IC and I cannot seem to find sufficient detail on how to setup HW/SW and get it configured to be able to use PCIE with the imx6q.  On the hardware side I see design notes on being able to CLK1_N/P pins C7/D7 for the clock references plus the standard PCIe bus pins and see that implemented on the Sabrelite reference designs but I am having trouble understanding what needs to be setup in software and how to ensure the hardware is properly functioning. The problem seems to be compounded by the pci-imx driver and associated 3rd party PCIe devices.

 

After enabling PCIe in my associated imx6qdl-customboard.dtsi (loosely based of the sabrelite dtsi) and imx6qdl.dtsi and building the Freescale PCI driver into the 3.10.53 Kernel I am using, I can see the driver attempt to load in syslog/dmesg, but it fails to initialize w/ the common error message that does not provide much context, seen here https://community.freescale.com/thread/366689 (there are multiple threads seeing the same issue). It is the same error people have reported on the Sabrelite/Boundary Devices boards with certain PCIe cards or when no card is available, see the comments on PCIe at https://boundarydevices.com/ubuntu-trusty-for-i-mx6-boards-june-2015-kernel-3-10-53/. I have replicated the issue on the Sabrelite when I do not have a PCIe card installed.

 

After reviewing imx6 forums I tried a number of things without any luck, including:

- Disabling MSI/MSI-X Interrupts in the kernel

- Increasing the sleeps in pci-imx.c

- Tried the pci-imx.c from the 4.3.5 Kernel

 

The Linux Kernel 4.3.5 version of the driver appeared to provide better error handling and improve initialization. The new driver built with little hassle on 3.10.53, but upon being loaded reported an invalid or missing clock. Investigating the driver more I saw the clock names appear hardcoded to the clocks in clks-imx6q.c and per this link, http://lists.infradead.org/pipermail/linux-arm-kernel/2014-March/243809.html, there has been a naming convention change (at least in the main line Linux). I am going to pull out the patch linked with the clocking name convention change, so the clocks it wants should be defined in mach-imx/clk-imx6q.c. But I cannot seem to put together sufficient information on how I should setup and configure the HW + kernel/device tree/driver to use PCIe with the imx6. I have been able to dig through design & data sheets, kernel, drivers, and device tree examples for the imx6 with decent success, but I can’t seem to bridge the gap on getting the PCIe to work.

 

Is there any additional insight/direction that I can try? I will find a yocto build that has the updated pci-imx driver, if my back port does not work.

Outcomes