Linux-Devicetree Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] arm64: dts: imx8mm-evk: add phy-reset-gpios for fec1
@ 2020-02-14 19:27 Alifer Moraes
  2020-02-14 19:27 ` [PATCH 2/2] arm64: dts: imx8mq-evk: " Alifer Moraes
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alifer Moraes @ 2020-02-14 19:27 UTC (permalink / raw)
  To: robh+dt
  Cc: mark.rutland, shawnguo, s.hauer, kernel, festevam, linux-imx,
	peng.fan, leonard.crestez, devicetree, linux-kernel,
	Alifer Moraes

imx8mm-evk has a GPIO connected to AR8031 Ethernet PHY's reset pin.

Describe it in the device tree, following phy's datasheet reset duration of 10ms.

Tested booting via NFS.

Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
---

Originally sent by Peng Fan <peng.fan@nxp.com>

Back then CONFIG_AT803X_PHY was set as "m" in defconfig so the boot process hung
at nfs boot, now that CONFIG_AT803X_PHY is set as "y" by default, the patch works
correctly.

Peng's original patch missed to pass the phy-reset-duration, according to the AR8031
datasheet the reset GPIO needs to stay low for 10ms.

Original thread: https://lkml.org/lkml/2019/10/21/347

 arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
index 28ab17a277bb..11903ca86f0e 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
@@ -82,6 +82,8 @@
 	pinctrl-0 = <&pinctrl_fec1>;
 	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy0>;
+	phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
+	phy-reset-duration = <10>;
 	fsl,magic-packet;
 	status = "okay";
 
-- 
2.17.1


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

* [PATCH 2/2] arm64: dts: imx8mq-evk: add phy-reset-gpios for fec1
  2020-02-14 19:27 [PATCH 1/2] arm64: dts: imx8mm-evk: add phy-reset-gpios for fec1 Alifer Moraes
@ 2020-02-14 19:27 ` " Alifer Moraes
  2020-02-17  8:21   ` Marco Felsch
  2020-02-19  1:16   ` Fabio Estevam
  2020-02-17  8:20 ` [PATCH 1/2] arm64: dts: imx8mm-evk: " Marco Felsch
  2020-02-19  1:15 ` Fabio Estevam
  2 siblings, 2 replies; 7+ messages in thread
From: Alifer Moraes @ 2020-02-14 19:27 UTC (permalink / raw)
  To: robh+dt
  Cc: mark.rutland, shawnguo, s.hauer, kernel, festevam, linux-imx,
	peng.fan, leonard.crestez, devicetree, linux-kernel,
	Alifer Moraes

imx8mq-evk has a GPIO connected to AR8031 Ethernet PHY's reset pin.

Describe it in the device tree, following phy's datasheet reset duration of 10ms.

Tested booting via NFS.

Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
---
 arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
index c36685916683..a49e2bf8afe5 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
@@ -110,6 +110,8 @@
 	pinctrl-0 = <&pinctrl_fec1>;
 	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy0>;
+	phy-reset-gpios = <&gpio1 9  GPIO_ACTIVE_LOW>;
+	phy-reset-duration = <10>;
 	fsl,magic-packet;
 	status = "okay";
 
-- 
2.17.1


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

* Re: [PATCH 1/2] arm64: dts: imx8mm-evk: add phy-reset-gpios for fec1
  2020-02-14 19:27 [PATCH 1/2] arm64: dts: imx8mm-evk: add phy-reset-gpios for fec1 Alifer Moraes
  2020-02-14 19:27 ` [PATCH 2/2] arm64: dts: imx8mq-evk: " Alifer Moraes
@ 2020-02-17  8:20 ` " Marco Felsch
  2020-02-18 13:02   ` Alifer Moraes
  2020-02-19  1:15 ` Fabio Estevam
  2 siblings, 1 reply; 7+ messages in thread
From: Marco Felsch @ 2020-02-17  8:20 UTC (permalink / raw)
  To: Alifer Moraes
  Cc: robh+dt, mark.rutland, devicetree, peng.fan, shawnguo, s.hauer,
	linux-kernel, linux-imx, kernel, leonard.crestez, festevam

Hi,

On 20-02-14 16:27, Alifer Moraes wrote:
> imx8mm-evk has a GPIO connected to AR8031 Ethernet PHY's reset pin.
> 
> Describe it in the device tree, following phy's datasheet reset duration of 10ms.
> 
> Tested booting via NFS.
> 
> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
> ---
> 
> Originally sent by Peng Fan <peng.fan@nxp.com>
> 
> Back then CONFIG_AT803X_PHY was set as "m" in defconfig so the boot process hung
> at nfs boot, now that CONFIG_AT803X_PHY is set as "y" by default, the patch works
> correctly.
> 
> Peng's original patch missed to pass the phy-reset-duration, according to the AR8031
> datasheet the reset GPIO needs to stay low for 10ms.
> 
> Original thread: https://lkml.org/lkml/2019/10/21/347
> 
>  arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> index 28ab17a277bb..11903ca86f0e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
> @@ -82,6 +82,8 @@
>  	pinctrl-0 = <&pinctrl_fec1>;
>  	phy-mode = "rgmii-id";
>  	phy-handle = <&ethphy0>;
> +	phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;

Where is this gpio muxed?

Regards,
  Marco

> +	phy-reset-duration = <10>;
>  	fsl,magic-packet;
>  	status = "okay";
>  
> -- 
> 2.17.1
> 
> 
> 

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

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

* Re: [PATCH 2/2] arm64: dts: imx8mq-evk: add phy-reset-gpios for fec1
  2020-02-14 19:27 ` [PATCH 2/2] arm64: dts: imx8mq-evk: " Alifer Moraes
@ 2020-02-17  8:21   ` Marco Felsch
  2020-02-19  1:16   ` Fabio Estevam
  1 sibling, 0 replies; 7+ messages in thread
From: Marco Felsch @ 2020-02-17  8:21 UTC (permalink / raw)
  To: Alifer Moraes
  Cc: robh+dt, mark.rutland, devicetree, peng.fan, shawnguo, s.hauer,
	linux-kernel, linux-imx, kernel, leonard.crestez, festevam

Hi Alifer,

On 20-02-14 16:27, Alifer Moraes wrote:
> imx8mq-evk has a GPIO connected to AR8031 Ethernet PHY's reset pin.
> 
> Describe it in the device tree, following phy's datasheet reset duration of 10ms.
> 
> Tested booting via NFS.
> 
> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
> ---
>  arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> index c36685916683..a49e2bf8afe5 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
> @@ -110,6 +110,8 @@
>  	pinctrl-0 = <&pinctrl_fec1>;
>  	phy-mode = "rgmii-id";
>  	phy-handle = <&ethphy0>;
> +	phy-reset-gpios = <&gpio1 9  GPIO_ACTIVE_LOW>;

Same here.

Regards,
  Marco

> +	phy-reset-duration = <10>;
>  	fsl,magic-packet;
>  	status = "okay";
>  
> -- 
> 2.17.1
> 
> 
> 

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

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

* Re: [PATCH 1/2] arm64: dts: imx8mm-evk: add phy-reset-gpios for fec1
  2020-02-17  8:20 ` [PATCH 1/2] arm64: dts: imx8mm-evk: " Marco Felsch
@ 2020-02-18 13:02   ` Alifer Moraes
  0 siblings, 0 replies; 7+ messages in thread
From: Alifer Moraes @ 2020-02-18 13:02 UTC (permalink / raw)
  To: Marco Felsch
  Cc: robh+dt, mark.rutland, devicetree, peng.fan, shawnguo, s.hauer,
	linux-kernel, linux-imx, kernel, leonard.crestez, Fabio Estevam

Hello,

I forgot to select reply all in this question, so I answered only to Marco.

> Where is this gpio muxed?
>

The gpio is muxed in the subnode pinctrl_fec1.

Regards,

Alifer

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

* Re: [PATCH 1/2] arm64: dts: imx8mm-evk: add phy-reset-gpios for fec1
  2020-02-14 19:27 [PATCH 1/2] arm64: dts: imx8mm-evk: add phy-reset-gpios for fec1 Alifer Moraes
  2020-02-14 19:27 ` [PATCH 2/2] arm64: dts: imx8mq-evk: " Alifer Moraes
  2020-02-17  8:20 ` [PATCH 1/2] arm64: dts: imx8mm-evk: " Marco Felsch
@ 2020-02-19  1:15 ` Fabio Estevam
  2 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2020-02-19  1:15 UTC (permalink / raw)
  To: Alifer Moraes
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer, Sascha Hauer,
	NXP Linux Team, Peng Fan, Leonard Crestez,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

On Fri, Feb 14, 2020 at 4:27 PM Alifer Moraes <alifer.wsdm@gmail.com> wrote:
>
> imx8mm-evk has a GPIO connected to AR8031 Ethernet PHY's reset pin.
>
> Describe it in the device tree, following phy's datasheet reset duration of 10ms.
>
> Tested booting via NFS.
>
> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

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

* Re: [PATCH 2/2] arm64: dts: imx8mq-evk: add phy-reset-gpios for fec1
  2020-02-14 19:27 ` [PATCH 2/2] arm64: dts: imx8mq-evk: " Alifer Moraes
  2020-02-17  8:21   ` Marco Felsch
@ 2020-02-19  1:16   ` Fabio Estevam
  1 sibling, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2020-02-19  1:16 UTC (permalink / raw)
  To: Alifer Moraes
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer, Sascha Hauer,
	NXP Linux Team, Peng Fan, Leonard Crestez,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

On Fri, Feb 14, 2020 at 4:27 PM Alifer Moraes <alifer.wsdm@gmail.com> wrote:
>
> imx8mq-evk has a GPIO connected to AR8031 Ethernet PHY's reset pin.
>
> Describe it in the device tree, following phy's datasheet reset duration of 10ms.
>
> Tested booting via NFS.
>
> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 19:27 [PATCH 1/2] arm64: dts: imx8mm-evk: add phy-reset-gpios for fec1 Alifer Moraes
2020-02-14 19:27 ` [PATCH 2/2] arm64: dts: imx8mq-evk: " Alifer Moraes
2020-02-17  8:21   ` Marco Felsch
2020-02-19  1:16   ` Fabio Estevam
2020-02-17  8:20 ` [PATCH 1/2] arm64: dts: imx8mm-evk: " Marco Felsch
2020-02-18 13:02   ` Alifer Moraes
2020-02-19  1:15 ` Fabio Estevam

Linux-Devicetree Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-devicetree/0 linux-devicetree/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-devicetree linux-devicetree/ https://lore.kernel.org/linux-devicetree \
		devicetree@vger.kernel.org
	public-inbox-index linux-devicetree

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-devicetree


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git