[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211207060550.20918-1-qizhong.cheng@mediatek.com>
Date: Tue, 7 Dec 2021 14:05:50 +0800
From: qizhong cheng <qizhong.cheng@...iatek.com>
To: Ryder Lee <ryder.lee@...iatek.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Krzysztof WilczyĆski <kw@...ux.com>,
Jianjun Wang <jianjun.wang@...iatek.com>
CC: <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>, <chuanjia.liu@...iatek.com>,
<qizhong.cheng@...iatek.com>
Subject: [PATCH] PCI: mediatek: Delay 100ms to wait power and clock to become stable
Described in PCIe CEM specification setctions 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.
Signed-off-by: qizhong cheng <qizhong.cheng@...iatek.com>
Change-Id: Ia9abe1e763564a5bad1d045fd268c38e76e2ae95
---
drivers/pci/controller/pcie-mediatek.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 2f3f974977a3..a61ea3940471 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -702,6 +702,13 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
*/
writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
+ /*
+ * Described in PCIe CEM specification setctions 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.
+ */
+ msleep(100);
+
/* De-assert PHY, PE, PIPE, MAC and configuration reset */
val = readl(port->base + PCIE_RST_CTRL);
val |= PCIE_PHY_RSTB | PCIE_PERSTB | PCIE_PIPE_SRSTB |
--
2.25.1
Powered by blists - more mailing lists