]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: mdio-i2c: support I2C MDIO protocol for RollBall SFP modules
authorMarek Behún <kabel@kernel.org>
Fri, 30 Sep 2022 14:21:09 +0000 (16:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2022 10:08:33 +0000 (11:08 +0100)
commitc42d4b46a74a016348d4b2b417a436c9d914332e
treec232a27fdf9d01127e0fd348c4c8699f81e709ef
parentf8e26759898f110846a6bc2b5361f6860bb968cf
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>
drivers/net/mdio/mdio-i2c.c
drivers/net/phy/sfp.c
include/linux/mdio/mdio-i2c.h