PCI: imx6: Support MPLL reconfiguration for 100MHz and 200MHz refclock
authorLucas Stach <l.stach@pengutronix.de>
Tue, 31 Jul 2018 10:21:49 +0000 (12:21 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 18 Sep 2018 09:13:14 +0000 (10:13 +0100)
commitf18f42d7497dbbde3ff314d0ad585b827ea74e48
tree8184799a766eacd8b0b66e32ea67faf2b95ba9b1
parent7876320f88802b22d4e2daf7eb027dd14175a0f8
PCI: imx6: Support MPLL reconfiguration for 100MHz and 200MHz refclock

The power up defaults of the MPLL are designed for the standard 125MHz
refclock derived from the ENET PLL. As this clock has a jitter that
violates the PCIe Gen2 timing requirements, some board designs use
an external reference clock generator. Those clock generators may
output a clock at a different rate than what the MPLL expects
(usually a 100MHz clock, to re-use the PCIe bus clock).

In that case the MPLL must be reconfigured via overrides to use
different refclock dividers and loop multipliers. The i.MX6
reference manual lists both 100MHz and 200MHz as supported refclock
rates and the associated mult and div values.

Only the 100MHz setup has been tested on a real board, but since the
200MHz setup only differs in the used pre-divider it seems safe to
add it now.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
drivers/pci/controller/dwc/pci-imx6.c