realtek/rtl839x: respect phy-is-integrated property
authorStijn Tintel <stijn@linux-ipv6.be>
Thu, 18 Apr 2024 09:06:12 +0000 (12:06 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 18 Apr 2024 16:13:50 +0000 (19:13 +0300)
commit2416f2ddc1cbbd895f7a31c372823ce9bb48665a
tree9679db51ea1f54161b6d8785a067d1e721fd398e
parente4453d1f8172feee97e0f66a102aa4e63c47e629
realtek/rtl839x: respect phy-is-integrated property

Respect the phy-is-integrated property on ethernet-phy nodes.

There are RTL8393M switches where the PHYs at address 48 and 49 are
provided by an external RTL8214FC. Hardcoding them to use the internal
SerDes makes it impossible to use the ports connected to such an
external PHY. Respect the phy-is-integrated property on ethernet-phy
nodes as a first step to support such ports.

The potential impact for this should be limited to RTL8393 based
switches, and looking at the commit messages and device tree files of
the supported switches based on this SoC, the SFP and/or combo ports are
either not working (D-Link DGS-1210-52, Netgear GS750E, TP-Link
SG2452P/T1600G-52PS), use PHYs at a different address (Panasonic
SwitchM48EG PN28480K), or already have the phy-is-integrated property
set on the PHYs at address 48 and 49.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c