]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-meson8b: make the RGMII TX delay configurable
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sun, 22 Jan 2017 22:02:46 +0000 (23:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Jan 2017 18:35:40 +0000 (13:35 -0500)
commit3ecac21b3b7ff66b17413606f1402a9291e26b4a
tree055a93484709e21a8afaea85c4bc264c2299b09e
parent4eb25ca682b7855c7077070328bbbb17db8cbeb7
net: stmmac: dwmac-meson8b: make the RGMII TX delay configurable

Prior to this patch we were using a hardcoded RGMII TX clock delay of
2ns (= 1/4 cycle of the 125MHz RGMII TX clock). This value works for
many boards, but unfortunately not for all (due to the way the actual
circuit is designed, sometimes because the TX delay is enabled in the
PHY, etc.). Making the TX delay on the MAC side configurable allows us
to support all possible hardware combinations.

This allows fixing a compatibility issue on some boards, where the
RTL8211F PHY is configured to generate the TX delay. We can now turn
off the TX delay in the MAC, because otherwise we would be applying the
delay twice (which results in non-working TX traffic).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c