All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-20 11:03 ` Steve Twiss
  0 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-20 11:03 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: DEVICETREE, LINUX-ARM-KERNEL, LKML, Dialog Opensource Support

The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were
previously added by the MAC when required, but are now provided
internally by the PHY (and the MAC should no longer add the RX or TX
delays in this case).

This patch fixes the network problems seen on the Freescale i.MX6Q/DL
SABRE boards and makes a difference when correctly loading the NFS
rootfs on startup.

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>
---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index a070506..185fb17 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";
 };
-- 
1.9.3


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

* [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-20 11:03 ` Steve Twiss
  0 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-20 11:03 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: DEVICETREE, LKML, LINUX-ARM-KERNEL, Dialog Opensource Support

The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were
previously added by the MAC when required, but are now provided
internally by the PHY (and the MAC should no longer add the RX or TX
delays in this case).

This patch fixes the network problems seen on the Freescale i.MX6Q/DL
SABRE boards and makes a difference when correctly loading the NFS
rootfs on startup.

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>
---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index a070506..185fb17 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";
 };
-- 
1.9.3


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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-20 11:03 ` Steve Twiss
@ 2019-03-20 12:16   ` Fabio Estevam
  -1 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-20 12:16 UTC (permalink / raw)
  To: Steve Twiss
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Dialog Opensource Support

Hi Steve,

On Wed, Mar 20, 2019 at 9:06 AM Steve Twiss
<stwiss.opensource@diasemi.com> wrote:
>
> The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> 'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were

This patch declares it as 'rgmii-id', which contradicts the commit log.

> previously added by the MAC when required, but are now provided
> internally by the PHY (and the MAC should no longer add the RX or TX
> delays in this case).
>
> This patch fixes the network problems seen on the Freescale i.MX6Q/DL

Please provide a Fixes tag. It would be good to know if this fix needs
to be applied to older kernels.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-20 12:16   ` Fabio Estevam
  0 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-20 12:16 UTC (permalink / raw)
  To: Steve Twiss
  Cc: Mark Rutland, DEVICETREE, Dialog Opensource Support,
	Sascha Hauer, LKML, Rob Herring, NXP Linux Team,
	Pengutronix Kernel Team, Shawn Guo, LINUX-ARM-KERNEL

Hi Steve,

On Wed, Mar 20, 2019 at 9:06 AM Steve Twiss
<stwiss.opensource@diasemi.com> wrote:
>
> The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> 'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were

This patch declares it as 'rgmii-id', which contradicts the commit log.

> previously added by the MAC when required, but are now provided
> internally by the PHY (and the MAC should no longer add the RX or TX
> delays in this case).
>
> This patch fixes the network problems seen on the Freescale i.MX6Q/DL

Please provide a Fixes tag. It would be good to know if this fix needs
to be applied to older kernels.

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

* RE: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-20 12:16   ` Fabio Estevam
@ 2019-03-20 16:03     ` Steve Twiss
  -1 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-20 16:03 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

Hi Fabio,

On 20 March 2019 12:17, Fabio Estevam wrote:
> Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> 
> Hi Steve,
> 
> On Wed, Mar 20, 2019 at 9:06 AM Steve Twiss
> <stwiss.opensource@diasemi.com> wrote:
> >
> > The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> > 'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were
> 
> This patch declares it as 'rgmii-id', which contradicts the commit log.

The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
'rgmii' instead of 'rgmii-id'.

Can that be read two ways?
I meant the phy-mode is currently qualified as 'rgmii' instead of what it
should be: 'rgmii-id'.

[...]

> > This patch fixes the network problems seen on the Freescale i.MX6Q/DL
> 
> Please provide a Fixes tag. It would be good to know if this fix needs
> to be applied to older kernels.

I didn't put a Fixes tag in because I find this patch fixes v5.1-rc1 (which I see as broken).
But the patch is not needed in v5.0 because I see that as working.
So didn't see the need for a Cc: stable.

Regards,
Steve

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

* RE: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-20 16:03     ` Steve Twiss
  0 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-20 16:03 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Mark Rutland, DEVICETREE, Support Opensource, Sascha Hauer, LKML,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team, Shawn Guo,
	LINUX-ARM-KERNEL

Hi Fabio,

On 20 March 2019 12:17, Fabio Estevam wrote:
> Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> 
> Hi Steve,
> 
> On Wed, Mar 20, 2019 at 9:06 AM Steve Twiss
> <stwiss.opensource@diasemi.com> wrote:
> >
> > The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> > 'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were
> 
> This patch declares it as 'rgmii-id', which contradicts the commit log.

The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
'rgmii' instead of 'rgmii-id'.

Can that be read two ways?
I meant the phy-mode is currently qualified as 'rgmii' instead of what it
should be: 'rgmii-id'.

[...]

> > This patch fixes the network problems seen on the Freescale i.MX6Q/DL
> 
> Please provide a Fixes tag. It would be good to know if this fix needs
> to be applied to older kernels.

I didn't put a Fixes tag in because I find this patch fixes v5.1-rc1 (which I see as broken).
But the patch is not needed in v5.0 because I see that as working.
So didn't see the need for a Cc: stable.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-20 16:03     ` Steve Twiss
@ 2019-03-20 17:04       ` Fabio Estevam
  -1 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-20 17:04 UTC (permalink / raw)
  To: Steve Twiss, Andrew Lunn
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

Hi Steve,

[Adding Andrew]

On Wed, Mar 20, 2019 at 1:03 PM Steve Twiss
<stwiss.opensource@diasemi.com> wrote:
>
> Hi Fabio,
>
> On 20 March 2019 12:17, Fabio Estevam wrote:
> > Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> >
> > Hi Steve,
> >
> > On Wed, Mar 20, 2019 at 9:06 AM Steve Twiss
> > <stwiss.opensource@diasemi.com> wrote:
> > >
> > > The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> > > 'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were
> >
> > This patch declares it as 'rgmii-id', which contradicts the commit log.
>
> The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> 'rgmii' instead of 'rgmii-id'.
>
> Can that be read two ways?
> I meant the phy-mode is currently qualified as 'rgmii' instead of what it
> should be: 'rgmii-id'.

Thanks for the clarification.

>
> [...]
>
> > > This patch fixes the network problems seen on the Freescale i.MX6Q/DL
> >
> > Please provide a Fixes tag. It would be good to know if this fix needs
> > to be applied to older kernels.
>
> I didn't put a Fixes tag in because I find this patch fixes v5.1-rc1 (which I see as broken).
> But the patch is not needed in v5.0 because I see that as working.
> So didn't see the need for a Cc: stable.

It seems we have other boards that need to be fixed and we can not
have an old dtb with functional Ethernet with a new kernel.

Does anyone know if this issue is AR8031 specific?

Thanks

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-20 17:04       ` Fabio Estevam
  0 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-20 17:04 UTC (permalink / raw)
  To: Steve Twiss, Andrew Lunn
  Cc: Mark Rutland, DEVICETREE, Support Opensource, Sascha Hauer, LKML,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team, Shawn Guo,
	LINUX-ARM-KERNEL

Hi Steve,

[Adding Andrew]

On Wed, Mar 20, 2019 at 1:03 PM Steve Twiss
<stwiss.opensource@diasemi.com> wrote:
>
> Hi Fabio,
>
> On 20 March 2019 12:17, Fabio Estevam wrote:
> > Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> >
> > Hi Steve,
> >
> > On Wed, Mar 20, 2019 at 9:06 AM Steve Twiss
> > <stwiss.opensource@diasemi.com> wrote:
> > >
> > > The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> > > 'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were
> >
> > This patch declares it as 'rgmii-id', which contradicts the commit log.
>
> The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> 'rgmii' instead of 'rgmii-id'.
>
> Can that be read two ways?
> I meant the phy-mode is currently qualified as 'rgmii' instead of what it
> should be: 'rgmii-id'.

Thanks for the clarification.

>
> [...]
>
> > > This patch fixes the network problems seen on the Freescale i.MX6Q/DL
> >
> > Please provide a Fixes tag. It would be good to know if this fix needs
> > to be applied to older kernels.
>
> I didn't put a Fixes tag in because I find this patch fixes v5.1-rc1 (which I see as broken).
> But the patch is not needed in v5.0 because I see that as working.
> So didn't see the need for a Cc: stable.

It seems we have other boards that need to be fixed and we can not
have an old dtb with functional Ethernet with a new kernel.

Does anyone know if this issue is AR8031 specific?

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-20 17:04       ` Fabio Estevam
@ 2019-03-21  8:42         ` Abel Vesa
  -1 siblings, 0 replies; 35+ messages in thread
From: Abel Vesa @ 2019-03-21  8:42 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Steve Twiss, Andrew Lunn, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

On 19-03-20 14:04:42, Fabio Estevam wrote:
> Hi Steve,
> 
> [Adding Andrew]
> 
> On Wed, Mar 20, 2019 at 1:03 PM Steve Twiss
> <stwiss.opensource@diasemi.com> wrote:
> >
> > Hi Fabio,
> >
> > On 20 March 2019 12:17, Fabio Estevam wrote:
> > > Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> > >
> > > Hi Steve,
> > >
> > > On Wed, Mar 20, 2019 at 9:06 AM Steve Twiss
> > > <stwiss.opensource@diasemi.com> wrote:
> > > >
> > > > The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> > > > 'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were
> > >
> > > This patch declares it as 'rgmii-id', which contradicts the commit log.
> >
> > The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> > 'rgmii' instead of 'rgmii-id'.
> >
> > Can that be read two ways?
> > I meant the phy-mode is currently qualified as 'rgmii' instead of what it
> > should be: 'rgmii-id'.
> 
> Thanks for the clarification.
> 
> >
> > [...]
> >
> > > > This patch fixes the network problems seen on the Freescale i.MX6Q/DL
> > >
> > > Please provide a Fixes tag. It would be good to know if this fix needs
> > > to be applied to older kernels.
> >
> > I didn't put a Fixes tag in because I find this patch fixes v5.1-rc1 (which I see as broken).
> > But the patch is not needed in v5.0 because I see that as working.
> > So didn't see the need for a Cc: stable.
> 
> It seems we have other boards that need to be fixed and we can not
> have an old dtb with functional Ethernet with a new kernel.
> 
> Does anyone know if this issue is AR8031 specific?

I can confirm the same fix is works on imx6sx too.

> 
> Thanks

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-21  8:42         ` Abel Vesa
  0 siblings, 0 replies; 35+ messages in thread
From: Abel Vesa @ 2019-03-21  8:42 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Mark Rutland, Andrew Lunn, Support Opensource, DEVICETREE,
	Sascha Hauer, LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, Shawn Guo, LINUX-ARM-KERNEL

On 19-03-20 14:04:42, Fabio Estevam wrote:
> Hi Steve,
> 
> [Adding Andrew]
> 
> On Wed, Mar 20, 2019 at 1:03 PM Steve Twiss
> <stwiss.opensource@diasemi.com> wrote:
> >
> > Hi Fabio,
> >
> > On 20 March 2019 12:17, Fabio Estevam wrote:
> > > Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> > >
> > > Hi Steve,
> > >
> > > On Wed, Mar 20, 2019 at 9:06 AM Steve Twiss
> > > <stwiss.opensource@diasemi.com> wrote:
> > > >
> > > > The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> > > > 'rgmii' instead of 'rgmii-id'. Meaning the RX and TX delays that were
> > >
> > > This patch declares it as 'rgmii-id', which contradicts the commit log.
> >
> > The PHY used on the Freescale i.MX6Q/DL SABRE boards is qualified as
> > 'rgmii' instead of 'rgmii-id'.
> >
> > Can that be read two ways?
> > I meant the phy-mode is currently qualified as 'rgmii' instead of what it
> > should be: 'rgmii-id'.
> 
> Thanks for the clarification.
> 
> >
> > [...]
> >
> > > > This patch fixes the network problems seen on the Freescale i.MX6Q/DL
> > >
> > > Please provide a Fixes tag. It would be good to know if this fix needs
> > > to be applied to older kernels.
> >
> > I didn't put a Fixes tag in because I find this patch fixes v5.1-rc1 (which I see as broken).
> > But the patch is not needed in v5.0 because I see that as working.
> > So didn't see the need for a Cc: stable.
> 
> It seems we have other boards that need to be fixed and we can not
> have an old dtb with functional Ethernet with a new kernel.
> 
> Does anyone know if this issue is AR8031 specific?

I can confirm the same fix is works on imx6sx too.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-21  8:42         ` Abel Vesa
@ 2019-03-21 11:17           ` Fabio Estevam
  -1 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-21 11:17 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Steve Twiss, Andrew Lunn, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

Hi Abel,

On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:

> > It seems we have other boards that need to be fixed and we can not
> > have an old dtb with functional Ethernet with a new kernel.
> >
> > Does anyone know if this issue is AR8031 specific?
>
> I can confirm the same fix is works on imx6sx too.

imx6sx-sabresd also uses an AR8031 Ethernet PHY.

I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
on pico-imx7d with AR8035.

So yes, we currently have lots of broken dtb's in mainline and I am
wondering what is the proper fix here.

Does anyone know what was the kernel commit that introduced such regressions?

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-21 11:17           ` Fabio Estevam
  0 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-21 11:17 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Mark Rutland, Andrew Lunn, Support Opensource, DEVICETREE,
	Sascha Hauer, LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, Shawn Guo, LINUX-ARM-KERNEL

Hi Abel,

On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:

> > It seems we have other boards that need to be fixed and we can not
> > have an old dtb with functional Ethernet with a new kernel.
> >
> > Does anyone know if this issue is AR8031 specific?
>
> I can confirm the same fix is works on imx6sx too.

imx6sx-sabresd also uses an AR8031 Ethernet PHY.

I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
on pico-imx7d with AR8035.

So yes, we currently have lots of broken dtb's in mainline and I am
wondering what is the proper fix here.

Does anyone know what was the kernel commit that introduced such regressions?

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

* RE: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-21 11:17           ` Fabio Estevam
@ 2019-03-21 11:32             ` Steve Twiss
  -1 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-21 11:32 UTC (permalink / raw)
  To: Fabio Estevam, Abel Vesa
  Cc: Andrew Lunn, Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

Hi Fabio,

On 21 March 2019 11:17, Fabio Estevam,

> Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> 
> Hi Abel,
> 
> On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:
> 
> > > It seems we have other boards that need to be fixed and we can not
> > > have an old dtb with functional Ethernet with a new kernel.
> > >
> > > Does anyone know if this issue is AR8031 specific?
> >
> > I can confirm the same fix is works on imx6sx too.
> 
> imx6sx-sabresd also uses an AR8031 Ethernet PHY.
> 
> I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
> on pico-imx7d with AR8035.
> 
> So yes, we currently have lots of broken dtb's in mainline and I am
> wondering what is the proper fix here.

Agreed!
The DT should be an ABI. 

> Does anyone know what was the kernel commit that introduced such
> regressions?

I bisected to the original breakage (for the NFS rootfs) back to this commit:
commit 13d0ab6750b20957ac1466da4e44dc0af746ff28

Reverting this commit fixed the problem, but only for the kernel up to that
point: it was a long time ago, and several other fixes were added after that
which meant that by the time the kernel got to v5.0 it was working for me
again.

I bisected the breakage between v5.0 to v5.1-rc1 as this:
commit 3acca1dd17060332cfab15693733cdaf9fba1c90
... which doesn't make sense to me.

Regards,
Steve

---

commit 13d0ab6750b20957ac1466da4e44dc0af746ff28
Author: Heiner Kallweit <hkallweit1@gmail.com>
Date:   Wed Jan 16 08:07:38 2019 +0100

    net: phy: check return code when requesting PHY driver module
    
    When requesting the PHY driver module fails we'll bind the genphy
    driver later. This isn't obvious to the user and may cause, depending
    on the PHY, different types of issues. Therefore check the return code
    of request_module(). Note that we only check for failures in loading
    the module, not whether a module exists for the respective PHY ID.
    
    v2:
    - add comment explaining what is checked and what is not
    - return error from phy_device_create() if loading module fails
    
    Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

---

commit 3acca1dd17060332cfab15693733cdaf9fba1c90
Author: Heiner Kallweit <hkallweit1@gmail.com>
Date:   Mon Mar 4 19:39:03 2019 +0100

    net: dsa: mv88e6xxx: add call to mv88e6xxx_ports_cmode_init to probe for new DSA framework
    
    In the original patch I missed to add mv88e6xxx_ports_cmode_init()
    to the second probe function, the one for the new DSA framework.
    
    Fixes: ed8fe20205ac ("net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode")
    Reported-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
    Suggested-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

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

* RE: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-21 11:32             ` Steve Twiss
  0 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-21 11:32 UTC (permalink / raw)
  To: Fabio Estevam, Abel Vesa
  Cc: Mark Rutland, Andrew Lunn, Support Opensource, DEVICETREE,
	Sascha Hauer, LKML, Rob Herring, dl-linux-imx,
	Pengutronix Kernel Team, Shawn Guo, LINUX-ARM-KERNEL

Hi Fabio,

On 21 March 2019 11:17, Fabio Estevam,

> Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> 
> Hi Abel,
> 
> On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:
> 
> > > It seems we have other boards that need to be fixed and we can not
> > > have an old dtb with functional Ethernet with a new kernel.
> > >
> > > Does anyone know if this issue is AR8031 specific?
> >
> > I can confirm the same fix is works on imx6sx too.
> 
> imx6sx-sabresd also uses an AR8031 Ethernet PHY.
> 
> I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
> on pico-imx7d with AR8035.
> 
> So yes, we currently have lots of broken dtb's in mainline and I am
> wondering what is the proper fix here.

Agreed!
The DT should be an ABI. 

> Does anyone know what was the kernel commit that introduced such
> regressions?

I bisected to the original breakage (for the NFS rootfs) back to this commit:
commit 13d0ab6750b20957ac1466da4e44dc0af746ff28

Reverting this commit fixed the problem, but only for the kernel up to that
point: it was a long time ago, and several other fixes were added after that
which meant that by the time the kernel got to v5.0 it was working for me
again.

I bisected the breakage between v5.0 to v5.1-rc1 as this:
commit 3acca1dd17060332cfab15693733cdaf9fba1c90
... which doesn't make sense to me.

Regards,
Steve

---

commit 13d0ab6750b20957ac1466da4e44dc0af746ff28
Author: Heiner Kallweit <hkallweit1@gmail.com>
Date:   Wed Jan 16 08:07:38 2019 +0100

    net: phy: check return code when requesting PHY driver module
    
    When requesting the PHY driver module fails we'll bind the genphy
    driver later. This isn't obvious to the user and may cause, depending
    on the PHY, different types of issues. Therefore check the return code
    of request_module(). Note that we only check for failures in loading
    the module, not whether a module exists for the respective PHY ID.
    
    v2:
    - add comment explaining what is checked and what is not
    - return error from phy_device_create() if loading module fails
    
    Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>

---

commit 3acca1dd17060332cfab15693733cdaf9fba1c90
Author: Heiner Kallweit <hkallweit1@gmail.com>
Date:   Mon Mar 4 19:39:03 2019 +0100

    net: dsa: mv88e6xxx: add call to mv88e6xxx_ports_cmode_init to probe for new DSA framework
    
    In the original patch I missed to add mv88e6xxx_ports_cmode_init()
    to the second probe function, the one for the new DSA framework.
    
    Fixes: ed8fe20205ac ("net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode")
    Reported-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
    Suggested-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
_______________________________________________
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] 35+ messages in thread

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-21 11:17           ` Fabio Estevam
@ 2019-03-21 11:45             ` Andrew Lunn
  -1 siblings, 0 replies; 35+ messages in thread
From: Andrew Lunn @ 2019-03-21 11:45 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Abel Vesa, Steve Twiss, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

On Thu, Mar 21, 2019 at 08:17:01AM -0300, Fabio Estevam wrote:
> Hi Abel,
> 
> On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:
> 
> > > It seems we have other boards that need to be fixed and we can not
> > > have an old dtb with functional Ethernet with a new kernel.
> > >
> > > Does anyone know if this issue is AR8031 specific?
> >
> > I can confirm the same fix is works on imx6sx too.
> 
> imx6sx-sabresd also uses an AR8031 Ethernet PHY.
> 
> I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
> on pico-imx7d with AR8035.
> 
> So yes, we currently have lots of broken dtb's in mainline and I am
> wondering what is the proper fix here.
> 
> Does anyone know what was the kernel commit that introduced such regressions?

Hi Fabio

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.

There is also a need to fix the PHY driver, because there is at least
one board which needs it fixed in order to work.

When we discussed fixing the PHY driver, we had no idea how many
boards would break. So we said, lets try it, and fix up whatever
breaks. We can however discuss this again. We can declare both the PHY
driver and the DTs terminally broken, and add a vendor proprietary
property for the phy-mode, which takes preference over the standard
phy-mode if present, and that does the correct thing.

    Andrew


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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-21 11:45             ` Andrew Lunn
  0 siblings, 0 replies; 35+ messages in thread
From: Andrew Lunn @ 2019-03-21 11:45 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Mark Rutland, DEVICETREE, Abel Vesa, Sascha Hauer, LKML,
	Rob Herring, Steve Twiss, dl-linux-imx, Pengutronix Kernel Team,
	Shawn Guo, LINUX-ARM-KERNEL, Support Opensource

On Thu, Mar 21, 2019 at 08:17:01AM -0300, Fabio Estevam wrote:
> Hi Abel,
> 
> On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:
> 
> > > It seems we have other boards that need to be fixed and we can not
> > > have an old dtb with functional Ethernet with a new kernel.
> > >
> > > Does anyone know if this issue is AR8031 specific?
> >
> > I can confirm the same fix is works on imx6sx too.
> 
> imx6sx-sabresd also uses an AR8031 Ethernet PHY.
> 
> I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
> on pico-imx7d with AR8035.
> 
> So yes, we currently have lots of broken dtb's in mainline and I am
> wondering what is the proper fix here.
> 
> Does anyone know what was the kernel commit that introduced such regressions?

Hi Fabio

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.

There is also a need to fix the PHY driver, because there is at least
one board which needs it fixed in order to work.

When we discussed fixing the PHY driver, we had no idea how many
boards would break. So we said, lets try it, and fix up whatever
breaks. We can however discuss this again. We can declare both the PHY
driver and the DTs terminally broken, and add a vendor proprietary
property for the phy-mode, which takes preference over the standard
phy-mode if present, and that does the correct thing.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-21 11:32             ` Steve Twiss
@ 2019-03-21 11:50               ` Andrew Lunn
  -1 siblings, 0 replies; 35+ messages in thread
From: Andrew Lunn @ 2019-03-21 11:50 UTC (permalink / raw)
  To: Steve Twiss
  Cc: Fabio Estevam, Abel Vesa, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

> I bisected to the original breakage (for the NFS rootfs) back to this commit:
> commit 13d0ab6750b20957ac1466da4e44dc0af746ff28

I don't think that is the correct patch. Yes, it broke here, but that
was a different problem. 

I think the real commit is:
6d4cd041f0af ("net: phy: at803x: disable delay only for RGMII mode")

That commit contains a fix for broken behaviour in the PHY driver,
when then also causes broken DTs to fail.

	     Andrew

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-21 11:50               ` Andrew Lunn
  0 siblings, 0 replies; 35+ messages in thread
From: Andrew Lunn @ 2019-03-21 11:50 UTC (permalink / raw)
  To: Steve Twiss
  Cc: Mark Rutland, DEVICETREE, Abel Vesa, Fabio Estevam, Sascha Hauer,
	LKML, Rob Herring, dl-linux-imx, Pengutronix Kernel Team,
	Shawn Guo, LINUX-ARM-KERNEL, Support Opensource

> I bisected to the original breakage (for the NFS rootfs) back to this commit:
> commit 13d0ab6750b20957ac1466da4e44dc0af746ff28

I don't think that is the correct patch. Yes, it broke here, but that
was a different problem. 

I think the real commit is:
6d4cd041f0af ("net: phy: at803x: disable delay only for RGMII mode")

That commit contains a fix for broken behaviour in the PHY driver,
when then also causes broken DTs to fail.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-21 11:17           ` Fabio Estevam
@ 2019-03-21 12:43             ` Lucas Stach
  -1 siblings, 0 replies; 35+ messages in thread
From: Lucas Stach @ 2019-03-21 12:43 UTC (permalink / raw)
  To: Fabio Estevam, Abel Vesa
  Cc: Mark Rutland, Andrew Lunn, Support Opensource, DEVICETREE,
	Sascha Hauer, LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, Shawn Guo, LINUX-ARM-KERNEL

Am Donnerstag, den 21.03.2019, 08:17 -0300 schrieb Fabio Estevam:
> Hi Abel,
> 
> > On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:
> 
> > > It seems we have other boards that need to be fixed and we can not
> > > have an old dtb with functional Ethernet with a new kernel.
> > > 
> > > Does anyone know if this issue is AR8031 specific?
> > 
> > I can confirm the same fix is works on imx6sx too.
> 
> imx6sx-sabresd also uses an AR8031 Ethernet PHY.
> 
> I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
> on pico-imx7d with AR8035.
> 
> So yes, we currently have lots of broken dtb's in mainline and I am
> wondering what is the proper fix here.

Fix the DT. It's unfortunate the a kernel and DT bug canceled each
other out, but if the DT is clearly broken and fixing it in a backward
compatible way is not really feasible, I would argue that we should
treat a DT bug like any other bug.

Regards,
Lucas

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-21 12:43             ` Lucas Stach
  0 siblings, 0 replies; 35+ messages in thread
From: Lucas Stach @ 2019-03-21 12:43 UTC (permalink / raw)
  To: Fabio Estevam, Abel Vesa
  Cc: Mark Rutland, Andrew Lunn, Support Opensource, DEVICETREE,
	Sascha Hauer, LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, Shawn Guo, LINUX-ARM-KERNEL

Am Donnerstag, den 21.03.2019, 08:17 -0300 schrieb Fabio Estevam:
> Hi Abel,
> 
> > On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:
> 
> > > It seems we have other boards that need to be fixed and we can not
> > > have an old dtb with functional Ethernet with a new kernel.
> > > 
> > > Does anyone know if this issue is AR8031 specific?
> > 
> > I can confirm the same fix is works on imx6sx too.
> 
> imx6sx-sabresd also uses an AR8031 Ethernet PHY.
> 
> I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
> on pico-imx7d with AR8035.
> 
> So yes, we currently have lots of broken dtb's in mainline and I am
> wondering what is the proper fix here.

Fix the DT. It's unfortunate the a kernel and DT bug canceled each
other out, but if the DT is clearly broken and fixing it in a backward
compatible way is not really feasible, I would argue that we should
treat a DT bug like any other bug.

Regards,
Lucas

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-21 11:17           ` Fabio Estevam
@ 2019-03-22  1:11             ` Shawn Guo
  -1 siblings, 0 replies; 35+ messages in thread
From: Shawn Guo @ 2019-03-22  1:11 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Abel Vesa, Steve Twiss, Andrew Lunn, Rob Herring, Mark Rutland,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

On Thu, Mar 21, 2019 at 08:17:01AM -0300, Fabio Estevam wrote:
> Hi Abel,
> 
> On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:
> 
> > > It seems we have other boards that need to be fixed and we can not
> > > have an old dtb with functional Ethernet with a new kernel.
> > >
> > > Does anyone know if this issue is AR8031 specific?
> >
> > I can confirm the same fix is works on imx6sx too.
> 
> imx6sx-sabresd also uses an AR8031 Ethernet PHY.
> 
> I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
> on pico-imx7d with AR8035.
> 
> So yes, we currently have lots of broken dtb's in mainline and I am
> wondering what is the proper fix here.

So can we have a single patch fixing all broken i.MX DTBs?

Shawn

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-22  1:11             ` Shawn Guo
  0 siblings, 0 replies; 35+ messages in thread
From: Shawn Guo @ 2019-03-22  1:11 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Mark Rutland, Andrew Lunn, Abel Vesa, DEVICETREE, Sascha Hauer,
	LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, LINUX-ARM-KERNEL, Support Opensource

On Thu, Mar 21, 2019 at 08:17:01AM -0300, Fabio Estevam wrote:
> Hi Abel,
> 
> On Thu, Mar 21, 2019 at 5:42 AM Abel Vesa <abel.vesa@nxp.com> wrote:
> 
> > > It seems we have other boards that need to be fixed and we can not
> > > have an old dtb with functional Ethernet with a new kernel.
> > >
> > > Does anyone know if this issue is AR8031 specific?
> >
> > I can confirm the same fix is works on imx6sx too.
> 
> imx6sx-sabresd also uses an AR8031 Ethernet PHY.
> 
> I also tested that changing the phy-mode to "rgmii-id" fixes Ethernet
> on pico-imx7d with AR8035.
> 
> So yes, we currently have lots of broken dtb's in mainline and I am
> wondering what is the proper fix here.

So can we have a single patch fixing all broken i.MX DTBs?

Shawn

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-22  1:11             ` Shawn Guo
@ 2019-03-22  2:00               ` Fabio Estevam
  -1 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-22  2:00 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Abel Vesa, Steve Twiss, Andrew Lunn, Rob Herring, Mark Rutland,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

Hi Shawn,

On Thu, Mar 21, 2019 at 10:12 PM Shawn Guo <shawnguo@kernel.org> wrote:

> > So yes, we currently have lots of broken dtb's in mainline and I am
> > wondering what is the proper fix here.
>
> So can we have a single patch fixing all broken i.MX DTBs?

Unfortunately, just by looking at the dts files we do not know if a
board uses an AR803x PHY or not, so I am afraid we can not do an
automatic conversion.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-22  2:00               ` Fabio Estevam
  0 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-22  2:00 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Mark Rutland, Andrew Lunn, Abel Vesa, DEVICETREE, Sascha Hauer,
	LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, LINUX-ARM-KERNEL, Support Opensource

Hi Shawn,

On Thu, Mar 21, 2019 at 10:12 PM Shawn Guo <shawnguo@kernel.org> wrote:

> > So yes, we currently have lots of broken dtb's in mainline and I am
> > wondering what is the proper fix here.
>
> So can we have a single patch fixing all broken i.MX DTBs?

Unfortunately, just by looking at the dts files we do not know if a
board uses an AR803x PHY or not, so I am afraid we can not do an
automatic conversion.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-22  2:00               ` Fabio Estevam
@ 2019-03-22  2:15                 ` Shawn Guo
  -1 siblings, 0 replies; 35+ messages in thread
From: Shawn Guo @ 2019-03-22  2:15 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Abel Vesa, Steve Twiss, Andrew Lunn, Rob Herring, Mark Rutland,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

On Thu, Mar 21, 2019 at 11:00:18PM -0300, Fabio Estevam wrote:
> Hi Shawn,
> 
> On Thu, Mar 21, 2019 at 10:12 PM Shawn Guo <shawnguo@kernel.org> wrote:
> 
> > > So yes, we currently have lots of broken dtb's in mainline and I am
> > > wondering what is the proper fix here.
> >
> > So can we have a single patch fixing all broken i.MX DTBs?
> 
> Unfortunately, just by looking at the dts files we do not know if a
> board uses an AR803x PHY or not, so I am afraid we can not do an
> automatic conversion.

At least for those we already know?

Shawn

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-22  2:15                 ` Shawn Guo
  0 siblings, 0 replies; 35+ messages in thread
From: Shawn Guo @ 2019-03-22  2:15 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Mark Rutland, Andrew Lunn, Abel Vesa, DEVICETREE, Sascha Hauer,
	LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, LINUX-ARM-KERNEL, Support Opensource

On Thu, Mar 21, 2019 at 11:00:18PM -0300, Fabio Estevam wrote:
> Hi Shawn,
> 
> On Thu, Mar 21, 2019 at 10:12 PM Shawn Guo <shawnguo@kernel.org> wrote:
> 
> > > So yes, we currently have lots of broken dtb's in mainline and I am
> > > wondering what is the proper fix here.
> >
> > So can we have a single patch fixing all broken i.MX DTBs?
> 
> Unfortunately, just by looking at the dts files we do not know if a
> board uses an AR803x PHY or not, so I am afraid we can not do an
> automatic conversion.

At least for those we already know?

Shawn

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-22  2:15                 ` Shawn Guo
@ 2019-03-22  2:24                   ` Fabio Estevam
  -1 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-22  2:24 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Abel Vesa, Steve Twiss, Andrew Lunn, Rob Herring, Mark Rutland,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

On Thu, Mar 21, 2019 at 11:15 PM Shawn Guo <shawnguo@kernel.org> wrote:

> > Unfortunately, just by looking at the dts files we do not know if a
> > board uses an AR803x PHY or not, so I am afraid we can not do an
> > automatic conversion.
>
> At least for those we already know?

Yes, I can help preparing a patch that fixes the i.MX boards we know
use AR8031 PHY.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-22  2:24                   ` Fabio Estevam
  0 siblings, 0 replies; 35+ messages in thread
From: Fabio Estevam @ 2019-03-22  2:24 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Mark Rutland, Andrew Lunn, Abel Vesa, DEVICETREE, Sascha Hauer,
	LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, LINUX-ARM-KERNEL, Support Opensource

On Thu, Mar 21, 2019 at 11:15 PM Shawn Guo <shawnguo@kernel.org> wrote:

> > Unfortunately, just by looking at the dts files we do not know if a
> > board uses an AR803x PHY or not, so I am afraid we can not do an
> > automatic conversion.
>
> At least for those we already know?

Yes, I can help preparing a patch that fixes the i.MX boards we know
use AR8031 PHY.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-22  2:24                   ` Fabio Estevam
@ 2019-03-22 10:20                     ` Michal Vokáč
  -1 siblings, 0 replies; 35+ messages in thread
From: Michal Vokáč @ 2019-03-22 10:20 UTC (permalink / raw)
  To: Fabio Estevam, Shawn Guo
  Cc: Abel Vesa, Steve Twiss, Andrew Lunn, Rob Herring, Mark Rutland,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

On 22. 03. 19 3:24, Fabio Estevam wrote:
> On Thu, Mar 21, 2019 at 11:15 PM Shawn Guo <shawnguo@kernel.org> wrote:
> 
>>> Unfortunately, just by looking at the dts files we do not know if a
>>> board uses an AR803x PHY or not, so I am afraid we can not do an
>>> automatic conversion.
>>
>> At least for those we already know?
> 
> Yes, I can help preparing a patch that fixes the i.MX boards we know
> use AR8031 PHY.

AFACT this issue is not AR803x specific. I was hit by the same problem
with QCA833x switch on imx6dl-yapp4. Though, we are currently the only
platform in tree using this chip and Shawn already has the fix in his tree.

I am not aware of any other PHY drivers that my cause problems.

$ git log --oneline v5.0..v5.1-rc1 --grep=RGMII --author=Vinod -- drivers/net/
6d4cd041f0af net: phy: at803x: disable delay only for RGMII mode
a968b5e9d587 net: dsa: qca8k: Enable delay for RGMII_ID mode
5ecdd77c61c8 net: dsa: qca8k: disable delay for RGMII mode
cd28d1d6e52e net: phy: at803x: Disable phy delay for RGMII mode

Michal

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-22 10:20                     ` Michal Vokáč
  0 siblings, 0 replies; 35+ messages in thread
From: Michal Vokáč @ 2019-03-22 10:20 UTC (permalink / raw)
  To: Fabio Estevam, Shawn Guo
  Cc: Mark Rutland, Andrew Lunn, Abel Vesa, DEVICETREE, Sascha Hauer,
	LKML, Rob Herring, Steve Twiss, dl-linux-imx,
	Pengutronix Kernel Team, LINUX-ARM-KERNEL, Support Opensource

On 22. 03. 19 3:24, Fabio Estevam wrote:
> On Thu, Mar 21, 2019 at 11:15 PM Shawn Guo <shawnguo@kernel.org> wrote:
> 
>>> Unfortunately, just by looking at the dts files we do not know if a
>>> board uses an AR803x PHY or not, so I am afraid we can not do an
>>> automatic conversion.
>>
>> At least for those we already know?
> 
> Yes, I can help preparing a patch that fixes the i.MX boards we know
> use AR8031 PHY.

AFACT this issue is not AR803x specific. I was hit by the same problem
with QCA833x switch on imx6dl-yapp4. Though, we are currently the only
platform in tree using this chip and Shawn already has the fix in his tree.

I am not aware of any other PHY drivers that my cause problems.

$ git log --oneline v5.0..v5.1-rc1 --grep=RGMII --author=Vinod -- drivers/net/
6d4cd041f0af net: phy: at803x: disable delay only for RGMII mode
a968b5e9d587 net: dsa: qca8k: Enable delay for RGMII_ID mode
5ecdd77c61c8 net: dsa: qca8k: disable delay for RGMII mode
cd28d1d6e52e net: phy: at803x: Disable phy delay for RGMII mode

Michal

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

* RE: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-22 10:20                     ` Michal Vokáč
  (?)
@ 2019-03-22 10:50                       ` Steve Twiss
  -1 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-22 10:50 UTC (permalink / raw)
  To: Fabio Estevam, Shawn Guo, Michal Vokáč, Lucas Stach, Abel Vesa
  Cc: Andrew Lunn, Sascha Hauer, Rob Herring, Mark Rutland,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

Here are my thoughts. 

On 22 March 2019 10:21, Michal Vokáč wrote:

> Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> 
> On 22. 03. 19 3:24, Fabio Estevam wrote:
> > On Thu, Mar 21, 2019 at 11:15 PM Shawn Guo <shawnguo@kernel.org> wrote:
> >
> >>> Unfortunately, just by looking at the dts files we do not know if a
> >>> board uses an AR803x PHY or not, so I am afraid we can not do an
> >>> automatic conversion.
> >>
> >> At least for those we already know?
> >
> > Yes, I can help preparing a patch that fixes the i.MX boards we know
> > use AR8031 PHY.
> 
> AFACT this issue is not AR803x specific. I was hit by the same problem
> with QCA833x switch on imx6dl-yapp4. Though, we are currently the only
> platform in tree using this chip and Shawn already has the fix in his tree.
> 
> I am not aware of any other PHY drivers that my cause problems.
> 
> $ git log --oneline v5.0..v5.1-rc1 --grep=RGMII --author=Vinod -- drivers/net/
> 6d4cd041f0af net: phy: at803x: disable delay only for RGMII mode
> a968b5e9d587 net: dsa: qca8k: Enable delay for RGMII_ID mode
> 5ecdd77c61c8 net: dsa: qca8k: disable delay for RGMII mode
> cd28d1d6e52e net: phy: at803x: Disable phy delay for RGMII mode

If this is more widespread, as Michal points out, this might affect the way
the fix is approach then?

On 21 March 2019 12:43 Lucas Stach wrote:

> > So yes, we currently have lots of broken dtb's in mainline and I am
> > wondering what is the proper fix here.
[...]
> but if the DT is clearly broken and fixing it in a backward
> compatible way is not really feasible, I would argue that we should
> treat a DT bug like any other bug.

There is a way of doing this to preserve backwards compatibility I think.
Maybe deprecating the previous DTS phy-mode and replacing it with a new one,
phy-mode-v2 instead?

At the moment, there is only a weak link between DTS and the driver in the kernel
which  makes finding the error difficult. Also, it seems that partly, the direction of
change is caused by software which is pushing alterations in the DTS -- and not the
other way round.

Regards,
Steve

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

* RE: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-22 10:50                       ` Steve Twiss
  0 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-22 10:50 UTC (permalink / raw)
  To: Fabio Estevam, Shawn Guo, Michal Vokáč, Lucas Stach, Abel Vesa
  Cc: Andrew Lunn, Sascha Hauer, Rob Herring, Mark Rutland

Here are my thoughts. 

On 22 March 2019 10:21, Michal Vokáč wrote:

> Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> 
> On 22. 03. 19 3:24, Fabio Estevam wrote:
> > On Thu, Mar 21, 2019 at 11:15 PM Shawn Guo <shawnguo@kernel.org> wrote:
> >
> >>> Unfortunately, just by looking at the dts files we do not know if a
> >>> board uses an AR803x PHY or not, so I am afraid we can not do an
> >>> automatic conversion.
> >>
> >> At least for those we already know?
> >
> > Yes, I can help preparing a patch that fixes the i.MX boards we know
> > use AR8031 PHY.
> 
> AFACT this issue is not AR803x specific. I was hit by the same problem
> with QCA833x switch on imx6dl-yapp4. Though, we are currently the only
> platform in tree using this chip and Shawn already has the fix in his tree.
> 
> I am not aware of any other PHY drivers that my cause problems.
> 
> $ git log --oneline v5.0..v5.1-rc1 --grep=RGMII --author=Vinod -- drivers/net/
> 6d4cd041f0af net: phy: at803x: disable delay only for RGMII mode
> a968b5e9d587 net: dsa: qca8k: Enable delay for RGMII_ID mode
> 5ecdd77c61c8 net: dsa: qca8k: disable delay for RGMII mode
> cd28d1d6e52e net: phy: at803x: Disable phy delay for RGMII mode

If this is more widespread, as Michal points out, this might affect the way
the fix is approach then?

On 21 March 2019 12:43 Lucas Stach wrote:

> > So yes, we currently have lots of broken dtb's in mainline and I am
> > wondering what is the proper fix here.
[...]
> but if the DT is clearly broken and fixing it in a backward
> compatible way is not really feasible, I would argue that we should
> treat a DT bug like any other bug.

There is a way of doing this to preserve backwards compatibility I think.
Maybe deprecating the previous DTS phy-mode and replacing it with a new one,
phy-mode-v2 instead?

At the moment, there is only a weak link between DTS and the driver in the kernel
which  makes finding the error difficult. Also, it seems that partly, the direction of
change is caused by software which is pushing alterations in the DTS -- and not the
other way round.

Regards,
Steve

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

* RE: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-22 10:50                       ` Steve Twiss
  0 siblings, 0 replies; 35+ messages in thread
From: Steve Twiss @ 2019-03-22 10:50 UTC (permalink / raw)
  To: Fabio Estevam, Shawn Guo, Michal Vokáč, Lucas Stach, Abel Vesa
  Cc: Mark Rutland, Andrew Lunn, Support Opensource, DEVICETREE,
	Sascha Hauer, LKML, Rob Herring, dl-linux-imx,
	Pengutronix Kernel Team, LINUX-ARM-KERNEL

Here are my thoughts. 

On 22 March 2019 10:21, Michal Vokáč wrote:

> Subject: Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
> 
> On 22. 03. 19 3:24, Fabio Estevam wrote:
> > On Thu, Mar 21, 2019 at 11:15 PM Shawn Guo <shawnguo@kernel.org> wrote:
> >
> >>> Unfortunately, just by looking at the dts files we do not know if a
> >>> board uses an AR803x PHY or not, so I am afraid we can not do an
> >>> automatic conversion.
> >>
> >> At least for those we already know?
> >
> > Yes, I can help preparing a patch that fixes the i.MX boards we know
> > use AR8031 PHY.
> 
> AFACT this issue is not AR803x specific. I was hit by the same problem
> with QCA833x switch on imx6dl-yapp4. Though, we are currently the only
> platform in tree using this chip and Shawn already has the fix in his tree.
> 
> I am not aware of any other PHY drivers that my cause problems.
> 
> $ git log --oneline v5.0..v5.1-rc1 --grep=RGMII --author=Vinod -- drivers/net/
> 6d4cd041f0af net: phy: at803x: disable delay only for RGMII mode
> a968b5e9d587 net: dsa: qca8k: Enable delay for RGMII_ID mode
> 5ecdd77c61c8 net: dsa: qca8k: disable delay for RGMII mode
> cd28d1d6e52e net: phy: at803x: Disable phy delay for RGMII mode

If this is more widespread, as Michal points out, this might affect the way
the fix is approach then?

On 21 March 2019 12:43 Lucas Stach wrote:

> > So yes, we currently have lots of broken dtb's in mainline and I am
> > wondering what is the proper fix here.
[...]
> but if the DT is clearly broken and fixing it in a backward
> compatible way is not really feasible, I would argue that we should
> treat a DT bug like any other bug.

There is a way of doing this to preserve backwards compatibility I think.
Maybe deprecating the previous DTS phy-mode and replacing it with a new one,
phy-mode-v2 instead?

At the moment, there is only a weak link between DTS and the driver in the kernel
which  makes finding the error difficult. Also, it seems that partly, the direction of
change is caused by software which is pushing alterations in the DTS -- and not the
other way round.

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
  2019-03-22 10:50                       ` Steve Twiss
@ 2019-03-22 10:59                         ` Andrew Lunn
  -1 siblings, 0 replies; 35+ messages in thread
From: Andrew Lunn @ 2019-03-22 10:59 UTC (permalink / raw)
  To: Steve Twiss
  Cc: Fabio Estevam, Shawn Guo, Michal Vokáč,
	Lucas Stach, Abel Vesa, Sascha Hauer, Rob Herring, Mark Rutland,
	Pengutronix Kernel Team, dl-linux-imx, DEVICETREE,
	LINUX-ARM-KERNEL, LKML, Support Opensource

> There is a way of doing this to preserve backwards compatibility I think.
> Maybe deprecating the previous DTS phy-mode and replacing it with a new one,
> phy-mode-v2 instead?

Hi Steve

It needs to be a vendor specific property, atheros,phy-mode, for
example.

   Andrew

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

* Re: [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id
@ 2019-03-22 10:59                         ` Andrew Lunn
  0 siblings, 0 replies; 35+ messages in thread
From: Andrew Lunn @ 2019-03-22 10:59 UTC (permalink / raw)
  To: Steve Twiss
  Cc: Mark Rutland, DEVICETREE, Michal Vokáč,
	Abel Vesa, Support Opensource, Fabio Estevam, Sascha Hauer, LKML,
	Rob Herring, dl-linux-imx, Pengutronix Kernel Team, Shawn Guo,
	LINUX-ARM-KERNEL, Lucas Stach

> There is a way of doing this to preserve backwards compatibility I think.
> Maybe deprecating the previous DTS phy-mode and replacing it with a new one,
> phy-mode-v2 instead?

Hi Steve

It needs to be a vendor specific property, atheros,phy-mode, for
example.

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

end of thread, other threads:[~2019-03-22 11:00 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 11:03 [PATCH] ARM: dts: imx6qdl-sabresd: change phy-mode to use rgmii-id Steve Twiss
2019-03-20 11:03 ` Steve Twiss
2019-03-20 12:16 ` Fabio Estevam
2019-03-20 12:16   ` Fabio Estevam
2019-03-20 16:03   ` Steve Twiss
2019-03-20 16:03     ` Steve Twiss
2019-03-20 17:04     ` Fabio Estevam
2019-03-20 17:04       ` Fabio Estevam
2019-03-21  8:42       ` Abel Vesa
2019-03-21  8:42         ` Abel Vesa
2019-03-21 11:17         ` Fabio Estevam
2019-03-21 11:17           ` Fabio Estevam
2019-03-21 11:32           ` Steve Twiss
2019-03-21 11:32             ` Steve Twiss
2019-03-21 11:50             ` Andrew Lunn
2019-03-21 11:50               ` Andrew Lunn
2019-03-21 11:45           ` Andrew Lunn
2019-03-21 11:45             ` Andrew Lunn
2019-03-21 12:43           ` Lucas Stach
2019-03-21 12:43             ` Lucas Stach
2019-03-22  1:11           ` Shawn Guo
2019-03-22  1:11             ` Shawn Guo
2019-03-22  2:00             ` Fabio Estevam
2019-03-22  2:00               ` Fabio Estevam
2019-03-22  2:15               ` Shawn Guo
2019-03-22  2:15                 ` Shawn Guo
2019-03-22  2:24                 ` Fabio Estevam
2019-03-22  2:24                   ` Fabio Estevam
2019-03-22 10:20                   ` Michal Vokáč
2019-03-22 10:20                     ` Michal Vokáč
2019-03-22 10:50                     ` Steve Twiss
2019-03-22 10:50                       ` Steve Twiss
2019-03-22 10:50                       ` Steve Twiss
2019-03-22 10:59                       ` Andrew Lunn
2019-03-22 10:59                         ` Andrew Lunn

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.