summaryrefslogtreecommitdiff
path: root/include/linux/mdio
diff options
context:
space:
mode:
authorMarek BehĂșn <kabel@kernel.org>2022-09-30 16:21:09 +0200
committerDavid S. Miller <davem@davemloft.net>2022-10-03 11:08:33 +0100
commit09bbedac72d5a9267088c15d1a71c8c3a8fb47e7 (patch)
treec232a27fdf9d01127e0fd348c4c8699f81e709ef /include/linux/mdio
parente85b1347ace677c3822c12d9332dfaaffe594da6 (diff)
net: phy: mdio-i2c: support I2C MDIO protocol for RollBall SFP modules
Some multigig SFPs from RollBall and Hilink do not expose functional MDIO access to the internal PHY of the SFP via I2C address 0x56 (although there seems to be read-only clause 22 access on this address). Instead these SFPs PHY can be accessed via I2C via the SFP Enhanced Digital Diagnostic Interface - I2C address 0x51. The SFP_PAGE has to be selected to 3 and the password must be filled with 0xff bytes for this PHY communication to work. This extends the mdio-i2c driver to support this protocol by adding a special parameter to mdio_i2c_alloc function via which this RollBall protocol can be selected. Signed-off-by: Marek BehĂșn <kabel@kernel.org> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mdio')
-rw-r--r--include/linux/mdio/mdio-i2c.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/mdio/mdio-i2c.h b/include/linux/mdio/mdio-i2c.h
index 3bde1a555a49..65b550a6fc32 100644
--- a/include/linux/mdio/mdio-i2c.h
+++ b/include/linux/mdio/mdio-i2c.h
@@ -15,8 +15,10 @@ enum mdio_i2c_proto {
MDIO_I2C_NONE,
MDIO_I2C_MARVELL_C22,
MDIO_I2C_C45,
+ MDIO_I2C_ROLLBALL,
};
-struct mii_bus *mdio_i2c_alloc(struct device *parent, struct i2c_adapter *i2c);
+struct mii_bus *mdio_i2c_alloc(struct device *parent, struct i2c_adapter *i2c,
+ enum mdio_i2c_proto protocol);
#endif