From: Stefan Eichenberger <eichest@gmail.com>
To: hongxing.zhu@nxp.com, l.stach@pengutronix.de,
lpieralisi@kernel.org, kw@linux.com, robh@kernel.org,
bhelgaas@google.com, shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com,
francesco.dolcini@toradex.com
Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
imx@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v1 0/3] PCI: imx6: reset link after suspend/resume
Date: Mon, 19 Aug 2024 11:03:16 +0200 [thread overview]
Message-ID: <20240819090428.17349-1-eichest@gmail.com> (raw)
On the i.MX6Quad (not QuadPlus), the PCIe link does not work after a
suspend/resume cycle. Worse, the PCIe memory mapped I/O isn't accessible
at all, so the system freezes when a PCIe driver tries to access its I/O
space. The only way to get resume working again is to reset the PCIe
link, similar to what is done on devices that support suspend/resume.
Through trial and error, we found that something about the PCIe
reference clock does not work as expected after a resume. We could not
figure out if it is disabled (even though the registers still say it is
enabled), or if it is somehow unstable or has some hiccups. With the
workaround introduced in this patch series, we were able to fully resume
a Compex WLE900VX (ath10k) miniPCIe Wifi module and an Intel AX200 M.2
Wifi module. If there is a better way or other ideas on how to fix this
problem, please let us know. We are aware that resetting the link should
not be necessary, but we could not find a better solution. More
interestingly, even the SoCs that support suspend/resume according to
the i.MX erratas seem to reset the link on resume in
imx6_pcie_host_init, so we hope this might be a valid workaround.
Stefan Eichenberger (3):
PCI: imx6: Add a function to deassert the reset gpio
PCI: imx6: move the wait for clock stabilization to enable ref clk
PCI: imx6: reset link on resume
drivers/pci/controller/dwc/pci-imx6.c | 69 +++++++++++++++++++++++----
1 file changed, 59 insertions(+), 10 deletions(-)
--
2.43.0
next reply other threads:[~2024-08-19 9:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 9:03 Stefan Eichenberger [this message]
2024-08-19 9:03 ` [PATCH v1 1/3] PCI: imx6: Add a function to deassert the reset gpio Stefan Eichenberger
2024-08-19 14:49 ` Frank Li
2024-08-20 7:07 ` Stefan Eichenberger
2024-08-19 9:03 ` [PATCH v1 2/3] PCI: imx6: move the wait for clock stabilization to enable ref clk Stefan Eichenberger
2024-08-19 14:45 ` Frank Li
2024-08-20 7:06 ` Stefan Eichenberger
2024-08-19 9:03 ` [PATCH v1 3/3] PCI: imx6: reset link on resume Stefan Eichenberger
2024-08-19 14:39 ` Frank Li
2024-08-20 7:05 ` Stefan Eichenberger
2024-08-19 14:30 ` [PATCH v1 0/3] PCI: imx6: reset link after suspend/resume Frank Li
2024-08-20 6:52 ` Stefan Eichenberger
2024-08-21 15:41 ` Stefan Eichenberger
2024-08-21 16:51 ` Frank Li
2024-08-22 7:20 ` Stefan Eichenberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240819090428.17349-1-eichest@gmail.com \
--to=eichest@gmail.com \
--cc=bhelgaas@google.com \
--cc=festevam@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=hongxing.zhu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=kw@linux.com \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).