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:



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


    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.

    Edited once, 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:


    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:


    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

  • 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 https://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.

  • 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

  • Another question:


    The GPS sends the 1PPS signal on pin 42 (LED_WWAN) and pin 46 (LED_WPAN) on the Mini PCIe connector. Is any of these pins connected to the CPU so I can read it using GPIO?


    Kind regards,
    Hein Gustavsen
    Miros AS

  • These pins are connected to LEDs and can't be read by the CPU.

    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.

  • We've tested a PCI-Serial Card on ArmstoneA9.
    This node was available in arch/arm/boot/dts/armstonea9qdl.dtsi


    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:

    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:


    lspci found the card and showed desired entries:

    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.