[PATCH 3/4] PCI: qcom: Add CGC disable workaround for Nord PCIe
From: Krishna Chaitanya Chundru
Date: Mon Aug 24 2026 - 23:42:26 EST
Nord requires a workaround to address a timing convergence issue in the
PCIe power domain. To avoid the issue, set the CORE_CLK_CGC_DIS and
AUX_PWR_DET bits in PARF_SYS_CTRL after controller initialization.
The SLV_ACLK_CGC_DIS bit is already configured by hardware reset. This
change adds the remaining required settings as documented in
QCTDD11972446.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@xxxxxxxxxxxxxxxx>
---
drivers/pci/controller/dwc/pcie-qcom.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index d8eb52857f69..9fa7ab47c86e 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -266,6 +266,7 @@ struct qcom_pcie_cfg {
bool override_no_snoop;
bool firmware_managed;
bool no_l0s;
+ bool cgc_dis_workaround;
};
struct qcom_pcie_perst {
@@ -1073,11 +1074,18 @@ static int qcom_pcie_init_2_7_0(struct qcom_pcie *pcie)
static int qcom_pcie_post_init_2_7_0(struct qcom_pcie *pcie)
{
const struct qcom_pcie_cfg *pcie_cfg = pcie->cfg;
+ int val;
if (pcie_cfg->override_no_snoop)
writel(WR_NO_SNOOP_OVERRIDE_EN | RD_NO_SNOOP_OVERRIDE_EN,
pcie->parf + PARF_NO_SNOOP_OVERRIDE);
+ if (pcie_cfg->cgc_dis_workaround) {
+ val = readl(pcie->parf + PARF_SYS_CTRL);
+ val |= CORE_CLK_CGC_DIS | AUX_PWR_DET;
+ writel(val, pcie->parf + PARF_SYS_CTRL);
+ }
+
qcom_pcie_set_slot_nccs(pcie->pci);
return 0;
@@ -1604,6 +1612,13 @@ static const struct qcom_pcie_cfg cfg_2_9_0 = {
.ops = &ops_2_9_0,
};
+static const struct qcom_pcie_cfg cfg_nord = {
+ .ops = &ops_1_9_0,
+ .override_no_snoop = true,
+ .no_l0s = true,
+ .cgc_dis_workaround = true,
+};
+
static const struct qcom_pcie_cfg cfg_sc8280xp = {
.ops = &ops_1_21_0,
.no_l0s = true,
@@ -2282,6 +2297,7 @@ static int qcom_pcie_resume_noirq(struct device *dev)
}
static const struct of_device_id qcom_pcie_match[] = {
+ { .compatible = "qcom,nord-pcie", .data = &cfg_nord },
{ .compatible = "qcom,pcie-apq8064", .data = &cfg_2_1_0 },
{ .compatible = "qcom,pcie-apq8084", .data = &cfg_1_0_0 },
{ .compatible = "qcom,pcie-ipq4019", .data = &cfg_2_4_0 },
--
2.34.1