From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
To: Encrow Thorne <encrow.thorne@linux.spacemit.com>
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Yixun Lan" <dlan@kernel.org>,
"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org,
spacemit@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: spacemit: Ignore link partner PERST on K1
Date: Sun, 18 Oct 2026 09:56:35 +0530 [thread overview]
Message-ID: <179229759512.2114.3306580489141327360.b4-reply@b4> (raw)
In-Reply-To: <20260924-spacemit-k1-pcie-fix-v1-1-002b5c1ba9fc@linux.spacemit.com>
On 2026-09-24 10:04 +0800, Encrow Thorne wrote:
> The K1 PCIe controller and PHY are affected by the PERST signal from
> the link partner during initialization. With some devices connected,
> this can prevent host initialization from progressing and cause the
> system to hang while probing the PCIe controller.
>
> Set PCIE_IGNORE_PERSTN before accessing the DBI registers. When set,
> this bit makes both the PCIe controller and PHY ignore the PERST
> signal from the link partner.
>
> This allows host initialization to complete without being affected by
> the link partner's PERST state.
>
> Signed-off-by: Encrow Thorne <encrow.thorne@linux.spacemit.com>
> ---
> drivers/pci/controller/dwc/pcie-spacemit-k1.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-spacemit-k1.c b/drivers/pci/controller/dwc/pcie-spacemit-k1.c
> index 0564c46e2f48..98f067e1ba81 100644
> --- a/drivers/pci/controller/dwc/pcie-spacemit-k1.c
> +++ b/drivers/pci/controller/dwc/pcie-spacemit-k1.c
> @@ -44,6 +44,7 @@
>
> #define PCIE_CONTROL_LOGIC 0x0004
> #define PCIE_SOFT_RESET BIT(0)
> +#define PCIE_IGNORE_PERSTN BIT(2)
>
> struct k1_pcie {
> struct dw_pcie pci;
> @@ -137,6 +138,13 @@ static int k1_pcie_init(struct dw_pcie_rp *pp)
> if (ret)
> return ret;
>
> + /*
> + * When set to 1, the PCIe controller and PHY ignore the PERST signal
> + * from the link partner in both RC and EP modes.
> + */
What? PERST# is an output signal to RC and input to Endpoint. PERST# is not
controlled by the Endpoint, but only by the RC/host.
- Mani
next prev parent reply other threads:[~2026-10-18 4:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 2:04 Encrow Thorne
2026-09-24 2:23 ` Troy Mitchell
2026-11-05 2:53 ` Encrow Thorne
2026-11-05 19:16 ` Bjorn Helgaas
2026-10-18 4:26 ` Manivannan Sadhasivam [this message]
2026-11-05 2:51 ` Encrow Thorne
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=179229759512.2114.3306580489141327360.b4-reply@b4 \
--to=manivannan.sadhasivam@oss.qualcomm.com \
--cc=bhelgaas@google.com \
--cc=dlan@kernel.org \
--cc=encrow.thorne@linux.spacemit.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=troy.mitchell@linux.spacemit.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
all inboxes | Powered by JetHome®