Skip to contentSkip to conversation

ARM: dts: am335x-evm/evmsk: Fix PHY mode for ethernet

PATCH In review Peter Ujfalusi 2 participants 9 messages Feb 18, 2019 – Feb 20, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: dts: am335x-evm/evmsk: Fix PHY mode for ethernet

Hi,

cd28d1d6e52e: ("net: phy: at803x: Disable phy delay for RGMII mode") broke the ethernet networking on evmsk (and most likely on the evm as well):
https://patchwork.ozlabs.org/patch/1028527/

v1 patch to fix the situation:
https://patchwork.ozlabs.org/patch/1040617/

It turned out that the at803x driver is actually broken and need to be fixed along with the DT data.

The following series is proposed to fix the driver:
https://patchwork.ozlabs.org/project/netdev/list/?series=92611

but the PHT mode needs to be switched to rgmii-id from rgmii-txid:
The rx delay is enabled by default and the driver never disabled it so when asking rgmii-txid it actually got rgmii-id.

The patch can be backported to stable, I have tested that it is not causing regression with the old, broken driver.

Regards,
Peter
---
Peter Ujfalusi (2):
ARM: dts: am335x-evmsk: Fix PHY mode for ethernet
ARM: dts: am335x-evm: Fix PHY mode for ethernet

 arch/arm/boot/dts/am335x-evm.dts   | 2 +-
 arch/arm/boot/dts/am335x-evmsk.dts | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 10 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/2 ARM: dts: am335x-evmsk: Fix PHY mode for ethernet

The PHY must add both tx and rx delay and not only on the tx clock. The board uses AR8031_AL1A PHY where the rx delay is enabled by default, the tx dealy is disabled.

The reason why rgmii-txid worked because the rx delay was not disabled by the driver so essentially we ended up with rgmii-id PHY mode.

---
 arch/arm/boot/dts/am335x-evmsk.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am335x-evmsk.dts +2 -2
index 172c0224e7f6..b128998097ce 100644
@@ -651,13 +651,13 @@
 
 &cpsw_emac0 {
 	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii-txid";
+	phy-mode = "rgmii-id";
 	dual_emac_res_vlan = <1>;
 };
 
 &cpsw_emac1 {
 	phy-handle = <&ethphy1>;
-	phy-mode = "rgmii-txid";
+	phy-mode = "rgmii-id";
 	dual_emac_res_vlan = <2>;
 };
 
Signature · 4 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
#2 lore raw

PATCH 2/2 ARM: dts: am335x-evm: Fix PHY mode for ethernet

In reply to Peter Ujfalusi

The PHY must add both tx and rx delay and not only on the tx clock. The board uses AR8031_AL1A PHY where the rx delay is enabled by default, the tx dealy is disabled.

The reason why rgmii-txid worked because the rx delay was not disabled by the driver so essentially we ended up with rgmii-id PHY mode.

---
 arch/arm/boot/dts/am335x-evm.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/am335x-evm.dts +1 -1
index b67f5fee1469..dce5be5df97b 100644
@@ -729,7 +729,7 @@
 
 &cpsw_emac0 {
 	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii-txid";
+	phy-mode = "rgmii-id";
 };
 
 &tscadc {
Signature · 4 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
#3 lore raw
In reply to Peter Ujfalusi
Quoted 15 lines · Peter Ujfalusi

Hi,

cd28d1d6e52e: ("net: phy: at803x: Disable phy delay for RGMII mode") broke the ethernet networking on evmsk (and most likely on the evm as well):
https://patchwork.ozlabs.org/patch/1028527/

v1 patch to fix the situation:
https://patchwork.ozlabs.org/patch/1040617/

It turned out that the at803x driver is actually broken and need to be fixed along with the DT data.

The following series is proposed to fix the driver:
https://patchwork.ozlabs.org/project/netdev/list/?series=92611

Quoted 6 lines

but the PHT mode needs to be switched to rgmii-id from rgmii-txid:
The rx delay is enabled by default and the driver never disabled it so when asking rgmii-txid it actually got rgmii-id.

The patch can be backported to stable, I have tested that it is not causing regression with the old, broken driver.

Can the dts changes be merged before the driver changes or does it cause the phy to stop working?

Regards,

Tony

#4 lore raw
Quoted 20 lines · Tony Lindgren
Quoted 19 lines · Peter Ujfalusi

Hi,

cd28d1d6e52e: ("net: phy: at803x: Disable phy delay for RGMII mode") broke the ethernet networking on evmsk (and most likely on the evm as well):
https://patchwork.ozlabs.org/patch/1028527/

v1 patch to fix the situation:
https://patchwork.ozlabs.org/patch/1040617/

It turned out that the at803x driver is actually broken and need to be fixed along with the DT data.

The following series is proposed to fix the driver:
https://patchwork.ozlabs.org/project/netdev/list/?series=92611

but the PHT mode needs to be switched to rgmii-id from rgmii-txid:
The rx delay is enabled by default and the driver never disabled it so when asking rgmii-txid it actually got rgmii-id.

Quoted 5 lines
Quoted 2 lines

The patch can be backported to stable, I have tested that it is not causing regression with the old, broken driver.

Can the dts changes be merged before the driver changes or does it cause the phy to stop working?

The phy is not working atm, but this change will not cause regression even if it is merged first.

Quoted 5 lines

Regards,

Tony

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

#5 lore raw
Quoted 23 lines · Peter Ujfalusi
Quoted 20 lines · Tony Lindgren
Quoted 19 lines · Peter Ujfalusi

Hi,

cd28d1d6e52e: ("net: phy: at803x: Disable phy delay for RGMII mode") broke the ethernet networking on evmsk (and most likely on the evm as well):
https://patchwork.ozlabs.org/patch/1028527/

v1 patch to fix the situation:
https://patchwork.ozlabs.org/patch/1040617/

It turned out that the at803x driver is actually broken and need to be fixed along with the DT data.

The following series is proposed to fix the driver:
https://patchwork.ozlabs.org/project/netdev/list/?series=92611

but the PHT mode needs to be switched to rgmii-id from rgmii-txid:
The rx delay is enabled by default and the driver never disabled it so when asking rgmii-txid it actually got rgmii-id.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

The patch can be backported to stable, I have tested that it is not causing regression with the old, broken driver.

Can the dts changes be merged before the driver changes or does it cause the phy to stop working?

The phy is not working atm, but this change will not cause regression even if it is merged first.

OK so sounds like these are OK to wait for v5.1 merge window then as the dts changes alone won't fix anything?

Regards,

Tony

#6 lore raw

Hi Tony,

Quoted 27 lines · Tony Lindgren
Quoted 26 lines · Peter Ujfalusi
Quoted 23 lines · Tony Lindgren
Quoted 21 lines · Peter Ujfalusi

Hi,

cd28d1d6e52e: ("net: phy: at803x: Disable phy delay for RGMII mode") broke the ethernet networking on evmsk (and most likely on the evm as well):
https://patchwork.ozlabs.org/patch/1028527/

v1 patch to fix the situation:
https://patchwork.ozlabs.org/patch/1040617/

It turned out that the at803x driver is actually broken and need to be fixed along with the DT data.

The following series is proposed to fix the driver:
https://patchwork.ozlabs.org/project/netdev/list/?series=92611

but the PHT mode needs to be switched to rgmii-id from rgmii-txid:
The rx delay is enabled by default and the driver never disabled it so when asking rgmii-txid it actually got rgmii-id.

The patch can be backported to stable, I have tested that it is not causing regression with the old, broken driver.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Can the dts changes be merged before the driver changes or does it cause the phy to stop working?

The phy is not working atm, but this change will not cause regression even if it is merged first.

OK so sounds like these are OK to wait for v5.1 merge window then as the dts changes alone won't fix anything?

I think it would be better to send these to 5.0 to avoid the regression siting in linux-next.

The patches are actually doing to the correct thing (we need rgmii-id, not rmgii-txid for these boards).
It was just a matter of luck that it worked with rgmii-txid as the driver was broken and did not disabled the rxid when it should have.

Tested the patch on top of mainline (b5372fe5dc84235dbe04998efdede3c4daa866a9) was the topmost commit after the rc7 tag.

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

#7 lore raw
Quoted 11 lines · Peter Ujfalusi
Quoted 2 lines · Tony Lindgren

OK so sounds like these are OK to wait for v5.1 merge window then as the dts changes alone won't fix anything?

I think it would be better to send these to 5.0 to avoid the regression siting in linux-next.

The patches are actually doing to the correct thing (we need rgmii-id, not rmgii-txid for these boards).
It was just a matter of luck that it worked with rgmii-txid as the driver was broken and did not disabled the rxid when it should have.

OK applying into omap-for-v5.0/fixes-v2. I'll send a pull request on Thursday most likely then, let's see if it makes it for v5.0.

Regards,

Tony

#8 lore raw

Hi Tony,

Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Peter Ujfalusi
Quoted 2 lines · Tony Lindgren

OK so sounds like these are OK to wait for v5.1 merge window then as the dts changes alone won't fix anything?

I think it would be better to send these to 5.0 to avoid the regression siting in linux-next.

Quoted 8 lines
Quoted 4 lines

The patches are actually doing to the correct thing (we need rgmii-id, not rmgii-txid for these boards).
It was just a matter of luck that it worked with rgmii-txid as the driver was broken and did not disabled the rxid when it should have.

OK applying into omap-for-v5.0/fixes-v2. I'll send a pull request on Thursday most likely then, let's see if it makes it for v5.0.

Thank you!

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki