Skip to content

Commit 8c82dec

Browse files
Vidya Sagargregkh
authored andcommitted
PCI: tegra194: Disable direct speed change for Endpoint mode
[ Upstream commit 976f676 ] Pre-silicon simulation showed the controller operating in Endpoint mode initiating link speed change after completing Secondary Bus Reset. Ideally, the Root Port or the Switch Downstream Port should initiate the link speed change post SBR, not the Endpoint. So, as per the hardware team recommendation, disable direct speed change for the Endpoint mode to prevent it from initiating speed change after the physical layer link is up at Gen1, leaving speed change ownership with the host. Fixes: c57247f ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> [mani: commit log] 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: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Vidya Sagar <vidyas@nvidia.com> Link: https://patch.msgid.link/20260324190755.1094879-8-mmaddireddy@nvidia.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2e87c69 commit 8c82dec

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,6 +1805,10 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw *pcie)
18051805

18061806
reset_control_deassert(pcie->core_rst);
18071807

1808+
val = dw_pcie_readl_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL);
1809+
val &= ~PORT_LOGIC_SPEED_CHANGE;
1810+
dw_pcie_writel_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL, val);
1811+
18081812
if (pcie->update_fc_fixup) {
18091813
val = dw_pcie_readl_dbi(pci, CFG_TIMER_CTRL_MAX_FUNC_NUM_OFF);
18101814
val |= 0x1 << CFG_TIMER_CTRL_ACK_NAK_SHIFT;

0 commit comments

Comments
 (0)