realtek: Add support for SFP EEPROM-access over SMBus
authorBirger Koblitz <git@birger-koblitz.de>
Sun, 16 Jan 2022 10:18:38 +0000 (11:18 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 17 Feb 2022 15:21:46 +0000 (15:21 +0000)
commit45053b507c66d93c6db70e25f867e19a3af9bad4
tree0881c12757650b55bc5591ef6f362f2b8476e69b
parentf4bdb7fdccdfe3fa382abe77f72a16c2f2e6add0
realtek: Add support for SFP EEPROM-access over SMBus

The EEPROMs on SFP modules are compatible both to I2C as well
as SMBus. However, the kernel so far only supports I2C
access. We add SMBus access routines, because the I2C driver
for the RTL9300 HW only supports that protocol. At the same
time we disable I2C access to PHYs on SFP modules as otherwise
detection of any SFP module would fail. This is not in any
way problematic at this point in time since the RTL93XX
platform so far does not support PHYs on SFP modules.

The patches are copied and rebased version of:
https://bootlin.com/blog/sfp-modules-on-a-board-running-linux/

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
target/linux/realtek/config-5.10
target/linux/realtek/patches-5.10/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch [new file with mode: 0644]
target/linux/realtek/patches-5.10/711-net-phy-add-an-MDIO-SMBus-library.patch [new file with mode: 0644]
target/linux/realtek/patches-5.10/712-net-phy-sfp-add-support-for-SMBus.patch [new file with mode: 0644]