|
|
cda6d8 |
From f6b97def1dd03e7bf445974451b08640a6fc99e8 Mon Sep 17 00:00:00 2001
|
|
|
cda6d8 |
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
|
cda6d8 |
Date: Mon, 25 Apr 2022 17:20:27 +0200
|
|
|
cda6d8 |
Subject: [PATCH 07/34] net: dsa: lantiq_gswip: Don't set
|
|
|
cda6d8 |
GSWIP_MII_CFG_RMII_CLK
|
|
|
cda6d8 |
Git-commit: 71cffebf6358a7f5031f5b208bbdc1cb4db6e539
|
|
|
cda6d8 |
Patch-mainline: v5.18-rc5
|
|
|
cda6d8 |
References: git-fixes
|
|
|
cda6d8 |
|
|
|
cda6d8 |
Commit 4b5923249b8fa4 ("net: dsa: lantiq_gswip: Configure all remaining
|
|
|
cda6d8 |
GSWIP_MII_CFG bits") added all known bits in the GSWIP_MII_CFGp
|
|
|
cda6d8 |
register. It helped bring this register into a well-defined state so the
|
|
|
cda6d8 |
driver has to rely less on the bootloader to do things right.
|
|
|
cda6d8 |
Unfortunately it also sets the GSWIP_MII_CFG_RMII_CLK bit without any
|
|
|
cda6d8 |
possibility to configure it. Upon further testing it turns out that all
|
|
|
cda6d8 |
boards which are supported by the GSWIP driver in OpenWrt which use an
|
|
|
cda6d8 |
RMII PHY have a dedicated oscillator on the board which provides the
|
|
|
cda6d8 |
50MHz RMII reference clock.
|
|
|
cda6d8 |
|
|
|
cda6d8 |
Don't set the GSWIP_MII_CFG_RMII_CLK bit (but keep the code which always
|
|
|
cda6d8 |
clears it) to fix support for the Fritz!Box 7362 SL in OpenWrt. This is
|
|
|
cda6d8 |
a board with two Atheros AR8030 RMII PHYs. With the "RMII clock" bit set
|
|
|
cda6d8 |
the MAC also generates the RMII reference clock whose signal then
|
|
|
cda6d8 |
conflicts with the signal from the oscillator on the board. This results
|
|
|
cda6d8 |
in a constant cycle of the PHY detecting link up/down (and as a result
|
|
|
cda6d8 |
of that: the two ports using the AR8030 PHYs are not working).
|
|
|
cda6d8 |
|
|
|
cda6d8 |
At the time of writing this patch there's no known board where the MAC
|
|
|
cda6d8 |
(GSWIP) has to generate the RMII reference clock. If needed this can be
|
|
|
cda6d8 |
implemented in future by providing a device-tree flag so the
|
|
|
cda6d8 |
GSWIP_MII_CFG_RMII_CLK bit can be toggled per port.
|
|
|
cda6d8 |
|
|
|
cda6d8 |
Fixes: 4b5923249b8fa4 ("net: dsa: lantiq_gswip: Configure all remaining GSWIP_MII_CFG bits")
|
|
|
cda6d8 |
Tested-by: Jan Hoffmann <jan@3e8.eu>
|
|
|
cda6d8 |
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
|
cda6d8 |
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
cda6d8 |
Link: https://lore.kernel.org/r/20220425152027.2220750-1-martin.blumenstingl@googlemail.com
|
|
|
cda6d8 |
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
|
cda6d8 |
Signed-off-by: Denis Kirjanov <denis.kirjanov@suse.com>
|
|
|
cda6d8 |
---
|
|
|
cda6d8 |
drivers/net/dsa/lantiq_gswip.c | 3 ---
|
|
|
cda6d8 |
1 file changed, 3 deletions(-)
|
|
|
cda6d8 |
|
|
|
cda6d8 |
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
|
|
|
cda6d8 |
index 9e006a25b636..8a8f392813d8 100644
|
|
|
cda6d8 |
--- a/drivers/net/dsa/lantiq_gswip.c
|
|
|
cda6d8 |
+++ b/drivers/net/dsa/lantiq_gswip.c
|
|
|
cda6d8 |
@@ -1663,9 +1663,6 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port,
|
|
|
cda6d8 |
break;
|
|
|
cda6d8 |
case PHY_INTERFACE_MODE_RMII:
|
|
|
cda6d8 |
miicfg |= GSWIP_MII_CFG_MODE_RMIIM;
|
|
|
cda6d8 |
-
|
|
|
cda6d8 |
- /* Configure the RMII clock as output: */
|
|
|
cda6d8 |
- miicfg |= GSWIP_MII_CFG_RMII_CLK;
|
|
|
cda6d8 |
break;
|
|
|
cda6d8 |
case PHY_INTERFACE_MODE_RGMII:
|
|
|
cda6d8 |
case PHY_INTERFACE_MODE_RGMII_ID:
|
|
|
cda6d8 |
--
|
|
|
cda6d8 |
2.16.4
|
|
|
cda6d8 |
|