]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: tegra194: Assert CLKREQ# explicitly by default
authorVidya Sagar <vidyas@nvidia.com>
Tue, 24 Mar 2026 19:09:52 +0000 (00:39 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 8 Apr 2026 22:00:23 +0000 (17:00 -0500)
The Root Port's CLKREQ# signal is shared with a downstream PCIe switch and
the endpoints behind it. By default, APPL_PINMUX_CLKREQ_OVERRIDE only
overrides the CLKREQ# input to the controller (so REFCLK is enabled
internally); it does not drive the CLKREQ# output pin low. Some PCIe
switches (e.g. Broadcom PCIe Gen4) forward the Root Port's CLKREQ# to their
downstream side and expect it to be driven low for REFCLK, even when the
switch does not support CLK-PM or ASPM-L1SS. Without driving the output
pin low, link-up can fail between the switch and endpoints.

Clear APPL_PINMUX_CLKREQ_DEFAULT_VALUE so the CLKREQ# output pad is
explicitly driven low. That makes the shared CLKREQ# line low on the wire
and avoids link-up issues with such switches.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20260324191000.1095768-2-mmaddireddy@nvidia.com
drivers/pci/controller/dwc/pcie-tegra194.c

index 336d3c759547ab223200bd89e0ec5b8fcdaff1cb..002945de5e1171b580194bdbaa7299d34056a4b0 100644 (file)
@@ -44,6 +44,7 @@
 #define APPL_PINMUX_CLKREQ_OVERRIDE            BIT(3)
 #define APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN  BIT(4)
 #define APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE     BIT(5)
+#define APPL_PINMUX_CLKREQ_DEFAULT_VALUE       BIT(13)
 
 #define APPL_CTRL                              0x4
 #define APPL_CTRL_SYS_PRE_DET_STATE            BIT(6)
@@ -1429,6 +1430,7 @@ static int tegra_pcie_config_controller(struct tegra_pcie_dw *pcie,
                val = appl_readl(pcie, APPL_PINMUX);
                val |= APPL_PINMUX_CLKREQ_OVERRIDE_EN;
                val &= ~APPL_PINMUX_CLKREQ_OVERRIDE;
+               val &= ~APPL_PINMUX_CLKREQ_DEFAULT_VALUE;
                appl_writel(pcie, val, APPL_PINMUX);
        }