OSDN Git Service

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)
commitb765234e72fcba484a5fdd219e81ab526f416bf7
tree055a93484709e21a8afaea85c4bc264c2299b09e
parentd5490f1f67116419ddf3b4c7b9f3d5a0fb2fd407
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