gmac: sun8i: r40: add gmac tx_delay support
Subsystems (5)
PATCH 1/1 gmac: sun8i: r40: add gmac tx_delay support
r40 can support tx_delay, so we add it.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 -0
@@ -127,6 +127,7 @@ static const struct emac_variant emac_variant_r40 = { .support_mii = true, .support_rgmii = true, .rx_delay_max = 7, + .tx_delay_max = 7, };static const struct emac_variant emac_variant_a64 = {
Signature · 5 lines
2.39.2 -- CYG Technology.
Jernej Škrabec
maintainerDne sreda, 20. december 2023 ob 10:08:25 CET je fuyao napisal(a):
Quoted 1 line
r40 can support
tx_delay, so we add it.
I don't see how. User manual, 3.3.4.64. GMAC Clock Register talks only about RX delay.
Best regards,
Jernej
Quoted 19 lines
Signed-off-by fuyao <[email protected]>--- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1
-0@@ -127,6 +127,7 @@ static const struct emac_variant emac_variant_r40 = { .support_mii = true, .support_rgmii = true, .rx_delay_max = 7, + .tx_delay_max = 7, };static const struct emac_variant emac_variant_a64 = {
Quoted 6 lines · Jernej Škrabec
Dne sreda, 20. december 2023 ob 10:08:25 CET je fuyao napisal(a):
Quoted 1 line
r40 can support
tx_delay, so we add it.I don't see how. User manual, 3.3.4.64. GMAC Clock Register talks only about RX delay.
I don't see it in the user manual also.
it works fine in 100M, but it doesn't work good in 1G without tx_delay in my board.
Read the sdk from allwinner I found in:
https://sourcegraph.com/github.com/tinalinux/linux-3.10/-/blob/arch/arm/boot/dts/sun8iw11p1.dtsi?L1826
https://sourcegraph.com/github.com/tinalinux/[email protected]/-/blob/drivers/net/ethernet/allwinner/sunxi-gmac.c?L877
And I add it to my board, it works fine.
So, I think it may be exist register but not documented.
Best regards,
fuyao
Quoted 26 lines
Best regards,
JernejQuoted 19 lines
Signed-off-by fuyao <[email protected]>--- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1
-0@@ -127,6 +127,7 @@ static const struct emac_variant emac_variant_r40 = { .support_mii = true, .support_rgmii = true, .rx_delay_max = 7, + .tx_delay_max = 7, };static const struct emac_variant emac_variant_a64 = {
Jakub Kicinski
maintainerQuoted 5 lines · On Thu, 21 Dec 2023 15:16:54 +0800 fuyao wrote:
I don't see it in the user manual also.
it works fine in 100M, but it doesn't work good in 1G without
tx_delayin my board.
Quoted 8 lines
Read the sdk from allwinner I found in:
https://sourcegraph.com/github.com/tinalinux/linux-3.10/-/blob/arch/arm/boot/dts/sun8iw11p1.dtsi?L1826
https://sourcegraph.com/github.com/tinalinux/[email protected]/-/blob/drivers/net/ethernet/allwinner/sunxi-gmac.c?L877And I add it to my board, it works fine.
So, I think it may be exist register but not documented.
Unless Allwinner can chime in we should at least document the situation clearly in the commit message (incl. what HW+config was tested, exactly) and add a comment in the code?
Signature · 1 line
pw-bot: cr
Jernej Škrabec
maintainerDne torek, 02. januar 2024 ob 16:58:07 CET je Jakub Kicinski napisal(a):
Quoted 11 lines · On Thu, 21 Dec 2023 15:16:54 +0800 fuyao wrote:
Quoted 10 lines
I don't see it in the user manual also.
it works fine in 100M, but it doesn't work good in 1G without
tx_delayin my board.Read the sdk from allwinner I found in:
https://sourcegraph.com/github.com/tinalinux/linux-3.10/-/blob/arch/arm/boot/dts/sun8iw11p1.dtsi?L1826
https://sourcegraph.com/github.com/tinalinux/[email protected]/-/blob/drivers/net/ethernet/allwinner/sunxi-gmac.c?L877
Quoted 8 lines
Quoted 3 lines
And I add it to my board, it works fine.
So, I think it may be exist register but not documented.
Unless Allwinner can chime in we should at least document the situation clearly in the commit message (incl. what HW+config was tested, exactly) and add a comment in the code?
I agree. Fuyao, please do that.
Best regards,
Jernej