004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch 1.1 KB

1234567891011121314151617181920212223242526272829
  1. From 1c08ac0c4bd8e9d66c4dde29bc496c3b430dd028 Mon Sep 17 00:00:00 2001
  2. From: Corentin Labbe <clabbe.montjoie@gmail.com>
  3. Date: Tue, 28 Nov 2017 17:48:22 +0100
  4. Subject: net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling
  5. The driver expect "allwinner,leds-active-low" to be in PHY node, but
  6. the binding doc expect it to be in MAC node.
  7. Since all board DT use it also in MAC node, the driver need to search
  8. allwinner,leds-active-low in MAC node.
  9. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
  10. Signed-off-by: David S. Miller <davem@davemloft.net>
  11. ---
  12. drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 +--
  13. 1 file changed, 1 insertion(+), 2 deletions(-)
  14. --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
  15. +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
  16. @@ -809,8 +809,7 @@ static int sun8i_dwmac_set_syscon(struct
  17. val, reg);
  18. if (gmac->variant->soc_has_internal_phy) {
  19. - if (of_property_read_bool(priv->plat->phy_node,
  20. - "allwinner,leds-active-low"))
  21. + if (of_property_read_bool(node, "allwinner,leds-active-low"))
  22. reg |= H3_EPHY_LED_POL;
  23. else
  24. reg &= ~H3_EPHY_LED_POL;