From: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
To: "Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
cros-qcom-dts-watchers@chromium.org
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Subject: [PATCH v9 5/7] PCI: qcom: Add support for assert_perst()
Date: Sat, 01 Nov 2025 09:29:36 +0530 [thread overview]
Message-ID: <20251101-tc9563-v9-5-de3429f7787a@oss.qualcomm.com> (raw)
In-Reply-To: <20251101-tc9563-v9-0-de3429f7787a@oss.qualcomm.com>
Add support for assert_perst() for switches like TC9563, which require
configuration before the PCIe link is established. Such devices use
this function op to assert the PERST# before configuring the device
and once the configuration is done they de-assert the PERST#.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
drivers/pci/controller/dwc/pcie-qcom.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 805edbbfe7eba496bc99ca82051dee43d240f359..cdc605b44e19e17319c39933f22d0b7710c5e9ef 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -696,6 +696,18 @@ static int qcom_pcie_post_init_1_0_0(struct qcom_pcie *pcie)
return 0;
}
+static int qcom_pcie_assert_perst(struct dw_pcie *pci, bool assert)
+{
+ struct qcom_pcie *pcie = to_qcom_pcie(pci);
+
+ if (assert)
+ qcom_ep_reset_assert(pcie);
+ else
+ qcom_ep_reset_deassert(pcie);
+
+ return 0;
+}
+
static void qcom_pcie_2_3_2_ltssm_enable(struct qcom_pcie *pcie)
{
u32 val;
@@ -1516,6 +1528,7 @@ static const struct qcom_pcie_cfg cfg_fw_managed = {
static const struct dw_pcie_ops dw_pcie_ops = {
.link_up = qcom_pcie_link_up,
.start_link = qcom_pcie_start_link,
+ .assert_perst = qcom_pcie_assert_perst,
};
static int qcom_pcie_icc_init(struct qcom_pcie *pcie)
--
2.34.1
next prev parent reply other threads:[~2025-11-01 4:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-01 3:59 [PATCH v9 0/7] PCI: Enable Power and configure the TC9563 PCIe switch Krishna Chaitanya Chundru
2025-11-01 3:59 ` [PATCH v9 1/7] dt-bindings: PCI: Add binding for Toshiba " Krishna Chaitanya Chundru
2025-11-01 3:59 ` [PATCH v9 2/7] PCI: Add assert_perst() operation to control PCIe PERST# Krishna Chaitanya Chundru
2025-11-01 5:04 ` Manivannan Sadhasivam
2025-11-01 3:59 ` [PATCH v9 3/7] PCI: dwc: Add assert_perst() hook for dwc glue drivers Krishna Chaitanya Chundru
2025-11-01 3:59 ` [PATCH v9 4/7] PCI: dwc: Implement .assert_perst() hook Krishna Chaitanya Chundru
2025-11-01 5:06 ` Manivannan Sadhasivam
2025-11-01 3:59 ` Krishna Chaitanya Chundru [this message]
2025-11-01 5:07 ` [PATCH v9 5/7] PCI: qcom: Add support for assert_perst() Manivannan Sadhasivam
2025-11-01 3:59 ` [PATCH v9 6/7] PCI: pwrctrl: Add power control driver for TC9563 Krishna Chaitanya Chundru
2025-11-01 5:08 ` Manivannan Sadhasivam
2025-11-01 3:59 ` [PATCH v9 7/7] arm64: dts: qcom: qcs6490-rb3gen2: Add TC9563 PCIe switch node Krishna Chaitanya Chundru
2025-11-03 10:30 ` Konrad Dybcio
2025-11-18 18:45 ` [PATCH v9 0/7] PCI: Enable Power and configure the TC9563 PCIe switch Bjorn Helgaas
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=20251101-tc9563-v9-5-de3429f7787a@oss.qualcomm.com \
--to=krishna.chundru@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=jingoohan1@gmail.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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®