From: Gowtham Kudupudi <gowtham@ferryfair.com>
To: yue.wang@Amlogic.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, mani@kernel.org
Cc: robh@kernel.org, bhelgaas@google.com, neil.armstrong@linaro.org,
khilman@baylibre.com, jbrunet@baylibre.com,
martin.blumenstingl@googlemail.com, linux-pci@vger.kernel.org,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Gowtham Kudupudi <gowtham@ferryfair.com>
Subject: [PATCH] PCI: meson: Fix PERST# timing by asserting reset before LTSSM enable
Date: Sun, 14 Jun 2026 07:26:20 +0530 [thread overview]
Message-ID: <20260614015620.20432-1-gowtham@ferryfair.com> (raw)
On warm reboot, the PCIe controller's LTSSM starts link training
immediately if PERST# is already deasserted from the previous boot.
The driver then pulses PERST# for only 500us, which is too short to
properly reset the endpoint device that has already started training.
Fix by moving the PERST# assert/deassert pulse BEFORE enabling LTSSM,
so the endpoint gets a clean reset cycle before link training begins.
This was found on Amlogic G12B (A311D) with NVMe on an M.2 slot.
Cold boot worked because POR held PERST# low; warm reboot did not.
The fix was confirmed on a Banana Pi CM4 with Waveshare IO base board.
Signed-off-by: Gowtham Kudupudi <gowtham@ferryfair.com>
---
drivers/pci/controller/dwc/pci-meson.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c
index 5f8e2f4b3c12..3a7e9f1d5b8c 100644
--- a/drivers/pci/controller/dwc/pci-meson.c
+++ b/drivers/pci/controller/dwc/pci-meson.c
@@ -310,8 +310,8 @@ static int meson_pcie_start_link(struct dw_pcie *pci)
{
struct meson_pcie *mp = to_meson_pcie(pci);
+ meson_pcie_assert_reset(mp);
meson_pcie_ltssm_enable(mp);
- meson_pcie_assert_reset(mp);
return 0;
}
--
2.49.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next reply other threads:[~2026-06-14 2:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-14 1:56 Gowtham Kudupudi [this message]
2026-06-14 2:31 ` sashiko-bot
2026-06-15 10:34 ` Ronald Claveau
2026-06-16 6:06 ` neil.armstrong
2026-06-16 23:36 ` gowtham
2026-06-17 20:30 ` gowtham
2026-06-20 8:59 ` Ronald Claveau
2026-06-20 15:11 ` Manivannan Sadhasivam
2026-06-20 16:40 ` Ronald Claveau
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=20260614015620.20432-1-gowtham@ferryfair.com \
--to=gowtham@ferryfair.com \
--cc=bhelgaas@google.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=kwilczynski@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=yue.wang@Amlogic.com \
/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