net: phy: add I2C mdio bus
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 25 Jul 2017 14:03:08 +0000 (15:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 03:55:28 +0000 (20:55 -0700)
commit453d00defba502a48e3f9a218a519b233ff83d16
tree399004eb51b90393cd31c2ab03474bbb63a5bc24
parent5e5758d9d84256d55da831e940276c3216997f3e
net: phy: add I2C mdio bus

Add an I2C MDIO bus bridge library, to allow phylib to access PHYs which
are connected to an I2C bus instead of the more conventional MDIO bus.
Such PHYs can be found in SFP adapters and SFF modules.

Since PHYs appear at I2C bus address 0x40..0x5f, and 0x50/0x51 are
reserved for SFP EEPROMs/diagnostics, we must not allow the MDIO bus
to access these I2C addresses.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/Kconfig
drivers/net/phy/Makefile
drivers/net/phy/mdio-i2c.c [new file with mode: 0644]
drivers/net/phy/mdio-i2c.h [new file with mode: 0644]