Skip to contentSkip to conversation

net: dsa: lantiq_gswip: Add 200ms assert delay

PATCH Applied Aleksander Jan Bajkowski 3 participants 3 messages Sep 12, 2021 – Sep 13, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: dsa: lantiq_gswip: Add 200ms assert delay

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 a09d042b0862 ("net: dsa: lantiq: allow to use all GPHYs on xRX300 and xRX330")
---
 drivers/net/dsa/lantiq_gswip.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/dsa/lantiq_gswip.c +6 -0
index 64d6dfa83122..267324889dd6 100644
@@ -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",
Signature · 1 line
2.30.2
Acked-by on v2 1/1
#1 lore raw
Quoted 8 lines · Aleksander Jan Bajkowski

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 a09d042b0862 ("net: dsa: lantiq: allow to use all GPHYs on xRX300 and xRX330")
Quoted 22 lines
---
  drivers/net/dsa/lantiq_gswip.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/net/dsa/lantiq_gswip.c +6 -0
index 64d6dfa83122..267324889dd6 100644
@@ -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",
#2 lore raw
In reply to Aleksander Jan Bajkowski
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 10 lines · On Sun, 12 Sep 2021 13:58:07 +0200 you wrote:

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 a09d042b0862 ("net: dsa: lantiq: allow to use all GPHYs on xRX300 and xRX330")

[...]

Here is the summary with links:
- [net,v2] net: dsa: lantiq_gswip: Add 200ms assert delay

    https://git.kernel.org/netdev/net/c/111b64e35ea0

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html