realtek: mdio: register PHYs via fwnode for PSE support
Switch from auto-scan PHY discovery to explicit DT-based registration
using fwnode_mdiobus_register_phy(). This is the standard approach used
by of_mdiobus_register() and most MDIO drivers.
Auto-scan (phy_mask-based) registration does not attach DT fwnode data
to PHY devices, which means DT properties like "pses" are never parsed.
As a result, PSE controllers referenced from PHY nodes are not linked,
and ethtool PSE commands (--show-pse, --set-pse) do not work.
Store the device_node for each PHY found during DT parsing, suppress
auto-scan by setting phy_mask to ~0, and register each PHY explicitly
after devm_mdiobus_register(). This allows fwnode_find_pse_control() to
resolve PSE references and also establishes proper fw_devlink supplier
relationships.
Additionally this fixes a bug where the RTL8221B is limited to
1G and below due to missing DTS references.
Fixes: 4e00306 ("realtek: mdio: use bus auto registration")
Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/22019
Signed-off-by: Robert Marko <robimarko@gmail.com>