1
0
Fork 0
forked from mirror/openwrt
openwrt/target
Carlo Szelinsky a36ab12454 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>
2026-02-19 10:46:45 +01:00
..
imagebuilder treewide: drop CVS support 2026-02-13 15:40:13 +01:00
linux realtek: mdio: register PHYs via fwnode for PSE support 2026-02-19 10:46:45 +01:00
llvm-bpf
sdk treewide: drop CVS support 2026-02-13 15:40:13 +01:00
toolchain
Config.in targets: add USES_PM auto-feature 2025-07-20 12:16:13 +01:00
Makefile