From: Shawn Lin <shawn.lin@rock-chips.com>
To: Manivannan Sadhasivam <mani@kernel.org>, Igor Velkov <iav@iav.lv>
Cc: shawn.lin@rock-chips.com,
"Enrique Hernández Bello" <ehbello@gmail.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 16:40:28 +0800 [thread overview]
Message-ID: <5b757016-3926-4123-a02b-d7348448b535@rock-chips.com> (raw)
In-Reply-To: <aw0rinzOKMPaQlPU@debian>
在 2026/11/30 星期一 15:57, Manivannan Sadhasivam 写道:
> 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.
>
Looking back through the git history, this appears to be a leftover from
the rework that added EP support. In practice, rockchip_pcie_init_port()
should not enable LTSSM, that call can simply be removed. The LTSSM
enable in rockchip_pcie_host_init_port() could then be moved to after
#PERST is deasserted.
>> 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
>
next prev parent reply other threads:[~2026-11-30 8:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 21:58 [PATCH v5 0/2] " 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-05 12:23 ` Krzysztof Kozlowski
2026-11-05 17:40 ` Enrique Hernández Bello
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-29 14:05 ` Manivannan Sadhasivam
2026-11-29 18:20 ` Igor Velkov
2026-11-30 7:57 ` Manivannan Sadhasivam
2026-11-30 8:40 ` Shawn Lin [this message]
2026-11-30 9:15 ` Manivannan Sadhasivam
2026-11-05 1:44 ` [PATCH v5 0/2] " 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=5b757016-3926-4123-a02b-d7348448b535@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--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=mani@kernel.org \
--cc=robh@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
all inboxes | Powered by JetHome®