]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: mt7621: Delay phy ports initialization
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Sat, 31 Dec 2022 07:40:41 +0000 (08:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:35 +0000 (09:33 +0100)
commit251bb7bb7b6180e7569b35028c5b098edc1481c4
tree27db0cbc6bb954d8af504af07660eb144fd4faff
parentb5205fbfb77d19b80fb29e7114a34eb354731877
PCI: mt7621: Delay phy ports initialization

[ Upstream commit 1694758df7149f241fa77ece2b909752010b9fc6 ]

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]: https://github.com/openwrt/openwrt/pull/11220

Link: https://lore.kernel.org/r/20221231074041.264738-1-sergio.paracuellos@gmail.com
Fixes: 35d49bff3225 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pcie-mt7621.c