mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
net: phy: gmii2rgmii: Support external rgmii-id phy
Read the phy mode of the external phy from the device tree if available and check that it is a RGMII variant. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
This commit is contained in:
committed by
Tom Rini
parent
e4bd95bba1
commit
2900342961
@@ -48,7 +48,14 @@ static int xilinxgmiitorgmii_config(struct phy_device *phydev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ext_phydev->interface = PHY_INTERFACE_MODE_RGMII;
|
||||
ext_phydev->interface = ofnode_read_phy_mode(node);
|
||||
if (ext_phydev->interface == PHY_INTERFACE_MODE_NA) {
|
||||
ext_phydev->interface = PHY_INTERFACE_MODE_RGMII;
|
||||
} else if (!phy_interface_is_rgmii(ext_phydev)) {
|
||||
printf("Incorrect external interface type\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ext_phydev->node = phandle.node;
|
||||
phydev->priv = ext_phydev;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user