Skip to contentSkip to conversation

net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x

PATCH Applied [email protected] 2 participants 2 messages Jun 5, 2023 – Jun 8, 2023

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

PATCH v8 1/1 net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x

From: Michal Smulski <[email protected]>

Enable USXGMII mode for mv88e6393x chips. Tested on Marvell 88E6191X.

---
Changelist (v7 -> v8):
1. added comments related to the link bit of lp_status register.

 drivers/net/dsa/mv88e6xxx/chip.c   |  3 +-
 drivers/net/dsa/mv88e6xxx/port.c   |  3 ++
 drivers/net/dsa/mv88e6xxx/serdes.c | 47 ++++++++++++++++++++++++++++--
 drivers/net/dsa/mv88e6xxx/serdes.h |  4 +++
 4 files changed, 53 insertions(+), 4 deletions(-)
drivers/net/dsa/mv88e6xxx/chip.c +1 -2
index 2af0c1145d36..8b51756bd805 100644
@@ -812,11 +812,10 @@ static void mv88e6393x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,
 			if (!is_6361) {
 				__set_bit(PHY_INTERFACE_MODE_5GBASER, supported);
 				__set_bit(PHY_INTERFACE_MODE_10GBASER, supported);
+				__set_bit(PHY_INTERFACE_MODE_USXGMII, supported);
 				config->mac_capabilities |= MAC_5000FD |
 					MAC_10000FD;
 			}
-			/* FIXME: USXGMII is not supported yet */
-			/* __set_bit(PHY_INTERFACE_MODE_USXGMII, supported); */
 		}
 	}
 
drivers/net/dsa/mv88e6xxx/port.c +3 -0
index e9b4a6ea4d09..dd66ec902d4c 100644
@@ -566,6 +566,9 @@ static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
 	case PHY_INTERFACE_MODE_10GBASER:
 		cmode = MV88E6393X_PORT_STS_CMODE_10GBASER;
 		break;
+	case PHY_INTERFACE_MODE_USXGMII:
+		cmode = MV88E6393X_PORT_STS_CMODE_USXGMII;
+		break;
 	default:
 		cmode = 0;
 	}
drivers/net/dsa/mv88e6xxx/serdes.c +45 -2

90 lines not on this page · raw message

drivers/net/dsa/mv88e6xxx/serdes.h +4 -0
index 29bb4e91e2f6..e245687ddb1d 100644
@@ -48,6 +48,10 @@
 #define MV88E6393X_10G_INT_LINK_CHANGE	BIT(2)
 #define MV88E6393X_10G_INT_STATUS	0x9001
 
+/* USXGMII */
+#define MV88E6390_USXGMII_LP_STATUS       0xf0a2
+#define MV88E6390_USXGMII_PHY_STATUS      0xf0a6
+
 /* 1000BASE-X and SGMII */
 #define MV88E6390_SGMII_BMCR		(0x2000 + MII_BMCR)
 #define MV88E6390_SGMII_BMSR		(0x2000 + MII_BMSR)
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Mon, 5 Jun 2023 10:44:42 -0700 you wrote:

From: Michal Smulski <[email protected]>

Enable USXGMII mode for mv88e6393x chips. Tested on Marvell 88E6191X.

---
Changelist (v7 -> v8):
1. added comments related to the link bit of lp_status register.

[...]

Here is the summary with links:
- [net-next,v8] net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x

    https://git.kernel.org/netdev/net-next/c/4a56212774ac

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html