The NXP i.MX8QXP CPU has one PCI Express (PCIe) hardware module that can either be configured to act as a root complex or a PCI Express endpoint. PCI Express is a third-generation I/O interconnect targeting low-cost, high-volume, multi-platform interconnection.

PCIe includes the following cores:

  • PCIe dual mode (DM) core

  • PCIe root complex (RC) core

  • PCIe endpoint (EP) core

The Linux BSP only supports the PCIe port acting as Root Complex (RC).

On the ConnectCore 8X system-on-module:

  • On wireless variants of the ConnectCore 8X SOM, the PCIe bus is dedicated to the communication with the Qualcomm QCA6574 wireless chipset and it is not available on the LGA pads.

  • On non-wireless variants of the ConnectCore 8X SOM, the PCIe bus is available on the LGA pads.

On the ConnectCore 8X SBC Pro:

  • The PCIe port is available in the PCIe mini card connector at the bottom of the board.

    The PCIe lines can only be used on non-wireless variants of the ConnectCore 8X.

    The ConnectCore 8X SBC Pro does not assemble the PCIe clock generator. You need to assemble additional hardware to use the PCIe bus. See the ConnectCore 8X SBC Pro reference design at the ConnectCore 8X product support page.

Kernel configuration

You can manage the PCIe driver support through the kernel configuration option:

  • Freescale i.MX6/7/8 PCIe controller (CONFIG_PCI_IMX6)

This option is enabled as built-in on the default ConnectCore 8X kernel configuration file.

Kernel driver

The PCIe bus driver for the ConnectCore 8X system-on-module is located at drivers/pci/controller/dwc/pci-imx6.c.

Device tree bindings and customization

The i.MX8QXP PCIe interface device tree binding is documented at Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml.

Example: PCIe (Mini card) on the ConnectCore 8X SBC Pro

Definition of the PCIe bus

i.MX8QXP device tree
pcieb: pcie@0x5f010000 {
	compatible = "fsl,imx8qm-pcie","snps,dw-pcie";
	reg = <0x5f010000 0x10000>, /* Controller reg */
	      <0x7ff00000 0x80000>, /* PCI cfg space */
	      <0x5f080000 0xf0000>; /* lpcg, csr, msic, gpio */
	reg-names = "dbi", "config", "hsio";
	#address-cells = <3>;
	#size-cells = <2>;
	device_type = "pci";
	bus-range = <0x00 0xff>;
	ranges = <0x81000000 0 0x00000000 0x7ff80000 0 0x00010000 /* downstream I/O */
		  0x82000000 0 0x70000000 0x70000000 0 0x0ff00000>; /* non-prefetchable memory */
	num-lanes = <1>;
	num-viewport = <4>;
	interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
			<GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; /* eDMA */
	interrupt-names = "msi", "dma";
	#interrupt-cells = <1>;
	interrupt-map-mask = <0 0 0 0x7>;
	interrupt-map =  <0 0 0 1 &gic 0 105 4>,
			 <0 0 0 2 &gic 0 106 4>,
			 <0 0 0 3 &gic 0 107 4>,
			 <0 0 0 4 &gic 0 108 4>;
	clocks = <&pcieb_lpcg 0>,
		 <&pcieb_lpcg 1>,
		 <&pcieb_lpcg 2>,
		 <&phyx1_lpcg 0>,
		 <&phyx1_crr1_lpcg 0>,
		 <&pcieb_crr3_lpcg 0>,
		 <&misc_crr5_lpcg 0>;
	clock-names = "pcie", "pcie_bus", "pcie_inbound_axi",
		      "pcie_phy", "phy_per", "pcie_per", "misc_per";
	power-domains = <&pd IMX_SC_R_PCIE_B>,
			<&pd IMX_SC_R_SERDES_1>,
			<&pd IMX_SC_R_HSIO_GPIO>;
	power-domain-names = "pcie", "pcie_phy", "hsio_gpio";
	fsl,max-link-speed = <3>;
	hsio-cfg = <PCIEAX2PCIEBX1>;
	local-addr = <0x80000000>;
	status = "disabled";
};

IOMUX configuration

The ConnectCore 8X SBC Pro assembles a PCIe Mini card connector. Three GPIOs of the ConnectCore 8X SOM are routed to the PCIe connector:

  • GPIO0_IO30: PCIe disable line

  • GPIO0_IO29: PCIe wake line

  • GPIO3_IO16: PCIe reset line

ConnectCore 8X SBC Pro device tree
/* PCIE (Mini Card) */
pinctrl_pcieb_mini_card: pcieagrp_mini_card {
	fsl,pins = <
		/* PCIE_RESET_N */
		IMX8QXP_QSPI0A_SCLK_LSIO_GPIO3_IO16	0x06000021
		/* PCIE_DIS_N */
		IMX8QXP_SAI1_RXC_LSIO_GPIO0_IO30		0x06000061
		/* PCIE_WAKE_N */
		IMX8QXP_SAI1_RXD_LSIO_GPIO0_IO29		0x04000021
	>;
};

Bus enabling

The PCIe bus is disabled by default on the ConnectCore 8X SBC Pro device tree because of the missing clock generator (see note). Digi Embedded Yocto includes a sample reference device tree overlay that enables it. See Digi device tree overlays mechanism for information on enabling a device tree overlay.