mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
09bbedac72
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>
24 lines
422 B
C
24 lines
422 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* MDIO I2C bridge
|
|
*
|
|
* Copyright (C) 2015 Russell King
|
|
*/
|
|
#ifndef MDIO_I2C_H
|
|
#define MDIO_I2C_H
|
|
|
|
struct device;
|
|
struct i2c_adapter;
|
|
struct mii_bus;
|
|
|
|
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,
|
|
enum mdio_i2c_proto protocol);
|
|
|
|
#endif
|