linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
@ 2017-03-19  4:50 Florian Fainelli
  2017-03-22  4:06 ` Chen-Yu Tsai
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2017-03-19  4:50 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: mo.ucina, Florian Fainelli, Rob Herring, Mark Rutland,
	Russell King, Maxime Ripard, Chen-Yu Tsai,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, open list

The CPU port of the BCM53125 is configured with RGMII (no delays) but
this should actually be RGMII with transmit delay (rgmii-txid) because
STMMAC takes care of inserting the transmitter delay. This fixes
occasional packet loss encountered.

Fixes: d7b9eaff5f0c ("ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board")
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
index 72ec0d5ae052..bbf1c8cbaac6 100644
--- a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
+++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
@@ -167,7 +167,7 @@
 					reg = <8>;
 					label = "cpu";
 					ethernet = <&gmac>;
-					phy-mode = "rgmii";
+					phy-mode = "rgmii-txid";
 					fixed-link {
 						speed = <1000>;
 						full-duplex;
-- 
2.9.3

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

* Re: [PATCH] ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
  2017-03-19  4:50 [PATCH] ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings Florian Fainelli
@ 2017-03-22  4:06 ` Chen-Yu Tsai
  2017-03-22 21:12   ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Chen-Yu Tsai @ 2017-03-22  4:06 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-arm-kernel, mo.ucina, Rob Herring, Mark Rutland,
	Russell King, Maxime Ripard, Chen-Yu Tsai,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, open list

Hi Florian,

On Sun, Mar 19, 2017 at 12:50 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> The CPU port of the BCM53125 is configured with RGMII (no delays) but
> this should actually be RGMII with transmit delay (rgmii-txid) because
> STMMAC takes care of inserting the transmitter delay. This fixes
> occasional packet loss encountered.
>
> Fixes: d7b9eaff5f0c ("ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board")
> Reported-by: Hartmut Knaack <knaack.h@gmx.de>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
> index 72ec0d5ae052..bbf1c8cbaac6 100644
> --- a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
> @@ -167,7 +167,7 @@
>                                         reg = <8>;
>                                         label = "cpu";
>                                         ethernet = <&gmac>;
> -                                       phy-mode = "rgmii";
> +                                       phy-mode = "rgmii-txid";

Just to clarify, the DT binding says:

  * "rgmii-txid" (RGMII with internal TX delay provided by the PHY, the MAC
     should not add an TX delay in this case)

I'm assuming this applies from the device node's point of view?
In this case the "PHY" is STMMAC, and the "MAC" is the switch chip?
Is that right?


Thanks
ChenYu

>                                         fixed-link {
>                                                 speed = <1000>;
>                                                 full-duplex;
> --
> 2.9.3
>

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

* Re: [PATCH] ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
  2017-03-22  4:06 ` Chen-Yu Tsai
@ 2017-03-22 21:12   ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2017-03-22 21:12 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: linux-arm-kernel, mo.ucina, Rob Herring, Mark Rutland,
	Russell King, Maxime Ripard,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM PORT, open list

Hello Chen-Yu,

On 03/21/2017 09:06 PM, Chen-Yu Tsai wrote:
> Hi Florian,
> 
> On Sun, Mar 19, 2017 at 12:50 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>> The CPU port of the BCM53125 is configured with RGMII (no delays) but
>> this should actually be RGMII with transmit delay (rgmii-txid) because
>> STMMAC takes care of inserting the transmitter delay. This fixes
>> occasional packet loss encountered.
>>
>> Fixes: d7b9eaff5f0c ("ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board")
>> Reported-by: Hartmut Knaack <knaack.h@gmx.de>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>>  arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
>> index 72ec0d5ae052..bbf1c8cbaac6 100644
>> --- a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
>> +++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
>> @@ -167,7 +167,7 @@
>>                                         reg = <8>;
>>                                         label = "cpu";
>>                                         ethernet = <&gmac>;
>> -                                       phy-mode = "rgmii";
>> +                                       phy-mode = "rgmii-txid";
> 
> Just to clarify, the DT binding says:
> 
>   * "rgmii-txid" (RGMII with internal TX delay provided by the PHY, the MAC
>      should not add an TX delay in this case)
> 
> I'm assuming this applies from the device node's point of view?
> In this case the "PHY" is STMMAC, and the "MAC" is the switch chip?
> Is that right?

It's actually a MAC to MAC type of set up here, so the definition of the
property kind of still applies, with the caveat that we need to make
sure that if one side uses "rgmii", the other one uses "rgmii-txid"
which is what is being done here. I think I typoed in the commit message
in that it should read "STMMAC does not take care of inserting the
transmitter delay here" which is why the switch must do it.

Thanks!
-- 
Florian

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

* Re: [PATCH] ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
  2017-03-20  8:29 ` Maxime Ripard
@ 2017-03-20  8:32   ` Chen-Yu Tsai
  0 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2017-03-20  8:32 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Florian Fainelli, linux-arm-kernel, mo.ucina, Rob Herring,
	Mark Rutland, Russell King, Chen-Yu Tsai,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Hi,

On Mon, Mar 20, 2017 at 4:29 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi Florian,
>
> On Sat, Mar 18, 2017 at 09:53:20PM -0700, Florian Fainelli wrote:
>> The CPU port of the BCM53125 is configured with RGMII (no delays) but
>> this should actually be RGMII with transmit delay (rgmii-txid) because
>> STMMAC takes care of inserting the transmitter delay. This fixes
>> occasional packet loss encountered.
>>
>> Fixes: d7b9eaff5f0c ("ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board")
>> Reported-by: Hartmut Knaack <knaack.h@gmx.de>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>
> Applied, thanks!
> Maxime

I'm not sure dwmac-sunxi supports "rgmii-txid" though.
At least I don't remember implementing it.

ChenYu

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

* Re: [PATCH] ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
  2017-03-19  4:53 Florian Fainelli
@ 2017-03-20  8:29 ` Maxime Ripard
  2017-03-20  8:32   ` Chen-Yu Tsai
  0 siblings, 1 reply; 6+ messages in thread
From: Maxime Ripard @ 2017-03-20  8:29 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-arm-kernel, mo.ucina, Rob Herring, Mark Rutland,
	Russell King, Chen-Yu Tsai,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

Hi Florian,

On Sat, Mar 18, 2017 at 09:53:20PM -0700, Florian Fainelli wrote:
> The CPU port of the BCM53125 is configured with RGMII (no delays) but
> this should actually be RGMII with transmit delay (rgmii-txid) because
> STMMAC takes care of inserting the transmitter delay. This fixes
> occasional packet loss encountered.
> 
> Fixes: d7b9eaff5f0c ("ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board")
> Reported-by: Hartmut Knaack <knaack.h@gmx.de>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [PATCH] ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
@ 2017-03-19  4:53 Florian Fainelli
  2017-03-20  8:29 ` Maxime Ripard
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2017-03-19  4:53 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: mo.ucina, Florian Fainelli, Rob Herring, Mark Rutland,
	Russell King, Maxime Ripard, Chen-Yu Tsai,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

The CPU port of the BCM53125 is configured with RGMII (no delays) but
this should actually be RGMII with transmit delay (rgmii-txid) because
STMMAC takes care of inserting the transmitter delay. This fixes
occasional packet loss encountered.

Fixes: d7b9eaff5f0c ("ARM: dts: sun7i: Add BCM53125 switch nodes to the lamobo-r1 board")
Reported-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
index 72ec0d5ae052..bbf1c8cbaac6 100644
--- a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
+++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
@@ -167,7 +167,7 @@
 					reg = <8>;
 					label = "cpu";
 					ethernet = <&gmac>;
-					phy-mode = "rgmii";
+					phy-mode = "rgmii-txid";
 					fixed-link {
 						speed = <1000>;
 						full-duplex;
-- 
2.9.3

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

end of thread, other threads:[~2017-03-22 21:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-19  4:50 [PATCH] ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings Florian Fainelli
2017-03-22  4:06 ` Chen-Yu Tsai
2017-03-22 21:12   ` Florian Fainelli
2017-03-19  4:53 Florian Fainelli
2017-03-20  8:29 ` Maxime Ripard
2017-03-20  8:32   ` Chen-Yu Tsai

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).