Re: [PATCH net-next v3 2/2] net: mdio: mdio-i2c: Add support for single-byte SMBus operations

From: Maxime Chevallier
Date: Fri Mar 21 2025 - 14:15:53 EST


On Fri, 14 Mar 2025 17:23:18 +0100
Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx> wrote:

> 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.

As a side note, it's kind of a strange coincidence but I just had
access to a weird SGMII to 100BaseFX module (so with a PHY), and from
my tests the PHY only responds to single-byte MDIO accesses !

Trying to access the PHY with word transactions on 0x56 actually causes
the i2c bus to lock-up...

For the curious the module is a CISCO-PROLABS GLC-GE-100FX-C, and the
PHY id indicates it embeds a Broadcom BCM5461, probably strapped in
SGMII to 100FX mode.

The EEPROM reports strange things though, and I can't get that module to
work at all, the SGMII autoneg appears to go wrong and I get link
up/down events all over the place without anything ever going through,
so I don't think I'll upstream the fixups for the module. Still it
may be another use-case for single-byte mdio-smbus.

Maxime