Skip to content

Commit 01d3626

Browse files
Vidya Sagarbjorn-helgaas
authored andcommitted
PCI: tegra194: Assert CLKREQ# explicitly by default
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
1 parent 34b3eef commit 01d3626

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#define APPL_PINMUX_CLKREQ_OVERRIDE BIT(3)
4545
#define APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN BIT(4)
4646
#define APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE BIT(5)
47+
#define APPL_PINMUX_CLKREQ_DEFAULT_VALUE BIT(13)
4748

4849
#define APPL_CTRL 0x4
4950
#define APPL_CTRL_SYS_PRE_DET_STATE BIT(6)
@@ -1429,6 +1430,7 @@ static int tegra_pcie_config_controller(struct tegra_pcie_dw *pcie,
14291430
val = appl_readl(pcie, APPL_PINMUX);
14301431
val |= APPL_PINMUX_CLKREQ_OVERRIDE_EN;
14311432
val &= ~APPL_PINMUX_CLKREQ_OVERRIDE;
1433+
val &= ~APPL_PINMUX_CLKREQ_DEFAULT_VALUE;
14321434
appl_writel(pcie, val, APPL_PINMUX);
14331435
}
14341436

0 commit comments

Comments
 (0)