All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] ARM: dts: imx: Fix the AR803X phy-mode
@ 2019-03-30 15:50 Fabio Estevam
  2019-03-30 16:18 ` Andrew Lunn
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Fabio Estevam @ 2019-03-30 15:50 UTC (permalink / raw)
  To: shawnguo
  Cc: andrew, linux, smoch, stwiss.opensource, linux-imx, kernel,
	Fabio Estevam, linux-arm-kernel

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.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Hi,

Marking it as RFC in the hope of getting some feedback as to how
to proceed with fixing this regression on 5.1-rc1.

It's not possible to know if there are other imx boards in tree that use
AR803X, so here is an attempt.

mx6-sabresd, imx6sx-sdb and imx7d-pico have been successfully tested.

Thanks

 arch/arm/boot/dts/imx6q-tbs2910.dts      | 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-sdb.dtsi        | 2 +-
 arch/arm/boot/dts/imx7d-pico.dtsi        | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/imx6q-tbs2910.dts b/arch/arm/boot/dts/imx6q-tbs2910.dts
index 2ce8399a10ba..bfff87ce2e1f 100644
--- a/arch/arm/boot/dts/imx6q-tbs2910.dts
+++ b/arch/arm/boot/dts/imx6q-tbs2910.dts
@@ -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";
 };
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index a0705066ccba..185fb17a3500 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -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";
 };
diff --git a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
index 4ccb7afc4b35..6d7f6b9035bc 100644
--- a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
@@ -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";
diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
index b7d5fb421404..50d9a989e06a 100644
--- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
@@ -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>;
diff --git a/arch/arm/boot/dts/imx6sx-sdb.dtsi b/arch/arm/boot/dts/imx6sx-sdb.dtsi
index 08ede56c3f10..f6972deb5e39 100644
--- a/arch/arm/boot/dts/imx6sx-sdb.dtsi
+++ b/arch/arm/boot/dts/imx6sx-sdb.dtsi
@@ -191,7 +191,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet1>;
 	phy-supply = <&reg_enet_3v3>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy1>;
 	phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
 	status = "okay";
diff --git a/arch/arm/boot/dts/imx7d-pico.dtsi b/arch/arm/boot/dts/imx7d-pico.dtsi
index 3fd595a71202..6f50ebf31a0a 100644
--- a/arch/arm/boot/dts/imx7d-pico.dtsi
+++ b/arch/arm/boot/dts/imx7d-pico.dtsi
@@ -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 = <&ethphy0>;
 	fsl,magic-packet;
 	phy-reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
-- 
2.17.1


_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 15:50 [RFC] ARM: dts: imx: Fix the AR803X phy-mode Fabio Estevam
@ 2019-03-30 16:18 ` Andrew Lunn
  2019-04-01 12:53   ` Fabio Estevam
  2019-03-30 19:06 ` Baruch Siach
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Andrew Lunn @ 2019-03-30 16:18 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: linux, smoch, stwiss.opensource, linux-imx, kernel, shawnguo,
	linux-arm-kernel

> Hi,
> 
> Marking it as RFC in the hope of getting some feedback as to how
> to proceed with fixing this regression on 5.1-rc1.

I think it should be safe to propose these patches go to stable.

RGMII-ID has been supported since

2e5f9f281ee8 ("net: phy: at803x: Allow specifying the RGMII RX clock delay via phy mode")

Which is somewhere around v4.4. So back porting them should be fine.

      Andrew

_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 15:50 [RFC] ARM: dts: imx: Fix the AR803X phy-mode Fabio Estevam
  2019-03-30 16:18 ` Andrew Lunn
@ 2019-03-30 19:06 ` Baruch Siach
  2019-03-30 19:11   ` Fabio Estevam
  2019-03-31 10:44 ` Soeren Moch
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Baruch Siach @ 2019-03-30 19:06 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: andrew, linux, smoch, stwiss.opensource, linux-imx, kernel,
	shawnguo, linux-arm-kernel

Hi Fabio,

On Sat, Mar 30 2019, Fabio Estevam wrote:
> 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.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Hi,
>
> Marking it as RFC in the hope of getting some feedback as to how
> to proceed with fixing this regression on 5.1-rc1.
>
> It's not possible to know if there are other imx boards in tree that use
> AR803X, so here is an attempt.
>
> mx6-sabresd, imx6sx-sdb and imx7d-pico have been successfully tested.

The SolidRun SOM is also affected, I believe (imx6qdl-sr-som.dtsi,
AR8035). Would you be able to test it on your side?

Thanks,
baruch

--
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 19:06 ` Baruch Siach
@ 2019-03-30 19:11   ` Fabio Estevam
  2019-03-31  3:50     ` Baruch Siach
  0 siblings, 1 reply; 13+ messages in thread
From: Fabio Estevam @ 2019-03-30 19:11 UTC (permalink / raw)
  To: Baruch Siach
  Cc: Andrew Lunn, Russell King - ARM Linux, Soeren Moch, Steve Twiss,
	NXP Linux Team, Sascha Hauer, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Baruch,

On Sat, Mar 30, 2019 at 4:06 PM Baruch Siach <baruch@tkos.co.il> wrote:

> The SolidRun SOM is also affected, I believe (imx6qdl-sr-som.dtsi,
> AR8035). Would you be able to test it on your side?

This patch does touch imx6qdl-sr-som.dtsi, but I don't have access to
my Cubox at the moment.

Could you please test it?

Thanks

_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 19:11   ` Fabio Estevam
@ 2019-03-31  3:50     ` Baruch Siach
  0 siblings, 0 replies; 13+ messages in thread
From: Baruch Siach @ 2019-03-31  3:50 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Andrew Lunn, Russell King - ARM Linux, Soeren Moch, Steve Twiss,
	NXP Linux Team, Sascha Hauer, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Fabio,

On Sat, Mar 30 2019, Fabio Estevam wrote:
> On Sat, Mar 30, 2019 at 4:06 PM Baruch Siach <baruch@tkos.co.il> wrote:
>
>> The SolidRun SOM is also affected, I believe (imx6qdl-sr-som.dtsi,
>> AR8035). Would you be able to test it on your side?
>
> This patch does touch imx6qdl-sr-som.dtsi, but I don't have access to
> my Cubox at the moment.

I missed that.

> Could you please test it?

Sure. Tested on Hummingboard2. I verified that networking is broken
without this patch (v5.1-rc2). This patch fixes the problem.

Tested-by: Baruch Siach <baruch@tkos.co.il>

Thanks,
baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 15:50 [RFC] ARM: dts: imx: Fix the AR803X phy-mode Fabio Estevam
  2019-03-30 16:18 ` Andrew Lunn
  2019-03-30 19:06 ` Baruch Siach
@ 2019-03-31 10:44 ` Soeren Moch
  2019-04-01  8:38   ` Steve Twiss
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Soeren Moch @ 2019-03-31 10:44 UTC (permalink / raw)
  To: Fabio Estevam, shawnguo
  Cc: andrew, linux, stwiss.opensource, linux-imx, kernel, linux-arm-kernel

On 30.03.19 16:50, Fabio Estevam wrote:
> 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.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Hi,
>
> Marking it as RFC in the hope of getting some feedback as to how
> to proceed with fixing this regression on 5.1-rc1.
I can confirm this regression on a tbs2910 board, and also thatthis
patch fixes this.

Tested-by: Soeren Moch <smoch@web.de>

I also think it is the right solution to fix the broken dtbs, like in
this patch, instead of adding more complicated backward compatibility stuff.

Thanks,
Soeren
>
> It's not possible to know if there are other imx boards in tree that use
> AR803X, so here is an attempt.
>
> mx6-sabresd, imx6sx-sdb and imx7d-pico have been successfully tested.
>
> Thanks
>
>  arch/arm/boot/dts/imx6q-tbs2910.dts      | 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-sdb.dtsi        | 2 +-
>  arch/arm/boot/dts/imx7d-pico.dtsi        | 2 +-
>  6 files changed, 6 insertions(+), 6 deletions(-)
>


_______________________________________________
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] 13+ messages in thread

* RE: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 15:50 [RFC] ARM: dts: imx: Fix the AR803X phy-mode Fabio Estevam
@ 2019-04-01  8:38   ` Steve Twiss
  2019-03-30 19:06 ` Baruch Siach
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Steve Twiss @ 2019-04-01  8:38 UTC (permalink / raw)
  To: Fabio Estevam, shawnguo
  Cc: PENGUTRONIX, IMXNXP, smoch, ARMLINUX, andrew, LINUX-ARM-KERNEL,
	LKML, Support Opensource, Adam Thomson

Hi Fabio,

On 30 March 2019 15:51 Fabio Estevam, wrote:

> Subject: [RFC] 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.

[...]

>  arch/arm/boot/dts/imx6qdl-sabresd.dtsi   | 2 +-

[...]

> diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> index a0705066ccba..185fb17a3500 100644
> --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> @@ -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";
>  };

[...]

This patch looks surprisingly similar to this one ;)
https://lore.kernel.org/patchwork/patch/1052588/

Link: https://lkml.kernel.org/r/1397569821-5530-4-git-send-email-thomas.petazzoni@free-electrons.com
Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
Tested-by: Adam Thomson <Adam.Thomson@diasemi.com>
Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>

Regards,
Steve


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

* RE: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
@ 2019-04-01  8:38   ` Steve Twiss
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Twiss @ 2019-04-01  8:38 UTC (permalink / raw)
  To: Fabio Estevam, shawnguo
  Cc: andrew, Support Opensource, ARMLINUX, LKML, smoch, IMXNXP,
	PENGUTRONIX, Adam Thomson, LINUX-ARM-KERNEL

Hi Fabio,

On 30 March 2019 15:51 Fabio Estevam, wrote:

> Subject: [RFC] 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.

[...]

>  arch/arm/boot/dts/imx6qdl-sabresd.dtsi   | 2 +-

[...]

> diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> index a0705066ccba..185fb17a3500 100644
> --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> @@ -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";
>  };

[...]

This patch looks surprisingly similar to this one ;)
https://lore.kernel.org/patchwork/patch/1052588/

Link: https://lkml.kernel.org/r/1397569821-5530-4-git-send-email-thomas.petazzoni@free-electrons.com
Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
Tested-by: Adam Thomson <Adam.Thomson@diasemi.com>
Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>

Regards,
Steve


_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 15:50 [RFC] ARM: dts: imx: Fix the AR803X phy-mode Fabio Estevam
                   ` (3 preceding siblings ...)
  2019-04-01  8:38   ` Steve Twiss
@ 2019-04-01  9:01 ` Sébastien Szymanski
  2019-04-01  9:05 ` Marc Kleine-Budde
  5 siblings, 0 replies; 13+ messages in thread
From: Sébastien Szymanski @ 2019-04-01  9:01 UTC (permalink / raw)
  To: Fabio Estevam, shawnguo
  Cc: andrew, linux, smoch, stwiss.opensource, linux-imx, kernel,
	linux-arm-kernel

Hi Fabio,

On 3/30/19 4:50 PM, Fabio Estevam wrote:
> 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.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Hi,
> 
> Marking it as RFC in the hope of getting some feedback as to how
> to proceed with fixing this regression on 5.1-rc1.
> 
> It's not possible to know if there are other imx boards in tree that use
> AR803X, so here is an attempt.
> 
> mx6-sabresd, imx6sx-sdb and imx7d-pico have been successfully tested.
> 
> Thanks

APF6 SoM has AR8035. I confirm the issue and modifying the phy-mode
property to "rgmii-id" fixes it.

Can you please apply the fix to the APF6 SoM
(arch/arm/boot/dts/imx6qdl-apf6.dtsi) in your patch ?

Regards,

-- 
Sébastien Szymanski
Software engineer, Armadeus Systems
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26

_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 15:50 [RFC] ARM: dts: imx: Fix the AR803X phy-mode Fabio Estevam
                   ` (4 preceding siblings ...)
  2019-04-01  9:01 ` Sébastien Szymanski
@ 2019-04-01  9:05 ` Marc Kleine-Budde
  5 siblings, 0 replies; 13+ messages in thread
From: Marc Kleine-Budde @ 2019-04-01  9:05 UTC (permalink / raw)
  To: Fabio Estevam, shawnguo
  Cc: andrew, linux, smoch, stwiss.opensource, linux-imx, kernel,
	linux-arm-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 2140 bytes --]

On 3/30/19 4:50 PM, Fabio Estevam wrote:
> 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.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Hi,
> 
> Marking it as RFC in the hope of getting some feedback as to how
> to proceed with fixing this regression on 5.1-rc1.
> 
> It's not possible to know if there are other imx boards in tree that use
> AR803X, so here is an attempt.

The riotboard is affected, too:

--- a/arch/arm/boot/dts/imx6dl-riotboard.dts
+++ b/arch/arm/boot/dts/imx6dl-riotboard.dts
@@ -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>

Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-04-01  8:38   ` Steve Twiss
@ 2019-04-01 12:48     ` Fabio Estevam
  -1 siblings, 0 replies; 13+ messages in thread
From: Fabio Estevam @ 2019-04-01 12:48 UTC (permalink / raw)
  To: Steve Twiss
  Cc: shawnguo, PENGUTRONIX, IMXNXP, smoch, ARMLINUX, andrew,
	LINUX-ARM-KERNEL, LKML, Support Opensource, Adam Thomson

Hi Steve,

On Mon, Apr 1, 2019 at 5:38 AM Steve Twiss
<stwiss.opensource@diasemi.com> wrote:

> This patch looks surprisingly similar to this one ;)
> https://lore.kernel.org/patchwork/patch/1052588/
>
> Link: https://lkml.kernel.org/r/1397569821-5530-4-git-send-email-thomas.petazzoni@free-electrons.com
> Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
> Tested-by: Adam Thomson <Adam.Thomson@diasemi.com>
> Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>

I put your attributions in the formal patch that I have just submitted.

Thanks

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

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
@ 2019-04-01 12:48     ` Fabio Estevam
  0 siblings, 0 replies; 13+ messages in thread
From: Fabio Estevam @ 2019-04-01 12:48 UTC (permalink / raw)
  To: Steve Twiss
  Cc: andrew, Support Opensource, ARMLINUX, LKML, smoch, IMXNXP,
	PENGUTRONIX, Adam Thomson, shawnguo, LINUX-ARM-KERNEL

Hi Steve,

On Mon, Apr 1, 2019 at 5:38 AM Steve Twiss
<stwiss.opensource@diasemi.com> wrote:

> This patch looks surprisingly similar to this one ;)
> https://lore.kernel.org/patchwork/patch/1052588/
>
> Link: https://lkml.kernel.org/r/1397569821-5530-4-git-send-email-thomas.petazzoni@free-electrons.com
> Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
> Tested-by: Adam Thomson <Adam.Thomson@diasemi.com>
> Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>

I put your attributions in the formal patch that I have just submitted.

Thanks

_______________________________________________
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] 13+ messages in thread

* Re: [RFC] ARM: dts: imx: Fix the AR803X phy-mode
  2019-03-30 16:18 ` Andrew Lunn
@ 2019-04-01 12:53   ` Fabio Estevam
  0 siblings, 0 replies; 13+ messages in thread
From: Fabio Estevam @ 2019-04-01 12:53 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Russell King - ARM Linux, Soeren Moch, Steve Twiss,
	NXP Linux Team, Sascha Hauer, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Andrew,

On Sat, Mar 30, 2019 at 1:18 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > Hi,
> >
> > Marking it as RFC in the hope of getting some feedback as to how
> > to proceed with fixing this regression on 5.1-rc1.
>
> I think it should be safe to propose these patches go to stable.
>
> RGMII-ID has been supported since
>
> 2e5f9f281ee8 ("net: phy: at803x: Allow specifying the RGMII RX clock delay via phy mode")
>
> Which is somewhere around v4.4. So back porting them should be fine.

This commit landed in v4.5, so I marked it as:
Cc: <stable@vger.kernel.org> # 4.9+

I probably will need to manually generate versions for the some of the
stable versions.

Thanks

_______________________________________________
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] 13+ messages in thread

end of thread, other threads:[~2019-04-01 12:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-30 15:50 [RFC] ARM: dts: imx: Fix the AR803X phy-mode Fabio Estevam
2019-03-30 16:18 ` Andrew Lunn
2019-04-01 12:53   ` Fabio Estevam
2019-03-30 19:06 ` Baruch Siach
2019-03-30 19:11   ` Fabio Estevam
2019-03-31  3:50     ` Baruch Siach
2019-03-31 10:44 ` Soeren Moch
2019-04-01  8:38 ` Steve Twiss
2019-04-01  8:38   ` Steve Twiss
2019-04-01 12:48   ` Fabio Estevam
2019-04-01 12:48     ` Fabio Estevam
2019-04-01  9:01 ` Sébastien Szymanski
2019-04-01  9:05 ` Marc Kleine-Budde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.