[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250921160419.333427-18-maxime.chevallier@bootlin.com>
Date: Sun, 21 Sep 2025 21:34:15 +0530
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: davem@...emloft.net
Cc: Maxime Chevallier <maxime.chevallier@...tlin.com>,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
thomas.petazzoni@...tlin.com,
Andrew Lunn <andrew@...n.ch>,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Russell King <linux@...linux.org.uk>,
linux-arm-kernel@...ts.infradead.org,
Christophe Leroy <christophe.leroy@...roup.eu>,
Herve Codina <herve.codina@...tlin.com>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Köry Maincent <kory.maincent@...tlin.com>,
Marek Behún <kabel@...nel.org>,
Oleksij Rempel <o.rempel@...gutronix.de>,
Nicolò Veronese <nicveronese@...il.com>,
Simon Horman <horms@...nel.org>,
mwojtas@...omium.org,
Antoine Tenart <atenart@...nel.org>,
devicetree@...r.kernel.org,
Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Rob Herring <robh@...nel.org>,
Romain Gantois <romain.gantois@...tlin.com>,
Daniel Golle <daniel@...rotopia.org>,
Dimitri Fedrau <dimitri.fedrau@...bherr.com>,
Florian Fainelli <florian.fainelli@...adcom.com>
Subject: [PATCH net-next v13 17/18] net: phy: dp83822: Add SFP support through the phy_port interface
The DP83822 can support 100BaseFX. This mode was only accessible through
custom DT properties, but there also exist SFP modules that support
these modes. As this only requires setting the relevant supported
interface in the driver, expose the port capability with the new
phy_port API, allowing SFP support.
Reviewed-by: Christophe Leroy <christophe.leroy@...roup.eu>
Tested-by: Oleksij Rempel <o.rempel@...gutronix.de>
Tested-by: Florian Fainelli <florian.fainelli@...adcom.com>
Tested-by: Christophe Leroy <christophe.leroy@...roup.eu>
Signed-off-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
---
drivers/net/phy/dp83822.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c
index c6e5b7244658..94036e5af242 100644
--- a/drivers/net/phy/dp83822.c
+++ b/drivers/net/phy/dp83822.c
@@ -980,6 +980,13 @@ static int dp83822_attach_mdi_port(struct phy_device *phydev,
}
}
+ /* If attached from SFP, is_mii is set, but not the mediums. */
+ if (port->is_mii)
+ dp83822->fx_enabled = true;
+
+ if (dp83822->fx_enabled)
+ __set_bit(PHY_INTERFACE_MODE_100BASEX, port->interfaces);
+
return 0;
}
--
2.49.0
Powered by blists - more mailing lists