Unable to use PCIe

      Unable to use PCIe

      Hello,
      I'm using the latest fs-net kernel for the ArmStone A9 and tried to enable PCIe in "make menuconfig". This is my kernel config regarding PCIe support:

      Source Code

      1. # linux-4.1.15-fsimx6-V3.0 % cat .config | grep PCI
      2. CONFIG_MIGHT_HAVE_PCI=y
      3. CONFIG_PCI_QUIRKS=y
      4. CONFIG_PCI=y
      5. CONFIG_PCI_DOMAINS=y
      6. CONFIG_PCI_DOMAINS_GENERIC=y
      7. CONFIG_PCI_SYSCALL=y
      8. CONFIG_PCI_MSI=y
      9. # CONFIG_PCI_DEBUG is not set
      10. # CONFIG_PCI_REALLOC_ENABLE_AUTO is not set
      11. # CONFIG_PCI_STUB is not set
      12. CONFIG_PCI_ATS=y
      13. CONFIG_PCI_IOV=y
      14. CONFIG_PCI_PRI=y
      15. CONFIG_PCI_PASID=y
      16. # PCI host controller drivers
      17. CONFIG_PCIE_DW=y
      18. CONFIG_PCI_IMX6=y
      19. # CONFIG_PCI_IMX6_COMPLIANCE_TEST is not set
      20. # CONFIG_PCI_HOST_GENERIC is not set
      21. # CONFIG_PCI_LAYERSCAPE is not set
      22. # CONFIG_PCIE_IPROC is not set
      23. CONFIG_PCIEPORTBUS=y
      24. CONFIG_PCIEAER=y
      25. # CONFIG_PCIE_ECRC is not set
      26. # CONFIG_PCIEAER_INJECT is not set
      27. CONFIG_PCIEASPM=y
      28. # CONFIG_PCIEASPM_DEBUG is not set
      29. CONFIG_PCIEASPM_DEFAULT=y
      30. # CONFIG_PCIEASPM_POWERSAVE is not set
      31. # CONFIG_PCIEASPM_PERFORMANCE is not set
      32. CONFIG_PCIE_PME=y
      33. CONFIG_OF_ADDRESS_PCI=y
      34. CONFIG_OF_PCI=y
      35. CONFIG_OF_PCI_IRQ=y
      36. # CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
      37. # CONFIG_PATA_CMD640_PCI is not set
      38. # CONFIG_MWIFIEX_PCIE is not set
      39. # CONFIG_SERIO_PCIPS2 is not set
      40. # CONFIG_I2C_DESIGNWARE_PCI is not set
      41. # CONFIG_I2C_PXA_PCI is not set
      42. # CONFIG_SPI_PXA2XX_PCI is not set
      43. # PCI GPIO expanders
      44. # PCI-based Watchdog Cards
      45. # CONFIG_PCIPCWATCHDOG is not set
      46. # CONFIG_WDTPCI is not set
      47. # CONFIG_MFD_RTSX_PCI is not set
      48. # CONFIG_TTPCI_EEPROM is not set
      49. # CONFIG_MEDIA_PCI_SUPPORT is not set
      50. CONFIG_SND_PCI=y
      51. # CONFIG_SND_CMIPCI is not set
      52. # CONFIG_SND_YMFPCI is not set
      53. CONFIG_USB_EHCI_PCI=y
      54. CONFIG_USB_CHIPIDEA_PCI=y
      55. # CONFIG_MMC_SDHCI_PCI is not set
      56. # CONFIG_MMC_TOSHIBA_PCI is not set
      57. # CONFIG_DW_DMAC_PCI is not set
      58. # CONFIG_HSU_DMA_PCI is not set
      59. # CONFIG_VIRTIO_PCI is not set
      60. CONFIG_GENERIC_PCI_IOMAP=y


      Unfortunately, lspci doesn't show anything and I already tried different cards. This is the dmesg output:

      Source Code

      1. # dmesg | grep -i pci
      2. PCI: CLS 0 bytes, default 64
      3. ehci-pci: EHCI PCI platform driver


      I'm not sure how to get it working ...
      Best regards,
      Jonas
      Dear Jonas,

      the PCIe interface is not activated in the DeviceTree so if you want to use PCIe you have to activate the driver and activate the device in the DeviceTree. To activate the Device navigate to the DeviceTree file armstonea9qdl.dtsi its in the kernel arch/arm/boot/dts. Then go to the node pcie and uncomment it. Recompile the DeviceTree and try it again.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      Post was edited 1 time, last by “fs-support_PJ” ().

      That was really helpfull, thank you!
      Now I get a more verbose about in dmesg about PCIe but still something seems to fail:

      Source Code

      1. [ 1.997152] PCI: CLS 0 bytes, default 64
      2. [ 3.318656] ehci-pci: EHCI PCI platform driver
      3. [ 4.958088] imx6q-pcie 1ffc000.pcie: phy link never came up
      4. [ 4.962376] imx6q-pcie 1ffc000.pcie: failed to initialize host
      5. [ 4.966984] imx6q-pcie: probe of 1ffc000.pcie failed with error -22


      Thats the part I changed:

      Source Code

      1. 1166 // #if 0 // not tested
      2. 1167 &pcie {
      3. 1168 pinctrl-names = "default";
      4. 1169 pinctrl-0 = <&pinctrl_pcie>;
      5. 1170 disable-gpio = <&gpio5 15 GPIO_ACTIVE_LOW>;
      6. 1171 power-on-gpio = <&gpio6 16 GPIO_ACTIVE_LOW>;
      7. 1172 reset-gpio = <&gpio5 17 GPIO_ACTIVE_LOW>;
      8. 1173 status = "okay";
      9. 1174 };
      10. 1175 // #endif


      Best regards,
      Jonas

      Post was edited 1 time, last by “onnuex” ().

      Jonas, did you manage to get the PCIe running?

      F+S: What is the current status for PCIe on armStoneA9r2? Do you have any patches or do you plan to include support in the upcoming release?

      I plan to use a PCIe GPS receiver (USB).

      Kind regards,
      Hein Gustavsen
      Miros AS
      Hello,

      PCI Express is used very rarely in the embedded field. Most interfaces are directly available by the SOC.
      For which field of application do you need it?
      We gonna test PCI Express interface - Linux 4.1 combination and give a feedback.

      Best Regards
      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Is the 1.5V voltage used by the module? We found out that there are some armStoneA9r2 from the first production batch where the voltage regulator is not working.
      See de.wikipedia.org/wiki/PCI_Express_Mini_Card for the connector pinout. If there is no voltage on the 1.5V pins you can send us the boards for repair with RMA.
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      fs-support_DB wrote:

      Is the 1.5V voltage used by the module?


      Thank you for this tip. The GPS receiver does not use 1.5V as far as I can see.

      Our armStoneA9r2 does not provide 1.5V on the PCIe socket, but I guess that this is not the problem here. I will wait for you to test the PCIe interface and provide me with the correct kernel and device tree configuration.

      Kind regards,
      Hein Gustavsen
      Miros AS
      Does the module use the PCIe interface or the USB interface? The miniPCIe connector has both signals.
      The NEO-7 module from u-blox used on the EWM-G108H has UART/USB/SPI/I2C interfaces so I think USB is used.
      For PCIe a separate chip has to be used to convert it to one of the interfaces of the NEO-7, but I don't think this is used.
      Also on the pictures of the EWM-G108H you can see that the PCIe signals are not connected.
      So you have to look for an USB device.
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Thank you! I knew about the USB interface, but I was so caught up in the PCI error message that I did not think about trying USB. I had to enable USB_ACM in the kernel (USB Modem (CDC ACM) support) and then I got the /dev/ttyACM0 device as expected.

      Thank you for helping me resolve this issue!

      Kind regards,
      Hein Gustavsen
      Miros AS
      We've tested a PCI-Serial Card on ArmstoneA9.
      This node was available in arch/arm/boot/dts/armstonea9qdl.dtsi

      Source Code

      1. &pcie {
      2. pinctrl-names = "default";
      3. pinctrl-0 = <&pinctrl_pcie>;
      4. disable-gpio = <&gpio5 15 GPIO_ACTIVE_LOW>;
      5. power-on-gpio = <&gpio6 16 GPIO_ACTIVE_LOW>;
      6. reset-gpio = <&gpio5 17 GPIO_ACTIVE_LOW>;
      7. status = "okay";
      8. };


      and of course the pincontrol settings:

      Source Code

      1. pinctrl_pcie: pciegrp {
      2. fsl,pins = <
      3. /* PCIe-DIS */
      4. MX6QDL_PAD_DISP0_DAT21__GPIO5_IO15 0x1b0b0
      5. /* PCIe-RST */
      6. MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x1b0b0
      7. /* PCIe-WAKE */
      8. MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x1b0b0
      9. >;
      10. };


      In make menuconfig I mainly activated PCI infrastructure, which resulted in this config:

      Source Code

      1. #
      2. # Bus support
      3. #
      4. CONFIG_PCI=y
      5. CONFIG_PCI_DOMAINS=y
      6. CONFIG_PCI_DOMAINS_GENERIC=y
      7. CONFIG_PCI_SYSCALL=y
      8. CONFIG_PCI_MSI=y
      9. # CONFIG_PCI_DEBUG is not set
      10. # CONFIG_PCI_REALLOC_ENABLE_AUTO is not set
      11. # CONFIG_PCI_STUB is not set
      12. # CONFIG_PCI_IOV is not set
      13. # CONFIG_PCI_PRI is not set
      14. # CONFIG_PCI_PASID is not set
      15. #
      16. # PCI host controller drivers
      17. #
      18. CONFIG_PCIE_DW=y
      19. CONFIG_PCI_IMX6=y
      20. # CONFIG_PCI_IMX6_COMPLIANCE_TEST is not set
      21. # CONFIG_EP_MODE_IN_EP_RC_SYS is not set
      22. # CONFIG_RC_MODE_IN_EP_RC_SYS is not set
      23. # CONFIG_PCI_HOST_GENERIC is not set
      24. # CONFIG_PCI_LAYERSCAPE is not set
      25. # CONFIG_PCIE_IPROC is not set
      26. CONFIG_PCIEPORTBUS=y
      27. CONFIG_PCIEAER=y
      28. # CONFIG_PCIE_ECRC is not set
      29. # CONFIG_PCIEAER_INJECT is not set
      30. CONFIG_PCIEASPM=y
      31. # CONFIG_PCIEASPM_DEBUG is not set
      32. CONFIG_PCIEASPM_DEFAULT=y
      33. # CONFIG_PCIEASPM_POWERSAVE is not set
      34. # CONFIG_PCIEASPM_PERFORMANCE is not set
      35. CONFIG_PCIE_PME=y
      36. # CONFIG_PCCARD is not set


      lspci found the card and showed desired entries:

      Source Code

      1. # lspci
      2. 00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01)
      3. 01:00.0 Serial controller: Exar Corp. Device 0352 (rev 03)
      4. #


      Best Regards,
      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.