]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: lantiq_gswip: Add 200ms assert delay
authorAleksander Jan Bajkowski <olek2@wp.pl>
Sun, 12 Sep 2021 11:58:07 +0000 (13:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Sep 2021 12:01:44 +0000 (13:01 +0100)
The delay is especially needed by the xRX300 and xRX330 SoCs. Without
this patch, some phys are sometimes not properly detected.

The patch was tested on BT Home Hub 5A and D-Link DWR-966.

Fixes: dcf121824563 ("net: dsa: lantiq: allow to use all GPHYs on xRX300 and xRX330")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lantiq_gswip.c

index 64d6dfa83122035810ddcd967c943bf8c40a224f..267324889dd647e6fcf571b9aa3195c79d32613d 100644 (file)
@@ -1885,6 +1885,12 @@ static int gswip_gphy_fw_load(struct gswip_priv *priv, struct gswip_gphy_fw *gph
 
        reset_control_assert(gphy_fw->reset);
 
+       /* The vendor BSP uses a 200ms delay after asserting the reset line.
+        * Without this some users are observing that the PHY is not coming up
+        * on the MDIO bus.
+        */
+       msleep(200);
+
        ret = request_firmware(&fw, gphy_fw->fw_name, dev);
        if (ret) {
                dev_err(dev, "failed to load firmware: %s, error: %i\n",