[PATCH v5 2/2] PCI: rockchip-host: Make the PERST# inactive delay configurable
Manivannan Sadhasivam
mani at kernel.org
Sun Nov 29 23:57:31 PST 2026
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
--
மணிவண்ணன் சதாசிவம்
More information about the Linux-rockchip
mailing list