ARM: dts: imx: Fix the AR803X phy-mode
Subsystems (3)
Fabio Estevam
reviewerPATCH 1/1 ARM: dts: imx: Fix the AR803X phy-mode
Commit 6d4cd041f0af ("net: phy: at803x: disable delay only for RGMII mode") exposed an issue on imx DTS files using AR8031/AR8035 PHYs.
The end result is that the boards can no longer obtain an IP address via UDHCP, for example.
Quoting Andrew Lunn:
"The problem here is, all the DTs were broken since day 0. However, because the PHY driver was also broken, nobody noticed and it worked. Now that the PHY driver has been fixed, all the bugs in the DTs now become an issue"
To fix this problem, the phy-mode property needs to be "rgmii-id", which has the following meaning as per Documentation/devicetree/bindings/net/ethernet.txt:
"RGMII with internal RX and TX delays provided by the PHY, the MAC should not add the RX or TX delays in this case)"
Tested on imx6-sabresd, imx6sx-sdb and imx7d-pico boards with successfully restored networking.
Based on the initial submission from Steve Twiss for the imx6qdl-sabresd.
--- arch/arm/boot/dts/imx6dl-riotboard.dts | 2 +- arch/arm/boot/dts/imx6q-tbs2910.dts | 2 +- arch/arm/boot/dts/imx6qdl-apf6.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sr-som.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 2 +- arch/arm/boot/dts/imx6sx-sabreauto.dts | 2 +- arch/arm/boot/dts/imx6sx-sdb.dtsi | 2 +- arch/arm/boot/dts/imx7d-pico.dtsi | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/boot/dts/imx6dl-riotboard.dts +1 -1
@@ -92,7 +92,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>; interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/imx6q-tbs2910.dts +1 -1
@@ -98,7 +98,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl-apf6.dtsi +1 -1
@@ -51,7 +51,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-duration = <10>; phy-reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; status = "okay";
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +1 -1
@@ -292,7 +292,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>; fsl,err006687-workaround-present;
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +1 -1
@@ -202,7 +202,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6qdl-sr-som.dtsi +1 -1
@@ -53,7 +53,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_microsom_enet_ar8035>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-duration = <2>; phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; status = "okay";
arch/arm/boot/dts/imx6qdl-wandboard.dtsi +1 -1
@@ -224,7 +224,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>; interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
arch/arm/boot/dts/imx6sx-sabreauto.dts +1 -1
@@ -75,7 +75,7 @@ &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <ðphy1>; fsl,magic-packet; status = "okay";
arch/arm/boot/dts/imx6sx-sdb.dtsi +1 -1
@@ -191,7 +191,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet1>; phy-supply = <®_enet_3v3>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <ðphy1>; phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; status = "okay";
arch/arm/boot/dts/imx7d-pico.dtsi +1 -1
@@ -92,7 +92,7 @@ <&clks IMX7D_ENET1_TIME_ROOT_CLK>; assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>; assigned-clock-rates = <0>, <100000000>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <ðphy0>; fsl,magic-packet; phy-reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
Signature · 1 line
2.17.1
Hi,
Quoted 187 lines · Fabio Estevam
Commit
6d4cd041f0af("net: phy: at803x: disable delay only for RGMII mode") exposed an issue on imx DTS files using AR8031/AR8035 PHYs.The end result is that the boards can no longer obtain an IP address via UDHCP, for example.
Quoting Andrew Lunn:
"The problem here is, all the DTs were broken since day 0. However, because the PHY driver was also broken, nobody noticed and it worked. Now that the PHY driver has been fixed, all the bugs in the DTs now become an issue"
To fix this problem, the phy-mode property needs to be "rgmii-id", which has the following meaning as per
Documentation/devicetree/bindings/net/ethernet.txt:"RGMII with internal RX and TX delays provided by the PHY, the MAC should not add the RX or TX delays in this case)"
Tested on imx6-sabresd, imx6sx-sdb and imx7d-pico boards with successfully restored networking.
Based on the initial submission from Steve Twiss for the imx6qdl-sabresd.
Cc <[email protected]> # 4.9+Signed-off-by Fabio Estevam <[email protected]>Tested-by Baruch Siach <[email protected]>Tested-by Soeren Moch <[email protected]>Tested-by Steve Twiss <[email protected]>Tested-by Adam Thomson <[email protected]>Signed-off-by Steve Twiss <[email protected]>Tested-by Marc Kleine-Budde <[email protected]>Signed-off-by Marc Kleine-Budde <[email protected]>--- arch/arm/boot/dts/imx6dl-riotboard.dts | 2 +- arch/arm/boot/dts/imx6q-tbs2910.dts | 2 +- arch/arm/boot/dts/imx6qdl-apf6.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sr-som.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 2 +- arch/arm/boot/dts/imx6sx-sabreauto.dts | 2 +- arch/arm/boot/dts/imx6sx-sdb.dtsi | 2 +- arch/arm/boot/dts/imx7d-pico.dtsi | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-)arch/arm/boot/dts/imx6dl-riotboard.dts +1
-1@@ -92,7 +92,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>; interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/imx6q-tbs2910.dts +1
-1@@ -98,7 +98,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; status = "okay"; };arch/arm/boot/dts/imx6qdl-apf6.dtsi +1
-1@@ -51,7 +51,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-duration = <10>; phy-reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; status = "okay";arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +1
-1@@ -292,7 +292,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>; fsl,err006687-workaround-present;arch/arm/boot/dts/imx6qdl-sabresd.dtsi +1
-1@@ -202,7 +202,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; status = "okay"; };arch/arm/boot/dts/imx6qdl-sr-som.dtsi +1
-1@@ -53,7 +53,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_microsom_enet_ar8035>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-duration = <2>; phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; status = "okay";arch/arm/boot/dts/imx6qdl-wandboard.dtsi +1
-1@@ -224,7 +224,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>; interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/imx6sx-sabreauto.dts +1
-1@@ -75,7 +75,7 @@ &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <ðphy1>; fsl,magic-packet; status = "okay";arch/arm/boot/dts/imx6sx-sdb.dtsi +1
-1@@ -191,7 +191,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet1>; phy-supply = <®_enet_3v3>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <ðphy1>; phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; status = "okay";arch/arm/boot/dts/imx7d-pico.dtsi +1
-1@@ -92,7 +92,7 @@ <&clks IMX7D_ENET1_TIME_ROOT_CLK>; assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>; assigned-clock-rates = <0>, <100000000>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <ðphy0>; fsl,magic-packet; phy-reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Please add:
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi +1 -1
@@ -331,7 +331,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; txen-skew-ps = <0>; txc-skew-ps = <3000>;
arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi +1 -1
@@ -262,7 +262,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>, <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>; fsl,err006687-workaround-present;
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +1 -1
@@ -264,7 +264,7 @@ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; txen-skew-ps = <0>; txc-skew-ps = <3000>;
Thanks,
Michael
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Fabio Estevam
reviewerHi Michael,
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
Quoted 3 lines · Michael Grzeschik
Please add:
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi +0
-0
Are these boars currently broken too?
As far as I can see they do not use AR8031/AR8035.
Hi Fabio,
Quoted 11 lines · Fabio Estevam
Hi Michael,
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
Quoted 3 lines · Michael Grzeschik
Please add:
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi +0
-0Are these boars currently broken too?
As far as I can see they do not use AR8031/AR8035.
These use the KSZ9021. But the fix was obviously the right one after v5.0 making the network stable again. I did not dig deeper into the cause, after finding this diff solving the issue.
mgr
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Fabio Estevam
reviewerHi Michael,
Quoted 3 lines · Michael Grzeschik
These use the KSZ9021. But the fix was obviously the right one after v5.0 making the network stable again. I did not dig deeper into the cause, after finding this diff solving the issue.
I was not aware that KSZ9021 PHYs are currently broken too.
This patch aims to fixing the i.MX boards with AR8031/AR8035 PHY.
The fix for KSZ9021 would require some explanation as to what commit exposed or caused the issue and would be better to be on a separate patch.
Could you please work on that?
Thanks
Quoted 3 lines
The fix for KSZ9021 would require some explanation as to what commit exposed or caused the issue and would be better to be on a separate patch.
+1
Looking at the commit log for that driver, i don't see a patch which would cause issues like this.
So a clear explanation is required.
Andrew
Quoted 10 lines · Andrew Lunn
Quoted 3 lines
The fix for KSZ9021 would require some explanation as to what commit exposed or caused the issue and would be better to be on a separate patch.
+1
Looking at the commit log for that driver, i don't see a patch which would cause issues like this.
So a clear explanation is required.
I will bisect the prbolem and come back after I found the patch causing the issue.
mgr
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Hi,
Quoted 7 lines · Michael Grzeschik
Quoted 6 lines · Andrew Lunn
Quoted 3 lines
The fix for KSZ9021 would require some explanation as to what commit exposed or caused the issue and would be better to be on a separate patch.
+1
Quoted 7 lines
Quoted 4 lines
Looking at the commit log for that driver, i don't see a patch which would cause issues like this.
So a clear explanation is required.
I will bisect the prbolem and come back after I found the patch causing the issue.
Last week I tried to reproduce the issue with the nitrogen6x_max. But by using the vanilla kernel there was no issue with v5.0. So it was probably some stack specific issue or my hw setup was somehow buggy.
As long it is not possible for me to reproduce the issue this should be ignored.
Thanks,
Michael
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Sasha Levin
maintainerHi,
[This is an automated email]
This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: 4.9+
The bot has tested the following trees: v5.0.5, v4.19.32, v4.14.109, v4.9.166.
v5.0.5: Build OK!
v4.19.32: Failed to apply! Possible dependencies:
29988e867cb1 ("ARM: dts: imx7: Fix memory node duplication")
4edbe6aa46d1 ("ARM: dts: imx7d-pico-pi: Move SoM related part to imx7d-pico.dtsi")
50536c661194 ("ARM: dts: imx7d-pico: Do not harcode the memory size")v4.14.109: Failed to apply! Possible dependencies:
1bf52b98ae1c ("ARM: dts: imx6sx-sabreauto: add external 24MHz clock source") 221aaa198e70 ("ARM: dts: imx6sx-sabreauto: drop board specific pinctrl container node") 37accf72e04b ("ARM: dts: imx6sx-sabreauto: add fec support") 41bbeadceb03 ("ARM: dts: imx7d-pico-pi: Separate into cpu and baseboard dts") 4edbe6aa46d1 ("ARM: dts: imx7d-pico-pi: Move SoM related part to imx7d-pico.dtsi") 76dc340e7585 ("ARM: dts: imx6qdl: SolidRun: move AR8035 into microsom") 8dccafaa281a ("arm: dts: fix unit-address leading 0s")
99a52450c707 ("ARM: dts: imx7d-pico: Add Wifi support")
d9e246cc2880 ("ARM: dts: imx6sx-sabreauto: add PMIC support")
v4.9.166: Failed to apply! Possible dependencies:
12de44f55dcd ("ARM: dts: imx: Fix Ethernet PHY reset polarity") 1317efa1699f ("ARM: dts: imx6ul: Add DTS for liteSOM module") 13283626c889 ("ARM: dts: imx/vf: Correct license text")
1bf52b98ae1c ("ARM: dts: imx6sx-sabreauto: add external 24MHz clock source") 221aaa198e70 ("ARM: dts: imx6sx-sabreauto: drop board specific pinctrl container node") 23c787a99ff7 ("ARM: dts: imx7d-pico: Add initial support")
26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
37accf72e04b ("ARM: dts: imx6sx-sabreauto: add fec support")
3faa1bb2e89c ("ARM: dts: imx: add Boundary Devices Nitrogen6_SOM2 support") 41bbeadceb03 ("ARM: dts: imx7d-pico-pi: Separate into cpu and baseboard dts") 478c9440b328 ("ARM: dts: imx6ul: Add DTS for liteBoard")
4edbe6aa46d1 ("ARM: dts: imx7d-pico-pi: Move SoM related part to imx7d-pico.dtsi") 6df11287f7c9 ("ARM: dts: imx6q: Add Engicam i.CoreM6 Quad/Dual initial support") 76dc340e7585 ("ARM: dts: imx6qdl: SolidRun: move AR8035 into microsom") 8dccafaa281a ("arm: dts: fix unit-address leading 0s")
99a52450c707 ("ARM: dts: imx7d-pico: Add Wifi support")
9daee3076940 ("ARM: dts: imx6q: Add Engicam i.CoreM6 DualLite/Solo initial support") a58d73340b0e ("ARM: dts: armada-385-synology-ds116: add support for Synology DS116 NAS") c201369d4aa5 ("ARM: dts: imx6ull: add imx6ull support")
d9e246cc2880 ("ARM: dts: imx6sx-sabreauto: add PMIC support") fc48e76489fd ("ARM: dts: imx6: Add support for Toradex Colibri iMX6 module")
How should we proceed with this patch?
--
Thanks,
Sasha
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerQuoted 11 lines · Sasha Levin
Hi,
[This is an automated email]
This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: 4.9+
The bot has tested the following trees: v5.0.5, v4.19.32, v4.14.109, v4.9.166.
How should we proceed with this patch?
I can manually generate versions for 4.9, 4.14 and 4.19 stable trees when this one hit mainline.