Skip to content

Commit 0cb2a8f

Browse files
parakaLorenzo Pieralisi
authored andcommitted
PCI: mt7621: Delay phy ports initialization
Some devices like ZBT WE1326 and ZBT WF3526-P and some Netgear models need to delay phy port initialization after calling the mt7621_pcie_init_port() driver function to get into reliable boots for both warm and hard resets. The delay required to detect the ports seems to be in the range [75-100] milliseconds. If the ports are not detected the controller is not functional. There is no datasheet or something similar to really understand why this extra delay is needed only for these devices and it is not for most of the boards that are built on mt7621 SoC. This issue has been reported by openWRT community and the complete discussion is in [0]. The 100 milliseconds delay has been tested in all devices to validate it. Add the extra 100 milliseconds delay to fix the issue. [0]: openwrt/openwrt#11220 Link: https://lore.kernel.org/r/[email protected] Fixes: 2bdd523 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver") Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]>
1 parent 1b929c0 commit 0cb2a8f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/pci/controller/pcie-mt7621.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
#define PCIE_PORT_LINKUP BIT(0)
6161
#define PCIE_PORT_CNT 3
6262

63+
#define INIT_PORTS_DELAY_MS 100
6364
#define PERST_DELAY_MS 100
6465

6566
/**
@@ -369,6 +370,7 @@ static int mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
369370
}
370371
}
371372

373+
msleep(INIT_PORTS_DELAY_MS);
372374
mt7621_pcie_reset_ep_deassert(pcie);
373375

374376
tmp = NULL;

0 commit comments

Comments
 (0)