From: Bjorn Helgaas <helgaas@kernel.org>
To: Qiang Yu <qiang.yu@oss.qualcomm.com>
Cc: "Manivannan Sadhasivam" <mani@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Vinod Koul" <vkoul@kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org
Subject: Re: [PATCH 0/4] PCI: qcom: Align PHY init sequence with HPG
Date: Wed, 16 Sep 2026 10:55:04 -0500 [thread overview]
Message-ID: <20260916155504.GA926264@bhelgaas> (raw)
In-Reply-To: <20260915-align_pcie_init_sequence_0916-v1-0-0b2195836f30@oss.qualcomm.com>
On Tue, Sep 15, 2026 at 11:04:20PM -0700, Qiang Yu wrote:
> HPG requires the controller/PHY GDSCs to be powered up and all
> clocks enabled, then the controller's reset and the PHY's reset
> toggled together as one group, with PARF_DEVICE_TYPE set right
> after. This series adds the callbacks needed on both sides to
> realize that sequence: a phy_reset() call the controller makes as
> part of its own reset, and matching phy_ops::init/phy_ops::reset on
> the PHY side.
This observation is not related to this series; it's a question about
PCI host controller initialization ordering in general because it
seems like this is a perennial issue. Is there anything we can do to
converge on some sort of generic standard or typical ordering across
drivers?
For example, while looking at a patch that changed ordering in a
different driver (not qcom), I asked Gemini for some guidance and it
came up with the following ordering recommendations, which seem
pretty generic:
- assert downstream PERST# so physical lanes remain quiet while
setting up the host
- assert local resets (core & PHY)
- enable and stabilize power (IP core, I/O rails, PHYs)
- enable and stabilize clocks, including refclk and T_PERST_CLK
- initialize PHYs
- deassert PHY reset or allow register access to PHY
- wait for PHY PLL lock to refclk
- program PHY parameters & calibration
- verify PHY ready
- deassert local core reset
- configure RC (device type, MPS, max link speed, width, etc)
- deassert downstream PERST#
- enable LTSSM
If this could be made generic enough, maybe something like it could be
included in Documentation/PCI/controller/pci-controller-drivers.rst?
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: Qiang Yu <qiang.yu@oss.qualcomm.com>
Cc: "Manivannan Sadhasivam" <mani@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Vinod Koul" <vkoul@kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org
Subject: Re: [PATCH 0/4] PCI: qcom: Align PHY init sequence with HPG
Date: Wed, 16 Sep 2026 10:55:04 -0500 [thread overview]
Message-ID: <20260916155504.GA926264@bhelgaas> (raw)
In-Reply-To: <20260915-align_pcie_init_sequence_0916-v1-0-0b2195836f30@oss.qualcomm.com>
On Tue, Sep 15, 2026 at 11:04:20PM -0700, Qiang Yu wrote:
> HPG requires the controller/PHY GDSCs to be powered up and all
> clocks enabled, then the controller's reset and the PHY's reset
> toggled together as one group, with PARF_DEVICE_TYPE set right
> after. This series adds the callbacks needed on both sides to
> realize that sequence: a phy_reset() call the controller makes as
> part of its own reset, and matching phy_ops::init/phy_ops::reset on
> the PHY side.
This observation is not related to this series; it's a question about
PCI host controller initialization ordering in general because it
seems like this is a perennial issue. Is there anything we can do to
converge on some sort of generic standard or typical ordering across
drivers?
For example, while looking at a patch that changed ordering in a
different driver (not qcom), I asked Gemini for some guidance and it
came up with the following ordering recommendations, which seem
pretty generic:
- assert downstream PERST# so physical lanes remain quiet while
setting up the host
- assert local resets (core & PHY)
- enable and stabilize power (IP core, I/O rails, PHYs)
- enable and stabilize clocks, including refclk and T_PERST_CLK
- initialize PHYs
- deassert PHY reset or allow register access to PHY
- wait for PHY PLL lock to refclk
- program PHY parameters & calibration
- verify PHY ready
- deassert local core reset
- configure RC (device type, MPS, max link speed, width, etc)
- deassert downstream PERST#
- enable LTSSM
If this could be made generic enough, maybe something like it could be
included in Documentation/PCI/controller/pci-controller-drivers.rst?
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-09-16 15:55 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 6:04 [PATCH 0/4] PCI: qcom: Align PHY init sequence with HPG Qiang Yu
2026-09-16 6:04 ` Qiang Yu
2026-09-16 6:04 ` [PATCH 1/4] PCI: qcom: Move PHY init and add PHY reset call to align " Qiang Yu
2026-09-16 6:04 ` Qiang Yu
2026-09-16 6:12 ` sashiko-bot
2026-09-16 6:12 ` sashiko-bot
2026-09-21 9:14 ` Kathiravan Thirumoorthy
2026-09-21 9:14 ` Kathiravan Thirumoorthy
2026-09-16 6:04 ` [PATCH 2/4] PCI: qcom-ep: Move PHY init and drive PHY reset " Qiang Yu
2026-09-16 6:04 ` Qiang Yu
2026-09-16 6:14 ` sashiko-bot
2026-09-16 6:14 ` sashiko-bot
2026-10-12 15:29 ` Manivannan Sadhasivam
2026-10-12 15:29 ` Manivannan Sadhasivam
2026-09-16 6:04 ` [PATCH 3/4] phy: qcom-qmp-pcie-multiphy: Split phy_ops into init/exit/reset/power_on Qiang Yu
2026-09-16 6:04 ` Qiang Yu
2026-09-16 6:11 ` sashiko-bot
2026-09-16 6:11 ` sashiko-bot
2026-10-12 15:32 ` Manivannan Sadhasivam
2026-10-12 15:32 ` Manivannan Sadhasivam
2026-09-16 6:04 ` [PATCH 4/4] phy: qcom-qmp-pcie: " Qiang Yu
2026-09-16 6:04 ` Qiang Yu
2026-09-16 6:17 ` sashiko-bot
2026-09-16 6:17 ` sashiko-bot
2026-10-12 15:33 ` Manivannan Sadhasivam
2026-10-12 15:33 ` Manivannan Sadhasivam
2026-09-21 9:15 ` Kathiravan Thirumoorthy
2026-09-21 9:15 ` Kathiravan Thirumoorthy
2026-10-13 14:26 ` Michael Burch
2026-10-13 14:26 ` Michael Burch
2026-09-16 15:55 ` Bjorn Helgaas [this message]
2026-09-16 15:55 ` [PATCH 0/4] PCI: qcom: Align PHY init sequence with HPG Bjorn Helgaas
2026-09-21 11:16 ` Manivannan Sadhasivam
2026-09-21 11:16 ` Manivannan Sadhasivam
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=20260916155504.GA926264@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=qiang.yu@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=vkoul@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 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.