[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230703112914.68806-1-a-verma1@ti.com>
Date: Mon, 3 Jul 2023 16:59:14 +0530
From: Achal Verma <a-verma1@...com>
To: Vignesh Raghavendra <vigneshr@...com>,
Tom Joseph <tjoseph@...ence.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof Wilczy_ski <kw@...ux.com>,
Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>
CC: <linux-omap@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, Achal Verma <a-verma1@...com>
Subject: [PATCH] PCI: j721e: Fix delay before PERST# deassert
As per the PCIe Card Electromechanical specification REV. 3.0, PERST#
signal should be de-asserted after minimum 100ms from the time power-rails
become stable. Current delay of 100us is observed to be not enough on some
custom platform implemented using TI's K3 SOCs.
So, to ensure 100ms delay to give sufficient time for power-rails and
refclk to become stable, change delay from 100us to 100ms.
>From PCIe Card Electromechanical specification REV. 3.0 section 2.6.2:
TPVPERL: Power stable to PERST# inactive - 100ms
T-PERST-CLK: REFCLK stable before PERST# inactive - 100 usec.
Fixes: f3e25911a430 ("PCI: j721e: Add TI J721E PCIe driver")
Signed-off-by: Achal Verma <a-verma1@...com>
---
drivers/pci/controller/cadence/pci-j721e.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
index e70213c9060a..fa2b4c11d2c4 100644
--- a/drivers/pci/controller/cadence/pci-j721e.c
+++ b/drivers/pci/controller/cadence/pci-j721e.c
@@ -499,13 +499,12 @@ static int j721e_pcie_probe(struct platform_device *pdev)
/*
* "Power Sequencing and Reset Signal Timings" table in
* PCI EXPRESS CARD ELECTROMECHANICAL SPECIFICATION, REV. 3.0
- * indicates PERST# should be deasserted after minimum of 100us
- * once REFCLK is stable. The REFCLK to the connector in RC
- * mode is selected while enabling the PHY. So deassert PERST#
- * after 100 us.
+ * indicates PERST# should be deasserted after minimum of 100ms
+ * after power rails achieve specified operating limits and
+ * within this period reference clock should also become stable.
*/
if (gpiod) {
- usleep_range(100, 200);
+ msleep(100);
gpiod_set_value_cansleep(gpiod, 1);
}
--
2.25.1
Powered by blists - more mailing lists