]> asedeno.scripts.mit.edu Git - linux.git/commit
PCI: imx6: Add DT property for link gen, default to Gen1
authorTim Harvey <tharvey@gateworks.com>
Wed, 20 Apr 2016 00:52:44 +0000 (19:52 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 20 Apr 2016 00:52:44 +0000 (19:52 -0500)
commita5fcec480f25eb5444c0b71ecdf9b18b09236b95
treed7922086b065ff22027531b280fe146f769c5150
parent3ea8529acc30467331b7b1f5da6cf668fac091c7
PCI: imx6: Add DT property for link gen, default to Gen1

Freescale has stated [1] that the LVDS clock source of the IMX6 does not
pass the PCI Gen2 clock jitter test, therefore unless an external Gen2
compliant external clock source is present and supplied back to the IMX6
PCIe core via LVDS CLK1/CLK2 you can not claim Gen2 compliance.

Add a DT property to specify Gen1 vs Gen2 and check this before allowing a
Gen2 link.

We default to Gen1 if the property is not present because at this time
there are no IMX6 boards in mainline that 'input' a clock on LVDS
CLK1/CLK2.

In order to be Gen2 compliant on IMX6 you need to:

 - Have a Gen2 compliant external clock generator and route that clock back
   to either LVDS CLK1 or LVDS CLK2 as an input (see IMX6SX-SabreSD
   reference design).

 - Specify this clock in the PCIe node in the DT (i.e.,
   IMX6QDL_CLK_LVDS1_IN or IMX6QDL_CLK_LVDS2_IN instead of
   IMX6QDL_CLK_LVDS1_GATE which configures it as a CLK output).

[1] https://community.freescale.com/message/453209

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Zhu Richard <Richard.Zhu@freescale.com>
CC: Akshay Bhat <akshay.bhat@timesys.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: Shawn Guo <shawnguo@kernel.org>
Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
drivers/pci/host/pci-imx6.c