Switch to use the ofnode_phy_is_fixed_link() API which can support
both the new and old DT bindings.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
#include <miiphy.h>
#include <dm/device-internal.h>
#include <dm/device_compat.h>
+#include <dm/of_extra.h>
#include <dm/uclass-internal.h>
#include <linux/compat.h>
int i;
if (CONFIG_IS_ENABLED(PHY_FIXED) &&
- ofnode_valid(dev_read_subnode(ethdev, "fixed-link"))) {
+ ofnode_phy_is_fixed_link(dev_ofnode(ethdev), NULL)) {
phy = phy_connect(NULL, -1, ethdev, interface);
goto out;
}