Skip to content

Commit 65ace9a

Browse files
mtk20626Lorenzo Pieralisi
authored andcommitted
PCI: mediatek: Assert PERST# for 100ms for power and clock to stabilize
Described in PCIe CEM specification sections 2.2 (PERST# Signal) and 2.2.1 (Initial Power-Up (G3 to S0)). The deassertion of PERST# should be delayed 100ms (TPVPERL) for the power and clock to become stable. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: qizhong cheng <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Acked-by: Pali Rohár <[email protected]>
1 parent fa55b7d commit 65ace9a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/pci/controller/pcie-mediatek.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,13 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
702702
*/
703703
writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
704704

705+
/*
706+
* Described in PCIe CEM specification sections 2.2 (PERST# Signal) and
707+
* 2.2.1 (Initial Power-Up (G3 to S0)). The deassertion of PERST# should
708+
* be delayed 100ms (TPVPERL) for the power and clock to become stable.
709+
*/
710+
msleep(100);
711+
705712
/* De-assert PHY, PE, PIPE, MAC and configuration reset */
706713
val = readl(port->base + PCIE_RST_CTRL);
707714
val |= PCIE_PHY_RSTB | PCIE_PERSTB | PCIE_PIPE_SRSTB |

0 commit comments

Comments
 (0)