linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gmac: sun8i: r40: add gmac tx_delay support
@ 2023-12-20  9:08 fuyao
  2023-12-20 17:04 ` Jernej Škrabec
  0 siblings, 1 reply; 5+ messages in thread
From: fuyao @ 2023-12-20  9:08 UTC (permalink / raw)
  To: Alexandre Torgue, Jose Abreu, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Maxime Coquelin, netdev, linux-arm-kernel,
	linux-sunxi, linux-stm32, linux-kernel
  Cc: 麦健建

r40 can support tx_delay, so we add it.

Signed-off-by: fuyao <fuyao1697@cyg.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 137741b94122..fd07573afc9b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -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 = {
-- 
2.39.2


-- 
CYG Technology.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gmac: sun8i: r40: add gmac tx_delay support
  2023-12-20  9:08 [PATCH] gmac: sun8i: r40: add gmac tx_delay support fuyao
@ 2023-12-20 17:04 ` Jernej Škrabec
  2023-12-21  7:16   ` fuyao
  0 siblings, 1 reply; 5+ messages in thread
From: Jernej Škrabec @ 2023-12-20 17:04 UTC (permalink / raw)
  To: Alexandre Torgue, Jose Abreu, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Maxime Coquelin, netdev, linux-arm-kernel,
	linux-sunxi, linux-stm32, linux-kernel, 麦健建

Dne sreda, 20. december 2023 ob 10:08:25 CET je fuyao napisal(a):
> 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

> 
> Signed-off-by: fuyao <fuyao1697@cyg.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> index 137741b94122..fd07573afc9b 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> @@ -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 = {
> 





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gmac: sun8i: r40: add gmac tx_delay support
  2023-12-20 17:04 ` Jernej Škrabec
@ 2023-12-21  7:16   ` fuyao
  2024-01-02 15:58     ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: fuyao @ 2023-12-21  7:16 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Alexandre Torgue, Jose Abreu, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Chen-Yu Tsai, Samuel Holland,
	Maxime Coquelin, netdev, linux-arm-kernel, linux-sunxi,
	linux-stm32, linux-kernel, 麦健建

On Wed, Dec 20, 2023 at 06:04:28PM +0100, Jernej Škrabec wrote:
> Dne sreda, 20. december 2023 ob 10:08:25 CET je fuyao napisal(a):
> > 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/linux-3.10@r40-v1.y/-/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

> Best regards,
> Jernej
> 
> > 
> > Signed-off-by: fuyao <fuyao1697@cyg.com>
> > ---
> >  drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> > index 137741b94122..fd07573afc9b 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> > @@ -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 = {
> > 
> 
> 
> 
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gmac: sun8i: r40: add gmac tx_delay support
  2023-12-21  7:16   ` fuyao
@ 2024-01-02 15:58     ` Jakub Kicinski
  2024-01-09 20:15       ` Jernej Škrabec
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2024-01-02 15:58 UTC (permalink / raw)
  To: fuyao
  Cc: Jernej Škrabec, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Paolo Abeni, Chen-Yu Tsai,
	Samuel Holland, Maxime Coquelin, netdev, linux-arm-kernel,
	linux-sunxi, linux-stm32, linux-kernel, 麦健建

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_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/linux-3.10@r40-v1.y/-/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.

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?
-- 
pw-bot: cr

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gmac: sun8i: r40: add gmac tx_delay support
  2024-01-02 15:58     ` Jakub Kicinski
@ 2024-01-09 20:15       ` Jernej Škrabec
  0 siblings, 0 replies; 5+ messages in thread
From: Jernej Škrabec @ 2024-01-09 20:15 UTC (permalink / raw)
  To: fuyao, Jakub Kicinski
  Cc: Alexandre Torgue, Jose Abreu, David S. Miller, Eric Dumazet,
	Paolo Abeni, Chen-Yu Tsai, Samuel Holland, Maxime Coquelin,
	netdev, linux-arm-kernel, linux-sunxi, linux-stm32, linux-kernel,
	麦健建

Dne torek, 02. januar 2024 ob 16:58:07 CET je Jakub Kicinski napisal(a):
> 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_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/linux-3.10@r40-v1.y/-/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.
> 
> 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




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-09 20:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-20  9:08 [PATCH] gmac: sun8i: r40: add gmac tx_delay support fuyao
2023-12-20 17:04 ` Jernej Škrabec
2023-12-21  7:16   ` fuyao
2024-01-02 15:58     ` Jakub Kicinski
2024-01-09 20:15       ` Jernej Škrabec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).