]> 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)
commit0b0d8a4352dada15462f69599d8ca1e73fb8e514
tree055a93484709e21a8afaea85c4bc264c2299b09e
parente5555e04a1ab174ca81dfb521003a6d7d4807446
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