Commit 1c08ac0c authored by Corentin Labbe's avatar Corentin Labbe Committed by David S. Miller

net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling

The driver expect "allwinner,leds-active-low" to be in PHY node, but
the binding doc expect it to be in MAC node.

Since all board DT use it also in MAC node, the driver need to search
allwinner,leds-active-low in MAC node.
Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f8821f96
...@@ -808,8 +808,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv) ...@@ -808,8 +808,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
val, reg); val, reg);
if (gmac->variant->soc_has_internal_phy) { if (gmac->variant->soc_has_internal_phy) {
if (of_property_read_bool(priv->plat->phy_node, if (of_property_read_bool(node, "allwinner,leds-active-low"))
"allwinner,leds-active-low"))
reg |= H3_EPHY_LED_POL; reg |= H3_EPHY_LED_POL;
else else
reg &= ~H3_EPHY_LED_POL; reg &= ~H3_EPHY_LED_POL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment