Skip to content

Instantly share code, notes, and snippets.

@xdarklight
Last active November 14, 2020 20:56
Show Gist options
  • Save xdarklight/6a204caec318b55bb18ce42e7c6e6337 to your computer and use it in GitHub Desktop.
Save xdarklight/6a204caec318b55bb18ce42e7c6e6337 to your computer and use it in GitHub Desktop.
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index 74db81dafee3..0b67c4d717ac 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -1894,6 +1894,16 @@ static int gswip_probe(struct platform_device *pdev)
dev_err(dev, "gphy fw probe failed\n");
return err;
}
+
+ /* The standalone PHY11G requires 300ms to be fully
+ * initialized and ready for any MDIO communication after being
+ * taken out of reset. For the SoC-internal GPHY variant there
+ * is no (known) documentation for the minimum time after a
+ * reset. Use the same value as for the standalone variant as
+ * some users have reported internal PHYs not being detected
+ * without any delay.
+ */
+ msleep(300);
}
/* bring up the mdio bus */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment