2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/pci/controller/dwc
Francesco Dolcini a6809941c1 PCI: imx6: Fix PERST# start-up sequence
According to the PCIe standard the PERST# signal (reset-gpio in
fsl,imx* compatible dts) should be kept asserted for at least 100 usec
before the PCIe refclock is stable, should be kept asserted for at
least 100 msec after the power rails are stable and the host should wait
at least 100 msec after it is de-asserted before accessing the
configuration space of any attached device.

From PCIe CEM r2.0, sec 2.6.2

  T-PVPERL: Power stable to PERST# inactive - 100 msec
  T-PERST-CLK: REFCLK stable before PERST# inactive - 100 usec.

From PCIe r5.0, sec 6.6.1

  With a Downstream Port that does not support Link speeds greater than
  5.0 GT/s, software must wait a minimum of 100 ms before sending a
  Configuration Request to the device immediately below that Port.

Failure to do so could prevent PCIe devices to be working correctly,
and this was experienced with real devices.

Move reset assert to imx6_pcie_assert_core_reset(), this way we ensure
that PERST# is asserted before enabling any clock, move de-assert to the
end of imx6_pcie_deassert_core_reset() after the clock is enabled and
deemed stable and add a new delay of 100 msec just afterward.

Link: https://lore.kernel.org/all/20220211152550.286821-1-francesco.dolcini@toradex.com
Link: https://lore.kernel.org/r/20220404081509.94356-1-francesco.dolcini@toradex.com
Fixes: bb38919ec5 ("PCI: imx6: Add support for i.MX6 PCIe controller")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Richard Zhu <hongxing.zhu@nxp.com>
2022-05-11 13:50:45 +01:00
..
Kconfig Merge branch 'remotes/lorenzo/pci/qcom' 2021-11-05 11:28:52 -05:00
Makefile PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver 2021-10-11 15:34:02 -05:00
pci-dra7xx.c bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
pci-exynos.c pci-v5.17-changes 2022-01-16 08:08:11 +02:00
pci-imx6.c PCI: imx6: Fix PERST# start-up sequence 2022-05-11 13:50:45 +01:00
pci-keystone.c PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
pci-layerscape-ep.c PCI: layerscape: Correct syntax by changing comma to semicolon 2021-03-22 17:24:19 +00:00
pci-layerscape.c PCI: layerscape: Change to use the DWC common link-up check function 2022-01-05 15:23:15 +00:00
pci-meson.c PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
pcie-al.c PCI: al: Remove useless dw_pcie_ops 2021-02-24 11:09:50 -06:00
pcie-armada8k.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-artpec6.c PCI: artpec6: Prefer of_device_get_match_data() 2022-01-03 15:00:55 -06:00
pcie-designware-ep.c PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver 2021-10-11 15:34:02 -05:00
pcie-designware-host.c PCI: dwc: Restore MSI Receiver mask during resume 2022-03-10 13:52:09 -06:00
pcie-designware-plat.c PCI: designware-plat: Prefer of_device_get_match_data() 2022-01-03 15:01:09 -06:00
pcie-designware.c PCI: dwc: Do not remap invalid res 2021-12-02 09:41:43 +00:00
pcie-designware.h PCI: dwc: Move iATU detection earlier 2021-04-29 17:05:59 +01:00
pcie-dw-rockchip.c PCI: rockchip-dwc: Add Rockchip RK356X host controller driver 2021-08-31 14:58:20 -05:00
pcie-fu740.c Merge branch 'pci/host/fu740' 2022-03-22 17:16:24 -05:00
pcie-hisi.c PCI: hisi: Avoid invalid address space conversions 2022-01-03 15:05:28 -06:00
pcie-histb.c PCI: histb: Drop error data fabrication when config read fails 2021-11-18 13:40:29 -06:00
pcie-intel-gw.c PCI: intel-gw: Rename intel_pcie_port to intel_pcie 2022-01-03 15:01:43 -06:00
pcie-keembay.c PCI: keembay: Add support for Intel Keem Bay 2021-08-20 13:47:05 +01:00
pcie-kirin.c pci-v5.18-changes 2022-03-25 13:02:05 -07:00
pcie-qcom-ep.c pci-v5.17-changes 2022-01-16 08:08:11 +02:00
pcie-qcom.c Merge branch 'remotes/lorenzo/pci/qcom' 2022-03-22 17:16:26 -05:00
pcie-spear13xx.c PCI: spear13xx: Avoid invalid address space conversions 2022-01-03 15:05:28 -06:00
pcie-tegra194-acpi.c PCI: tegra194: Fix MCFG quirk build regressions 2021-06-18 10:32:34 -05:00
pcie-tegra194.c PCI: tegra194: Rename tegra_pcie_dw to tegra194_pcie 2022-01-03 15:05:28 -06:00
pcie-uniphier-ep.c PCI: uniphier-ep: Add NX1 support 2022-02-11 16:26:21 +00:00
pcie-uniphier.c PCI: uniphier: Rename uniphier_pcie_priv to uniphier_pcie 2022-01-03 15:05:28 -06:00
pcie-visconti.c PCI: visconti: Remove surplus dev_err() when using platform_get_irq_byname() 2021-10-07 16:03:57 +01:00