1 --- a/drivers/net/phy/at803x.c
2 +++ b/drivers/net/phy/at803x.c
3 @@ -329,6 +329,14 @@ static int at803x_config_init(struct phy
4 AT803X_DEBUG_TX_CLK_DLY_EN, 0);
8 + if (phydev->mdio.dev.of_node &&
9 + of_property_read_bool(phydev->mdio.dev.of_node,
10 + "at803x-disable-smarteee")) {
11 + at803x_disable_smarteee(phydev);
18 @@ -367,6 +375,7 @@ static void at803x_link_change_notify(st
20 struct at803x_priv *priv = phydev->priv;
21 struct at803x_platform_data *pdata;
22 + u8 fixup_rgmii_tx_delay = 0;
23 pdata = dev_get_platdata(&phydev->mdio.dev);
26 @@ -396,8 +405,19 @@ static void at803x_link_change_notify(st
28 priv->phy_reset = false;
30 - if (pdata && pdata->fixup_rgmii_tx_delay &&
31 - phydev->speed != priv->prev_speed) {
33 + if (pdata && pdata->fixup_rgmii_tx_delay)
34 + fixup_rgmii_tx_delay = 1;
36 +#ifdef CONFIG_OF_MDIO
37 + if (phydev->mdio.dev.of_node &&
38 + of_property_read_bool(phydev->mdio.dev.of_node,
39 + "at803x-fixup-rgmii-tx-delay")) {
40 + fixup_rgmii_tx_delay = 1;
44 + if (fixup_rgmii_tx_delay && phydev->speed != priv->prev_speed) {
45 switch (phydev->speed) {