net: mdio: mdio-i2c: Add support for single-byte SMBus operations
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Sat, 22 Mar 2025 07:57:45 +0000 (08:57 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Mar 2025 16:10:55 +0000 (09:10 -0700)
commitd4bd3aca33c2c0d07f76e1482dd5d90525199cec
treee2b1267edef9bbb4ea52adf02ec6c26b416c2162
parent7662abf4db945e0c78ac56c58b198ad1504b554e
net: mdio: mdio-i2c: Add support for single-byte SMBus operations

PHYs that are within copper SFP modules have their MDIO bus accessible
through address 0x56 (usually) on the i2c bus. The MDIO-I2C bridge is
desgned for 16 bits accesses, but we can also perform 8bits accesses by
reading/writing the high and low bytes sequentially.

This commit adds support for this type of accesses, thus supporting
smbus controllers such as the one in the VSC8552.

This was only tested on Copper SFP modules that embed a Marvell 88e1111
PHY.

Tested-by: Sean Anderson <sean.anderson@linux.dev>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250322075745.120831-3-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/mdio/mdio-i2c.c