From: Manivannan Sadhasivam <mani@kernel.org>
To: Igor Velkov <iav@iav.lv>
Cc: "Enrique Hernández Bello" <ehbello@gmail.com>,
shawn.lin@rock-chips.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, bhelgaas@google.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de,
dlemoal@kernel.org, devicetree@vger.kernel.org,
linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] PCI: rockchip-host: Make the PERST# inactive delay configurable
Date: Mon, 30 Nov 2026 13:27:31 +0530 [thread overview]
Message-ID: <aw0rinzOKMPaQlPU@debian> (raw)
In-Reply-To: <20261129-rockchip-pcie-ltssm-order-1@iav.lv>
On Sun, Nov 29, 2026 at 08:20:36PM +0200, Igor Velkov wrote:
> On 2026-11-29 19:35 +0530, Manivannan Sadhasivam wrote:
> > Basically, I just moved the LTSSM start after PERST# deassert and increased the
> > status check to 1s as per the spec.
>
> The diff does not move the start of training: rockchip_pcie_init_port()
> already sets PCIE_CLIENT_LINK_TRAIN_ENABLE for the RC, in the
> PCIE_CLIENT_CONFIG write before the core resets are released. The moved
> write only sets the bit again, so the 1 s timeout is the only change.
Ah, I didn't look into the implementation of rockchip_pcie_init_port(). But it
feels super weird to start the LTSSM in two successive places without a comment
in the code.
> To start training after PERST#, init_port() would have to clear the bit
> for the RC (PCIE_CLIENT_LINK_TRAIN_DISABLE).
>
> Enrique, a test on the ROCK Pi 4C that needs no register change:
> move msleep(PCIE_T_PVPERL_MS) to before rockchip_pcie_init_port().
> The pulse stays ~100 ms, but training starts only just before PERST#
> is released.
>
That reduces the delay window, which can help. But ideally, LTSSM should be
started after PERST# deassert. But doing so would require some code reorg and
need to ensure that the sequence mentioned in the hardware manual is not
disturbed.
Perhaps, Rockchip folks should make such a change?
Shawn, comments?
- Mani
--
மணிவண்ணன் சதாசிவம்
WARNING: multiple messages have this Message-ID (diff)
From: Manivannan Sadhasivam <mani@kernel.org>
To: Igor Velkov <iav@iav.lv>
Cc: "Enrique Hernández Bello" <ehbello@gmail.com>,
shawn.lin@rock-chips.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, bhelgaas@google.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de,
dlemoal@kernel.org, devicetree@vger.kernel.org,
linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] PCI: rockchip-host: Make the PERST# inactive delay configurable
Date: Mon, 30 Nov 2026 13:27:31 +0530 [thread overview]
Message-ID: <aw0rinzOKMPaQlPU@debian> (raw)
In-Reply-To: <20261129-rockchip-pcie-ltssm-order-1@iav.lv>
On Sun, Nov 29, 2026 at 08:20:36PM +0200, Igor Velkov wrote:
> On 2026-11-29 19:35 +0530, Manivannan Sadhasivam wrote:
> > Basically, I just moved the LTSSM start after PERST# deassert and increased the
> > status check to 1s as per the spec.
>
> The diff does not move the start of training: rockchip_pcie_init_port()
> already sets PCIE_CLIENT_LINK_TRAIN_ENABLE for the RC, in the
> PCIE_CLIENT_CONFIG write before the core resets are released. The moved
> write only sets the bit again, so the 1 s timeout is the only change.
Ah, I didn't look into the implementation of rockchip_pcie_init_port(). But it
feels super weird to start the LTSSM in two successive places without a comment
in the code.
> To start training after PERST#, init_port() would have to clear the bit
> for the RC (PCIE_CLIENT_LINK_TRAIN_DISABLE).
>
> Enrique, a test on the ROCK Pi 4C that needs no register change:
> move msleep(PCIE_T_PVPERL_MS) to before rockchip_pcie_init_port().
> The pulse stays ~100 ms, but training starts only just before PERST#
> is released.
>
That reduces the delay window, which can help. But ideally, LTSSM should be
started after PERST# deassert. But doing so would require some code reorg and
need to ensure that the sequence mentioned in the hardware manual is not
disturbed.
Perhaps, Rockchip folks should make such a change?
Shawn, comments?
- Mani
--
மணிவண்ணன் சதாசிவம்
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2026-11-30 7:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 21:58 [PATCH v5 0/2] PCI: rockchip-host: Make the PERST# inactive delay configurable Enrique Hernández Bello
2026-11-04 21:58 ` Enrique Hernández Bello
2026-11-04 21:58 ` [PATCH v5 1/2] dt-bindings: PCI: rockchip,rk3399-pcie: Add PERST# inactive delay properties Enrique Hernández Bello
2026-11-04 21:58 ` Enrique Hernández Bello
2026-11-04 22:06 ` sashiko-bot
2026-11-05 12:23 ` Krzysztof Kozlowski
2026-11-05 12:23 ` Krzysztof Kozlowski
2026-11-05 17:40 ` Enrique Hernández Bello
2026-11-05 17:40 ` Enrique Hernández Bello
2026-11-05 18:24 ` Krzysztof Kozlowski
2026-11-05 18:24 ` Krzysztof Kozlowski
2026-11-04 21:58 ` [PATCH v5 2/2] PCI: rockchip-host: Make the PERST# inactive delay configurable Enrique Hernández Bello
2026-11-04 21:58 ` Enrique Hernández Bello
2026-11-04 22:04 ` sashiko-bot
2026-11-29 14:05 ` Manivannan Sadhasivam
2026-11-29 14:05 ` Manivannan Sadhasivam
2026-11-29 18:20 ` Igor Velkov
2026-11-29 18:20 ` Igor Velkov
2026-11-30 7:57 ` Manivannan Sadhasivam [this message]
2026-11-30 7:57 ` Manivannan Sadhasivam
2026-11-30 8:40 ` Shawn Lin
2026-11-30 8:40 ` Shawn Lin
2026-11-30 9:15 ` Manivannan Sadhasivam
2026-11-30 9:15 ` Manivannan Sadhasivam
2026-11-05 1:44 ` [PATCH v5 0/2] " Igor Velkov
2026-11-05 1:44 ` Igor Velkov
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=aw0rinzOKMPaQlPU@debian \
--to=mani@kernel.org \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlemoal@kernel.org \
--cc=ehbello@gmail.com \
--cc=heiko@sntech.de \
--cc=iav@iav.lv \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
--cc=shawn.lin@rock-chips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.