2020-05-06 20:02:25

by Grygorii Strashko

[permalink] [raw]
Subject: [PATCH next] ARM: dts: am437x: fix networking on boards with ksz9031 phy

Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the
KSZ9031 PHY") the networking is broken on boards:
am437x-gp-evm
am437x-sk-evm
am437x-idk-evm

All above boards have phy-mode = "rgmii" and this is worked before, because
KSZ9031 PHY started with default RGMII internal delays configuration (TX
off, RX on 1.2 ns) and MAC provided TX delay. After above commit, the
KSZ9031 PHY starts handling phy mode properly and disables RX delay, as
result networking is become broken.

Fix it by switching to phy-mode = "rgmii-rxid" to reflect previous
behavior.

Cc: Oleksij Rempel <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Philippe Schenker <[email protected]>
Fixes: commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
Signed-off-by: Grygorii Strashko <[email protected]>
---
arch/arm/boot/dts/am437x-gp-evm.dts | 2 +-
arch/arm/boot/dts/am437x-idk-evm.dts | 2 +-
arch/arm/boot/dts/am437x-sk-evm.dts | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index 811c8cae315b..d692e3b2812a 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -943,7 +943,7 @@

&cpsw_emac0 {
phy-handle = <&ethphy0>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-rxid";
};

&elm {
diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts
index 9f66f96d09c9..a7495fb364bf 100644
--- a/arch/arm/boot/dts/am437x-idk-evm.dts
+++ b/arch/arm/boot/dts/am437x-idk-evm.dts
@@ -504,7 +504,7 @@

&cpsw_emac0 {
phy-handle = <&ethphy0>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
};

&rtc {
diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index 25222497f828..4d5a7ca2e25d 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -833,13 +833,13 @@

&cpsw_emac0 {
phy-handle = <&ethphy0>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-rxid";
dual_emac_res_vlan = <1>;
};

&cpsw_emac1 {
phy-handle = <&ethphy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-rxid";
dual_emac_res_vlan = <2>;
};

--
2.17.1


2020-05-07 04:43:23

by Oleksij Rempel

[permalink] [raw]
Subject: Re: [PATCH next] ARM: dts: am437x: fix networking on boards with ksz9031 phy

Hi Grygorii,

thank you for you patches!

On Wed, May 06, 2020 at 10:08:35PM +0300, Grygorii Strashko wrote:
> Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the
> KSZ9031 PHY") the networking is broken on boards:
> am437x-gp-evm
> am437x-sk-evm
> am437x-idk-evm
>
> All above boards have phy-mode = "rgmii" and this is worked before, because
> KSZ9031 PHY started with default RGMII internal delays configuration (TX
> off, RX on 1.2 ns) and MAC provided TX delay. After above commit, the
> KSZ9031 PHY starts handling phy mode properly and disables RX delay, as
> result networking is become broken.
>
> Fix it by switching to phy-mode = "rgmii-rxid" to reflect previous
> behavior.
>
> Cc: Oleksij Rempel <[email protected]>
> Cc: Andrew Lunn <[email protected]>
> Cc: Philippe Schenker <[email protected]>
> Fixes: commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
> Signed-off-by: Grygorii Strashko <[email protected]>
> ---
> arch/arm/boot/dts/am437x-gp-evm.dts | 2 +-
> arch/arm/boot/dts/am437x-idk-evm.dts | 2 +-
> arch/arm/boot/dts/am437x-sk-evm.dts | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
> index 811c8cae315b..d692e3b2812a 100644
> --- a/arch/arm/boot/dts/am437x-gp-evm.dts
> +++ b/arch/arm/boot/dts/am437x-gp-evm.dts
> @@ -943,7 +943,7 @@
>
> &cpsw_emac0 {
> phy-handle = <&ethphy0>;
> - phy-mode = "rgmii";
> + phy-mode = "rgmii-rxid";
> };
>
> &elm {
> diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts
> index 9f66f96d09c9..a7495fb364bf 100644
> --- a/arch/arm/boot/dts/am437x-idk-evm.dts
> +++ b/arch/arm/boot/dts/am437x-idk-evm.dts
> @@ -504,7 +504,7 @@
>
> &cpsw_emac0 {
> phy-handle = <&ethphy0>;
> - phy-mode = "rgmii";
> + phy-mode = "rgmii-id";
> };

Do you have here really rgmii-id?


> &rtc {
> diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
> index 25222497f828..4d5a7ca2e25d 100644
> --- a/arch/arm/boot/dts/am437x-sk-evm.dts
> +++ b/arch/arm/boot/dts/am437x-sk-evm.dts
> @@ -833,13 +833,13 @@
>
> &cpsw_emac0 {
> phy-handle = <&ethphy0>;
> - phy-mode = "rgmii";
> + phy-mode = "rgmii-rxid";
> dual_emac_res_vlan = <1>;
> };
>
> &cpsw_emac1 {
> phy-handle = <&ethphy1>;
> - phy-mode = "rgmii";
> + phy-mode = "rgmii-rxid";
> dual_emac_res_vlan = <2>;
> };
>
> --
> 2.17.1

Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


Attachments:
(No filename) (2.86 kB)
signature.asc (849.00 B)
Download all attachments

2020-05-07 15:16:12

by Grygorii Strashko

[permalink] [raw]
Subject: Re: [PATCH next] ARM: dts: am437x: fix networking on boards with ksz9031 phy



On 07/05/2020 07:40, Oleksij Rempel wrote:
> Hi Grygorii,
>
> thank you for you patches!
>
> On Wed, May 06, 2020 at 10:08:35PM +0300, Grygorii Strashko wrote:
>> Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the
>> KSZ9031 PHY") the networking is broken on boards:
>> am437x-gp-evm
>> am437x-sk-evm
>> am437x-idk-evm
>>
>> All above boards have phy-mode = "rgmii" and this is worked before, because
>> KSZ9031 PHY started with default RGMII internal delays configuration (TX
>> off, RX on 1.2 ns) and MAC provided TX delay. After above commit, the
>> KSZ9031 PHY starts handling phy mode properly and disables RX delay, as
>> result networking is become broken.
>>
>> Fix it by switching to phy-mode = "rgmii-rxid" to reflect previous
>> behavior.
>>
>> Cc: Oleksij Rempel <[email protected]>
>> Cc: Andrew Lunn <[email protected]>
>> Cc: Philippe Schenker <[email protected]>
>> Fixes: commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
>> Signed-off-by: Grygorii Strashko <[email protected]>
>> ---
>> arch/arm/boot/dts/am437x-gp-evm.dts | 2 +-
>> arch/arm/boot/dts/am437x-idk-evm.dts | 2 +-
>> arch/arm/boot/dts/am437x-sk-evm.dts | 4 ++--
>> 3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
>> index 811c8cae315b..d692e3b2812a 100644
>> --- a/arch/arm/boot/dts/am437x-gp-evm.dts
>> +++ b/arch/arm/boot/dts/am437x-gp-evm.dts
>> @@ -943,7 +943,7 @@
>>
>> &cpsw_emac0 {
>> phy-handle = <&ethphy0>;
>> - phy-mode = "rgmii";
>> + phy-mode = "rgmii-rxid";
>> };
>>
>> &elm {
>> diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts
>> index 9f66f96d09c9..a7495fb364bf 100644
>> --- a/arch/arm/boot/dts/am437x-idk-evm.dts
>> +++ b/arch/arm/boot/dts/am437x-idk-evm.dts
>> @@ -504,7 +504,7 @@
>>
>> &cpsw_emac0 {
>> phy-handle = <&ethphy0>;
>> - phy-mode = "rgmii";
>> + phy-mode = "rgmii-id";
>> };
>
> Do you have here really rgmii-id?
>

Right, thanks you.

--
Best regards,
grygorii